Fix polybar player-mpris script
This commit is contained in:
parent
499c012601
commit
c9026ce0c1
2 changed files with 6 additions and 5 deletions
1
.bin/.e
1
.bin/.e
|
@ -11,6 +11,7 @@ declare -A mapper=(
|
|||
["git"]="$HOME/.config/git/config"
|
||||
["git-ignore"]="$HOME/.config/git/ignore"
|
||||
["home-manager"]="$HOME/.config/nixpkgs/home.nix"
|
||||
["polybar"]="$HOME/.config/polybar"
|
||||
["qutebrowser"]="$HOME/.config/qutebrowser/common.py"
|
||||
["starship"]="$HOME/.config/starship.toml"
|
||||
["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
alias playerctl="playerctl -p spotifyd"
|
||||
playerctl="playerctl -p spotifyd"
|
||||
|
||||
player_status=$(playerctl status 2> /dev/null)
|
||||
player_status=$($playerctl status 2> /dev/null)
|
||||
|
||||
if [ "$player_status" = "Playing" ]; then
|
||||
echo " $(playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
|
||||
echo " $($playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
|
||||
elif [ "$player_status" = "Paused" ]; then
|
||||
echo " $(playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
|
||||
echo " $($playerctl metadata -f '{{title}} - {{artist}} | {{duration(position)}}/{{duration(mpris:length)}}')"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue