Fix whitespace issues. Add note about contributor.

This commit is contained in:
Protesilaos Stavrou 2020-05-01 19:41:17 +03:00
parent 3c24aae657
commit 6eb20783c1
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -1,13 +1,16 @@
#!/bin/bash
# Extracted and adapted from source:
# https://github.com/Chrysostomus/bspwm-scripts/blob/master/bin/bspwm_resize.sh
#!/bin/bash
# Extracted and adapted from source:
# https://github.com/Chrysostomus/bspwm-scripts/blob/master/bin/bspwm_resize.sh
# Resizes (expands or contracts) the selected node in the given
# direction. This is assigned to a key binding in $HOME/.config/sxhkd/sxhkdrc
# Resizes (expands or contracts) the selected node in the given
# direction. This is assigned to a key binding in $HOME/.config/sxhkd/sxhkdrc
# works nice with thefollowing sxhkdrc config :
# NOTE by Protesilaos 2020-05-01: The support for floating windows was
# contributed by Pierre-François Bonnefoi who also recommends the
# following sxhkdrc config:
#
# super + ctrl + {Left,Down,Up,Right}
# bspwm_resize {west,south,north,east} 50
# bspwm_resize {west,south,north,east} 50
size=${2:-'10'}
direction=$1
@ -17,7 +20,7 @@ floating=$?
case "$direction" in
west) [ $floating = 0 ] && bspc node -z right -"$size" 0 || bspc node @west -r -"$size" || bspc node @east -r -"$size" ;;
east) [ $floating = 0 ] && bspc node -z right +"$size" 0 || bspc node @west -r +"$size" || bspc node @east -r +"$size" ;;
east) [ $floating = 0 ] && bspc node -z right +"$size" 0 || bspc node @west -r +"$size" || bspc node @east -r +"$size" ;;
north) [ $floating = 0 ] && bspc node -z bottom 0 -"$size" || bspc node @south -r -"$size" || bspc node @north -r -"$size" ;;
south) [ $floating = 0 ] && bspc node -z bottom 0 +"$size" || bspc node @south -r +"$size" || bspc node @north -r +"$size" ;;
esac
esac