feat: mpris support for waybar

This commit is contained in:
2026-01-27 23:36:18 +03:00
parent cebcd98d0f
commit 1308399187
2 changed files with 19 additions and 5 deletions

View File

@@ -99,6 +99,17 @@
"on-scroll-down": "mpc volume +1", "on-scroll-down": "mpc volume +1",
"on-scroll-up": "mpc volume -1" "on-scroll-up": "mpc volume -1"
}, },
"mpris": {
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} <i>{dynamic}</i>",
"dynamic-order": ["artist", "title"],
"player-icons": {
"default": "▶"
},
"status-icons": {
"paused": "⏸"
}
},
"clock": { "clock": {
"timezone": "Europe/Moscow", "timezone": "Europe/Moscow",
"interval": 5, "interval": 5,

View File

@@ -44,6 +44,7 @@ window#waybar.chromium {
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
/* Common styling applied to all modules */ /* Common styling applied to all modules */
#mpd, #mpd,
#mpris,
#custom-pomodoro, #custom-pomodoro,
#clock, #clock,
#battery, #battery,
@@ -118,7 +119,7 @@ window#waybar.chromium {
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
SIDE PANEL GROUPS SIDE PANEL GROUPS
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#mpd, .modules-center, .modules-right { #mpd, #mpris, .modules-center, .modules-right {
/* Layout & Box Model */ /* Layout & Box Model */
border: 1px solid @border-color; border: 1px solid @border-color;
border-radius: 15px; border-radius: 15px;
@@ -196,24 +197,24 @@ window#waybar.chromium {
} }
/* MPD STATES */ /* MPD STATES */
#mpd { #mpd, #mpris {
transition: color 2s, background 2s; transition: color 2s, background 2s;
} }
#mpd.playing { #mpd.playing, #mpris.playing {
color: @accent; color: @accent;
font-weight: 700; font-weight: 700;
/* color: @text-primary; */ /* color: @text-primary; */
} }
#mpd.stopped { #mpd.stopped, #mrpis.stopped {
color: transparent; color: transparent;
background: transparent; background: transparent;
border-color: transparent; border-color: transparent;
transition: color 2s, background 2s; transition: color 2s, background 2s;
} }
#mpd.paused { #mpd.paused, #mpris.paused {
font-weight: normal; font-weight: normal;
color: @text-secondary; color: @text-secondary;
} }
@@ -243,6 +244,8 @@ window#waybar.chromium {
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#mpd.playing:hover, #mpd.playing:hover,
#mpd.paused:hover, #mpd.paused:hover,
#mpris.playing:hover,
#mpris.paused:hover,
#clock:hover, #clock:hover,
#battery:hover, #battery:hover,
#network:hover, #network:hover,