diff options
Diffstat (limited to 'home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix')
-rw-r--r-- | home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix b/home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix new file mode 100644 index 00000000000..02a1f09c902 --- /dev/null +++ b/home-manager/tests/modules/programs/ncmpcpp/ncmpcpp-example-settings.nix @@ -0,0 +1,60 @@ +{ 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} + ''; + }; +} |