diff options
author | Roger Gonzalez <roger@rogs.me> | 2021-01-01 16:02:28 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2021-01-01 16:02:28 -0300 |
commit | 8fedf45bdce537aa53cad815024a0721b5538389 (patch) | |
tree | da2a996ba24a34acbd12508678fb750eeaf0c9ff /.config/polybar/music | |
parent | 88a0e8f4b2e74a8215e392464d8ae0dff36af5bb (diff) |
Added music and BTC modules to polybar
Diffstat (limited to '.config/polybar/music')
-rwxr-xr-x | .config/polybar/music | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.config/polybar/music b/.config/polybar/music new file mode 100755 index 00000000..40a028f6 --- /dev/null +++ b/.config/polybar/music @@ -0,0 +1,15 @@ +#!/bin/bash + +player_status=$(playerctl status 2> /dev/null) +if [[ $? -eq 0 ]]; then + metadata=$(echo "$(playerctl metadata title) - $(playerctl metadata artist) - $(playerctl metadata album)" | cut -c -80) +fi + +# Foreground color formatting tags are optional +if [[ $player_status = "Playing" ]]; then + echo "%{F#FFFFFF}▶️ $metadata%{F-}" +elif [[ $player_status = "Paused" ]]; then + echo "%{F#999}⏸️ $metadata%{F-}" +else + echo "" +fi |