From 2db310a772665c1444827b9819eeaaf4fef4d6ea Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sun, 13 Aug 2023 16:57:18 +0300 Subject: [PATCH] add autostart script isntead --- config/awesome/autostart.sh | 10 ++++++++++ config/awesome/rc.lua | 8 ++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 config/awesome/autostart.sh 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")