master ohmu/wmutils / src / contrib / focus_watcher.sh
ohmu  ·  2026-07-25
 1#!/bin/sh
 2#
 3# z3bra - 2014 (c) wtfpl
 4# focus a window when it is created
 5# depends on: wew focus.sh
 6
 7wew | while read ev wid args; do
 8    case $ev in
 9        # occurs on mapping requests
10        MAP) wattr o $wid || focus.sh $wid ;;
11    esac
12done