diff --git a/bin/omarchy-hyprland-monitor-scaling-cycle b/bin/omarchy-hyprland-monitor-scaling-cycle index 233ec06c..77924f76 100755 --- a/bin/omarchy-hyprland-monitor-scaling-cycle +++ b/bin/omarchy-hyprland-monitor-scaling-cycle @@ -8,15 +8,24 @@ WIDTH=$(echo "$MONITOR_INFO" | jq -r '.width') HEIGHT=$(echo "$MONITOR_INFO" | jq -r '.height') REFRESH_RATE=$(echo "$MONITOR_INFO" | jq -r '.refreshRate') -# Cycle through scales: 1 → 1.6 → 2 → 3 → 1 +# Cycle through scales: 1 → 1.6 → 2 → 3 → 1 (or reverse with --reverse) CURRENT_INT=$(awk -v s="$CURRENT_SCALE" 'BEGIN { printf "%.0f", s * 10 }') -case "$CURRENT_INT" in -10) NEW_SCALE=1.6 ;; -16) NEW_SCALE=2 ;; -20) NEW_SCALE=3 ;; -*) NEW_SCALE=1 ;; -esac +if [[ "$1" == "--reverse" ]]; then + case "$CURRENT_INT" in + 10) NEW_SCALE=3 ;; + 16) NEW_SCALE=1 ;; + 20) NEW_SCALE=1.6 ;; + *) NEW_SCALE=2 ;; + esac +else + case "$CURRENT_INT" in + 10) NEW_SCALE=1.6 ;; + 16) NEW_SCALE=2 ;; + 20) NEW_SCALE=3 ;; + *) NEW_SCALE=1 ;; + esac +fi hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE" notify-send -u low "󰍹 Display scaling set to ${NEW_SCALE}x" diff --git a/default/hypr/bindings/tiling-v2.conf b/default/hypr/bindings/tiling-v2.conf index e0c74eb4..4560c521 100644 --- a/default/hypr/bindings/tiling-v2.conf +++ b/default/hypr/bindings/tiling-v2.conf @@ -130,3 +130,4 @@ bindd = SUPER ALT, code:14, Switch to group window 5, changegroupactive, 5 # Cycle monitor scaling bindd = SUPER, Slash, Cycle monitor scaling, exec, omarchy-hyprland-monitor-scaling-cycle +bindd = SUPER ALT, Slash, Cycle monitor scaling backwards, exec, omarchy-hyprland-monitor-scaling-cycle --reverse