commit a43765c1af2489d14c41ed9fe3ebe0f2f5c649db parent d5b26532531140aa0f3c4c48dbe9f57bab110441 Author: Markus Hanetzok <markus@hanetzok.net> Date: Sun, 1 Dec 2024 00:46:02 +0100 add sysact script and edit sxhkdrc Diffstat:
M | .config/sxhkd/sxhkdrc | | | 8 | ++++++++ |
A | .local/bin/sysact.sh | | | 14 | ++++++++++++++ |
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -3,6 +3,12 @@ super + BackSpace sysact.sh # pulseaudio +super + minus + pamixer -d 5 +super + equal + pamixer -i 5 +super + shift + m + pamixer -t XF86AudioLowerVolume pamixer -d 5 XF86AudioRaiseVolume @@ -13,6 +19,8 @@ XF86AudioMute # mpd/mpc XF86AudioPlay mpc toggle +super + shift + p + mpc toggle super + period mpc next super + comma diff --git a/.local/bin/sysact.sh b/.local/bin/sysact.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +dwmpid() { + tree="$(pstree -ps $$)" + tree="${tree#*dwm(}" + echo "${tree%%)*}" +} +case "$(printf "lock\nshutdown\nreboot\nrefresh" | dmenu -i -p 'Action: ')" in + 'lock') slock ;; + 'shutdown') systemctl poweroff -i ;; + 'reboot') systemctl reboot -i ;; + 'refresh') kill -HUP "$(dwmpid)" ;; + *) exit 1 ;; +esac