diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /.config/waybar/modules/mpris.awk | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/waybar/modules/mpris.awk')
| -rw-r--r-- | .config/waybar/modules/mpris.awk | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/.config/waybar/modules/mpris.awk b/.config/waybar/modules/mpris.awk deleted file mode 100644 index 194aa73..0000000 --- a/.config/waybar/modules/mpris.awk +++ /dev/null @@ -1,54 +0,0 @@ -{ - gsub(/"/,"") - gsub(/'/,"\047") - # print "DEBUG: " $0 - - artist=$1 - album=$2 - title=$3 - position=$4 - player=$5 - status=$6 -} - -($0 == "") || (status ~ /stopped/) { - system("jq -Mnc {}") - next -} - -(status ~ /playing/) { - icon="" -} -(status ~ /paused/) { - icon="" -} -(artist != "") && (album != "") { - text=sprintf("%s - %s - %s (%s)", artist, album, title, position) - tooltip=sprintf("%s\nby %s\nfrom %s\n(%s)", title, artist, album, player) -} -(artist == "") { - text=sprintf("%s - %s (%s)", album, title, position) - tooltip=sprintf("%s\nfrom %s\n(%s)", title, album, player) -} -(album == "") { - text=sprintf("%s - %s (%s)", artist, title, position) - tooltip=sprintf("%s\nby %s\n(%s)", title, artist, player) -} -(artist == "") && (album == "") { - text=sprintf("%s (%s)", title, position) - tooltip=sprintf("%s\n(%s)", title, player) -} -# edge cases to beautify the output -(player == "tdesktop") && (title ~ /Unknown Track/) { - text="telegram voice message" -} - -{ - system(sprintf("jq -rMnc --arg class \"%s\" --arg text \"%s %s\" --arg tt \"%s\" '{ class: $class, text: $text|@html, tooltip: $tt|@html }'", \ - status, - icon, - text, - tooltip)) -} - -END {} |