Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Minimize windows while using bspwm
#! /bin/sh
xev -root | grep '(_NET_ACTIVE_WINDOW)' -B 1 --line-buffered | \
grep '^ClientMessage' --line-buffered | sed -u -e 's/^.*window //; s/,//' | \
while read w; do \
if [ -n "$(bspc query -N -n $w.hidden)" ]; then \
bspc node "$w" -g hidden=off
bspc node $w.fullscreen -t tiled
bspc node $w -l normal
bspc node -a $w
fi
done
super + F6
w=$(bspc query -N -n focused.local.!below); \
if [ -n "$w" ]; then \
bspc node $w.tiled -t fullscreen; \
bspc node $w -l below; \
bspc node $w -g hidden=on; \
fi
super + {_,ctrl + }shift + F6
w=$(bspc query -N -n .hidden.local.below | while read i; \
do echo $i $(xprop -id $i | fgrep NET_WM_NAME | \
sed 's/^[^=]* = //'); done | {head -n 1,rofi -dmenu}); \
if [ -n "$w" ]; then \
w=$(echo $w | cut -d ' ' -s -f 1); \
bspc node "$w" -g hidden=off; \
bspc node $w.fullscreen -t tiled; \
bspc node $w -l normal; \
bspc node -f $w; \
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment