You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
565 B
Plaintext
40 lines
565 B
Plaintext
10 months ago
|
#!/bin/sh
|
||
|
lock() {
|
||
|
i3lock
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
lock)
|
||
|
if [ "$XDG_CURRENT_DESKTOP" == "i3" ]
|
||
|
then
|
||
|
i3lock
|
||
|
else
|
||
|
xflock4
|
||
|
fi
|
||
|
;;
|
||
|
logout)
|
||
|
if [ "$XDG_CURRENT_DESKTOP" == "i3" ]
|
||
|
then
|
||
|
i3-msg exit
|
||
|
else
|
||
|
xfce4-session-logout --logout
|
||
|
fi
|
||
|
;;
|
||
|
hibernate)
|
||
|
xfce4-session-logout --hibernate
|
||
|
;;
|
||
|
suspend)
|
||
|
xfce4-session-logout --suspend
|
||
|
;;
|
||
|
reboot)
|
||
|
xfce4-session-logout --reboot
|
||
|
;;
|
||
|
shutdown)
|
||
|
xfce4-session-logout --halt
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {lock|logout|hibernate|suspend|reboot|shutdown}"
|
||
|
exit 2
|
||
|
esac
|
||
|
exit 0
|