Convert lock.sh from tabs to spaces

This commit is contained in:
Adam Goldsmith 2017-11-03 03:27:33 -04:00
parent 81433c59c2
commit 24370abb5d
1 changed files with 28 additions and 28 deletions

View File

@ -1,11 +1,11 @@
#!/bin/bash
lock() {
killall -SIGHUP gpg-agent
setxkbmap -option 'ctrl:nocaps' -option "shift:both_capslock"
killall -SIGHUP gpg-agent
setxkbmap -option 'ctrl:nocaps' -option "shift:both_capslock"
# 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 \
--ringcolor=333333ff --line-uses-ring --insidecolor=00000000 \
--insidewrongcolor=00000000 --insidevercolor=00000000 \
@ -15,8 +15,8 @@ lock() {
}
case "$1" in
lock)
lock
lock)
lock
# if given an argument, turn off the screen after that many seconds
if [[ $2 && ${2-x} ]]
@ -24,29 +24,29 @@ case "$1" in
sleep $2
xset dpms force off
fi
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
pick)
$0 $(echo -e "lock\nlogout\nsuspend\nhibernate\nreboot\nshutdown" | rofi -dmenu -i)
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown|pick}"
exit 2
;;
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
pick)
$0 $(echo -e "lock\nlogout\nsuspend\nhibernate\nreboot\nshutdown" | rofi -dmenu -i)
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown|pick}"
exit 2
;;
esac
exit 0