diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-10-04 15:28:43 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2023-10-04 15:28:43 +0300 |
commit | 4f501fdf5f2ec9f4a14c21fbd6955133b77f48db (patch) | |
tree | 718c20e8c5596514ce08a79f67dc18d55a476c31 /dotfiles/.local/bin | |
parent | 5b1f986741723d46c9b9f125fcacb3558dc47fbf (diff) | |
download | swayrice-4f501fdf5f2ec9f4a14c21fbd6955133b77f48db.tar.gz swayrice-4f501fdf5f2ec9f4a14c21fbd6955133b77f48db.zip |
menuresize: improvements
* Make width option the first in the list.
* Exit if no option was chosen in the first menu (e.g. esc key was
pressed).
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-x | dotfiles/.local/bin/menuresize | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/menuresize b/dotfiles/.local/bin/menuresize index 8875c45..9d1c028 100755 --- a/dotfiles/.local/bin/menuresize +++ b/dotfiles/.local/bin/menuresize @@ -19,5 +19,8 @@ if [ -n "$1" ]; then fi -direction="$(printf "left\nright\nup\ndown\nwidth\nheight" | rofi -dmenu -matching prefix -p "Select resize direction or dimension")" +direction="$(printf "width\nheight\nleft\nright\nup\ndown" | rofi -dmenu -matching prefix -p "Select resize direction or dimension")" +if [ -z "$direction" ]; then + exit +fi resize "$direction" |