commit 20e4be2

hovercats  ·  2024-11-25 21:41:29 +0000 UTC
parent b732a18
focus: dont exit with status code 1 if no windows is found.
this subtly breaks the watcher script because the while loop exits due a non-null exit status comming from focus script. thus having to restart the watcher script manually.
1 files changed,  +1, -1
+1, -1
1@@ -17,7 +17,7 @@ switch($1) {
2 }
3 
4 # exit if we can't find another window to focus
5-if (~ $#wid 0) printf 'No window to focus on\n' && exit 1
6+if (~ $#wid 0) printf 'No window to focus on\n' && exit 0
7 
8 chwso -r $wid # put it on top of the stack
9 wtf      $wid # set focus on it