Switch waybar player handling, also breaking config

This commit is contained in:
2024-05-18 18:33:32 +02:00
parent c78d7a9f4f
commit 42608b79e8
3 changed files with 28 additions and 6 deletions

View File

@@ -7,7 +7,7 @@
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["custom/archicon","hyprland/workspaces", "custom/media", ], "modules-left": ["custom/archicon","hyprland/workspaces", "custom/media", ],
"modules-center": ["hyprland/window"], "modules-center": ["hyprland/window"],
"modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "clock", "tray"], "modules-right": ["mpris", "idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "clock", "tray"],
// Modules configuration // Modules configuration
// "sway/workspaces": { // "sway/workspaces": {
// "disable-scroll": true, // "disable-scroll": true,
@@ -53,6 +53,24 @@
"tooltip": true, "tooltip": true,
"tooltip-format": "{app}: {title}" "tooltip-format": "{app}: {title}"
}, },
"mpris": {
"interval": 3,
"format": " {status_icon} ",
"format-paused": " {status_icon} ",
"tooltip-format": " {player_icon} {dynamic} ",
"tooltip-format-paused": " {player_icon} {dynamic} ",
"player-icons": {
"default": "󰎄",
"mpv": "",
"YoutubeMusic": ""
},
"status-icons": {
"playing": "",
"paused": "",
"stopped": ""
},
// "ignored-players": ["firefox"]
},
"mpd": { "mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ", "format-disconnected": "Disconnected ",
@@ -88,7 +106,8 @@
}, },
"tray": { "tray": {
// "icon-size": 21, // "icon-size": 21,
"spacing": 10 "spacing": 10,
"show-passive-items": true
}, },
"clock": { "clock": {
// "timezone": "America/New_York", // "timezone": "America/New_York",

View File

@@ -1,5 +1,5 @@
#!/bin/dash #!/bin/dash
CONFIG_FILES="$HOME/.config/waybar/config $HOME/.config/waybar/style.css" CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/style.css"
trap "killall waybar" EXIT trap "killall waybar" EXIT

View File

@@ -88,7 +88,10 @@ button:hover {
#wireplumber, #wireplumber,
#custom-media, #custom-media,
#tray, #tray,
#mpris,
#keyboard-state,
#mode, #mode,
#battery,
#idle_inhibitor, #idle_inhibitor,
#scratchpad, #scratchpad,
#mpd { #mpd {
@@ -238,7 +241,7 @@ label:focus {
color: #2d3436; color: #2d3436;
} }
#mpd { #mpd, #mpris {
background-color: #66cc99; background-color: #66cc99;
color: #2a5c45; color: #2a5c45;
} }
@@ -247,11 +250,11 @@ label:focus {
background-color: #f53c3c; background-color: #f53c3c;
} }
#mpd.stopped { #mpd.stopped, #mpris.stopped {
background-color: #90b1b1; background-color: #90b1b1;
} }
#mpd.paused { #mpd.paused, #mpris.paused {
background-color: #51a37a; background-color: #51a37a;
} }