Compare commits
No commits in common. "9fb860642ee3e942467971c1900ea0abeceac946" and "f0132c852f4a38b37cdfd3ebd536293f9d06ce02" have entirely different histories.
9fb860642e
...
f0132c852f
3 changed files with 19 additions and 1 deletions
|
@ -73,5 +73,12 @@
|
|||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"custom/spotify": {
|
||||
"format": " {}",
|
||||
"max-length": 40,
|
||||
"interval": 30, // Remove this if your script is endless and write in loop
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder
|
||||
"exec-if": "pgrep spotify"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
7
config/waybar-sway/mediaplayer.sh
Executable file
7
config/waybar-sway/mediaplayer.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
player_status=$(playerctl status 2> /dev/null)
|
||||
if [ "$player_status" = "Playing" ]; then
|
||||
echo "$(playerctl metadata artist) - $(playerctl metadata title)"
|
||||
elif [ "$player_status" = "Paused" ]; then
|
||||
echo " $(playerctl metadata artist) - $(playerctl metadata title)"
|
||||
fi
|
|
@ -32,7 +32,7 @@ window#waybar {
|
|||
border-bottom: 3px solid white;
|
||||
}
|
||||
|
||||
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #window {
|
||||
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
|
||||
padding: 0 3px;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
@ -86,6 +86,10 @@ window#waybar {
|
|||
#pulseaudio.muted {
|
||||
}
|
||||
|
||||
#custom-spotify {
|
||||
color: rgb(102, 220, 105);
|
||||
}
|
||||
|
||||
#tray {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue