From f1e83ddd51b43c8eaa3def75794e2e403c9845ec Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Wed, 28 Jun 2023 00:56:10 +0200 Subject: sysact --- shell-scripts/sysact | 9 ++------- 1 file 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 -- cgit v1.2.3