Move monitor scaling off Super slash
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
# omarchy:examples=omarchy hyprland monitor scaling | omarchy hyprland monitor scaling 1.6 | omarchy hyprland monitor scaling up | omarchy hyprland monitor scaling down
|
||||
|
||||
SCALES=(1 1.25 1.6 2 3 4)
|
||||
STEP_SCALES=(1 1.25 1.6 2)
|
||||
|
||||
usage() {
|
||||
echo "Usage: omarchy-hyprland-monitor-scaling [up|down|1|1.25|1.6|2|3|4]"
|
||||
@@ -43,9 +42,8 @@ set_scale() {
|
||||
|
||||
scale_from_current() {
|
||||
local direction="${1:-}"
|
||||
local scale_list="${2:-${SCALES[*]}}"
|
||||
|
||||
awk -v direction="$direction" -v list="$scale_list" '
|
||||
awk -v direction="$direction" -v list="${SCALES[*]}" '
|
||||
NR == 1 { scale = $0; found = 1 }
|
||||
END {
|
||||
if (!found) exit 1
|
||||
@@ -86,10 +84,10 @@ case "${1:-}" in
|
||||
usage
|
||||
;;
|
||||
up)
|
||||
set_scale "$(focused_monitor_scale | scale_from_current next "${STEP_SCALES[*]}")"
|
||||
set_scale "$(focused_monitor_scale | scale_from_current next)"
|
||||
;;
|
||||
down)
|
||||
set_scale "$(focused_monitor_scale | scale_from_current previous "${STEP_SCALES[*]}")"
|
||||
set_scale "$(focused_monitor_scale | scale_from_current previous)"
|
||||
;;
|
||||
1 | 1.25 | 1.6 | 2 | 3 | 4)
|
||||
set_scale "$1"
|
||||
|
||||
Reference in New Issue
Block a user