mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Fix Hyprland 0.53 windowrule syntax breaking changes (#4025)
* Fix Hyprland 0.53 windowrule syntax breaking changes Hyprland 0.53 introduced breaking changes to windowrule syntax: - Props now use `match:` prefix: `class:pattern` → `match:class pattern` - Boolean effects require `on` suffix: `float` → `float on` - Snake_case naming: `nofocus` → `no_focus`, `stayfocused` → `stay_focused` - `noborder` replaced with `border_size 0` - `noanim` replaced with `animation none` - layerrule syntax: `noanim, X` → `animation none, match:namespace X` - `misc:new_window_takes_over_fullscreen` → `misc:on_focus_under_fullscreen` See: https://github.com/hyprwm/hyprland-wiki/pull/1278 * Correct for the new style * Migrate the scrolltouchpad setting in userland too * Need a reboot to pair with new Hyprland --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
@@ -31,8 +31,8 @@ input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Scroll nicely in the terminal
|
# Scroll nicely in the terminal
|
||||||
windowrule = scrolltouchpad 1.5, class:(Alacritty|kitty)
|
windowrule = match:class (Alacritty|kitty), scroll_touchpad 1.5
|
||||||
windowrule = scrolltouchpad 0.2, class:com.mitchellh.ghostty
|
windowrule = match:class com.mitchellh.ghostty, scroll_touchpad 0.2
|
||||||
|
|
||||||
# Enable touchpad gestures for changing workspaces
|
# Enable touchpad gestures for changing workspaces
|
||||||
# See https://wiki.hyprland.org/Configuring/Gestures/
|
# See https://wiki.hyprland.org/Configuring/Gestures/
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
windowrule = noscreenshare, class:^(1[p|P]assword)$
|
windowrule = no_screen_share on, match:class ^(1[p|P]assword)$
|
||||||
windowrule = tag +floating-window, class:^(1[p|P]assword)$
|
windowrule = tag +floating-window, match:class ^(1[p|P]assword)$
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
windowrule = noscreenshare, class:^(Bitwarden)$
|
windowrule = no_screen_share on, match:class ^(Bitwarden)$
|
||||||
windowrule = tag +floating-window, class:^(Bitwarden)$
|
windowrule = tag +floating-window, match:class ^(Bitwarden)$
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# Browser types
|
# Browser types
|
||||||
windowrule = tag +chromium-based-browser, class:((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)
|
windowrule = tag +chromium-based-browser, match:class ((google-)?[cC]hrom(e|ium)|[bB]rave-browser|[mM]icrosoft-edge|Vivaldi-stable|helium)
|
||||||
windowrule = tag +firefox-based-browser, class:([fF]irefox|zen|librewolf)
|
windowrule = tag +firefox-based-browser, match:class ([fF]irefox|zen|librewolf)
|
||||||
|
|
||||||
# Force chromium-based browsers into a tile to deal with --app bug
|
# Force chromium-based browsers into a tile to deal with --app bug
|
||||||
windowrule = tile, tag:chromium-based-browser
|
windowrule = tile on, match:tag chromium-based-browser
|
||||||
|
|
||||||
# Only a subtle opacity change, but not for video sites
|
# Only a subtle opacity change, but not for video sites
|
||||||
windowrule = opacity 1 0.97, tag:chromium-based-browser
|
windowrule = opacity 1 0.97, match:tag chromium-based-browser
|
||||||
windowrule = opacity 1 0.97, tag:firefox-based-browser
|
windowrule = opacity 1 0.97, match:tag firefox-based-browser
|
||||||
|
|
||||||
# Some video sites should never have opacity applied to them
|
# Some video sites should never have opacity applied to them
|
||||||
windowrule = opacity 1.0 1.0, initialTitle:((?i)(?:[a-z0-9-]+\.)*youtube\.com_/|app\.zoom\.us_/wc/home)
|
windowrule = opacity 1.0 1.0, match:initial_title ((?i)(?:[a-z0-9-]+\.)*youtube\.com_/|app\.zoom\.us_/wc/home)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Focus floating DaVinci Resolve dialog windows
|
# Focus floating DaVinci Resolve dialog windows
|
||||||
windowrule = stayfocused, class:.*[Rr]esolve.*, floating:1
|
windowrule = stay_focused on, match:class .*[Rr]esolve.*, match:float 1
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Remove 1px border around hyprshot screenshots
|
# Remove 1px border around hyprshot screenshots
|
||||||
layerrule = noanim, selection
|
layerrule = animation none, match:namespace selection
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
# Fix splash screen showing in weird places and prevent annoying focus takeovers
|
# Fix splash screen showing in weird places and prevent annoying focus takeovers
|
||||||
windowrule = tag +jetbrains-splash, class:^(jetbrains-.*)$, title:^(splash)$, floating:1
|
windowrule = tag +jetbrains-splash, match:class ^(jetbrains-.*)$, match:title ^(splash)$, match:float 1
|
||||||
windowrule = center, tag:jetbrains-splash
|
windowrule = center on, match:tag jetbrains-splash
|
||||||
windowrule = nofocus, tag:jetbrains-splash
|
windowrule = no_focus on, match:tag jetbrains-splash
|
||||||
windowrule = noborder, tag:jetbrains-splash
|
windowrule = border_size 0, match:tag jetbrains-splash
|
||||||
|
|
||||||
# Center popups/find windows
|
# Center popups/find windows
|
||||||
windowrule = tag +jetbrains, class:^(jetbrains-.*), title:^()$, floating:1
|
windowrule = tag +jetbrains, match:class ^(jetbrains-.*), match:title ^()$, match:float 1
|
||||||
windowrule = center, tag:jetbrains
|
windowrule = center on, match:tag jetbrains
|
||||||
|
|
||||||
# Enabling this makes it possible to provide input in popup dialogs (search window, new file, etc.)
|
# Enabling this makes it possible to provide input in popup dialogs (search window, new file, etc.)
|
||||||
windowrule = stayfocused, tag:jetbrains
|
windowrule = stay_focused on, match:tag jetbrains
|
||||||
windowrule = noborder, tag:jetbrains
|
windowrule = border_size 0, match:tag jetbrains
|
||||||
|
|
||||||
# For some reason tag:jetbrains does not work for size rule
|
# For some reason tag:jetbrains does not work for size rule
|
||||||
windowrule = size >50% >50%, class:^(jetbrains-.*), title:^()$, floating:1
|
windowrule = size >50% >50%, match:class ^(jetbrains-.*), match:title ^()$, match:float 1
|
||||||
|
|
||||||
# Disable window flicker when autocomplete or tooltips appear
|
# Disable window flicker when autocomplete or tooltips appear
|
||||||
windowrule = noinitialfocus, class:^(jetbrains-.*)$, title:^(win.*)$, floating:1
|
windowrule = no_initial_focus on, match:class ^(jetbrains-.*)$, match:title ^(win.*)$, match:float 1
|
||||||
|
|
||||||
# Disable mouse focus
|
# Disable mouse focus
|
||||||
windowrule = nofollowmouse, class:^(jetbrains-.*)$
|
windowrule = no_follow_mouse on, match:class ^(jetbrains-.*)$
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Float LocalSend and fzf file picker
|
# Float LocalSend and fzf file picker
|
||||||
windowrule = float, class:(Share|localsend)
|
windowrule = float on, match:class (Share|localsend)
|
||||||
windowrule = center, class:(Share|localsend)
|
windowrule = center on, match:class (Share|localsend)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Picture-in-picture overlays
|
# Picture-in-picture overlays
|
||||||
windowrule = tag +pip, title:(Picture.?in.?[Pp]icture)
|
windowrule = tag +pip, match:title (Picture.?in.?[Pp]icture)
|
||||||
windowrule = float, tag:pip
|
windowrule = float on, match:tag pip
|
||||||
windowrule = pin, tag:pip
|
windowrule = pin on, match:tag pip
|
||||||
windowrule = size 600 338, tag:pip
|
windowrule = size 600 338, match:tag pip
|
||||||
windowrule = keepaspectratio, tag:pip
|
windowrule = keep_aspect_ratio on, match:tag pip
|
||||||
windowrule = noborder, tag:pip
|
windowrule = border_size 0, match:tag pip
|
||||||
windowrule = opacity 1 1, tag:pip
|
windowrule = opacity 1 1, match:tag pip
|
||||||
windowrule = move 100%-w-40 4%, tag:pip
|
windowrule = move 100%-w-40 4%, match:tag pip
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
windowrule = opacity 1 1, class:qemu
|
windowrule = opacity 1 1, match:class qemu
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
windowrule = fullscreen, class:com.libretro.RetroArch
|
windowrule = fullscreen on, match:class com.libretro.RetroArch
|
||||||
windowrule = opacity 1 1, class:com.libretro.RetroArch
|
windowrule = opacity 1 1, match:class com.libretro.RetroArch
|
||||||
windowrule = idleinhibit fullscreen, class:com.libretro.RetroArch
|
windowrule = idle_inhibit fullscreen, match:class com.libretro.RetroArch
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Float Steam
|
# Float Steam
|
||||||
windowrule = float, class:steam
|
windowrule = float on, match:class steam
|
||||||
windowrule = center, class:steam, title:Steam
|
windowrule = center on, match:class steam, match:title Steam
|
||||||
windowrule = opacity 1 1, class:steam
|
windowrule = opacity 1 1, match:class steam
|
||||||
windowrule = size 1100 700, class:steam, title:Steam
|
windowrule = size 1100 700, match:class steam, match:title Steam
|
||||||
windowrule = size 460 800, class:steam, title:Friends List
|
windowrule = size 460 800, match:class steam, match:title Friends List
|
||||||
windowrule = idleinhibit fullscreen, class:steam
|
windowrule = idle_inhibit fullscreen, match:class steam
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
# Floating windows
|
# Floating windows
|
||||||
windowrule = float, tag:floating-window
|
windowrule = float on, match:tag floating-window
|
||||||
windowrule = center, tag:floating-window
|
windowrule = center on, match:tag floating-window
|
||||||
windowrule = size 875 600, tag:floating-window
|
windowrule = size 875 600, match:tag floating-window
|
||||||
|
|
||||||
windowrule = tag +floating-window, class:(org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)
|
windowrule = tag +floating-window, match:class (org.omarchy.bluetui|org.omarchy.impala|org.omarchy.wiremix|org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)
|
||||||
windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)
|
windowrule = tag +floating-window, match:class (xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), match:title ^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)
|
||||||
windowrule = float, class:org.gnome.Calculator
|
windowrule = float on, match:class org.gnome.Calculator
|
||||||
|
|
||||||
# Fullscreen screensaver
|
# Fullscreen screensaver
|
||||||
windowrule = fullscreen, class:org.omarchy.screensaver
|
windowrule = fullscreen on, match:class org.omarchy.screensaver
|
||||||
windowrule = float, class:org.omarchy.screensaver
|
windowrule = float on, match:class org.omarchy.screensaver
|
||||||
|
|
||||||
# No transparency on media windows
|
# No transparency on media windows
|
||||||
windowrule = opacity 1 1, class:^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$
|
windowrule = opacity 1 1, match:class ^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$
|
||||||
|
|
||||||
# Popped window rounding
|
# Popped window rounding
|
||||||
windowrule = rounding 8, tag:pop
|
windowrule = rounding 8, match:tag pop
|
||||||
|
|
||||||
# Prevent idle while open
|
# Prevent idle while open
|
||||||
windowrule = idleinhibit always, tag:noidle
|
windowrule = idle_inhibit always, match:tag noidle
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Define terminal tag to style them uniformly
|
# Define terminal tag to style them uniformly
|
||||||
windowrule = tag +terminal, class:(Alacritty|kitty|com.mitchellh.ghostty)
|
windowrule = tag +terminal, match:class (Alacritty|kitty|com.mitchellh.ghostty)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# Application-specific animation
|
# Application-specific animation
|
||||||
layerrule = noanim, walker
|
layerrule = animation none, match:namespace walker
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Webcam overlay for screen recording
|
# Webcam overlay for screen recording
|
||||||
windowrule = float, title:WebcamOverlay
|
windowrule = float on, match:title WebcamOverlay
|
||||||
windowrule = pin, title:WebcamOverlay
|
windowrule = pin on, match:title WebcamOverlay
|
||||||
windowrule = noinitialfocus, title:WebcamOverlay
|
windowrule = no_initial_focus on, match:title WebcamOverlay
|
||||||
windowrule = nodim, title:WebcamOverlay
|
windowrule = no_dim on, match:title WebcamOverlay
|
||||||
windowrule = move 100%-w-40 100%-w-40, title:WebcamOverlay # There's a typo in the hyprland rule so 100%-w on the height param is actually correct here
|
windowrule = move 100%-w-40 100%-w-40, match:title WebcamOverlay # There's a typo in the hyprland rule so 100%-w on the height param is actually correct here
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ misc {
|
|||||||
disable_splash_rendering = true
|
disable_splash_rendering = true
|
||||||
focus_on_activate = true
|
focus_on_activate = true
|
||||||
anr_missed_pings = 3
|
anr_missed_pings = 3
|
||||||
new_window_takes_over_fullscreen = 1
|
on_focus_under_fullscreen = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://wiki.hypr.land/Configuring/Variables/#cursor
|
# https://wiki.hypr.land/Configuring/Variables/#cursor
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
windowrule = suppressevent maximize, class:.*
|
# Hyprland 0.53+ syntax
|
||||||
|
windowrule = suppress_event maximize, match:class .*
|
||||||
|
|
||||||
# Just dash of opacity by default
|
# Just dash of opacity by default
|
||||||
windowrule = opacity 0.97 0.9, class:.*
|
windowrule = opacity 0.97 0.9, match:class .*
|
||||||
|
|
||||||
# Fix some dragging issues with XWayland
|
# Fix some dragging issues with XWayland
|
||||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
windowrule = no_focus on, match:class ^$, match:title ^$, match:xwayland 1, match:float 1, match:fullscreen 0, match:pin 0
|
||||||
|
|
||||||
# App-specific tweaks
|
# App-specific tweaks
|
||||||
source = ~/.local/share/omarchy/default/hypr/apps.conf
|
source = ~/.local/share/omarchy/default/hypr/apps.conf
|
||||||
|
|||||||
9
migrations/1767138576.sh
Normal file
9
migrations/1767138576.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
echo "Update terminal scrolltouchpad setting to Hyprland 0.53 style"
|
||||||
|
|
||||||
|
if grep -q "scrolltouchpad" ~/.config/hypr/input.conf; then
|
||||||
|
sed -Ei 's/^windowrule = scrolltouchpad ([^,]+), class:\(([^)]+)\)$/windowrule = match:class (\2), scroll_touchpad \1/;
|
||||||
|
s/^windowrule = scrolltouchpad ([^,]+), class:([^ ]+)$/windowrule = match:class \2, scroll_touchpad \1/' ~/.config/hypr/input.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure we restart to pair new Hyprland settings with new version
|
||||||
|
omarchy-state set reboot-required
|
||||||
Reference in New Issue
Block a user