2023-03-06 19:08:25 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-03-07 14:01:29 +01:00
|
|
|
## switch between windows ##
|
|
|
|
|
2023-08-08 04:42:24 +02:00
|
|
|
. /tmp/wms_var
|
2023-03-06 19:08:25 +01:00
|
|
|
|
2023-08-15 05:25:18 +02:00
|
|
|
AMW=$(lsw) # all maped windows
|
2023-09-07 05:52:48 +02:00
|
|
|
DELAY=.2
|
2023-08-15 05:25:18 +02:00
|
|
|
|
|
|
|
if [ -n "$AMW" ]; then
|
|
|
|
TARGET=$(\
|
|
|
|
for wid in $(lsw); do # print id, class and name in xmenu
|
|
|
|
printf '%s\n' "$wid | $(atomx WM_CLASS $wid) | $(wname $wid)"
|
|
|
|
done | cut -c 1-100 | $XMENU | cut -d '|' -f 1)
|
2023-03-06 19:08:25 +01:00
|
|
|
|
2023-09-07 05:52:48 +02:00
|
|
|
sleep $DELAY &&
|
2023-03-20 02:46:41 +01:00
|
|
|
wms_mainrole.sh "$TARGET" # focus target
|
2023-08-15 05:25:18 +02:00
|
|
|
|
|
|
|
fi
|