feat: fix workspace rules for docked
This commit is contained in:
@@ -18,7 +18,10 @@ if read_docked and laptop_config then
|
|||||||
is_docked = true
|
is_docked = true
|
||||||
end
|
end
|
||||||
|
|
||||||
hl.notification.create({ text = "Config for " .. (laptop_config and "laptop" or "desktop") .. " loaded", timeout = 5000 })
|
hl.notification.create({
|
||||||
|
text = "Config for " .. (laptop_config and "laptop" or "desktop") .. " loaded",
|
||||||
|
timeout = 5000,
|
||||||
|
})
|
||||||
|
|
||||||
-- Core
|
-- Core
|
||||||
require("hyprland.colors")
|
require("hyprland.colors")
|
||||||
@@ -45,7 +48,7 @@ require("hyprland.windowrules.tags")
|
|||||||
require("hyprland.windowrules.workspaces")
|
require("hyprland.windowrules.workspaces")
|
||||||
|
|
||||||
-- Workspace rules
|
-- Workspace rules
|
||||||
require("hyprland.workspacerules.main")
|
require("hyprland.workspacerules.main")(laptop_config, is_docked)
|
||||||
|
|
||||||
-- Monitors
|
-- Monitors
|
||||||
require("hyprland.monitors")(laptop_config, is_docked)
|
require("hyprland.monitors")(laptop_config, is_docked)
|
||||||
|
|||||||
@@ -1,30 +1,35 @@
|
|||||||
hl.workspace_rule({
|
return function(is_laptop, is_docked)
|
||||||
|
hl.workspace_rule({
|
||||||
workspace = "1",
|
workspace = "1",
|
||||||
monitor = "DP-1",
|
monitor = "DP-1",
|
||||||
default = true,
|
default = true,
|
||||||
})
|
})
|
||||||
hl.workspace_rule({
|
hl.workspace_rule({
|
||||||
workspace = "2",
|
|
||||||
monitor = "HDMI-A-1",
|
|
||||||
default = true,
|
|
||||||
})
|
|
||||||
hl.workspace_rule({
|
|
||||||
workspace = "2",
|
|
||||||
monitor = "DP-2",
|
|
||||||
default = true,
|
|
||||||
})
|
|
||||||
hl.workspace_rule({
|
|
||||||
workspace = "3",
|
workspace = "3",
|
||||||
monitor = "DP-1",
|
monitor = "DP-1",
|
||||||
default = false,
|
default = false,
|
||||||
})
|
})
|
||||||
hl.workspace_rule({
|
if not is_laptop then
|
||||||
|
hl.workspace_rule({
|
||||||
|
workspace = "2",
|
||||||
|
monitor = "DP-2",
|
||||||
|
default = true,
|
||||||
|
})
|
||||||
|
hl.workspace_rule({
|
||||||
workspace = "4",
|
workspace = "4",
|
||||||
monitor = "DP-2",
|
monitor = "DP-2",
|
||||||
default = false,
|
default = false,
|
||||||
})
|
})
|
||||||
hl.workspace_rule({
|
elseif is_docked then
|
||||||
|
hl.workspace_rule({
|
||||||
|
workspace = "2",
|
||||||
|
monitor = "HDMI-A-1",
|
||||||
|
default = true,
|
||||||
|
})
|
||||||
|
hl.workspace_rule({
|
||||||
workspace = "4",
|
workspace = "4",
|
||||||
monitor = "HDMI-A-1",
|
monitor = "HDMI-A-1",
|
||||||
default = false,
|
default = false,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user