From 1b6d306e948a49c417549100f299396f4b7acede Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 14 Jun 2022 09:22:03 +0200 Subject: [PATCH] Autostart apps --- autostart.sh | 6 ++++++ rc.lua | 4 ++++ 2 files changed, 10 insertions(+) create mode 100755 autostart.sh diff --git a/autostart.sh b/autostart.sh new file mode 100755 index 0000000..e565649 --- /dev/null +++ b/autostart.sh @@ -0,0 +1,6 @@ +if [ -d "$HOME/.config/autostart" ]; then + for file in $HOME/.config/autostart/*; do + command=$(cat $file | grep '^Exec=' | head -n 1 | cut -d '=' -f 2-) + $command& + done +fi diff --git a/rc.lua b/rc.lua index 8445fa7..6073944 100644 --- a/rc.lua +++ b/rc.lua @@ -36,6 +36,10 @@ function file_exists(name) if f~=nil then io.close(f) return true else return false end end +if file_exists(home..'/.config/awesome/autostart.sh') then + os.execute(home .. '/.config/awesome/autostart.sh &') +end + if file_exists(home..'/.xsession') then os.execute(home .. '/.xsession &') end