Krolyxon
Commit 8aad227

Branches

Refs →

aurora8aad227

hyprland: separate window rules to a lua file, also globalize pywal variable

Author
krolyxon
Date
2026-08-25 21:30 +0530
Parent
a090c36
Commit
8aad227481a77ff5c8edce5c4655a1cfd3da27b1

+41 −44

3 files changed

  1. M .config/hypr/hyprland.lua +3 −42
  2. M .config/hypr/source/appearance.lua +0 −2
  3. A .config/hypr/source/window_rules.lua +38 −0
M .config/hypr/hyprland.lua View
@@ -9,8 +9,8 @@ mainMod = "SUPER"
99 HOME = os.getenv("HOME")
1010
1111
12−-- Theme (pywal)
13−dofile(HOME .. "/.cache/wal/hyprland-colors.lua")
12+-- Theme (pywal16)
13+wal = dofile(HOME .. "/.cache/wal/hyprland-colors.lua")
1414
1515 -- -----------------------------------------------------
1616 -- Autostart
@@ -45,43 +45,4 @@ require("source.permissions")
4545 require("source.appearance")
4646 require("source.input")
4747 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")
M .config/hypr/source/appearance.lua View
@@ -1,5 +1,3 @@
1−local wal = dofile(os.getenv("HOME") .. "/.cache/wal/hyprland-colors.lua")
2−
31 hl.config({
42 --------------------------------------------------
53 -- General
A .config/hypr/source/window_rules.lua View
@@ -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+})