aurora8aad227
hyprland: separate window rules to a lua file, also globalize pywal variable
+41 −44
3 files changed
- M .config/hypr/hyprland.lua +3 −42
- M .config/hypr/source/appearance.lua +0 −2
- A .config/hypr/source/window_rules.lua +38 −0
| @@ -9,8 +9,8 @@ mainMod = "SUPER" | |||
| 9 | 9 | HOME = os.getenv("HOME") | |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | − | -- Theme (pywal) | |
| 13 | − | dofile(HOME .. "/.cache/wal/hyprland-colors.lua") | |
| 12 | + | -- Theme (pywal16) | |
| 13 | + | wal = dofile(HOME .. "/.cache/wal/hyprland-colors.lua") | |
| 14 | 14 | ||
| 15 | 15 | -- ----------------------------------------------------- | |
| 16 | 16 | -- Autostart | |
| @@ -45,43 +45,4 @@ require("source.permissions") | |||
| 45 | 45 | require("source.appearance") | |
| 46 | 46 | require("source.input") | |
| 47 | 47 | require("source.keybinds") | |
| 48 | − | ||
| 49 | − | ||
| 50 | − | -------------------------------------------------- | |
| 51 | − | -- Window rules | |
| 52 | − | -------------------------------------------------- | |
| 53 | − | hl.window_rule({ | |
| 54 | − | name = "suppress-maximize-events", | |
| 55 | − | ||
| 56 | − | match = { | |
| 57 | − | class = ".*", | |
| 58 | − | }, | |
| 59 | − | ||
| 60 | − | suppress_event = "maximize", | |
| 61 | − | }) | |
| 62 | − | ||
| 63 | − | hl.window_rule({ | |
| 64 | − | name = "fix-xwayland-drags", | |
| 65 | − | ||
| 66 | − | match = { | |
| 67 | − | class = "^$", | |
| 68 | − | title = "^$", | |
| 69 | − | xwayland = true, | |
| 70 | − | float = true, | |
| 71 | − | fullscreen = false, | |
| 72 | − | pin = false, | |
| 73 | − | }, | |
| 74 | − | ||
| 75 | − | no_focus = true, | |
| 76 | − | }) | |
| 77 | − | ||
| 78 | − | hl.window_rule({ | |
| 79 | − | name = "move-hyprland-run", | |
| 80 | − | ||
| 81 | − | match = { | |
| 82 | − | class = "hyprland-run", | |
| 83 | − | }, | |
| 84 | − | ||
| 85 | − | move = "20 monitor_h-120", | |
| 86 | − | float = true, | |
| 87 | − | }) | |
| 48 | + | require("source.window_rules") | |
| @@ -1,5 +1,3 @@ | |||
| 1 | − | local wal = dofile(os.getenv("HOME") .. "/.cache/wal/hyprland-colors.lua") | |
| 2 | − | ||
| 3 | 1 | hl.config({ | |
| 4 | 2 | -------------------------------------------------- | |
| 5 | 3 | -- General | |
| @@ -0,0 +1,38 @@ | |||
| 1 | + | -------------------------------------------------- | |
| 2 | + | -- Window rules | |
| 3 | + | -------------------------------------------------- | |
| 4 | + | hl.window_rule({ | |
| 5 | + | name = "suppress-maximize-events", | |
| 6 | + | ||
| 7 | + | match = { | |
| 8 | + | class = ".*", | |
| 9 | + | }, | |
| 10 | + | ||
| 11 | + | suppress_event = "maximize", | |
| 12 | + | }) | |
| 13 | + | ||
| 14 | + | hl.window_rule({ | |
| 15 | + | name = "fix-xwayland-drags", | |
| 16 | + | ||
| 17 | + | match = { | |
| 18 | + | class = "^$", | |
| 19 | + | title = "^$", | |
| 20 | + | xwayland = true, | |
| 21 | + | float = true, | |
| 22 | + | fullscreen = false, | |
| 23 | + | pin = false, | |
| 24 | + | }, | |
| 25 | + | ||
| 26 | + | no_focus = true, | |
| 27 | + | }) | |
| 28 | + | ||
| 29 | + | hl.window_rule({ | |
| 30 | + | name = "move-hyprland-run", | |
| 31 | + | ||
| 32 | + | match = { | |
| 33 | + | class = "hyprland-run", | |
| 34 | + | }, | |
| 35 | + | ||
| 36 | + | move = "20 monitor_h-120", | |
| 37 | + | float = true, | |
| 38 | + | }) | |