wms/wms_editor.sh

15 lines
278 B
Bash
Raw Normal View History

2023-12-16 05:09:38 +01:00
#!/bin/sh
## check if there is an open Emacs window ##
## dependencies: wname, lsw.
2023-12-27 12:41:33 +01:00
. /tmp/wms_var
2023-12-16 05:09:38 +01:00
TARGET=$(for wid in $(lsw); do
printf '%s\n' "$wid $(atomx WM_CLASS $wid)"
2023-12-27 12:41:33 +01:00
done | grep $XENAME | cut -d ' ' -f1)
2023-12-16 05:09:38 +01:00
[ $TARGET ] && wms_mainrole.sh $TARGET \
2023-12-27 12:41:33 +01:00
|| $XECMD
2023-12-16 05:09:38 +01:00