{"id":16120855,"url":"https://github.com/andreasbackx/spotifatius","last_synced_at":"2025-07-25T22:02:48.192Z","repository":{"id":58211916,"uuid":"485043586","full_name":"AndreasBackx/spotifatius","owner":"AndreasBackx","description":"A simple Spotify CLI primarily made for monitoring what songs you're listening to and displaying that in your bar of choice like waybar or polybar.","archived":false,"fork":false,"pushed_at":"2024-10-19T14:07:13.000Z","size":93,"stargazers_count":39,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T07:07:56.673Z","etag":null,"topics":["cli","i3","polybar","spotify","sway","waybar"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreasBackx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-24T14:03:38.000Z","updated_at":"2025-03-12T16:57:44.000Z","dependencies_parsed_at":"2025-01-03T04:11:28.564Z","dependency_job_id":null,"html_url":"https://github.com/AndreasBackx/spotifatius","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.032258064516129004","last_synced_commit":"4e76a9a31b328801e6ff7dbb4b2de375188ce1bf"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasBackx%2Fspotifatius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasBackx%2Fspotifatius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasBackx%2Fspotifatius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasBackx%2Fspotifatius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreasBackx","download_url":"https://codeload.github.com/AndreasBackx/spotifatius/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451654,"owners_count":20940939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","i3","polybar","spotify","sway","waybar"],"created_at":"2024-10-09T20:59:48.675Z","updated_at":"2025-07-25T22:02:48.130Z","avatar_url":"https://github.com/AndreasBackx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotifatius\n\n_Spotify + status + some Latin = Spotifatius._\n\nA simple Spotify CLI primarily made for monitoring what songs you're listening to and displaying that in your bar of choice like [waybar](https://github.com/Alexays/Waybar) or [polybar](https://github.com/polybar/polybar).\n\n## Usage\n\nFirst make sure the `RSPOTIFY_CLIENT_ID` and `RSPOTIFY_CLIENT_SECRET` environment\nvariables are available in your shell environment. They need to contain the\nSpotify developer Client ID and secret. Follow [Spotify's Developer Documentation](https://developer.spotify.com/documentation/web-api/concepts/apps)\non how to set that up, make sure the redirect URI is set to `http://127.0.0.1:8000`.\nOnce done, run `spotifatius monitor` once to setup Spotify access tokens:\n\n\n```shell\n$ spotifatius monitor\nOpened https://accounts.spotify.com/authorize?[...] in your browser.\nPlease enter the URL you were redirected to:\n[INSERT URL HERE]\n{\"text\":\"Twenty One Pilots - Bounce Man\",\"tooltip\":\"Scaled And Icy\",\"class\":[\"playing\"]}\n```\n\nFrom then on, this step will no longer be required. You can then add\n`spotifatius monitor` to your favourite bar, see [Bar Integration](#bar-integration).\nThe first invocation of this command will start a server that is required by\nother commands. If there is already a server running, it will mirror the output\nfrom said server, this is useful if you want the monitoring to show on\nmultiple displays.\n\nTo toggle the liked state anywhere, use `toggle-liked`.\n\n```shell\n$ spotifatius toggle-liked\nAdded to library!\n```\n\nThat will update the monitoring server/client:\n\n```shell\n{\"text\":\"Added to library!\",\"class\":[\"added\"]}\n{\"text\":\"Twenty One Pilots + Bounce Man\",\"tooltip\":\"Scaled And Icy\",\"class\":[\"liked\",\"playing\"]}\n```\n\nDoing that again will remove the liked state:\n\n```shell\n$ spotifatius toggle-liked\nRemoved from library!\n```\n\n```shell\n{\"text\":\"Removed from library!\",\"class\":[\"removed\"]}\n{\"text\":\"Twenty One Pilots - Bounce Man\",\"tooltip\":\"Scaled And Icy\",\"class\":[\"playing\"]}\n```\n\nBy default, liked songs also have a `+` instead of a `-` between the artist and song title.\n\n## Bar Integration\n\nHere are some configuration examples for the supported bars.\n\n### Waybar\n\nAdd the following to make it available as a module:\n\n```json\n\"custom/spotify\": {\n    \"format\": \"{}\",\n    \"return-type\": \"json\",\n    \"on-click-right\": \"spotifatius toggle-liked\",\n    \"exec\": \"spotifatius monitor\"\n}\n```\n\nThe following classes are supported:\n* `playing`: the current song is playing.\n* `paused`: the current song is paused.\n* `stopped`: the current song is stopped.\n* `liked`: the current song is in your liked songs.\n* `added`: there's a message being displayed saying the song was just added to your liked songs.\n* `removed`: there's a message being displayed saying the song was just removed to your liked songs.\n\n### Polybar\n\n```ini\n[module/spotify]\ntype = custom/script\nexec = spotifatius monitor --output-type polybar\ntail = true\nclick-right = spotifatius toggle-liked\n```\n\n## config.toml options\n\n### format\n\n🗒 **Note:** These formatting options are not yet final and might change in upcoming versions. They won't be considered breaking changes as a result, though a minor version bump will be done if this changes. [More info.](https://github.com/AndreasBackx/spotifatius/pull/8)\n\nThe JSON output can be formatted using the `format` var in config.toml:\n\nExample 1:\n```toml\nformat = \"{status} {title} {separator} {artist}\" # {\"text\":\"  Bounce Man + Twenty One Pilots\",\"tooltip\":\"Scaled And Icy\",\"class\":[\"liked\", \"playing\"]}\n```\n\nExample 2:\n```toml\nformat = \"{artist} -- {title}\" # {\"text\":\"Twenty One Pilots -- Bounce Man\",\"tooltip\":\"Scaled And Icy\",\"class\":[\"liked\", \"playing\"]}\n```\n\nDefault format is `{artist} {separator} {title}`\n\nAvailable options:\n| Name        | Function |\n| ---         | --- |\n| {status}    | Unicode symbol for playing/paused track |\n| {title}     | Current track title |\n| {artist}    | Current track artist |\n| {separator} | + if current track is a liked song, - if not |\n\n\n### polybar\n\nPolybar maps the classes from the [waybar](#waybar) output to colors that you can define in your config file `~/.config/spotifatius/config.toml`:\n\n```toml\n[polybar]\n[polybar.colors]\n# added = \"\"\n# liked = \"\"\npaused = \"#6E6E6E\"\nplaying = \"#CECECE\"\n# removed = \"\"\n```\n\n_By default there are no colors set for polybar._\n\nSome example output:\n\n```shell\n$ spotifatius monitor --output-type polybar\n# Output for playing unliked song.\n%{F#CECECE}Twenty One Pilots - Bounce Man%{F-}\n# Output for playing liked song.\n%{F#CECECE}Twenty One Pilots + Bounce Man%{F-}\n# Output for paused liked song.\n%{F#6E6E6E}Twenty One Pilots + Bounce Man%{F-}\n```\n\n## Server/Client via gRPC\n\nSpotifatius' monitor command will be default because a gRPC server that is streaming monitor updates, see [proto/service.proto](proto/service.proto). If a monitor instance detects the port is already used by another monitor instance, it will start listening over gRPC so all instances are in sync. As of writing, closing the server instance will also close the client.\n\n## Installation\n\nIf you would like spotifatius to be available on your distro's package manager, feel free to make an issue if you have some time to help.\n\n### Arch User Repository (AUR)\n\n```zsh\nparu -S spotifatius\n```\n\n### Cargo (crates.io)\n\n```zsh\ncargo install spotifatius --locked\n```\n\n### Manually\n\n```zsh\ngit clone git@github.com:AndreasBackx/spotifatius.git\ncd spotifatius\ncargo install --path . --locked\n```\n\n## Logging\n\nPass `RUST_LOG` with either `trace`, `debug`, `info`, `warn`, or `error` to set the logging level, default is `error`. See [tracing-subcriber documentation for more info](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/index.html#filtering-events-with-environment-variables).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasbackx%2Fspotifatius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasbackx%2Fspotifatius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasbackx%2Fspotifatius/lists"}