Set the initial GDK_SCALE to match the monitor scale

This commit is contained in:
David Heinemeier Hansson
2026-05-09 19:55:15 +02:00
parent 3eca9573ea
commit 890e3fc8c5
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ if [[ -f $FIRST_RUN_MODE ]]; then
bash "$OMARCHY_PATH/install/first-run/firewall.sh"
bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh"
bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh"
bash "$OMARCHY_PATH/install/first-run/gdk-scale.sh"
bash "$OMARCHY_PATH/install/first-run/swayosd.sh"
bash "$OMARCHY_PATH/install/first-run/gtk-primary-paste.sh"
bash "$OMARCHY_PATH/install/first-run/elephant.sh"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# omarchy:summary=Print the monitor scale of the internal monitor or first other monitor
hyprctl monitors -j | jq -r '([.[] | select(.name | contains("eDP"))][0] // .[0]).scale // empty | tonumber | if . == floor then floor else . end'
+3
View File
@@ -0,0 +1,3 @@
# Set the default GDK_SCALE from what the monitor is currently reporting
sed -i -E "s|^([[:space:]]*env[[:space:]]*=[[:space:]]*GDK_SCALE,).*|\\1$(omarchy-hyprland-monitor-scale)|" ~/.config/hypr/monitors.conf