Add mpris module to Waybar

This commit is contained in:
Sam A. 2023-04-16 15:57:16 +02:00
parent 4ba0b52c7e
commit df6c3e40f0
Signed by: samsapti
GPG Key ID: CBBBE7371E81C4EA
2 changed files with 33 additions and 12 deletions

View File

@ -3,17 +3,14 @@
"layer": "top",
"position": "top",
"height": 36,
"modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"],
"modules-left": ["idle_inhibitor", "sway/workspaces", "mpris", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["network", "pulseaudio", "backlight", "memory", "cpu", "temperature", "battery", "tray"],
"sway/workspaces": {
"disable-scroll": true
},
"sway/window": {
"max-length": 64
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
"format": "<i>{}</i>"
},
"idle_inhibitor": {
"format": "{icon}",
@ -63,8 +60,8 @@
"pulseaudio": {
"scroll-step": 2, // %, can be a float
"format": "{icon} {volume}% {format_source}",
"format-bluetooth": "{icon} {volume}% {format_source}",
"format-bluetooth-muted": "{icon}  {format_source}",
"format-bluetooth": "{icon}  {volume}% {format_source}",
"format-bluetooth-muted": "{icon}   {format_source}",
"format-muted": " {format_source}",
"format-source": " {volume}%",
"format-source-muted": "",
@ -79,6 +76,15 @@
},
"on-click": "/usr/bin/pavucontrol"
},
"mpris": {
"format": "{player_icon} <i>{artist} - {title}</i>",
"format-paused": "{player_icon} <i>{artist} - {title}</i>",
"player-icons": {
"default": "\uf001",
"Spot": "\uf1bc"
},
"ignored-players": ["chromium", "firefox"]
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", "", "", "", "", "", "", "", ""]

View File

@ -72,10 +72,6 @@ window#waybar.hidden {
box-shadow: inset 0 3px @orange;
}
#mode {
box-shadow: inset 0 3px @cyan;
}
#clock,
#battery,
#cpu,
@ -89,7 +85,7 @@ window#waybar.hidden {
#tray,
#mode,
#idle_inhibitor,
#mpd {
#mpris {
padding: 0 4px;
margin: 0 4px;
color: @white;
@ -177,6 +173,20 @@ label:focus {
box-shadow: inset 0 3px @orange;
}
#mpris {
color: @violet;
box-shadow: inset 0 3px @violet;
}
#mpris.Spot {
color: @green;
box-shadow: inset 0 3px @green;
}
#mpris.paused {
box-shadow: none;
}
#tray {
box-shadow: inset 0 3px @cyan;
}
@ -199,6 +209,11 @@ label:focus {
box-shadow: inset 0 3px @violet;
}
#mode {
color: @cyan;
box-shadow: inset 0 3px @cyan;
}
#temperature {
color: @yellow;
box-shadow: inset 0 3px @yellow;