This commit is contained in:
2026-04-01 14:06:08 +02:00
parent ce30cb93d5
commit cb6606340f
16 changed files with 108 additions and 75 deletions
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
url=$(playerctl --player=elisa metadata xesam:url)
if [[ "$url" != file://* ]]; then
exit 1
fi
path="${url#file://}"
lyrics_path="${path%.*}.lrc"
if [[ ! -e "$lyrics_path" ]]; then
exit 1
fi
cat "$lyrics_path"
@@ -1,18 +1,22 @@
#!/usr/bin/env bash
pid=$(pgrep -x quickshell)
[ -z "$pid" ] && exit 1
pids=$(pgrep -x quickshell)
[ -z "$pids" ] && exit 1
# for child in $(pgrep -P "$pid" 2>/dev/null); do
# kill "$child"
# done
children=$(pgrep -P "$pid" 2>/dev/null)
children=()
kill "$pid"
for pid in $pids; do
# children=$(pgrep -P "$pid" 2>/dev/null)
children+=($!)
kill "$pid" || true
done
sleep 0.5
for child in $children; do
for child in "${children[@]}"; do
kill "$child" || true
done