dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
0f5f57e
1 file changed +12 −7
modifiedconfig/hypr/startup.lua
@@ -39,13 +39,16 @@ | ||
| 39 | 39 | end, { timeout = 120000, type = "oneshot" }) |
| 40 | 40 | |
| 41 | 41 | -- WowUp can't start hidden, so the window it opens at login is sent to a hidden |
| 42 | - -- workspace and closed again, which leaves it in the tray. That rule must not | |
| 43 | - -- outlive the one window: it is dropped as soon as the window has opened (or | |
| 44 | - -- after a minute if none came), so opening WowUp yourself right after login | |
| 45 | - -- lands on your workspace like any other window. | |
| 42 | + -- workspace and closed again, which leaves it in the tray. Its class is | |
| 43 | + -- "wowupcf" on NixOS ("WowUpCf" on CachyOS), so both are matched. Before that | |
| 44 | + -- window it can open Overwolf's consent popup (same class, titled "WowUpCf"), | |
| 45 | + -- which is hidden and closed the same way. The rule must not outlive the main window: | |
| 46 | + -- it is dropped as soon as that has opened (or after a minute if none came), | |
| 47 | + -- so opening WowUp yourself right after login lands on your workspace like any | |
| 48 | + -- other window. | |
| 46 | 49 | local wowup_rule = hl.window_rule({ |
| 47 | 50 | name = "startup-wowup", |
| 48 | - match = { class = "^WowUpCf$" }, | |
| 51 | + match = { class = "(?i)^wowupcf$" }, | |
| 49 | 52 | workspace = "special:autostart silent", |
| 50 | 53 | }) |
| 51 | 54 | local wowup_pending = true |
@@ -54,8 +57,10 @@ | ||
| 54 | 57 | wowup_rule:set_enabled(false) |
| 55 | 58 | end |
| 56 | 59 | hl.on("window.open", function(window) |
| 57 | - if wowup_pending and window.class == "WowUpCf" then | |
| 58 | - wowup_done() | |
| 60 | + if wowup_pending and window.class:lower() == "wowupcf" then | |
| 61 | + if window.title ~= "" and window.title ~= "WowUpCf" then | |
| 62 | + wowup_done() | |
| 63 | + end | |
| 59 | 64 | -- closing it from inside the open event is too early and gets ignored |
| 60 | 65 | local address = window.address |
| 61 | 66 | hl.timer(function() |