summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-06-28 00:56:10 +0200
committerMike Vink <mike1994vink@gmail.com>2023-06-28 00:56:10 +0200
commitf1e83ddd51b43c8eaa3def75794e2e403c9845ec (patch)
tree9514792ca266ee9c594e92abd266413e43005ff7
parent3ff163f82355aba1cbd60332309209bbe5cd92c9 (diff)
sysact
-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