All checks were successful
Nix Format Check / check-format (push) Successful in 39s
38 lines
798 B
Bash
Executable File
38 lines
798 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
apps=(
|
|
"spotify"
|
|
"whatsapp-for-linux"
|
|
"telegram-desktop"
|
|
"vesktop"
|
|
"trayscale"
|
|
"1password"
|
|
"ulauncher-wrapped --no-window-shadow --hide-window"
|
|
"polkit-agent"
|
|
"swaync"
|
|
"nm-applet"
|
|
"blueman-applet"
|
|
)
|
|
|
|
# check if screen has any dead sessions
|
|
if screen -list | grep -q "Dead"; then
|
|
screen -wipe
|
|
fi
|
|
|
|
echo "Starting auto-start applications..."
|
|
for app in "${apps[@]}"; do
|
|
app_name=$(echo $app | awk '{print $1}')
|
|
app_params=$(echo $app | cut -d' ' -f2-)
|
|
|
|
if [ -x "$(command -v $app_name)" ]; then
|
|
if screen -list | grep -q $app_name; then
|
|
echo "$app_name is already running. Skipping..."
|
|
continue
|
|
fi
|
|
|
|
echo "Starting $app_name with parameters $app_params..."
|
|
screen -dmS $app_name $app_name $app_params
|
|
sleep 1
|
|
fi
|
|
done
|