Skip to content

Commit f6719b1

Browse files
committed
Add Super + Ctrl + Backspace to toggle resolution between 1-2-3x
1 parent 6ef727a commit f6719b1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

bin/omarchy-toggle-monitor-scaling

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Get the current scale from the first monitor
4+
CURRENT_SCALE=$(hyprctl monitors -j | jq -r '.[0].scale')
5+
6+
# Define the scaling cycle based on current scale
7+
# Cycles through 1.00 → 2.00 → 3.13 → 1.00
8+
case "$CURRENT_SCALE" in
9+
1.00) NEW_SCALE="2" ;;
10+
2.00) NEW_SCALE="3.13" ;;
11+
3.13) NEW_SCALE="1" ;;
12+
*) NEW_SCALE="2" ;;
13+
esac
14+
15+
# Apply the new scale to all monitors
16+
hyprctl monitors -j | jq -r '.[].name' | while read -r monitor; do
17+
hyprctl keyword monitor "$monitor,preferred,auto,$NEW_SCALE"
18+
done
19+
20+
# Notify the user
21+
notify-send "󰍹 Display scaling set to ${NEW_SCALE}x"

default/hypr/bindings/utilities.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle
2828
# Toggle nightlight
2929
bindd = SUPER CTRL, N, Toggle nightlight, exec, omarchy-toggle-nightlight
3030

31+
# Toggle monitor scaling
32+
bindd = SUPER CTRL, Backspace, Toggle monitor scaling, exec, omarchy-toggle-monitor-scaling
33+
3134
# Control Apple Display brightness
3235
bindd = CTRL, F1, Apple Display brightness down, exec, omarchy-brightness-display-apple -5000
3336
bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-brightness-display-apple +5000

0 commit comments

Comments
 (0)