mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
this change removes the incorrect white space char next to `shutdown` and `renew` and replaces it with a regular white space char. I'm not sure if others experience this, but I get a box character next to `shutdown` and `renew`. When I open this in my code editor and switch the font to Liberation Mono, the same box char appears. You likely don't experience this issue if you did not change your font to liberation mono. My theory is that it's a char that doesn't render the same in Liberation Mono as it does in Luke's default font.
19 lines
672 B
Bash
Executable File
19 lines
672 B
Bash
Executable File
#!/bin/sh
|
|
# A dmenu wrapper script for system functions.
|
|
case "$(readlink -f /sbin/init)" in
|
|
*systemd*) ctl='systemctl' ;;
|
|
*) ctl='loginctl' ;;
|
|
esac
|
|
|
|
case "$(printf "🔒 lock\n🚪 leave dwm\n♻ renew dwm\n🐻 hibernate\n💤 sleep\n🔃 reboot\n🖥 shutdown\n📺 display off" | dmenu -i -p 'Action: ')" in
|
|
'🔒 lock') slock ;;
|
|
'🚪 leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;;
|
|
'♻ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;;
|
|
'🐻 hibernate') slock $ctl hibernate ;;
|
|
'💤 sleep') slock $ctl suspend ;;
|
|
'🔃 reboot') $ctl reboot ;;
|
|
'🖥 shutdown') $ctl poweroff ;;
|
|
'📺 display off') xset dpms force off ;;
|
|
*) exit 1 ;;
|
|
esac
|