Added script for screen-locking

This commit is contained in:
Lucien Cartier-Tilet 2020-04-09 15:15:34 +02:00
parent 97b5e068e5
commit 4bd6dae117
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 19 additions and 1 deletions

View File

@ -22,6 +22,7 @@
- [[#dart-language-server][Dart Language Server]]
- [[#dmenu][Dmenu]]
- [[#emoji-picker][Emoji picker]]
- [[#lock][Lock]]
- [[#lsl][Lsl]]
- [[#mp42webm][mp42webm]]
- [[#polybar-launch][Polybar-launch]]
@ -350,6 +351,23 @@
It is inspired from [[https://www.youtube.com/watch?v=UCEXY46t3OA][this video]] from [[https://lukesmith.xyz/][Luke Smith]], rewritten in Fish.
* Lock
:PROPERTIES:
:CUSTOM_ID: h-320c559f-b8a3-4ce2-956c-90987b4c224c
:HEADER-ARGS: :tangle ~/.local/bin/lock
:END:
~lock~ is a simple script that locks the screen with ~i3lock~ while setting as
the background image of the locked screen a corrupted screenshot of the screen
before it was locked.
#+BEGIN_SRC fish
#!/usr/bin/fish
set TMPBG /tmp/screen.png
scrot $TMPBG
corrupter -add 0 $TMPBG $TMPBG
i3lock -t -e -f -i $TMPBG
rm $TMPBG
#+END_SRC
* Lsl
:PROPERTIES:
:HEADER-ARGS: :tangle ~/.local/bin/lsl

View File

@ -915,7 +915,7 @@
|--------------------+-------------------------------------------+----------------------------------------|
| no | /usr/lib/xfce-polkit/xfce-polkit | Launch the XFCE Polkit |
| no | picom --experimental-backends -e 1 | Launch picom |
| no | xss-lock -- i3lock -fol | Launch power management |
| no | xss-lock -- lock | Launch power management |
| no | numlockx on | Activate NumLock |
| no | dunst -config ~/.config/dunst/dunstrc | Launch notification manager |
| no | nm-applet | NetworkManager system tray |