depot/third_party/home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix
Default email 72904c318c Project import generated by Copybara.
GitOrigin-RevId: 9bf1f40af124573a54fd208b1f539eb694ef31a6
2020-10-11 17:22:58 -07:00

60 lines
1.3 KiB
Nix

{ pkgs, ... }:
{
config = {
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/user/music";
settings = {
user_interface = "alternative";
display_volume_level = false;
playlist_disable_highlight_delay = 0;
};
bindings = [
{
key = "j";
command = "scroll_down";
}
{
key = "k";
command = "scroll_up";
}
{
key = "J";
command = [ "select_item" "scroll_down" ];
}
{
key = "K";
command = [ "select_item" "scroll_up" ];
}
{
key = "x";
command = "delete_playlist_items";
}
{
key = "x";
command = "delete_browser_items";
}
{
key = "x";
command = "delete_stored_playlist";
}
];
};
nixpkgs.overlays =
[ (self: super: { ncmpcpp = pkgs.writeScriptBin "dummy-ncmpcpp" ""; }) ];
nmt.script = ''
assertFileContent \
home-files/.config/ncmpcpp/config \
${./ncmpcpp-example-settings-expected-config}
assertFileContent \
home-files/.config/ncmpcpp/bindings \
${./ncmpcpp-example-settings-expected-bindings}
'';
};
}