initial commit
This commit is contained in:
19
files/configs/misc-scripts/blurlock
Executable file
19
files/configs/misc-scripts/blurlock
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# /usr/bin/blurlock
|
||||
|
||||
# take screenshot
|
||||
scrot /tmp/screenshot.png
|
||||
|
||||
# blur it
|
||||
convert /tmp/screenshot.png -blur 0x12 /tmp/screenshotblur.png
|
||||
rm /tmp/screenshot.png
|
||||
|
||||
# lock the screen
|
||||
i3lock -i /tmp/screenshotblur.png
|
||||
|
||||
# sleep 1 adds a small delay to prevent possible race conditions with suspend
|
||||
sleep 1
|
||||
|
||||
xset dpms force off
|
||||
|
||||
exit 0
|
||||
32
files/configs/misc-scripts/i3exit
Executable file
32
files/configs/misc-scripts/i3exit
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# /usr/bin/i3exit
|
||||
|
||||
case "$1" in
|
||||
lock)
|
||||
blurlock
|
||||
;;
|
||||
logout)
|
||||
i3-msg exit
|
||||
;;
|
||||
switch_user)
|
||||
dm-tool switch-to-greeter
|
||||
;;
|
||||
suspend)
|
||||
blurlock && systemctl suspend
|
||||
;;
|
||||
hibernate)
|
||||
blurlock && systemctl hibernate
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
echo "== ! i3exit: missing or invalid argument ! =="
|
||||
echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user