Convert lock.sh from tabs to spaces
This commit is contained in:
parent
81433c59c2
commit
24370abb5d
@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
lock() {
|
lock() {
|
||||||
killall -SIGHUP gpg-agent
|
killall -SIGHUP gpg-agent
|
||||||
setxkbmap -option 'ctrl:nocaps' -option "shift:both_capslock"
|
setxkbmap -option 'ctrl:nocaps' -option "shift:both_capslock"
|
||||||
|
|
||||||
# needs i3lock-color
|
# needs i3lock-color
|
||||||
i3lock --ignore-empty-password --clock --indicator -f --color=222222 \
|
i3lock --ignore-empty-password --clock --indicator -f --color=222222 \
|
||||||
--textcolor=eeeeeeee --timecolor=eeeeeeee --datecolor=cccccccc \
|
--textcolor=eeeeeeee --timecolor=eeeeeeee --datecolor=cccccccc \
|
||||||
--ringcolor=333333ff --line-uses-ring --insidecolor=00000000 \
|
--ringcolor=333333ff --line-uses-ring --insidecolor=00000000 \
|
||||||
--insidewrongcolor=00000000 --insidevercolor=00000000 \
|
--insidewrongcolor=00000000 --insidevercolor=00000000 \
|
||||||
@ -15,8 +15,8 @@ lock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
lock)
|
lock)
|
||||||
lock
|
lock
|
||||||
|
|
||||||
# if given an argument, turn off the screen after that many seconds
|
# if given an argument, turn off the screen after that many seconds
|
||||||
if [[ $2 && ${2-x} ]]
|
if [[ $2 && ${2-x} ]]
|
||||||
@ -24,29 +24,29 @@ case "$1" in
|
|||||||
sleep $2
|
sleep $2
|
||||||
xset dpms force off
|
xset dpms force off
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
logout)
|
logout)
|
||||||
i3-msg exit
|
i3-msg exit
|
||||||
;;
|
;;
|
||||||
suspend)
|
suspend)
|
||||||
lock && systemctl suspend
|
lock && systemctl suspend
|
||||||
;;
|
;;
|
||||||
hibernate)
|
hibernate)
|
||||||
lock && systemctl hibernate
|
lock && systemctl hibernate
|
||||||
;;
|
;;
|
||||||
reboot)
|
reboot)
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
;;
|
;;
|
||||||
shutdown)
|
shutdown)
|
||||||
systemctl poweroff
|
systemctl poweroff
|
||||||
;;
|
;;
|
||||||
pick)
|
pick)
|
||||||
$0 $(echo -e "lock\nlogout\nsuspend\nhibernate\nreboot\nshutdown" | rofi -dmenu -i)
|
$0 $(echo -e "lock\nlogout\nsuspend\nhibernate\nreboot\nshutdown" | rofi -dmenu -i)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown|pick}"
|
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown|pick}"
|
||||||
exit 2
|
exit 2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user