fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert Helgessontests: some minor cleanupsaf715ed8

master
1.3 KiB43 linesraw
1{ lib, pkgs, ... }:
2
3{
4  programs.qutebrowser = {
5    enable = true;
6
7    enableDefaultBindings = false;
8
9    keyBindings = {
10      normal = {
11        "<Ctrl-v>" = "spawn mpv {url}";
12        ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]'';
13        "<F1>" = lib.mkMerge [
14          "config-cycle tabs.show never always"
15          "config-cycle statusbar.show in-mode always"
16          "config-cycle scrolling.bar never always"
17        ];
18      };
19      prompt = { "<Ctrl-y>" = "prompt-yes"; };
20    };
21  };
22
23  test.stubs.qutebrowser = { };
24
25  nmt.script = let
26    qutebrowserConfig = if pkgs.stdenv.hostPlatform.isDarwin then
27      ".qutebrowser/config.py"
28    else
29      ".config/qutebrowser/config.py";
30  in ''
31    assertFileContent \
32      home-files/${qutebrowserConfig} \
33      ${
34        pkgs.writeText "qutebrowser-expected-config.py" ''
35          config.load_autoconfig(False)
36          c.bindings.default = {}
37          config.bind(",l", "config-cycle spellcheck.languages [\"en-GB\"] [\"en-US\"]", mode="normal")
38          config.bind("<Ctrl-v>", "spawn mpv {url}", mode="normal")
39          config.bind("<F1>", "config-cycle tabs.show never always ;; config-cycle statusbar.show in-mode always ;; config-cycle scrolling.bar never always", mode="normal")
40          config.bind("<Ctrl-y>", "prompt-yes", mode="prompt")''
41      }
42  '';
43}