update hyprland autostart
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
|
|
||||||
-- See https://wiki.hypr.land/Configuring/Basics/Autostart/
|
|
||||||
|
|
||||||
-- Autostart necessary processes (like notifications daemons, status bars, etc.)
|
|
||||||
-- Or execute your favorite apps at launch like this:
|
|
||||||
--
|
|
||||||
-- hl.on("hyprland.start", function ()
|
|
||||||
-- hl.exec_cmd(terminal)
|
|
||||||
-- hl.exec_cmd("nm-applet")
|
|
||||||
-- hl.exec_cmd("waybar & hyprpaper & firefox")
|
|
||||||
-- end)
|
|
||||||
|
|
||||||
hl.on("hyprland.start", function()
|
|
||||||
hl.exec_cmd("librewolf", { workspace = 9 })
|
|
||||||
|
|
||||||
hl.exec_cmd("thunderbird", { workspace = 10 })
|
|
||||||
hl.timer(function()
|
|
||||||
hl.exec_cmd("signal-desktop", { workspace = 10 })
|
|
||||||
hl.exec_cmd("Telegram", { workspace = 10 })
|
|
||||||
end, { timeout = 1000, type = "oneshot" })
|
|
||||||
end)
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Basics/Autostart/
|
||||||
|
|
||||||
|
-- Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||||
|
-- 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 -}}
|
||||||
|
end)
|
||||||
@@ -1,23 +1,5 @@
|
|||||||
local launchPrefix = "uwsm app -- "
|
|
||||||
|
|
||||||
local function is_ipc_call(command)
|
|
||||||
-- check if this is an ipc call to a running programm
|
|
||||||
is_dms_ipc = starts_with(command, "dms ipc")
|
|
||||||
is_hyprctl = starts_with(command, "hyprctl")
|
|
||||||
is_ipc = any({is_dms_ipc, is_hyprctl}, function(v) return v end)
|
|
||||||
return is_ipc
|
|
||||||
end
|
|
||||||
|
|
||||||
function create_launcher(command)
|
|
||||||
if is_ipc_call(command) then
|
|
||||||
return command
|
|
||||||
end
|
|
||||||
return launchPrefix .. command
|
|
||||||
end
|
|
||||||
|
|
||||||
function execute(command)
|
|
||||||
return hl.dsp.exec_cmd(create_launcher(command))
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Program Launchers
|
-- Program Launchers
|
||||||
hl.bind("SUPER + Return", execute(programs.terminal), { description = "Open Terminal" })
|
hl.bind("SUPER + Return", execute(programs.terminal), { description = "Open Terminal" })
|
||||||
|
|||||||
@@ -286,4 +286,3 @@ rule(
|
|||||||
{ matches_title("^(Teams for Linux - Screen is being shared)$") },
|
{ matches_title("^(Teams for Linux - Screen is being shared)$") },
|
||||||
{ float(), size(600, 300), pin() }
|
{ float(), size(600, 300), pin() }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ debug_flag = true
|
|||||||
-------------------
|
-------------------
|
||||||
function debug_notify(message)
|
function debug_notify(message)
|
||||||
if debug_flag and message ~= nil then
|
if debug_flag and message ~= nil then
|
||||||
hl.notification.create({text = message, timeout = 30000})
|
hl.notification.create({text = message, timeout = 10000})
|
||||||
hl.exec_cmd("echo '" .. message .. "' >> /tmp/hyprland-notify.log")
|
hl.exec_cmd("echo '" .. message .. "' >> /tmp/hyprland-notify.log")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -81,6 +81,25 @@ programs = {
|
|||||||
browser = "librewolf",
|
browser = "librewolf",
|
||||||
calculator = "qalculate-gtk",
|
calculator = "qalculate-gtk",
|
||||||
}
|
}
|
||||||
|
launchPrefix = "uwsm app -- "
|
||||||
|
function is_ipc_call(command)
|
||||||
|
-- check if this is an ipc call to a running programm
|
||||||
|
is_dms_ipc = starts_with(command, "dms ipc")
|
||||||
|
is_hyprctl = starts_with(command, "hyprctl")
|
||||||
|
is_ipc = any({is_dms_ipc, is_hyprctl}, function(v) return v end)
|
||||||
|
return is_ipc
|
||||||
|
end
|
||||||
|
|
||||||
|
function create_launcher(command)
|
||||||
|
if is_ipc_call(command) then
|
||||||
|
return command
|
||||||
|
end
|
||||||
|
return launchPrefix .. command
|
||||||
|
end
|
||||||
|
|
||||||
|
function execute(command)
|
||||||
|
return hl.dsp.exec_cmd(create_launcher(command))
|
||||||
|
end
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
---- Variables ----
|
---- Variables ----
|
||||||
@@ -118,6 +137,10 @@ require("hyprland-binds")
|
|||||||
---- WINDOW RULES ----
|
---- WINDOW RULES ----
|
||||||
----------------------
|
----------------------
|
||||||
require("hyprland-windowrules")
|
require("hyprland-windowrules")
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
---- LAYER RULES ----
|
||||||
|
---------------------
|
||||||
hl.layer_rule({ match = { namespace = "^(quickshell)$" }, no_anim = true })
|
hl.layer_rule({ match = { namespace = "^(quickshell)$" }, no_anim = true })
|
||||||
hl.layer_rule({ match = { namespace = "^dms:.*" }, no_anim = true })
|
hl.layer_rule({ match = { namespace = "^dms:.*" }, no_anim = true })
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user