41147ae09a
In feh you can bind multiple keys to the same action, but Home Manager only let you set a single key to an action. You can cheat and pass a string with space-separated keys, but with this change you can pass a list for each action to bind multiple keys to it. Also adds a couple of tests. Fixes #1366
34 lines
665 B
Nix
34 lines
665 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
config = {
|
|
programs.feh.enable = true;
|
|
|
|
programs.feh.buttons = {
|
|
zoom_in = null;
|
|
zoom_out = 4;
|
|
next_img = "C-4";
|
|
prev_img = [ 3 "C-3" ];
|
|
};
|
|
|
|
programs.feh.keybindings = {
|
|
zoom_in = null;
|
|
zoom_out = "minus";
|
|
prev_img = [ "h" "Left" ];
|
|
};
|
|
|
|
nixpkgs.overlays =
|
|
[ (self: super: { feh = pkgs.writeScriptBin "dummy-feh" ""; }) ];
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/feh/buttons \
|
|
${./feh-bindings-expected-buttons}
|
|
|
|
assertFileContent \
|
|
home-files/.config/feh/keys \
|
|
${./feh-bindings-expected-keys}
|
|
'';
|
|
};
|
|
}
|