default.nix (1594B)
1 { 2 lib, 3 pkgs, 4 5 user, 6 ... 7 }: 8 { 9 home-manager.users.${user} = 10 { config, ... }: 11 { 12 options.programs.glirc = { 13 extraConfig = lib.mkOption { 14 type = with lib.types; nullOr lines; 15 default = null; 16 }; 17 }; 18 19 config = 20 let 21 cfg = config.programs.glirc; 22 in 23 { 24 home.packages = [ pkgs.glirc ]; 25 26 xdg.configFile."glirc/config" = lib.mkIf (cfg.extraConfig != null) { 27 text = cfg.extraConfig; 28 }; 29 30 programs.glirc.extraConfig = lib.mkBefore '' 31 notifications: yes 32 33 key-bindings: 34 * bind: "C-d" 35 action: scroll-down-small 36 * bind: "C-u" 37 action: scroll-up-small 38 * bind: "C-f" 39 action: scroll-down 40 * bind: "C-b" 41 action: scroll-up 42 * bind: "C-a" 43 action: jump-to-activity 44 * bind: "C-s" 45 action: jump-to-previous 46 47 * bind: "C-o" 48 action: clear-format 49 * bind: "C-c" 50 action: color 51 * bind: "C-v" 52 action: reverse-video 53 54 -- ^4 55 * bind: "C-\\" 56 action: bold 57 58 -- ^5 59 * bind: "C-]" 60 action: italic 61 62 -- ^6 63 * bind: "C-^" 64 action: strikethrough 65 66 -- ^7 67 * bind: "C-_" 68 action: underline 69 ''; 70 }; 71 }; 72 }