commit 10dc370

hovercats  ·  2022-10-01 07:20:54 +0000 UTC
parent 2957631
fullscreen.sh revert changes, as it breaks the script alltogether
1 files changed,  +8, -8
+8, -8
 1@@ -9,7 +9,7 @@ FSFILE=${FSFILE:-~/.fwin}
 2 
 3 # it's pretty simple, but anyway...
 4 usage() {
 5-    echo "usage: $(basename "$0") <wid>"
 6+    echo "usage: $(basename $0) <wid>"
 7     exit 1
 8 }
 9 
10@@ -19,23 +19,23 @@ test -z "$1" && usage
11 # this will unset the fullscreen state of any fullscreen window if there is one.
12 # this way, there will only be one window in fullscreen at a time, and no window
13 # will loose their previous geometry info
14-test -f "$FSFILE" && wtp "$(cat "$FSFILE")"
15+test -f $FSFILE && wtp $(cat $FSFILE)
16 
17 # if file exist and contain our window id, it means that out window is in
18 # fullscreen mode
19-if test -f "$FSFILE" && grep -q "$1" "$FSFILE"; then
20+if test -f $FSFILE && grep -q $1 $FSFILE; then
21     # if the window we removed was our window, delete the file, so we can
22     # fullscreen it again later 
23-    rm -f "$FSFILE"
24+    rm -f $FSFILE
25 
26 else
27     # if not, then put the current window in fullscreen mode, after saving its
28     # geometry and id to $FSFILE we also remove any border from this window.
29-    wattr xywhi "$1" > "$FSFILE"
30-    chwb -s 0 "$1"
31-    wtp "$(wattr xywh "$(lsw -r)")" "$1"
32+    wattr xywhi $1 > $FSFILE
33+    chwb -s 0 $1
34+    wtp $(wattr xywh `lsw -r`) $1
35 fi
36 
37 # now focus the window, and put it in front, no matter which state we're in, and
38 # put the cursor on its bottom-right corner (for consistency)
39-focus.sh "$1"
40+focus.sh $1