diff --git a/config/awesome/autostart.sh b/config/awesome/autostart.sh new file mode 100755 index 00000000..d85dda0d --- /dev/null +++ b/config/awesome/autostart.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +## run (only once) processes which spawn with the same name +function run { + if (command -v $1 && ! pgrep $1); then + $@& + fi +} + +run keepassxc diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 1c018526..17be0217 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -584,9 +584,5 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n -- Gaps for dopamine beautiful.useless_gap = 10 --- making better autostart -local startupApps = { - 'keepassxc', -} - -awful.spawn.single_instance(startupApps) +-- autostart +awful.util.spawn_with_shell("~/.config/awesome/autostart.sh")