Add program auto-starts

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-08-16 13:00:32 +02:00
parent b7fb88cb79
commit 903cfb99fd
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -5,6 +5,10 @@ program_kills=(
'electron.*discord/resources/app.asar' 'electron.*discord/resources/app.asar'
) )
program_starts=(
discord
)
systemd_services=( systemd_services=(
streamdeck streamdeck
) )
@ -36,3 +40,8 @@ i3lock -e -f -n -c 000000
for svc in "${systemd_services[@]}"; do for svc in "${systemd_services[@]}"; do
systemctl --user is-enabled ${svc} >/dev/null 2>&1 && systemctl --user start ${svc} || log "Service ${svc} not enabled, skipping start" systemctl --user is-enabled ${svc} >/dev/null 2>&1 && systemctl --user start ${svc} || log "Service ${svc} not enabled, skipping start"
done done
# Restart programs
for cmd in "${program_starts[@]}"; do
which ${cmd} >/dev/null 2>&1 && i3-msg "exec ${cmd}" || true
done