From 39f1ca77d86b8aa8fe25ac41ac827129f819fa66 Mon Sep 17 00:00:00 2001 From: Jonathan Cammisuli <4332460+Cammisuli@users.noreply.github.com> Date: Sat, 28 Feb 2026 17:22:01 -0500 Subject: [PATCH] Apply already configured resolution and refresh rate when toggling scale Closes #4824 --- bin/omarchy-hyprland-monitor-scaling-cycle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-hyprland-monitor-scaling-cycle b/bin/omarchy-hyprland-monitor-scaling-cycle index 00509752..c673fe5b 100755 --- a/bin/omarchy-hyprland-monitor-scaling-cycle +++ b/bin/omarchy-hyprland-monitor-scaling-cycle @@ -4,6 +4,9 @@ MONITOR_INFO=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true)') ACTIVE_MONITOR=$(echo "$MONITOR_INFO" | jq -r '.name') CURRENT_SCALE=$(echo "$MONITOR_INFO" | jq -r '.scale') +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 CURRENT_INT=$(awk -v s="$CURRENT_SCALE" 'BEGIN { printf "%.0f", s * 10 }') @@ -16,6 +19,6 @@ case "$CURRENT_INT" in esac hyprctl keyword misc:disable_scale_notification true -hyprctl keyword monitor "$ACTIVE_MONITOR,preferred,auto,$NEW_SCALE" +hyprctl keyword monitor "$ACTIVE_MONITOR,${WIDTH}x${HEIGHT}@${REFRESH_RATE},auto,$NEW_SCALE" hyprctl keyword misc:disable_scale_notification false notify-send "󰍹 Display scaling set to ${NEW_SCALE}x"