From d9cc030c15b62515778e40c9a4e35abba9f75476 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 12 Aug 2023 22:07:40 +0300 Subject: [PATCH] make better autostart for awesome --- config/awesome/rc.lua | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index fa5f1ef6..eead7f85 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -584,17 +584,9 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n -- Gaps for dopamine beautiful.useless_gap = 5 --- autostart -autorun = true -autorundone = false -autorunApps = { - "keepassxc", - "flameshot", -} - -if autorun and not autorundone then - for app = 1, #autorunApps do - awful.util.spawn(autorunApps[app]) - end - autorundone = true -end +-- better autostart +awful.spawn.with_shell( + 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. + 'xrdb -merge <<< "awesome.started:true";' .. + 'keepassxc' +)