better song info polybar module
This commit is contained in:
parent
c4a1c0422a
commit
55ba702c7f
@ -364,11 +364,6 @@
|
|||||||
# msg_urgency = critical
|
# msg_urgency = critical
|
||||||
# fullscreen = show
|
# fullscreen = show
|
||||||
|
|
||||||
[spotify-polybar]
|
|
||||||
appname = Spotify
|
|
||||||
skip_display = yes
|
|
||||||
script = ~/.config/dunst/polybar-hook.sh
|
|
||||||
|
|
||||||
[notification-sound]
|
[notification-sound]
|
||||||
appname = *
|
appname = *
|
||||||
script = ~/.config/dunst/play-notification-sound.sh
|
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-left = i3
|
||||||
modules-center =
|
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-position = right
|
||||||
tray-padding = 2
|
tray-padding = 2
|
||||||
@ -197,15 +197,16 @@ format-full-foreground = ${colors.text}
|
|||||||
format-full-prefix-foreground = ${colors.foreground}
|
format-full-prefix-foreground = ${colors.foreground}
|
||||||
format-full-underline = ${self.format-charging-underline}
|
format-full-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
[module/spotifyd]
|
[module/playerctl]
|
||||||
type = custom/ipc
|
type = custom/script
|
||||||
|
|
||||||
|
exec = $XDG_CONFIG_HOME/polybar/playerctl-meta.sh
|
||||||
|
|
||||||
|
tail = true
|
||||||
|
|
||||||
format-foreground = ${colors.text}
|
format-foreground = ${colors.text}
|
||||||
format-underline = ${colors.spotify-ul}
|
format-underline = ${colors.spotify-ul}
|
||||||
|
|
||||||
hook-0 = $HOME/.config/polybar/spotifyd-meta.sh
|
|
||||||
initial = 1
|
|
||||||
|
|
||||||
[module/wireguard-status]
|
[module/wireguard-status]
|
||||||
type = custom/ipc
|
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