Write a script for shutdown options
This commit is contained in:
parent
3d97448fee
commit
c0465ec22d
2 changed files with 20 additions and 2 deletions
18
.local/bin/leave
Executable file
18
.local/bin/leave
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#! /usr/bin/sh
|
||||
|
||||
listopts() {
|
||||
echo "⏼ Shut down"
|
||||
echo "⟲ Reboot"
|
||||
echo "🚪 Log out"
|
||||
}
|
||||
|
||||
option=$(listopts | fuzzel --dmenu)
|
||||
|
||||
case "${option}" in
|
||||
"⏼ Shut down")
|
||||
systemctl poweroff;;
|
||||
"⟲ Reboot")
|
||||
systemctl reboot;;
|
||||
"🚪 Log out")
|
||||
swaymsg exit;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue