diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2019-11-23 16:16:30 -0500 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2019-11-23 16:16:30 -0500 |
| commit | a5e66ac4f45322b3665c944ba34d83b7db43ebc5 (patch) | |
| tree | bed315d0a7f2c180b3eb634ece3a6a2089cdeb6f /.local/bin/i3cmds/i3resize | |
| parent | 85d353d7963391cd66f23a3e99a66b8b58045e4c (diff) | |
| download | eibhear-a5e66ac4f45322b3665c944ba34d83b7db43ebc5.tar.gz eibhear-a5e66ac4f45322b3665c944ba34d83b7db43ebc5.tar.zst eibhear-a5e66ac4f45322b3665c944ba34d83b7db43ebc5.zip | |
merger of bin
Diffstat (limited to '.local/bin/i3cmds/i3resize')
| -rwxr-xr-x | .local/bin/i3cmds/i3resize | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.local/bin/i3cmds/i3resize b/.local/bin/i3cmds/i3resize new file mode 100755 index 0000000..f89bdb5 --- /dev/null +++ b/.local/bin/i3cmds/i3resize @@ -0,0 +1,27 @@ +#!/usr/bin/env sh +# This script was made by `goferito` on Github. +# Some cleanup by Luke. + +[ -z "$1" ] && echo "No direction provided" && exit 1 +distanceStr="2 px or 2 ppt" + +moveChoice() { + i3-msg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ + i3-msg resize "$3" "$4" "$distanceStr" +} + +case $1 in + up) + moveChoice grow up shrink down + ;; + down) + moveChoice shrink up grow down + ;; + left) + moveChoice shrink right grow left + ;; + right) + moveChoice grow right shrink left + ;; +esac + |
