1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 08:49:44 +01:00
home-manager/tests/modules/programs/spotify-player/settings.nix
diniamo c7cfdb3864
spotify-player: add support for actions
Actions were added in the v0.19.1 release.
2024-10-25 10:04:48 +02:00

119 lines
2.6 KiB
Nix

{
programs.spotify-player = {
enable = true;
settings = {
theme = "default";
playback_window_position = "Top";
copy_command = {
command = "wl-copy";
args = [ ];
};
device = {
audio_cache = false;
normalization = false;
};
};
themes = [{
name = "default2";
palette = {
black = "black";
red = "red";
green = "green";
yellow = "yellow";
blue = "blue";
magenta = "magenta";
cyan = "cyan";
white = "white";
bright_black = "bright_black";
bright_red = "bright_red";
bright_green = "bright_green";
bright_yellow = "bright_yellow";
bright_blue = "bright_blue";
bright_magenta = "bright_magenta";
bright_cyan = "bright_cyan";
bright_white = "bright_white";
};
component_style = {
block_title = { fg = "Magenta"; };
border = { };
playback_track = {
fg = "Cyan";
modifiers = [ "Bold" ];
};
playback_artists = {
fg = "Cyan";
modifiers = [ "Bold" ];
};
playback_album = { fg = "Yellow"; };
playback_metadata = { fg = "BrightBlack"; };
playback_progress_bar = {
bg = "BrightBlack";
fg = "Green";
};
current_playing = {
fg = "Green";
modifiers = [ "Bold" ];
};
page_desc = {
fg = "Cyan";
modifiers = [ "Bold" ];
};
table_header = { fg = "Blue"; };
selection = { modifiers = [ "Bold" "Reversed" ]; };
};
}];
keymaps = [
{
command = "NextTrack";
key_sequence = "g n";
}
{
command = "PreviousTrack";
key_sequence = "g p";
}
{
command = "Search";
key_sequence = "C-c C-x /";
}
{
command = "ResumePause";
key_sequence = "M-enter";
}
{
command = "None";
key_sequence = "q";
}
];
actions = [
{
action = "GoToArtist";
key_sequence = "g A";
}
{
action = "GoToAlbum";
key_sequence = "g B";
target = "PlayingTrack";
}
{
action = "ToggleLiked";
key_sequence = "C-l";
}
];
};
test.stubs.spotify-player = { };
nmt.script = ''
assertFileContent home-files/.config/spotify-player/app.toml ${./app.toml}
assertFileContent home-files/.config/spotify-player/theme.toml ${
./theme.toml
}
assertFileContent home-files/.config/spotify-player/keymap.toml ${
./keymap.toml
}
'';
}