Add my own version of i3-scrot and i3-exit

This commit is contained in:
cizordj
2021-01-15 17:19:43 -03:00
parent c7e5cd6cff
commit 786493fbda
2 changed files with 75 additions and 0 deletions
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
lock(){
screenshot="/tmp/qI5MkdEu.png"
screenshotblur="/tmp/Vur4EooC.png"
import -window root "$screenshot"
convert "$screenshot" -blur 0x5 "$screenshotblur"
rm "$screenshot"
i3lock -i "$screenshotblur"
xset dpms force off
}
case "$1" in
lock)
lock ;;
logout)
i3-msg exit ;;
reboot)
systemctl reboot ;;
shutdown)
systemctl poweroff ;;
esac
Executable
+53
View File
@@ -0,0 +1,53 @@
#!/bin/sh
initialize(){
cd "$(xdg-user-dir PICTURES)"
}
notify(){
notify-send "The screenshot has been made"
exit 0
}
desk(){
initialize
scrot
notify
}
select(){
initialize
notify-send "Select an area for the screenshot"
sleep 0.5
scrot -s && end || exit 0
}
window(){
initialize
scrot -u
notify
}
help(){
cat << EOF
Options:
-h| --help Show this message
-d| --desk Fullscreen screenshot
-w| --window Active window only
-s| --select Select an area
EOF
exit 0
}
case "$1" in
-d | --desk)
desk
;;
-s | --select)
select
;;
-w | --window)
window
;;
-h | --help)
help
;;
*)
help
;;
esac