better song info polybar module
This commit is contained in:
parent
c4a1c0422a
commit
55ba702c7f
@ -364,11 +364,6 @@
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
[spotify-polybar]
|
||||
appname = Spotify
|
||||
skip_display = yes
|
||||
script = ~/.config/dunst/polybar-hook.sh
|
||||
|
||||
[notification-sound]
|
||||
appname = *
|
||||
script = ~/.config/dunst/play-notification-sound.sh
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
polybar-msg hook spotifyd 1
|
@ -44,7 +44,7 @@ font-1 = "Hack Nerd Font:style=Regular:pixelsize=10;2"
|
||||
|
||||
modules-left = i3
|
||||
modules-center =
|
||||
modules-right = spotifyd pulseaudio memory cpu wlan wireguard-status battery date
|
||||
modules-right = playerctl pulseaudio memory cpu wlan wireguard-status battery date
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
@ -197,15 +197,16 @@ format-full-foreground = ${colors.text}
|
||||
format-full-prefix-foreground = ${colors.foreground}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
[module/spotifyd]
|
||||
type = custom/ipc
|
||||
[module/playerctl]
|
||||
type = custom/script
|
||||
|
||||
exec = $XDG_CONFIG_HOME/polybar/playerctl-meta.sh
|
||||
|
||||
tail = true
|
||||
|
||||
format-foreground = ${colors.text}
|
||||
format-underline = ${colors.spotify-ul}
|
||||
|
||||
hook-0 = $HOME/.config/polybar/spotifyd-meta.sh
|
||||
initial = 1
|
||||
|
||||
[module/wireguard-status]
|
||||
type = custom/ipc
|
||||
|
||||
|
3
.config/polybar/playerctl-meta.sh
Executable file
3
.config/polybar/playerctl-meta.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
playerctl --player=spotify,%any -f "{{title}} - {{artist}}" metadata -F 2>/dev/null
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
meta(){
|
||||
metadata=$(playerctl --player=spotify,%any -f "{{title}} - {{artist}}" metadata 2>/dev/null ) && echo $metadata
|
||||
}
|
||||
|
||||
i=0
|
||||
|
||||
until meta || [ $i -gt 10 ];
|
||||
do
|
||||
sleep 1
|
||||
let i=i+1
|
||||
done
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user