update hyprland autostart
This commit is contained in:
@@ -7,7 +7,7 @@ debug_flag = true
|
||||
-------------------
|
||||
function debug_notify(message)
|
||||
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")
|
||||
end
|
||||
end
|
||||
@@ -81,6 +81,25 @@ programs = {
|
||||
browser = "librewolf",
|
||||
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 ----
|
||||
@@ -118,6 +137,10 @@ require("hyprland-binds")
|
||||
---- WINDOW RULES ----
|
||||
----------------------
|
||||
require("hyprland-windowrules")
|
||||
|
||||
---------------------
|
||||
---- LAYER RULES ----
|
||||
---------------------
|
||||
hl.layer_rule({ match = { namespace = "^(quickshell)$" }, no_anim = true })
|
||||
hl.layer_rule({ match = { namespace = "^dms:.*" }, no_anim = true })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user