aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/polybar/config66
1 files changed, 28 insertions, 38 deletions
diff --git a/.config/polybar/config b/.config/polybar/config
index 1b6697b..fd08d4a 100644
--- a/.config/polybar/config
+++ b/.config/polybar/config
@@ -107,7 +107,7 @@ font-5 = "UbuntuMono Nerd font:size=11;2"
modules-left = sep menu sep close sep minimize sep maximize sep xwindow sep
modules-center = bspwm
-modules-right = dunst search control date sep
+modules-right = spotify spotify-prev spotify-play-pause spotify-next long-sep dunst search control date sep
;modules-left = sep menu
;modules-center = date
@@ -401,6 +401,10 @@ click-right = "kill -USR1 $(pgrep --oldest --parent %pid%)"
type = custom/text
content = " "
+[module/long-sep]
+type = custom/text
+content = " "
+
[module/space]
type = custom/text
content = " "
@@ -449,47 +453,33 @@ label-active-foreground = ${colors.acolor}
label-urgent-foreground = ${colors.curgent}
label-occupied-foreground = ${colors.foreground}
+[module/spotify]
+type = custom/script
+tail = true
+interval = 1
+; prefix symbol is shown before the text
+format-prefix = ""
+format = <label>
+exec = ~/.config/polybar/scripts/scroll_spotify_status.sh
-[module/previous]
-type = custom/ipc
-format-padding = 1
-; Default
-hook-0 = echo ""
-; When spotify active
-hook-1 = echo "󰒮 "
-click-left = "spotifyctl -q previous"
-
-
-[module/next]
-type = custom/ipc
-format-padding = 1
-; Default
-hook-0 = echo ""
-; When spotify active
-hook-1 = echo " 󰒭 "
-click-left = "spotifyctl -q next"
-
+[module/spotify-prev]
+type = custom/script
+exec = echo " 􁋮 "
+format = <label>
+click-left = playerctl previous -p spotify
-[module/playpause]
+[module/spotify-play-pause]
type = custom/ipc
-; Default
-hook-0 = echo ""
-; Playing
-hook-1 = echo ""
-; Paused
-hook-2 = echo ""
-click-left = "spotifyctl -q playpause"
-
+hook-0 = echo "􀊗"
+hook-1 = echo "􀊕"
+initial = 1
+click-left = playerctl play-pause -p spotify
-[module/spotify]
-type = custom/ipc
-format-padding = 0.5
-; Default
-hook-0 = echo ""
-; Playing/paused show song name and artist
-;hook-1 = spotifyctl -q status --format ' %artist% %title%' --max-title-length 10 --max-artist-length 5 --trunc ''
-hook-1 = spotifyctl status --format ' %artist%: %title%' --max-artist-length 15 --max-title-length 15 --trunc '...'
-;hook-1 = spotifyctl -q status --format '%artist%~ %title%' --max-length 20
+[module/spotify-next]
+type = custom/script
+exec = echo " 􁋰"
+format = <label>
+click-left = playerctl next -p spotify
[module/toggle_spotify]
type = custom/text