[GH-ISSUE #616] Allow changing step for volume up/down #1294

Closed
opened 2026-03-14 14:17:31 +03:00 by kerem · 4 comments
Owner

Originally created by @repparw on GitHub (Nov 27, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/616

Allow to set a different step for volumeup/down keymaps instead of always using 5.

Maybe a config option, or an optional argument after the command (volumeup 2 instead of volumeup)

Originally created by @repparw on GitHub (Nov 27, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/616 Allow to set a different step for volumeup/down keymaps instead of always using 5. Maybe a config option, or an optional argument after the command (volumeup 2 instead of volumeup)
kerem 2026-03-14 14:17:31 +03:00
Author
Owner

@DOD-101 commented on GitHub (Dec 7, 2024):

If we change this into being an adjustable amount, would it not also make sense to have just one command (e.g. VolumeChange) to adjust the volume up or down. Then you could simply pass a positive or negative value.

This would also then be similar to the CLI option to change the volume. Thoughts @aome510?

<!-- gh-comment-id:2525242510 --> @DOD-101 commented on GitHub (Dec 7, 2024): If we change this into being an adjustable amount, would it not also make sense to have just one command (e.g. `VolumeChange`) to adjust the volume up or down. Then you could simply pass a positive or negative value. This would also then be similar to the CLI option to change the volume. Thoughts @aome510?
Author
Owner

@aome510 commented on GitHub (Dec 7, 2024):

If we change this into being an adjustable amount, would it not also make sense to have just one command (e.g. VolumeChange) to adjust the volume up or down. Then you could simply pass a positive or negative value.

This would also then similar to the CLI option to change the volume. Thoughts @aome510?

sounds good

<!-- gh-comment-id:2525305946 --> @aome510 commented on GitHub (Dec 7, 2024): > If we change this into being an adjustable amount, would it not also make sense to have just one command (e.g. `VolumeChange`) to adjust the volume up or down. Then you could simply pass a positive or negative value. > > This would also then similar to the CLI option to change the volume. Thoughts @aome510? sounds good
Author
Owner

@repparw commented on GitHub (Dec 10, 2024):

Sorry just checking this, but this makes it have a different format from all other commands.

Maybe make offset implicit. e.g "VolumeChange -2"

This also affects nix/home-manager configs... can't pass {{}} to command when the module expects strings.

programs.spotify-player = {
    enable = true;
    keymaps = [
      {
        command = { VolumeChange = { offset = 2 } };
        key_sequence = "0";
      }
      {
        command = { VolumeChange = { offset = -2 } };
        key_sequence = "9";
      }
      {
        command = "Mute";
        key_sequence = "m";
      }
      {
        command = "NextTrack";
        key_sequence = "n";
      }
      {
        command = "PreviousTrack";
        key_sequence = "b";
      }
      {
        command = "PreviousTrack";
        key_sequence = "p";
      }
      {
        command = "PreviousPage";
        key_sequence = "q";
      }
      {
        command = "FocusNextWindow";
        key_sequence = "l";
      }
      {
        command = "FocusPreviousWindow";
        key_sequence = "h";
      }
      {
        command = "Quit";
        key_sequence = "C-q";
      }
      {
        command = "LibraryPage";
        key_sequence = "g h";
      }
      {
        command = "LyricPage";
        key_sequence = "g l";
      }
    ];
    actions = [
      {
        action = "CopyLink";
        key_sequence = "y";
        target = "PlayingTrack";
      }
      {
        action = "CopyLink";
        key_sequence = "Y";
      }
      {
        action = "GoToArtist";
        key_sequence = "g A";
        target = "PlayingTrack";
      }
      {
        action = "GoToAlbum";
        key_sequence = "g B";
        target = "PlayingTrack";
      }
      {
        action = "ToggleLiked";
        key_sequence = "C-l";
        target = "PlayingTrack";
      }
    ];
<!-- gh-comment-id:2532911131 --> @repparw commented on GitHub (Dec 10, 2024): Sorry just checking this, but this makes it have a different format from all other commands. Maybe make offset implicit. e.g "VolumeChange -2" This also affects nix/home-manager configs... can't pass {{}} to command when the module expects strings. ``` programs.spotify-player = { enable = true; keymaps = [ { command = { VolumeChange = { offset = 2 } }; key_sequence = "0"; } { command = { VolumeChange = { offset = -2 } }; key_sequence = "9"; } { command = "Mute"; key_sequence = "m"; } { command = "NextTrack"; key_sequence = "n"; } { command = "PreviousTrack"; key_sequence = "b"; } { command = "PreviousTrack"; key_sequence = "p"; } { command = "PreviousPage"; key_sequence = "q"; } { command = "FocusNextWindow"; key_sequence = "l"; } { command = "FocusPreviousWindow"; key_sequence = "h"; } { command = "Quit"; key_sequence = "C-q"; } { command = "LibraryPage"; key_sequence = "g h"; } { command = "LyricPage"; key_sequence = "g l"; } ]; actions = [ { action = "CopyLink"; key_sequence = "y"; target = "PlayingTrack"; } { action = "CopyLink"; key_sequence = "Y"; } { action = "GoToArtist"; key_sequence = "g A"; target = "PlayingTrack"; } { action = "GoToAlbum"; key_sequence = "g B"; target = "PlayingTrack"; } { action = "ToggleLiked"; key_sequence = "C-l"; target = "PlayingTrack"; } ]; ```
Author
Owner

@DOD-101 commented on GitHub (Dec 10, 2024):

Sorry just checking this

No worries mate.

I just checked and this does work with home manager:

        {
          command = {
            VolumeChange = {
              offset = 2;
            };
          };
          key_sequence = "0";
        }

The TOML output looks a bit different but works the same.

Do keep in mind that this hasn't yet made it into a release, meaning if you want to use this currently, you will need to build from source.

<!-- gh-comment-id:2532932800 --> @DOD-101 commented on GitHub (Dec 10, 2024): > Sorry just checking this No worries mate. I just checked and this does work with home manager: ```nix { command = { VolumeChange = { offset = 2; }; }; key_sequence = "0"; } ``` The TOML output looks a bit different but works the same. Do keep in mind that this hasn't yet made it into a release, meaning if you want to use this currently, you will need to build from source.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1294
No description provided.