Move flags to persistent setup so hyprctl reload doesn't reset them

This commit is contained in:
David Heinemeier Hansson
2026-04-17 14:16:47 +02:00
parent 8912bcb81c
commit 79d3b8cec6
12 changed files with 78 additions and 30 deletions
@@ -1,13 +1,8 @@
#!/bin/bash
# Check current single_window_aspect_ratio setting
CURRENT_VALUE=$(hyprctl getoption "layout:single_window_aspect_ratio" 2>/dev/null | head -1)
# Toggle single-window square aspect ratio using the flag system.
# Parse vec2 output: "vec2: [1, 1]" or "vec2: [0, 0]"
if [[ $CURRENT_VALUE == *"[1, 1]"* ]]; then
hyprctl keyword layout:single_window_aspect_ratio "0 0"
notify-send -u low " Disable single-window square aspect ratio"
else
hyprctl keyword layout:single_window_aspect_ratio "1 1"
notify-send -u low " Enable single-window square aspect"
fi
omarchy-hyprland-flag-toggle \
--enabled-notification " Enable single-window square aspect ratio" \
--disabled-notification " Disable single-window square aspect ratio" \
single-window-aspect-ratio