dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

i3resize (527B)


      1 #!/usr/bin/env sh
      2 # This script was made by `goferito` on Github.
      3 # Some cleanup by Luke.
      4 
      5 [ -z "$1" ] && echo "No direction provided" && exit 1
      6 distanceStr="2 px or 2 ppt"
      7 
      8 moveChoice() {
      9   i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \
     10     i3-msg resize "$3" "$4" "$distanceStr"
     11 }
     12 
     13 case $1 in
     14   up)
     15     moveChoice grow up shrink down
     16     ;;
     17   down)
     18     moveChoice shrink up grow down
     19     ;;
     20   left)
     21     moveChoice shrink right grow left
     22     ;;
     23   right)
     24     moveChoice grow right shrink left
     25     ;;
     26 esac
     27