commit d827658

hovercats  ·  2024-11-04 07:08:26 +0000 UTC
parent 001230c
focus: move func to the case statement instead
1 files changed,  +2, -6
+2, -6
 1@@ -2,11 +2,6 @@
 2 
 3 flag e +
 4 
 5-fn usage {
 6-    printf 'Usage: next|prev|top|wid\n'
 7-    exit 1
 8-}
 9-
10 switch($1) {
11 	case next 
12 		wid=`{lsw | grep -v `{pfw} | sed '1 p;d'}
13@@ -17,7 +12,8 @@ switch($1) {
14 	case 0x*  
15 		wattr $1 && wid=$1
16 	case *    
17-		usage
18+		printf 'Usage: next|prev|top|wid\n'
19+		exit 1
20 }
21 
22 # exit if we can't find another window to focus