Move monitor scaling off Super slash

This commit is contained in:
David Heinemeier Hansson
2026-06-29 13:24:56 -05:00
parent fed2fd8e3d
commit dafc400891
3 changed files with 14 additions and 10 deletions
+3 -5
View File
@@ -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"