commit a2e1294

hovercats  ·  2023-11-28 20:35:48 +0000 UTC
parent 0e0fb5f
focus: use [ foo ] instead of test
1 files changed,  +2, -2
+2, -2
 1@@ -22,7 +22,7 @@ setborder() {
 2     wattr "$2" || return
 3 
 4     # do not modify border of fullscreen windows
 5-    test "$(wattr xywh "$2")" = "$(wattr xywh "$ROOT")" && return
 6+    [ "$(wattr xywh "$2")" = "$(wattr xywh "$ROOT")" ] && return
 7 
 8     case $1 in
 9         active)   chwb -s "$BW" -c "$ACTIVE" "$2" ;;
10@@ -38,7 +38,7 @@ case $1 in
11 esac
12 
13 # exit if we can't find another window to focus
14-test -z "$wid" && printf "$(basename "$0"): can't find a window to focus\n" >&2 && exit 1
15+[ -z "$wid" ] && printf "$(basename "$0"): can't find a window to focus\n" >&2 && exit 1
16 
17 setborder inactive "$CUR" # set inactive border on current window
18 setborder active "$wid"   # activate the new window