aboutsummaryrefslogtreecommitdiff
path: root/dot_config/hypr/config/rules.lua
blob: ca5fe88f769629bb4c770f7533af1d75e939933a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
-- No gaps when only window
hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 })
hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 })
hl.window_rule({
  name        = "no-gaps-wtv1",
  match       = { float = false, workspace = "w[tv1]" },
  border_size = 0,
  rounding    = 0,
})
hl.window_rule({
  name        = "no-gaps-f1",
  match       = { float = false, workspace = "f[1]" },
  border_size = 0,
  rounding    = 0,
})


-- Workspaces to monitors
for i = 1, 5 do
  hl.workspace_rule({ workspace = tostring(i), monitor = MAIN_DISPLAY, persistent = true, default = i == 1 })
end
for i = 6, 10 do
  hl.workspace_rule({ workspace = tostring(i), monitor = SECONDARY_DISPLAY, persistent = true, default = i == 6 })
end


hl.window_rule({
  name = "steam",
  match = {
    class = "steam"
  },
  monitor = SECONDARY_DISPLAY,
  workspace = "7 silent",
  no_initial_focus = true,
  focus_on_activate = false,
  suppress_event = "activatefocus"
})

hl.window_rule({
  name = "steam_notifications",
  match = {
    class = "^(steam)$",
    title = "^(notificationtoasts_.*)$"
  },
  no_focus = true,
  no_initial_focus = true,
  focus_on_activate = false,
  suppress_event = "activate activatefocus"
})

hl.window_rule({
  name = "discord",
  match = {
    class = "[dD]iscord"
  },
  monitor = SECONDARY_DISPLAY,
  workspace = "6 silent",
  no_initial_focus = true,
  focus_on_activate = false,
  suppress_event = "active activatefocus"
})

hl.window_rule({
  match = {
    class = "gamescope"
  },
  immediate = true,
  monitor = MAIN_DISPLAY,
  content = "game",
  decorate = false,
  keep_aspect_ratio = false,
  no_anim = true,
  no_blur = true,
  no_shadow = true,
})

hl.window_rule({
  name = "ghostty-fullscreen-opaque",
  match = {
    class = "com.mitchellh.ghostty",
    fullscreen = true,
  },
  force_rgbx = true,
  no_blur = true,
})