Spotifyd fixes

This commit is contained in:
Simponic 2022-10-26 00:46:30 -06:00
parent 864e005dba
commit 5f6a576d7f
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1
5 changed files with 17 additions and 9 deletions

View File

@ -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": {

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, .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;

2
.gitignore vendored
View File

@ -44,3 +44,5 @@
!.stumpwm.d
!.stumpwm.d/*
!NOTES.md

5
NOTES.md Normal file
View File

@ -0,0 +1,5 @@
# Spotify
- Spotifyd
- [spdcon](https://github.com/seabassapologist/untitled-spotifyd-controller)
+ Had to change $class to "spdcon" in spdcon.go

View File

@ -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