enable fzf

This commit is contained in:
Leonardo Eugênio 2022-08-09 09:23:07 -03:00
parent 1ad8e22a0b
commit 0c67a2e212
3 changed files with 58 additions and 45 deletions

View file

@ -18,9 +18,7 @@
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ]; After = [ "graphical-session.target" ];
}; };
Service = { Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; };
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
};
}; };
}; };
systemd.user.timers = { systemd.user.timers = {

View file

@ -97,6 +97,7 @@ in {
interactiveShellInit = '' interactiveShellInit = ''
set -g __accent_color "${accent.color}" set -g __accent_color "${accent.color}"
alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'" alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'"
fzf_key_bindings
''; '';
shellAbbrs = { shellAbbrs = {
v = "kak"; v = "kak";
@ -122,11 +123,9 @@ in {
}; };
functions = { fish_greeting = ""; }; functions = { fish_greeting = ""; };
}; };
programs.zoxide = { programs.zoxide.enable = true;
enable = true;
enableFishIntegration = true;
};
programs.direnv.enable = true; programs.direnv.enable = true;
programs.fzf.enable = true;
home.file = { home.file = {
".config/fish/conf.d/prompt.fish".source = ./fish_prompt.fish; ".config/fish/conf.d/prompt.fish".source = ./fish_prompt.fish;
".local/share/backgrounds".source = ./backgrounds; ".local/share/backgrounds".source = ./backgrounds;
@ -265,6 +264,22 @@ in {
home.sessionVariables = { home.sessionVariables = {
VOLUME_CHANGE_SOUND = VOLUME_CHANGE_SOUND =
"${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga"; "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
FZF_DEFAULT_OPTS = let
colors = {
"bg+" = color.bg_light;
"hl+" = color.normal.green;
gutter = color.bg;
prompt = accent.color;
pointer = accent.color;
spinner = accent.color;
};
makeKeyValue = (k: v: "${k}:${v}");
makeOptList = lib.mapAttrsToList makeKeyValue colors;
makeColorValue = lib.strings.concatStringsSep "," makeOptList;
color_opts = "--color=${makeColorValue}";
preview_opts =
"--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
in "${preview_opts} ${color_opts}";
}; };
programs.firefox = { programs.firefox = {
enable = true; enable = true;