Crates.io | spolyfy |
lib.rs | spolyfy |
version | 1.0.5 |
source | src |
created_at | 2021-10-17 22:23:56.66729 |
updated_at | 2021-10-18 18:57:52.998083 |
description | Spotify module for Polybar |
homepage | |
repository | https://github.com/Taptiive/spolyfy |
max_upload_size | |
id | 466445 |
size | 31,060 |
Spolyfy is a Polybar module written in Rust that provides current Spotify song's title, previous, next and play-pause buttons.
You can install Spolyfy using Cargo with the following command:
$ cargo install spolyfy
You can setup the modules like this
[module/spotify-current]
type=custom/script
exec = spolyfy -c 35
exec-if = [ $(spolyfy -l) = "yep" ]
[module/spotify-previous]
type=custom/script
exec = spolyfy -a ;This command prints a Nerd Font icon
exec-if = [ $(spolyfy -l) = "yep" ]
click-left = spolyfy -p
[module/spotify-play-pause]
type=custom/script
exec = spolyfy -x ;This command prints a Nerd Font icon
exec-if = [ $(spolyfy -l) = "yep" ]
click-left = spolyfy -s
[module/spotify-next]
type=custom/script
exec = spolyfy -b ;This command prints a Nerd Font icon
exec-if = [ $(spolyfy -l) = "yep" ]
click-left = spolyfy -n
Then you can add the modules in your bar anyway you want
Example
[bar/mybar]
modules-center = spotify-current spotify-previous spotify-play-pause spotify-next
Im not very experienced in Polybar nor Rust, so please feel free to report any bug or improvement to the code ;)