summaryrefslogtreecommitdiff
path: root/shell-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'shell-scripts')
-rwxr-xr-xshell-scripts/sysact9
1 files changed, 2 insertions, 7 deletions
diff --git a/shell-scripts/sysact b/shell-scripts/sysact
index 64c2f32..4bb92dc 100755
--- a/shell-scripts/sysact
+++ b/shell-scripts/sysact
@@ -2,15 +2,10 @@
# A dmenu wrapper script for system functions.
export WM="dwm"
-case "$(readlink -f /sbin/init)" in
- *systemd*) ctl='systemctl' ;;
- *) ctl='loginctl' ;;
-esac
+ctl='systemctl'
wmpid(){ # This function is needed if there are multiple instances of the window manager.
- tree="$(pstree -ps $$)"
- tree="${tree#*$WM(}"
- echo "${tree%%)*}"
+ echo "$(pidof dwm)"
}
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in