wms/rwm_termtogle.sh
rootniformaticaservice e83acb54de several changes
2023-03-06 22:55:30 -03:00

13 lines
346 B
Bash
Executable file

#!/bin/bash
. $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_starship.sh $TARGET # focus terminal