wms/wms_termtogle.sh
rootniformaticaservice 583f0a44fc new sensible name
2023-03-19 22:46:41 -03:00

15 lines
375 B
Bash
Executable file

#!/bin/bash
## toggle between terminals ##
. $HOME/.config/wms/wms_var
TNAME=$(echo $TERMINAL | cut -d ' ' -f 1) # terminal name
TARGET=$(
for wid in $(lsw); do # print all windows, filter and target the first in stack
printf '%s\n' "$wid $(atomx WM_CLASS $wid)"
done | grep "$TNAME" | cut -d ' ' -f 1 | head -n 1)
wms_mainrole.sh $TARGET # focus terminal