From dff66cd1efb36afd54dd6dcf2fdaa9475d5646c1 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 14 Apr 2020 22:10:38 -0400 Subject: [PATCH] sysact added --- .local/bin/sysact | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .local/bin/sysact diff --git a/.local/bin/sysact b/.local/bin/sysact new file mode 100755 index 0000000..6bf1a56 --- /dev/null +++ b/.local/bin/sysact @@ -0,0 +1,15 @@ +#!/bin/sh + +# A dmenu wrapper script for system functions. + +cmds="\ +lock screen slock +leave dwm kill -TERM $(pidof -s dwm) +refresh dwm kill -HUP $(pidof -s dwm) +reboot sudo -A reboot +shutdown sudo -A shutdown -h now +" + +choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" + +`echo "$cmds" | grep "^$choice " | cut -d ' ' -f2`