]> Freerunner's - dotfiles.git/commitdiff
hypr: refactor windowrules
authorAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 17 Sep 2026 17:59:23 +0000 (19:59 +0200)
committerAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 17 Sep 2026 17:59:23 +0000 (19:59 +0200)
dot-config/hypr/fragments/env.lua
dot-config/hypr/fragments/windowrules.lua
dot-config/hypr/hyprland.lua
dot-config/hypr/noctalia.lua
dot-config/hypr/scripts/gamemode.sh

index abfd7d53f314f3b2dccf1c23bf9340ea04b585fb..ec56f13b0c71354bf7261a72eb326136bdf988f8 100644 (file)
@@ -9,7 +9,7 @@ hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
 hl.env("XDG_SESSION_DESKTOP", "Hyprland")
 
 -- amd stuff
-hl.env("AMD_VULKAN_ICD", "RADV")
+-- hl.env("AMD_VULKAN_ICD=, "RADV")
 
 -- prefer wayland
 hl.env("QT_QPA_PLATFORM", "wayland;xcb")
index c36d7be77794f1b692dade34ab5ff00d15213768..87ea500f5c4832b60352c9f5e4ece8747e34e3c7 100644 (file)
@@ -27,19 +27,19 @@ hl.window_rule({
 
 hl.window_rule({
     name = "floating_enable",
-    float = true,
     match = {
         class = "^((VirtualBox|qtpass|org.ijhack.qtpass|org.kde|smplayer|mpv|ark|lxqt|vlc|pcmanfm|kdesystemsettings|gimp|openrgb|nwg-look|alsa-scarlett-gui|lstopo|org.corectrl.CoreCtrl|LACT|lutris|blueman-manager|org.freedesktop.impl.portal|be.alexandervanhee.gradia|io.missioncenter.MissionCenter|io.github.ilya_zlobintsev.LACT|ncmpcpp).*)$",
     },
+    float = true,
 })
 
 hl.window_rule({
     name = "floating_enable_size_1200",
-    float = true,
-    size = "1200 1200",
     match = {
         class = "^((com.system76.CosmicMonitor|qalculate|clipse).*)$",
     },
+    float = true,
+    size = "1200 1200",
 })
 
 hl.window_rule({
@@ -64,53 +64,36 @@ hl.window_rule({
 
 hl.window_rule({
     name = "dialogs_floating_bytitle",
-    float = true,
     match = {
         title = "^((Über|About|Öffnen|org.freedesktop.impl.portal.desktop.kde).*)$",
     },
+    float = true,
 })
 
 hl.window_rule({
     name = "dialogs_focused_bytitle",
-    stay_focused = true,
     match = {
         title = "^((Über|About|Öffnen|Neuen Ordner erstellen|Datei überschreiben|Create New Folder|org.freedesktop.impl.portal).*)$",
     },
+    stay_focused = true,
 })
 
 hl.window_rule({
     name = "dialogs_focused_byclass",
-    float = true,
-    stay_focused = true,
     match = {
         class = "^((org.gnupg.pinentry-qt|org.kde.kwalletd6|org.kde.ksecretd|org.kde.polkit-kde-authentication-agent-1).*)$",
     },
-})
-
-hl.window_rule({
-    name = "game_launchers",
     float = true,
-    match = {
-        title = "^(.*)auncher$",
-    },
-})
-
-hl.window_rule({
-    name = "heroic",
     stay_focused = true,
-    match = {
-        class = "negative:heroic",
-        title = "^(.*)Launcher$",
-    },
 })
 
 -- indicate windows with special attention
 hl.window_rule({
     name = "upgrayyedd",
-    border_color = surface,
     match = {
-        initial_title = "^(upgrayyedd)$",
+        title = "^(upgrayyedd)$",
     },
+    border_color = tertiary,
 })
 
 -- handle windows tray items (xembedsniproxy)
@@ -121,75 +104,81 @@ hl.window_rule({
 -- windowrule = noblur, title:^()$, class:^()$
 
 hl.window_rule({
-    name = "browsers",
-    tag = "+neverdim",
-    workspace = 1,
-    group = "deny",
+    name = "add_browsers_to_neverdim",
     match = {
         class = "^(firefox|firefox-bin|org.qutebrowser.qutebrowser|Microsoft-edge.*|qutebrowser)$",
     },
+    tag = "+neverdim",
+    workspace = 1,
+    group = "deny",
 })
 
 hl.window_rule({
     name = "workspace2",
-    workspace = 2,
     match = {
         class = "^(pm|tm|pr|thunderbird|thunderbird-bin)$",
     },
+    workspace = 2,
 })
 
 hl.window_rule({
     name = "workspace3",
-    pseudo = true,
-    no_initial_focus = true,
-    workspace = 3,
     match = {
         class = "^(Threema.*|discord.*)$",
     },
+    pseudo = true,
+    no_initial_focus = true,
+    workspace = 3,
 })
 
 hl.window_rule({
     name = "workspace4",
-    workspace = 4,
     match = {
         class = "^((deezer|ncmpcpp|spotify).*)$",
     },
+    workspace = 4,
 })
 
 hl.window_rule({
-    name = "workspace5",
-    workspace = 5,
+    name = "workspace5.1",
     match = {
+        initial_class = "^(steam|heroic).*$",
     },
+    workspace = 5,
 })
 
 hl.window_rule({
-    name = "workspace5",
-    workspace = 5,
+    name = "workspace5.2",
     match = {
-        initial_class = "^(steam|heroic).*$",
+        initial_class = "steam_app_default",
+        initial_title = "Battle.net(.*)",
+    workspace = 5,
     },
 })
 
 hl.window_rule({
     name = "workspace6",
-    workspace = 6,
     match = {
-        initial_class = "^(steam_app).*$",
+        content = "game",
     },
+    workspace = 6,
 })
 
 hl.window_rule({
     name = "workspace7",
-    workspace = 7,
     match = {
         class = "^(gimp|krita|ardour).*$",
     },
+    workspace = 7,
 })
 
 -- handle video PiPs
 hl.window_rule({
     name = "windowrule-26",
+    match = {
+        class = "^(firefox.*)$",
+        initial_title = "^(Bild-im-Bild|Picture-in-Picture)$",
+    },
     float = true,
     move = "((monitor_w)-813) (55)",
     size = "800 450",
@@ -199,11 +188,7 @@ hl.window_rule({
     border_size = 0,
     content = "video",
     tag = "+neverdim",
-    -- hyprbars:no_bar = true,
-    match = {
-        class = "^(firefox.*)$",
-        initial_title = "^(Bild-im-Bild|Picture-in-Picture)$",
-    },
+    ["hyprbars:no_bar"] = true
 })
 
 -- handle terminal(s/-apps)
@@ -214,38 +199,46 @@ hl.window_rule({
 
 hl.window_rule({
     name = "popup_class",
-    float = true,
-    group = "deny",
-    size = "1280 800",
     match = {
         class = "^(popup)$",
     },
+    float = true,
+    group = "deny",
+    size = "1280 800",
 })
 
 hl.window_rule({
     name = "kakpopupmove",
+    match = {
+        class = "^(kakpopup)$",
+    },
     float = true,
     stay_focused = true,
     group = "deny",
     opacity = "1.0 override",
     size = "1200 600",
     move = "((monitor_w-1.7*window_w)-20) ((monitor_h-1.2*window_h)-10)",
-    match = {
-        class = "^(kakpopup)$",
-    },
 })
 
 -- handle ueberzugpp
 hl.window_rule({
     name = "windowrule-49",
+    match = {
+        class = "^(ueberzugpp.*)$",
+    },
     no_anim = true,
     no_initial_focus = true,
     decorate = false,
     no_shadow = true,
     group = "deny",
+})
+
+hl.window_rule({
+    name = "vkcube",
     match = {
-        class = "^(ueberzugpp.*)$",
+        initial_title = "^(vkcube)$",
     },
+    fullscreen = true,
 })
 
 hl.window_rule({
@@ -278,57 +271,72 @@ hl.window_rule({
     move = "((monitor_w*1)-window_w-10) ((monitor_h*0.25))",
 })
 
--- handle wine/proton games
-local GAMES = "^(steam_app_.*|steam_proton|streaming_client|gamescope)$"
+hl.window_rule({
+    name = "battle.net",
+    match = {
+        initial_class = "^steam_app_default$",
+        title = "(^Battle.net(.*)|)$",
+    },
+    float = true,
+    no_shadow = true,
+    rounding = 3,
+    ["hyprbars:no_bar"] = true
+})
 
 hl.window_rule({
-    name = "windowrule-56",
-    tag = "+game",
+    name = "heroic",
     match = {
-        initial_class = GAMES,
+        initial_class = "heroic",
+        title = "^(.*)Launcher$",
     },
+    float = true,
+    no_shadow = true,
+    rounding = 3,
+    ["hyprbars:no_bar"] = true
 })
 
 hl.window_rule({
-    name = "windowrule-57",
+    name = "tag_all_games",
+    match = {
+        class = "^(steam_app_%d(.*)|steam_proton|streaming_client|gamescope)$",
+    },
+    tag = "+game",
+})
+
+hl.window_rule({
+    name = "disable_eyecandy_fortag",
+    match = {
+        tag = "game",
+    },
     content = "game",
     float = true,
     no_dim = true,
     no_blur = true,
-    rounding = 0,
+    rounding = false,
     no_shadow = true,
     no_anim = true,
     opaque = true,
-    min_size = "1280 800",
+    -- min_size = "1280 800",
     move = "((monitor_w*0.5)) ((monitor_h*0.5))",
     idle_inhibit = "always",
     fullscreen = true,
-    match = {
-        tag = "game",
-    },
 })
 
 -- handle TAGS (always handle tags last)
 hl.window_rule({
     name = "neverdim",
-    no_dim = true,
     match = {
         tag = "neverdim",
     },
+    no_dim = true,
 })
 
-hl.window_rule({
-    name = "windowrule-60",
-    fullscreen = true,
-    match = {
-        initial_title = "^(vkcube)$",
-    },
-
 -- hl.window_rule({
 --     name = "immediate_exp",
---     immediate = true,
 --     match = {
---         initial_title = "tag:game",
+--         tag = "game",
 --     },
-})
+--     immediate = true,
+--})
+
 
index c84f284e7c4f97efc35b003607b1c233e7331021..30c82cd8b34f541b56bbe790fe87979fd75d84e8 100644 (file)
@@ -104,8 +104,10 @@ hl.config({
         border_size = 2,
 
         col = {
-            active_border   = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 },
-            inactive_border = "rgba(595959aa)",
+            -- active_border   = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 },
+            -- inactive_border = "rgba(595959aa)",
+            nogroup_border_active = "rgb(bb8888)",
+            nogroup_border = "rgb(bb8888)",
         },
 
         -- Set to true to enable resizing windows by clicking and dragging on borders and gaps
@@ -306,7 +308,7 @@ hl.config({
             bar_text_font = "ZedMono NFP",
             bar_text_size = 16,
             bar_height = 24,
-            bar_color = "rgb(101010)",
+            bar_color = surface,
             -- title_color = "rgb(efefef)",
             bar_part_of_window = 1,
             bar_precedence_over_border = 1,
@@ -403,8 +405,7 @@ require("fragments.workspacerules")
 require("fragments.layerrules")
 require("fragments.animations")
 require("fragments.windowrules")
-require("noctalia.noctalia-colors")
-
 
 -- For Noctalia Color templates
 require("noctalia").apply_theme()
+
index 8e0395f77298a552aa92e5e495fd0fe1cec1db32..c672901105f044317f8b884e4c6c9a7393538cc3 100644 (file)
@@ -1,12 +1,12 @@
 -- Generated by Noctalia
 
-local primary = "rgb(ffc799)"
-local surface = "rgb(0c0c0c)"
-local on_surface = "rgb(ffffff)"
-local secondary = "rgb(99ffe4)"
-local on_secondary = "rgb(000000)"
-local error = "rgb(ff8080)"
-local on_error = "rgb(000000)"
+local primary = "rgb(b48ead)"
+local surface = "rgb(2e3440)"
+local on_surface = "rgb(eceff4)"
+local secondary = "rgb(a3be8c)"
+local on_secondary = "rgb(2e3440)"
+local error = "rgb(bf616a)"
+local on_error = "rgb(2e3440)"
 
 local function apply_theme()
     hl.config({
@@ -14,6 +14,8 @@ local function apply_theme()
             col = {
                 active_border = primary,
                 inactive_border = surface,
+                nogroup_border_active = primary,
+                nogroup_border = surface,
             },
         },
         group = {
index 5f16c8d1b1f0e9b6181d49961e3a454ddf2cdd68..ea106251a7812de110a9003ca68a78e3542df7fb 100755 (executable)
@@ -36,7 +36,7 @@ if [ "$COMFY" = true ] ; then
                 float_switch_override_focus = 0,
             },
         })'
-    noctalia msg power-set Performance
+    noctalia msg power-set performance
     noctalia msg wallpaper-set color:\#333333
     noctalia msg nightlight-disable
     noctalia msg osd-disable