Instantly share code, notes, and snippets.

Embed
What would you like to do?
Start all entries in xdg autostart dir
autostart_etc=${XDG_CONFIG_DIRS-/etc/xdg}/autostart
autostart_home=${XDG_CONFIG_HOME-~/.config}/autostart
shopt -s nullglob
for i in $autostart_etc/*.desktop $autostart_home/*.desktop; do
if ! grep -q "OnlyShowIn=" "$i"; then
$(grep "Exec=" "$i" | sed 's/Exec=//') &
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment