Fix songnotification, add logo from dalle :)

This commit is contained in:
Lizzy Hunt 2023-03-27 11:12:26 -06:00
parent 040ff6efd0
commit 95d542f79c
No known key found for this signature in database
GPG Key ID: 8AC6A4B840C0EC49
4 changed files with 11 additions and 32 deletions

BIN
.config/spotifyd/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -1,18 +1,12 @@
{
"include": "~/.config/waybar/local.d/*",
"position": "top",
"spacing": 0,
"modules-left": ["network", "clock"],
"modules-center": ["sway/workspaces", "custom/spotifyd"],
"modules-right": ["pulseaudio", "memory", "cpu", "temperature#cpu", "backlight", "battery"],
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": " {:%A, %d %B %Y, %H:%M}",
"interval": 60
},
"backlight": {
"format": " {}%"
},
"cpu": {
"format": " {usage}%"
},
@ -24,28 +18,6 @@
"critical-threshold": 70,
"format": " {temperatureC}°C "
},
"custom/spotifyd": {
"format": " {}",
"return-type": "json",
"exec": "spdcon -o waybar",
"on-click": "spdcon -c PlayPause",
"on-click-right": "spdcon -c Next",
"on-click-middle": "spdcon -c Previous",
"interval": 2,
},
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": " {ipaddr}",
"format-ethernet": " {ipaddr}/{cidr}",

View File

@ -23,7 +23,7 @@ window#waybar {
/* Modules */
#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, .spdcon {
#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, #custom-waybar-mpris {
padding: 0 10px;
margin: 0px 5px;
background: #fbf1c7;
@ -57,3 +57,8 @@ window#waybar {
#pulseaudio.muted {
background-color: #cc241d;
}
tooltip {
background: #fbf1c7;
border: 1px solid rgba(100, 114, 125, 0.5);
}

View File

@ -1,4 +1,6 @@
#!/bin/sh
#song=$(playerctl metadata --format "{{ title }}\n{{ artist }}\n{{ album }}")
#notify-send "Now Playing" "$song" #--icon=~/.config/spotifyd/penguin.jpg
song=$(playerctl metadata --format "{{ title }}\n{{ artist }}")
if [[ $PLAYER_EVENT = "load" ]]; then
notify-send "Now Playing" "$song" --icon=~/.config/spotifyd/logo.png
fi