wms/rwm_termtogle.sh
rootniformaticaservice 51d458a88b other shit
2023-03-07 10:01:29 -03:00

15 lines
378 B
Bash
Executable file

#!/bin/bash
## toggle between terminals ##
. $HOME/.config/rootwm/rwm_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)
rwm_mainrole.sh $TARGET # focus terminal