Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/zsh
- dir=$(bspc query -T -n focused | jshon -e presel | jshon -e splitDir | tr -d \")
- ratio=$(bspc query -T -n focused | jshon -e presel | jshon -e splitRatio)
- case "$dir" in
- west|east)
- cur=$(bspc query -T -n focused | jshon -e rectangle | jshon -e width)
- bspc node @east -r -$((${cur}-${cur}*${ratio})) || bspc node @west -r +$((${cur}-${cur}*${ratio}))
- ;;
- north|south)
- cur=$(bspc query -T -n focused | jshon -e rectangle | jshon -e height)
- bspc node @south -r -$((${cur}-${cur}*${ratio})) || bspc node @north -r +$((${cur}-${cur}*${ratio}))
- esac
- cancel_presels
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement