From 7812ece28f0154a410607985ec7fd572c4a27236 Mon Sep 17 00:00:00 2001 From: Daniel Sissom Date: Tue, 14 Jul 2020 16:26:03 -0500 Subject: [PATCH] Updated keybinding and status bar for jack microphone mute toggle. --- bspwm/panel/panel | 1 + bspwm/panel/panel_bar | 6 +++++- sxhkd/sxhkdrc | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bspwm/panel/panel b/bspwm/panel/panel index b477cda..29e1fc4 100755 --- a/bspwm/panel/panel +++ b/bspwm/panel/panel @@ -17,6 +17,7 @@ bspc config top_padding $PANEL_HEIGHT xtitle -sf 'T%s\n' | sed -u 's/^\(.................................................\).*\(..........................\)/\1...\2/' > "$PANEL_FIFO" & bspc subscribe report > "$PANEL_FIFO" & tick > "$PANEL_FIFO" & +while true; do [ -f /tmp/djsissom-jackmute ] && echo 'M' > "$PANEL_FIFO" || echo 'M' > "$PANEL_FIFO"; sleep 0.1; done & ~/.config/bspwm/panel/panel_bar < "$PANEL_FIFO" | lemonbar -n "$PANEL_WM_NAME" -g "x$PANEL_HEIGHT" -a 20 -B "#BF000000" -F "#FF9A875F" -f "$PANEL_FONT" -f "$PANEL_FONT2" -f "$PANEL_FONT3" | sh & diff --git a/bspwm/panel/panel_bar b/bspwm/panel/panel_bar index 10ddcf1..d396106 100755 --- a/bspwm/panel/panel_bar +++ b/bspwm/panel/panel_bar @@ -12,6 +12,10 @@ while read -r line ; do # xtitle output title="%{F-}${line#?}%{F-}" ;; + M*) + # mic mute output + mic="%{F-}${line#?}%{F-}" + ;; W*) # bspwm state wm_infos="" @@ -69,5 +73,5 @@ while read -r line ; do wm_infos="$wm_infos%{F-} %{F-}" ;; esac - printf "%s\n" "%{S+}%{l}%{A:sysmenu:}  %{A}$title%{c}$wm_infos%{r}%{A:togglecal:}$sys_infos%{A} %{A:powermenu:}⏻%{A} " + printf "%s\n" "%{S+}%{l}%{A:sysmenu:}  %{A}$title%{c}$wm_infos%{r}$mic %{A:togglecal:}$sys_infos%{A} %{A:powermenu:}⏻%{A} " done diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 3ec7440..8ef6d51 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -25,7 +25,8 @@ alt + Escape # exit bspwm super + alt + Escape - pkill -x panel; bspc quit + xlogout +# pkill -x panel; bspc quit # close the current window alt + w @@ -285,7 +286,8 @@ XF86AudioLowerVolume amixer set Speaker 1%- XF86AudioMute - amixer set PCM toggle + togglemute + #amixer set PCM toggle #amixer set Speaker toggle # take a screenshot