mirror of
https://github.com/Fluffy-Bean/dots.git
synced 2025-05-14 07:42:14 +00:00
20 lines
No EOL
495 B
Bash
Executable file
20 lines
No EOL
495 B
Bash
Executable file
#!/bin/sh
|
|
|
|
player=$(playerctl -p %any,firefox status)
|
|
title=$(playerctl -p %any,firefox metadata --format '{{ title }}')
|
|
artist=$(playerctl -p %any,firefox metadata --format '{{ artist }}')
|
|
|
|
if [ $player = "Playing" ]
|
|
then
|
|
if [ "$title" == "" ]
|
|
then
|
|
$title="Unknow title"
|
|
fi
|
|
if [ "$artist" == "" ]
|
|
then
|
|
$artist = "Unknow artist"
|
|
fi
|
|
echo "%{F#151515}%{T2}%{T- F-}%{B#151515}"$title", "$artist"%{B-}%{F#151515}%{T2}%{T- F-}"
|
|
#else
|
|
# echo ""
|
|
fi |