aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-10-04 15:28:43 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2023-10-04 15:28:43 +0300
commit4f501fdf5f2ec9f4a14c21fbd6955133b77f48db (patch)
tree718c20e8c5596514ce08a79f67dc18d55a476c31 /dotfiles/.local/bin
parent5b1f986741723d46c9b9f125fcacb3558dc47fbf (diff)
downloadswayrice-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-xdotfiles/.local/bin/menuresize5
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"