🐛 fix(waybar): custom-music module now works correctly
This commit is contained in:
parent
c0b455bb06
commit
81dabd6bca
4 changed files with 9 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
|||
"~/.config/waybar/modules/custom-cava.jsonc",
|
||||
"~/.config/waybar/modules/custom-wf-recorder.jsonc",
|
||||
"~/.config/waybar/modules/custom-updates.jsonc",
|
||||
"~/.config/waybar/modules/custom-media.jsonc",
|
||||
"~/.config/waybar/modules/custom-music.jsonc",
|
||||
"~/.config/waybar/modules/custom-logo.jsonc",
|
||||
"~/.config/waybar/modules/custom-notifications.jsonc",
|
||||
"~/.config/waybar/modules/custom-weather.jsonc",
|
||||
|
@ -18,7 +18,7 @@
|
|||
"custom/cava",
|
||||
"custom/wf-recorder",
|
||||
],
|
||||
"modules-center": ["custom/media"],
|
||||
"modules-center": ["custom/music"],
|
||||
"modules-right": [
|
||||
"custom/updates",
|
||||
"hyprland/language",
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
{
|
||||
"custom/media": {
|
||||
"format": "{icon} {}",
|
||||
"custom/music": {
|
||||
"format": "{0}",
|
||||
"return-type": "json",
|
||||
"max-length": 100,
|
||||
"format-icons": {
|
||||
"spotify": " ",
|
||||
"default": " ",
|
||||
},
|
||||
"escape": true,
|
||||
"exec": "$HOME/.config/waybar/scripts/mediaplayer.py 2> /dev/null",
|
||||
"tooltip": true,
|
||||
"exec": "~/.config/waybar/scripts/mediaplayer.py --player spotify",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-scroll-up": "playerctl next",
|
||||
"on-scroll-down": "playerctl previous",
|
|
@ -135,9 +135,7 @@ class PlayerManager:
|
|||
track_info = title
|
||||
|
||||
if track_info:
|
||||
if player.props.status == "Playing":
|
||||
track_info = " " + track_info
|
||||
else:
|
||||
if player.props.status != "Playing":
|
||||
track_info = " " + track_info
|
||||
# only print output if no other player is playing
|
||||
current_playing = self.get_first_playing_player()
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#custom-media,
|
||||
#custom-music,
|
||||
#custom-fans,
|
||||
#clock,
|
||||
#idle_inhibitor,
|
||||
|
@ -252,7 +252,7 @@ window#waybar.hidden {
|
|||
color: @mantle;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
#custom-music {
|
||||
background: @lavender;
|
||||
background: linear-gradient(
|
||||
52deg,
|
||||
|
|
Loading…
Add table
Reference in a new issue