diff --git a/nowplaying.sh b/nowplaying.sh new file mode 100755 index 0000000..aade69e --- /dev/null +++ b/nowplaying.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ $(playerctl status) = 'Playing' ]; then + a=$( playerctl metadata artist ) + t=$( playerctl metadata title ) + echo "$a - $t" +fi + +exit 0 diff --git a/source_polybar.py b/source_polybar.py index 7d1e47d..bc0d412 100755 --- a/source_polybar.py +++ b/source_polybar.py @@ -52,7 +52,7 @@ def main(): [module/music] type = custom/script - exec = /home/ferit/scripts/nowplaying.py + exec = /home/ferit/scripts/nowplaying.sh tail = true interval = 2