qs: better lyrics

This commit is contained in:
2026-03-25 06:20:10 +01:00
parent 768cdbdcfa
commit e6b928be7d
6 changed files with 284 additions and 151 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/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"
+2 -2
View File
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
lockfile=/tmp/fzfclip.lock
exec {LOCK_FD}>"$lockfile"
@@ -7,4 +7,4 @@ flock -n "$LOCK_FD" || {
exit 1
}
fzfclip "$@"
fzfclip "$@" {LOCK_FD}>&-