wms/wms_voyeur.sh

19 lines
459 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
## snooping on xorg window events and doing some things ##
## based on https://github.com/wmutils/contrib/blob/master/focus_watcher.sh ##
# wms_voyeur.sh by @root_informatica.
wew | while read ev wid args; do
case $ev in
MAP) # focus on mappng requests.
wattr o $wid || wms_focuser.sh -t
;;
UNMAP) # focus the top window in the servers window stack.
[ ! "$(pfw)" ] && wms_focuser.sh -t
;;
esac
done