commit 935cfb2
hovercats
·
2025-09-22 18:26:51 +0000 UTC
parent a1e0e72
watcher: add some informative comments
1 files changed,
+7,
-0
+7,
-0
1@@ -2,15 +2,22 @@
2
3 flag e +
4
5+# Pipe from wew recieve events
6 while(ev=`{read -n 1}) {
7 switch($ev(1)) {
8 case MAP
9+ # Attempt to focus on the newly mapped window
10 wattr o $ev(2) || focus $ev(2)
11 case CREATE
12+ # Attempt to focus on the newly created window
13+ # Fallback for unregistered MAP events
14 wattr o $ev(2) || focus $ev(2)
15 case UNMAP
16+ # Attempt to regain focus when windows are unmapped
17 test ! `{pfw} && focus top
18 case DESTROY
19+ # Attempt to regain focus when windows are killed
20+ # Fallback for unregistered UNMAP events
21 test ! `{pfw} && focus top
22 }
23 }