about summary refs log tree commit diff
path: root/pos-dyntercomms.sh
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2024-10-14 20:11:09 -0400
committerZach DeCook <zachdecook@librem.one>2024-10-14 20:11:09 -0400
commit69dedb1a59fe6f24e8d278c1c410ee42727c9d97 (patch)
tree621a14e0c05e50b368ed803769f7c58089e6b716 /pos-dyntercomms.sh
parent94f4c3d2ab90dd752eb0a86faf509b986fb6735a (diff)
downloadpos-dyntercomms-69dedb1a59fe6f24e8d278c1c410ee42727c9d97.tar.gz
improve watch
Diffstat (limited to 'pos-dyntercomms.sh')
-rwxr-xr-xpos-dyntercomms.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/pos-dyntercomms.sh b/pos-dyntercomms.sh
index 2110bd3..187912f 100755
--- a/pos-dyntercomms.sh
+++ b/pos-dyntercomms.sh
@@ -137,19 +137,11 @@ case "$activewmclass" in
 			;;
 		*micro*)
 			#Micro
+			c="'Prior','Next','<alt>Comma','<alt>Period','<ctrl>s','<ctrl>q','<ctrl>f','<ctrl>p','<ctrl>n','<ctrl>e','<ctrl>c','<ctrl>v'"
 			CHOICES="
-				$icon_aru Scroll up       ^ 1 ^ sxmo_type -k Prior
-				$icon_ard Scroll down     ^ 1 ^ sxmo_type -k Next
+
 				$icon_prv Previous Tab    ^ 1 ^ sxmo_type -M Alt , -m Alt
 				$icon_nxt Next Tab        ^ 1 ^ sxmo_type -M Alt . -m Alt
-				$icon_sav Save            ^ 1 ^ sxmo_type -M Ctrl s -m Ctrl
-				$icon_cls Quit            ^ 0 ^ sxmo_type -M Ctrl q -m Ctrl
-				$icon_fnd Find            ^ 0 ^ sxmo_type -M Ctrl f -m Ctrl
-				$icon_fnd Find Previous   ^ 1 ^ sxmo_type -M Ctrl p -m Ctrl
-				$icon_fnd Find Next       ^ 1 ^ sxmo_type -M Ctrl n -m Ctrl
-				$icon_trm Command Bar     ^ 0 ^ sxmo_type -M Ctrl e -m Ctrl
-				$icon_cpy Copy            ^ 0 ^ sxmo_type -M Ctrl c -m Ctrl
-				$icon_pst Paste           ^ 0 ^ sxmo_type -M Ctrl v -m Ctrl
 				$icon_mnu Terminal menu   ^ 0 ^ sxmo_appmenu.sh $WMCLASS
 			"
 			WINNAME=Micro
@@ -209,6 +201,7 @@ case "$activewmclass" in
 			;;
 		*aerc*)
 			#aerc
+			c="'<shift>a','<ctrl>n'"
 			CHOICES="
 				$icon_pau Archive	  ^ 1 ^ sxmo_type ':archive flat' -k Return
 				$icon_nxt Next Tab	  ^ 0 ^ sxmo_type ':next-tab' -k Return
@@ -666,7 +659,12 @@ gsettings set sm.puri.phosh.osk.Terminal shortcuts "[$c]"
 }
 
 if test "$1" = "--watch"; then
-	socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" |grep 'activewindow>>' | while read -r line; do setComms; done
+	socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" |stdbuf -o0 grep 'activewindow>>' | while read -r line;
+	do
+		win="$(printf %s "$line" |cut -d '>' -f3 |cut -d , -f1)"
+		tit=$(printf %s "$line" |cut -d , -f2)
+		setComms "$win" "$tit"
+	done
 else
 	setComms "$@"
 fi