From 5f6a576d7f7dd3067020f27b086812653466d72a Mon Sep 17 00:00:00 2001 From: Simponic Date: Wed, 26 Oct 2022 00:46:30 -0600 Subject: [PATCH] Spotifyd fixes --- .config/waybar/config | 15 ++++++++------- .config/waybar/style.css | 2 +- .gitignore | 2 ++ NOTES.md | 5 +++++ scripts/songnotification | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 NOTES.md diff --git a/.config/waybar/config b/.config/waybar/config index 48612a6..43c4b19 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -2,7 +2,7 @@ "position": "top", "spacing": 0, "modules-left": ["network", "clock"], - "modules-center": ["sway/workspaces", "custom/spotify"], + "modules-center": ["sway/workspaces", "custom/spotifyd"], "modules-right": ["pulseaudio", "memory", "cpu", "temperature#cpu", "backlight", "battery"], "clock": { @@ -24,13 +24,14 @@ "critical-threshold": 70, "format": " {temperatureC}°C " }, - "custom/spotify": { - "exec": "/home/logan/scripts/mediaplayer.py --player spotifyd", - "format": "{} ", + "custom/spotifyd": { + "format": " {}", "return-type": "json", - "on-click": "playerctl play-pause", - "on-scroll-up": "playerctl next", - "on-scroll-down": "playerctl previous" + "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": { diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 965ee12..cafb589 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -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, .custom-spotifyd { +#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, .spdcon { padding: 0 10px; margin: 0px 5px; background: #fbf1c7; diff --git a/.gitignore b/.gitignore index 42bdd4f..99799bf 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ !.stumpwm.d !.stumpwm.d/* + +!NOTES.md diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..9d73cc6 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,5 @@ +# Spotify +- Spotifyd +- [spdcon](https://github.com/seabassapologist/untitled-spotifyd-controller) + + Had to change $class to "spdcon" in spdcon.go + diff --git a/scripts/songnotification b/scripts/songnotification index ea5cc00..440d8a6 100755 --- a/scripts/songnotification +++ b/scripts/songnotification @@ -1,4 +1,4 @@ #!/bin/sh song=$(playerctl metadata --format "{{ title }}\n{{ artist }}\n{{ album }}") -notify-send "Spotify" "$song" #--icon=~/.config/spotifyd/penguin.jpg +notify-send "Now Playing" "$song" #--icon=~/.config/spotifyd/penguin.jpg