aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-12-14 11:46:32 +0200
committersrdusr <trevorgray@srdusr.com>2023-12-14 11:46:32 +0200
commitff7f65a44f6b3a5bebb1f0378b617ff443343c04 (patch)
tree9fae12474370e2982477ee5d6034d9657edd2d89
parentb7b32f9799492c4d8c9c0aafdba5b3e334f668b5 (diff)
downloaddotfiles-ff7f65a44f6b3a5bebb1f0378b617ff443343c04.tar.gz
dotfiles-ff7f65a44f6b3a5bebb1f0378b617ff443343c04.zip
Add toggle-floaty
-rwxr-xr-xhotspots24
-rwxr-xr-xtoggle-floaty14
2 files changed, 26 insertions, 12 deletions
diff --git a/hotspots b/hotspots
index a50c348..8454bac 100755
--- a/hotspots
+++ b/hotspots
@@ -50,8 +50,8 @@ function onEnterWithDelay() {
function onEnter() {
ZONE=$1
case "$1" in
- 'T') eww open status &>/dev/null ;;
- 'R') eww open bar &>/dev/null ;;
+ 'T') eww open status &>/dev/null ;;
+ #'R') eww open bar &>/dev/null ;;
esac
}
@@ -59,8 +59,8 @@ function onEnter() {
function onExit() {
ZONE=''
case "$1" in
- 'T') eww close status &>/dev/null ;;
- 'R') eww close bar &>/dev/null ;;
+ 'T') eww close status &>/dev/null ;;
+ 'R') eww close bar &>/dev/null ;;
esac
}
@@ -108,14 +108,14 @@ while :; do
fi
else
case "$ZONE" in
- 'B') [[ "$X" -lt "$BX1" || "$X" -gt "$BX2" || "$Y" -lt "$BY" ]] && onExit B ;;
- 'L') [[ "$X" -ge "${L[0]}" || "$Y" -lt "$LY1" || "$Y" -gt "$LY2" ]] && onExit L ;;
- 'R') [[ "$X" -le "$RX" || "$Y" -lt "$RY1" || "$Y" -gt "$RY2" ]] && onExit R ;;
- 'T') [[ "$X" -lt "$BX1" || "$X" -gt "$BX2" || "$Y" -gt "${T[1]}" ]] && onExit T ;;
- 'BL') [[ "$X" -ge "${BL[0]}" || "$Y" -lt "$BLY" ]] && onExit BL ;;
- 'BR') [[ "$X" -le "$BRX" || "$Y" -lt "$BRY" ]] && onExit BR ;;
- 'TL') [[ "$X" -ge "${TL[0]}" || "$Y" -ge "${TL[1]}" ]] && onExit TL ;;
- 'TR') [[ "$X" -le "$TRX" || "$Y" -ge "${TR[1]}" ]] && onExit TR ;;
+ 'B') [[ "$X" -lt "$BX1" || "$X" -gt "$BX2" || "$Y" -lt "$BY" ]] && onExit B ;;
+ 'L') [[ "$X" -ge "${L[0]}" || "$Y" -lt "$LY1" || "$Y" -gt "$LY2" ]] && onExit L ;;
+ 'R') [[ "$X" -le "$RX" || "$Y" -lt "$RY1" || "$Y" -gt "$RY2" ]] && onExit R ;;
+ 'T') [[ "$X" -lt "$BX1" || "$X" -gt "$BX2" || "$Y" -gt "${T[1]}" ]] && onExit T ;;
+ 'BL') [[ "$X" -ge "${BL[0]}" || "$Y" -lt "$BLY" ]] && onExit BL ;;
+ 'BR') [[ "$X" -le "$BRX" || "$Y" -lt "$BRY" ]] && onExit BR ;;
+ 'TL') [[ "$X" -ge "${TL[0]}" || "$Y" -ge "${TL[1]}" ]] && onExit TL ;;
+ 'TR') [[ "$X" -le "$TRX" || "$Y" -ge "${TR[1]}" ]] && onExit TR ;;
esac
fi
done
diff --git a/toggle-floaty b/toggle-floaty
new file mode 100755
index 0000000..69e2c8f
--- /dev/null
+++ b/toggle-floaty
@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# make a tiled window floating and sticky
+# or make a floaty window tiled
+
+bspc node -t floating
+if [ $? -eq 0 ]; then
+ echo tiled
+ bspc node -g sticky=on
+else
+ echo floaty
+ bspc node -t tiled
+ bspc node -g sticky=off
+fi