aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/skim.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
commitc488527c95c874d3b8743c915173ad7bfb05d5af (patch)
tree2b874dc5606a9dff44096a5e8557f00dc52ac2b6 /home-manager/modules/programs/skim.nix
parent899a451e08f7d6d2c8214d119c2a0316849a0ed4 (diff)
parent6cc4fd6ede4909226cb81d3475834251ed1b7210 (diff)
Merge commit '6cc4fd6ede4909226cb81d3475834251ed1b7210'
Diffstat (limited to 'home-manager/modules/programs/skim.nix')
-rw-r--r--home-manager/modules/programs/skim.nix36
1 files changed, 16 insertions, 20 deletions
diff --git a/home-manager/modules/programs/skim.nix b/home-manager/modules/programs/skim.nix
index de1bff30fce..c90fe1b1a35 100644
--- a/home-manager/modules/programs/skim.nix
+++ b/home-manager/modules/programs/skim.nix
@@ -6,9 +6,7 @@ let
cfg = config.programs.skim;
-in
-
-{
+in {
options.programs.skim = {
enable = mkEnableOption "skim - a command-line fuzzy finder";
@@ -24,7 +22,7 @@ in
defaultOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ ];
example = [ "--height 40%" "--prompt ⟫" ];
description = ''
Extra command line options given to skim by default.
@@ -43,7 +41,7 @@ in
fileWidgetOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ ];
example = [ "--preview 'head {}'" ];
description = ''
Command line options for the CTRL-T keybinding.
@@ -53,7 +51,7 @@ in
changeDirWidgetCommand = mkOption {
type = types.nullOr types.str;
default = null;
- example = "fd --type d" ;
+ example = "fd --type d";
description = ''
The command that gets executed as the source for skim for the
ALT-C keybinding.
@@ -62,7 +60,7 @@ in
changeDirWidgetOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ ];
example = [ "--preview 'tree -C {} | head -200'" ];
description = ''
Command line options for the ALT-C keybinding.
@@ -71,7 +69,7 @@ in
historyWidgetOptions = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ ];
example = [ "--tac" "--exact" ];
description = ''
Command line options for the CTRL-R keybinding.
@@ -98,18 +96,16 @@ in
config = mkIf cfg.enable {
home.packages = [ pkgs.skim ];
- home.sessionVariables =
- mapAttrs (n: v: toString v) (
- filterAttrs (n: v: v != [] && v != null) {
- SKIM_ALT_C_COMMAND = cfg.changeDirWidgetCommand;
- SKIM_ALT_C_OPTS = cfg.changeDirWidgetOptions;
- SKIM_CTRL_R_OPTS = cfg.historyWidgetOptions;
- SKIM_CTRL_T_COMMAND = cfg.fileWidgetCommand;
- SKIM_CTRL_T_OPTS = cfg.fileWidgetOptions;
- SKIM_DEFAULT_COMMAND = cfg.defaultCommand;
- SKIM_DEFAULT_OPTIONS = cfg.defaultOptions;
- }
- );
+ home.sessionVariables = mapAttrs (n: v: toString v)
+ (filterAttrs (n: v: v != [ ] && v != null) {
+ SKIM_ALT_C_COMMAND = cfg.changeDirWidgetCommand;
+ SKIM_ALT_C_OPTS = cfg.changeDirWidgetOptions;
+ SKIM_CTRL_R_OPTS = cfg.historyWidgetOptions;
+ SKIM_CTRL_T_COMMAND = cfg.fileWidgetCommand;
+ SKIM_CTRL_T_OPTS = cfg.fileWidgetOptions;
+ SKIM_DEFAULT_COMMAND = cfg.defaultCommand;
+ SKIM_DEFAULT_OPTIONS = cfg.defaultOptions;
+ });
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
if [[ :$SHELLOPTS: =~ :(vi|emacs): ]]; then