Change the lockscreen-toggle script location.
Add right-click to lockscreen polybar element
This commit is contained in:
parent
bfd2f1a4b6
commit
81cbe1bcfb
@ -517,9 +517,11 @@
|
||||
type = custom/script
|
||||
|
||||
format-underline = ${colors.background}
|
||||
click-left = ~/scripts/lockscreen-toggle.sh
|
||||
click-left = ~/.config/polybar/scripts/lockscreen-toggle.sh
|
||||
click-right = ~/scripts/lockscreen.sh
|
||||
format = <label>
|
||||
exec = ~/.config/polybar/scripts/lockscreen-status.sh
|
||||
|
||||
interval = 2
|
||||
#+END_SRC
|
||||
|
||||
@ -538,6 +540,24 @@
|
||||
fi
|
||||
#+END_SRC
|
||||
|
||||
** Toggle Automatic Lock Screen
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/lockscreen-toggle.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
if pgrep -x "xautolock" >/dev/null
|
||||
then
|
||||
pkill xautolock;
|
||||
dunstify --replace=13602 'Lock Screen' 'Desactivated'
|
||||
else
|
||||
xautolock -locker "~/scripts/lockscreen.sh" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
dunstify --replace=13602 'Lock Screen' 'Activated'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
* Weather
|
||||
https://github.com/x70b1/polybar-scripts/tree/master/polybar-scripts/openweathermap-fullfeatured
|
||||
|
@ -83,24 +83,6 @@ Finally, lock the screen using =i3lock=.
|
||||
revert
|
||||
#+end_src
|
||||
|
||||
* Toggle Automatic Lock Screen
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/scripts/lockscreen-toggle.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
if pgrep -x "xautolock" >/dev/null
|
||||
then
|
||||
pkill xautolock;
|
||||
dunstify --replace=13602 'Lock Screen' 'Desactivated'
|
||||
else
|
||||
xautolock -locker "~/scripts/lockscreen.sh" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
dunstify --replace=13602 'Lock Screen' 'Activated'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
* Delete first page of PDF
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/scripts/pdf-delete-first-page.sh
|
||||
|
Loading…
Reference in New Issue
Block a user