update configuration files

This commit is contained in:
Frank Zechert
2026-08-15 18:09:50 +02:00
parent 64e22b0c46
commit b0b2e04b7f
12 changed files with 75 additions and 172 deletions
+30 -4
View File
@@ -1,3 +1,10 @@
hl.monitor({
output = "eDP-1",
scale = 1,
position = "0x0",
mode = "1920x1200@60"
})
-- if multiple profiles match, profile with highest priority wins.
-- if no profile match at all, the fallback_profile will be applied anyways.
local fallback_profile="laptop"
@@ -32,7 +39,16 @@ local profiles = {
["desc:Dell Inc. DELL U2724D 1CQFMF4"] = {disabled=false, scale=1, position="4480x0", mode="2560x1440@120"},
},
workspace_rules = {
{ workspace = "1", monitor = "desc:Dell Inc. DELL U2724DE BD19MF4", default = true, persistent = true },
{ workspace = "2", monitor = "desc:Dell Inc. DELL U2724DE BD19MF4", persistent = true },
{ workspace = "3", monitor = "desc:Dell Inc. DELL U2724DE BD19MF4", persistent = true },
{ workspace = "4", monitor = "desc:Dell Inc. DELL U2724DE BD19MF4", persistent = true },
{ workspace = "5", monitor = "desc:Dell Inc. DELL U2724DE BD19MF4", persistent = true },
{ workspace = "6", monitor = "desc:Dell Inc. DELL U2724D 1CQFMF4", default = true, persistent = true },
{ workspace = "7", monitor = "desc:Dell Inc. DELL U2724D 1CQFMF4", persistent = true },
{ workspace = "8", monitor = "desc:Dell Inc. DELL U2724D 1CQFMF4", persistent = true },
{ workspace = "9", monitor = "eDP-1", default = true, persistent = true },
{ workspace = "10", monitor = "eDP-1", persistent = true },
},
},
laptop = {
@@ -42,7 +58,7 @@ local profiles = {
},
disable_other_monitors = false,
monitor_config = {
["eDP-1"] = {disabled=false, scale=1, position="0x0", mode="1920x1200@120"},
["eDP-1"] = {disabled=false, scale=1, position="0x0", mode="1920x1200@60"},
},
workspace_rules = {
}
@@ -52,6 +68,14 @@ local profiles = {
local apply_monitor_request_queue = {}
local function apply_workspace_rules(workspace_rules)
if #workspace_rules < 1 then return end
for _, rules in ipairs(workspace_rules) do
hl.workspace_rule(rules)
end
debug_notify("Workspace Rules Applied")
end
local function apply_selected_profile(profile_name, profile)
-- do we want to disable other monitors that are not used in this profile?
if profile.disable_other_monitors then
@@ -84,6 +108,8 @@ local function apply_selected_profile(profile_name, profile)
hl.monitor(config)
end
debug_notify("Profile " .. profile_name .. " was applied")
apply_workspace_rules(profile.workspace_rules)
end
local function apply_monitor_profile()
@@ -147,10 +173,10 @@ end
hl.on("hyprland.start", function()
debug_notify("hyprland start :)")
hl.timer(function()
hl.dispatch(function()
hl.monitor({output = "eDP-1", disabled = false})
hl.dispatch(function() request_apply_monitor_profile() end)
end, { timeout = 1000, type = "oneshot" })
end)
end)
hl.on("monitor.layout_changed", request_apply_monitor_profile)