mirror of
https://github.com/cizordj/i3-themer.git
synced 2024-04-21 12:32:12 +00:00
Add my own version of i3-scrot and i3-exit
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user