- First add the flake to your NixOS configuration:
inputs = {
spotify-dbus-control = {
url = "github:0xc000022070/spotify-dbus-control";
# optional
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
...
}
- Integrate it with your own window manager (I'm using Hyprland in this example).
spotify-dbus <flag>
Flags:
--next Go to the next song
--prev Go to the previous song
--toggle Play or pause the current song
--push-back Go back 5 seconds
--push-forward Go forward 5 seconds
--stop Just stop