Skip to content

Instantly share code, notes, and snippets.

@jclarsson
Created November 19, 2015 11:57
Show Gist options
  • Save jclarsson/94f43b850a71be3fc17a to your computer and use it in GitHub Desktop.
Save jclarsson/94f43b850a71be3fc17a to your computer and use it in GitHub Desktop.
bspwm_border.sh
#!/bin/bash
####################################################################
# This script increases window padding when there are less windows #
####################################################################
KEEPTRUE=1
while [ $KEEPTRUE -eq 1 ]; do
VAR=$(expr $(bspc query -d $DESKTOP_SEL -W | grep -c "0x") - $(bspc query -d $DESKTOP_SEL -T | grep " f" | wc -l))
for w in $(bspc query -W -d); do bspc config -w $w window_gap $(expr 75 / $VAR ); done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment