openrc fixes
This commit is contained in:
parent
87dda7cdc3
commit
f08f4b0b7f
1 changed files with 5 additions and 3 deletions
|
@ -2,8 +2,10 @@
|
|||
|
||||
# A dmenu wrapper script for system functions.
|
||||
|
||||
# For non-systemd init systems.
|
||||
case "$(readlink -f /sbin/init)" in
|
||||
*runit-init) hib="sudo -A zzz" ;;
|
||||
*runit*) hib="sudo -A zzz" ;;
|
||||
*openrc*) reb="sudo -A openrc-shutdown -r"; shut="sudo -A openrc-shutdown -p" ;;
|
||||
esac
|
||||
|
||||
cmds="\
|
||||
|
@ -11,8 +13,8 @@ cmds="\
|
|||
🚪 leave dwm kill -TERM $(pidof -s dwm)
|
||||
♻ renew dwm kill -HUP $(pidof -s dwm)
|
||||
🐻 hibernate ${hib:-sudo -A systemctl suspend-then-hibernate}
|
||||
🔃 reboot sudo -A reboot
|
||||
🖥 shutdown sudo -A shutdown -h now"
|
||||
🔃 reboot ${reb:-sudo -A reboot}
|
||||
🖥 shutdown ${shut:-sudo -A shutdown -h now}"
|
||||
|
||||
choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue