Adjust for new build method for Discord
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
aa2af1d535
commit
4338364815
1 changed files with 6 additions and 6 deletions
12
bin/lock
12
bin/lock
|
@ -2,15 +2,15 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
program_kills=(
|
program_kills=(
|
||||||
Discord
|
'electron.*discord/app.asar'
|
||||||
)
|
)
|
||||||
|
|
||||||
systemd_services=(
|
systemd_services=(
|
||||||
streamdeck
|
streamdeck
|
||||||
)
|
)
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop MPD playback when mpc client was found
|
# Stop MPD playback when mpc client was found
|
||||||
|
@ -18,12 +18,12 @@ function log() {
|
||||||
|
|
||||||
# Disable systemd user services
|
# Disable systemd user services
|
||||||
for svc in "${systemd_services[@]}"; do
|
for svc in "${systemd_services[@]}"; do
|
||||||
systemctl --user is-active ${svc} >/dev/null 2>&1 && systemctl --user stop ${svc} || log "Service ${svc} not active / not found"
|
systemctl --user is-active ${svc} >/dev/null 2>&1 && systemctl --user stop ${svc} || log "Service ${svc} not active / not found"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Terminate Discord in order to get mobile notifications
|
# Terminate Discord in order to get mobile notifications
|
||||||
for prog in "${program_kills[@]}"; do
|
for prog in "${program_kills[@]}"; do
|
||||||
killall -TERM ${prog} || true
|
kill -TERM $(pgrep -fo "${prog}") || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# Mute default sink & source
|
# Mute default sink & source
|
||||||
|
@ -34,5 +34,5 @@ i3lock -e -f -n -c 000000
|
||||||
|
|
||||||
# Restart user-services
|
# Restart user-services
|
||||||
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue