Last active
March 1, 2020 18:19
-
-
Save Vftdan/12cf4776c838b69fe529ecdb3cc0a3be to your computer and use it in GitHub Desktop.
Minimize windows while using bspwm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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