15 lines
375 B
Bash
Executable file
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
|
|
|