From b3c6961ec830d9cea78bd54354f0e67024f68fcc Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 14 Dec 2023 11:47:50 +0200 Subject: Add toggle-hidden --- toggle-hidden | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 toggle-hidden 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 -- cgit v1.2.3