summaryrefslogtreecommitdiff
path: root/shell-scripts/sysact
diff options
context:
space:
mode:
Diffstat (limited to 'shell-scripts/sysact')
-rwxr-xr-xshell-scripts/sysact21
1 files changed, 0 insertions, 21 deletions
diff --git a/shell-scripts/sysact b/shell-scripts/sysact
deleted file mode 100755
index 4bb92dc..0000000
--- a/shell-scripts/sysact
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# A dmenu wrapper script for system functions.
-export WM="dwm"
-ctl='systemctl'
-
-wmpid(){ # This function is needed if there are multiple instances of the window manager.
- 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
- '🔒 lock') slock ;;
- "🚪 leave $WM") kill -TERM "$(wmpid)" ;;
- "♻️ renew $WM") kill -HUP "$(wmpid)" ;;
- '🐻 hibernate') slock $ctl hibernate -i ;;
- '💤 sleep') slock $ctl suspend -i ;;
- '🔃 reboot') $ctl reboot -i ;;
- '🖥️shutdown') $ctl poweroff -i ;;
- '📺 display off') xset dpms force off ;;
- *) exit 1 ;;
-esac