diff options
| author | silly <u65487754@gmail.com> | 2026-03-31 00:27:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-31 00:27:16 +0200 |
| commit | 9b0a0af8231d6ebb9ec6b6e13b36e7d87bd87ce3 (patch) | |
| tree | e042f0f873c195950043635423fe4af49bfacd22 | |
| parent | 857a07977e4dcfefa6d7639286718b021ad44ba2 (diff) | |
Create media.sh
| -rw-r--r-- | .config/scripts/media.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/scripts/media.sh b/.config/scripts/media.sh new file mode 100644 index 0000000..a9c1acb --- /dev/null +++ b/.config/scripts/media.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +playerctl metadata --format '{{title}} - {{artist}}' --follow | while read -r line; do + if playerctl status >/dev/null 2>&1; then + art_url=$(playerctl metadata mpris:artUrl 2>/dev/null) + notify-send -i "$art_url" \ + -h string:x-canonical-private-synchronous:media \ + "playing" "$line" + fi +done |
