update configuration files
This commit is contained in:
@@ -5,19 +5,7 @@
|
||||
-- Or execute your favorite apps at launch like this:
|
||||
--
|
||||
-- Most applications are started by systemd. Others are wrapped by uwsm app -- (by create_launcher() function)
|
||||
|
||||
function delay(f, millis)
|
||||
hl.timer(f, { timeout = millis, type = "oneshot" })
|
||||
end
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd(create_launcher("thunderbird"), { workspace = 10 })
|
||||
delay(function() hl.exec_cmd(create_launcher("signal-desktop"), { workspace = 10 }) end, 4000)
|
||||
delay(function() hl.exec_cmd(create_launcher("Telegram"), { workspace = 10 }) end, 5000)
|
||||
{{ if eq .work_env true -}}
|
||||
-- Outlook
|
||||
hl.exec_cmd(create_launcher("/home/frank/.local/share/applications/librewolf.webapp-e7db0a1c-02e9-42cc-a5da-8fdc222e89dc.desktop"), { workspace = "9" })
|
||||
-- Teams
|
||||
delay(function() hl.exec_cmd(create_launcher("/home/frank/.local/share/applications/librewolf.webapp-daf88433-cdaa-4a10-9bfb-af0a20fb7b71.desktop"), { workspace = "9" }) end, 3000)
|
||||
{{ end -}}
|
||||
hl.exec_cmd("~/.config/hypr/scripts/autostart.sh")
|
||||
end)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -158,7 +158,7 @@ return {
|
||||
}
|
||||
},
|
||||
master = {
|
||||
mfact = 0.65,
|
||||
mfact = 0.6,
|
||||
new_status = "slave",
|
||||
new_on_top = false,
|
||||
new_on_active = "none",
|
||||
|
||||
@@ -286,3 +286,8 @@ rule(
|
||||
{ matches_title("^(Teams for Linux - Screen is being shared)$") },
|
||||
{ float(), size(600, 300), pin() }
|
||||
)
|
||||
-- Jetbrains Toolbox
|
||||
rule(
|
||||
{ matches_initial_class("^(jetbrains-toolbox)$") },
|
||||
{ float(), center(), pin() }
|
||||
)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- thunderbird", {workspace = 10})'
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- /home/frank/.local/share/applications/librewolf.webapp-e7db0a1c-02e9-42cc-a5da-8fdc222e89dc.desktop", {workspace = 9})'
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- jetbrains-toolbox.desktop")'
|
||||
sleep 3
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- Telegram --ozone-platform=wayland", {workspace = 10})'
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- signal-desktop --ozone-platform=wayland", {workspace = 10})'
|
||||
hyprctl dispatch 'hl.dsp.exec_cmd("uwsm app -- /home/frank/.local/share/applications/librewolf.webapp-daf88433-cdaa-4a10-9bfb-af0a20fb7b71.desktop", {workspace = 9})'
|
||||
|
||||
Reference in New Issue
Block a user