aboutsummaryrefslogtreecommitdiff
path: root/toggle-hidden
diff options
context:
space:
mode:
Diffstat (limited to 'toggle-hidden')
-rwxr-xr-xtoggle-hidden14
1 files changed, 14 insertions, 0 deletions
diff --git a/toggle-hidden b/toggle-hidden
new file mode 100755
index 0000000..fe1964a
--- /dev/null
+++ b/toggle-hidden
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# hide or show all floating windows in bspwm
+#
+# dependencies: xargs
+
+IDS=($(bspc query -N -n .floating.hidden))
+if [ $? -eq 0 ]; then
+ # show hidden floaties
+ echo -n ${IDS[@]} | xargs -d ' ' -I ID bspc node ID -g hidden=off
+else
+ # hide floaties
+ bspc query -N -n .floating | xargs -I ID bspc node ID -g hidden=on
+fi