mirror of
https://github.com/VectorKappa/dotfiles.git
synced 2025-12-19 08:16:10 +01:00
22 lines
513 B
Bash
Executable File
22 lines
513 B
Bash
Executable File
#!/bin/dash
|
|
|
|
if [ "$(pgrep -cx autogap)" -gt 1 ] ; then
|
|
killall autogap && exit 0
|
|
else
|
|
|
|
bspc config top_padding 0
|
|
bspc config left_padding 0
|
|
bspc config right_padding 0
|
|
bspc config bottom_padding 0
|
|
bspc config -m $(bspc query -M | awk NR==1) top_padding $PANEL_HEIGHT
|
|
bspc config gapless_monocle true
|
|
|
|
bspc subscribe | while read line; do
|
|
W=$(bspc query -N -n .local.\!floating | wc -l)
|
|
G=$(echo "51 - ($W - 1) * 10" | bc)
|
|
[ "$G" -lt 1 ] && G=1
|
|
bspc config --desktop focused window_gap $G
|
|
done
|
|
|
|
fi
|