diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-09-10 13:52:44 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-09-10 13:52:44 +0300 |
commit | 647bd4dc91bb627eb3298eb5ccb3fe5a164103eb (patch) | |
tree | b7804f4e467974b3dca219ee59715bc9fb3af70f /dotfiles/.local/bin/swayresize | |
parent | 8f413b0058756e852d3012b9ca02b073fe867cff (diff) | |
parent | e5a7e88b25b88f9aa55bbce105467c81472a6aba (diff) | |
download | swayrice-647bd4dc91bb627eb3298eb5ccb3fe5a164103eb.tar.gz swayrice-647bd4dc91bb627eb3298eb5ccb3fe5a164103eb.zip |
Merge branch 'master' of github.com:Yaroslav-95/swayrice into master
Diffstat (limited to 'dotfiles/.local/bin/swayresize')
-rwxr-xr-x | dotfiles/.local/bin/swayresize | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/swayresize b/dotfiles/.local/bin/swayresize index 9ae94c0..89368e9 100755 --- a/dotfiles/.local/bin/swayresize +++ b/dotfiles/.local/bin/swayresize @@ -1,9 +1,14 @@ #!/bin/sh # This script was made by `goferito` on Github. # Some cleanup by Luke. +# Some improvements by Yaroslav. [ -z "$1" ] && echo "No direction provided" && exit 1 + distanceStr="2 px or 2 ppt" +if [ -n "$2" ]; then + distanceStr="$(printf "%s px or %s ppt" "$2" "$2")" +fi moveChoice() { swaymsg resize "$1" "$2" "$distanceStr" | grep '"success":true' || \ |