Autostart apps

This commit is contained in:
Thomas Forgione 2022-06-14 09:22:03 +02:00
parent 481ad32658
commit 1b6d306e94
2 changed files with 10 additions and 0 deletions

6
autostart.sh Executable file
View File

@ -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

4
rc.lua
View File

@ -36,6 +36,10 @@ function file_exists(name)
if f~=nil then io.close(f) return true else return false end if f~=nil then io.close(f) return true else return false end
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 if file_exists(home..'/.xsession') then
os.execute(home .. '/.xsession &') os.execute(home .. '/.xsession &')
end end