🐛 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-cava.jsonc",
|
||||||
"~/.config/waybar/modules/custom-wf-recorder.jsonc",
|
"~/.config/waybar/modules/custom-wf-recorder.jsonc",
|
||||||
"~/.config/waybar/modules/custom-updates.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-logo.jsonc",
|
||||||
"~/.config/waybar/modules/custom-notifications.jsonc",
|
"~/.config/waybar/modules/custom-notifications.jsonc",
|
||||||
"~/.config/waybar/modules/custom-weather.jsonc",
|
"~/.config/waybar/modules/custom-weather.jsonc",
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
"custom/cava",
|
"custom/cava",
|
||||||
"custom/wf-recorder",
|
"custom/wf-recorder",
|
||||||
],
|
],
|
||||||
"modules-center": ["custom/media"],
|
"modules-center": ["custom/music"],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/updates",
|
"custom/updates",
|
||||||
"hyprland/language",
|
"hyprland/language",
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
{
|
{
|
||||||
"custom/media": {
|
"custom/music": {
|
||||||
"format": "{icon} {}",
|
"format": "{0}",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"max-length": 100,
|
"max-length": 100,
|
||||||
"format-icons": {
|
|
||||||
"spotify": " ",
|
|
||||||
"default": " ",
|
|
||||||
},
|
|
||||||
"escape": true,
|
"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-click": "playerctl play-pause",
|
||||||
"on-scroll-up": "playerctl next",
|
"on-scroll-up": "playerctl next",
|
||||||
"on-scroll-down": "playerctl previous",
|
"on-scroll-down": "playerctl previous",
|
|
@ -135,9 +135,7 @@ class PlayerManager:
|
||||||
track_info = title
|
track_info = title
|
||||||
|
|
||||||
if track_info:
|
if track_info:
|
||||||
if player.props.status == "Playing":
|
if player.props.status != "Playing":
|
||||||
track_info = " " + track_info
|
|
||||||
else:
|
|
||||||
track_info = " " + track_info
|
track_info = " " + track_info
|
||||||
# only print output if no other player is playing
|
# only print output if no other player is playing
|
||||||
current_playing = self.get_first_playing_player()
|
current_playing = self.get_first_playing_player()
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#cpu,
|
#cpu,
|
||||||
#memory,
|
#memory,
|
||||||
#temperature,
|
#temperature,
|
||||||
#custom-media,
|
#custom-music,
|
||||||
#custom-fans,
|
#custom-fans,
|
||||||
#clock,
|
#clock,
|
||||||
#idle_inhibitor,
|
#idle_inhibitor,
|
||||||
|
@ -252,7 +252,7 @@ window#waybar.hidden {
|
||||||
color: @mantle;
|
color: @mantle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-media {
|
#custom-music {
|
||||||
background: @lavender;
|
background: @lavender;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
52deg,
|
52deg,
|
||||||
|
|
Loading…
Add table
Reference in a new issue