From d8c31463e2a5790c13297f7cf3796f45211cbf6c Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 2 Jan 2026 15:28:27 +0530 Subject: added mpd module to polybar --- .config/polybar/bars.ini | 2 +- .config/polybar/colors.ini | 3 +++ .config/polybar/modules.ini | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to '.config/polybar') diff --git a/.config/polybar/bars.ini b/.config/polybar/bars.ini index 0988649..3d8c15e 100644 --- a/.config/polybar/bars.ini +++ b/.config/polybar/bars.ini @@ -31,7 +31,7 @@ font-2 = "Hack Nerd Font:style=Regular:size=11;3" font-3 = "Hack Nerd Font:style=Regular:size=20;5" font-4 = "Source Han Sans JP:style=Heavy:size=11;2" # font-1 but bold, make sure to edit accordingly -modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline4 xwindow +modules-left = powerline0 date powerline1 wlan eth powerline2 storage-root powerline1 storage-home powerline2 cpu powerline1 temperature powerline2 memory powerline1 mpd powerline3 xwindow modules-right = polydoro pulseaudio ewmh battery systray [bar/mybar] diff --git a/.config/polybar/colors.ini b/.config/polybar/colors.ini index 6272c96..d4d500c 100644 --- a/.config/polybar/colors.ini +++ b/.config/polybar/colors.ini @@ -77,3 +77,6 @@ batt-full-fg = ${colors.module-color-0} backlight-bg = ${colors.module-color-0} backlight-fg = ${colors.foreground} + +mpd-bg = ${colors.module-color-0} +mpd-fg = ${colors.foreground} diff --git a/.config/polybar/modules.ini b/.config/polybar/modules.ini index 57b35cf..6e61e64 100644 --- a/.config/polybar/modules.ini +++ b/.config/polybar/modules.ini @@ -16,6 +16,26 @@ label = " %title:0:60:...%" label-foreground = ${colors.xwindow-fg} label-background = ${colors.xwindow-bg} +[module/mpd] +type = internal/mpd + +host = 127.0.0.1 +port = 6600 + +format-paused = %{T3}  %{T-} +format-paused-background = ${colors.mpd-bg} +format-paused-foreground = ${colors.mpd-fg} + +format-stopped = %{T3}  %{T-} +format-stopped-background = ${colors.mpd-bg} +format-stopped-foreground = ${colors.mpd-fg} + +format-playing = %{T3}  %{T-} +format-playing-background = ${colors.mpd-bg} +format-playing-foreground = ${colors.mpd-fg} + +label-time = "%elapsed% / %total% " + [module/storage-root] type = internal/fs interval = 25 -- cgit v1.2.3