blob: 9d1c028cefda63fef22c8cfe6fa9881ffff56f70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
resize() {
amount="$(rofi -dmenu -p "Resize $1")"
if [ -z "$amount" ]; then
exit
fi
if [ "$1" = "width" ] || [ "$1" = "height" ]; then
swaymsg "resize set $1 ${amount}ppt"
exit
fi;
swayresize "$1" "$amount"
}
if [ -n "$1" ]; then
resize "$1"
exit
fi
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"
|