Fix autostart

This commit is contained in:
ItsDrike 2021-09-02 17:38:48 +02:00
parent 8f5b8129f6
commit a26a3c4c78
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD
2 changed files with 4 additions and 3 deletions

View file

@ -3,4 +3,5 @@
# Automatically start the applications in $HOME/.config/autostart
AUTOSTART_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/autostart"
find "$AUTOSTART_DIR" -name '*.desktop' -exec ~/.local/bin/scripts/deskopen "{}" \;
find $AUTOSTART_DIR -name "*.desktop" | xargs -I {} sh -c "~/.local/bin/scripts/deskopen {} &"

View file

@ -7,5 +7,5 @@ exec_line=$(grep '^Exec' "$1" | tail -1)
cmd=$(echo $exec_line | sed 's/^Exec=//' | sed 's/%.//')
# Remove "" around command (if present)
cmd=$(echo $cmd | sed 's/^"//g' | sed 's/" *$//g')
# Run the exec line of the application in the background
$($cmd) &
# Run the exec line of the application using /bin/sh
/bin/sh -c "$cmd"