aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tools/fzf/default.nix
blob: 5ed8442b017d2dcc80eb7ebd6d8655b5d0fc962c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ config, lib,... }:

{
	options.tools.fzf = {
		enable = lib.mkEnableOption "Enables fzf.";
	};

	config = lib.mkIf config.tools.fzf.enable {
		programs.fzf.enable = true;
		programs.fzf.defaultOptions = [
			"--height 40%"
			"--layout=reverse"
			(if config.fonts.nerdfont.fira-code.enable then "--pointer=\"\"" else "--pointer=\">\"")
			"--header=\" \""
			"--border=none"
		];

		programs.fzf.colors = with config.scheme.withHashtag; {
			fg = base05; # Foreground
			bg = base00; # Background
			hl = base0D; # Highlight

			"fg+" = base07; # Foreground for selected item
			"bg+" = base01; # Background for selected item
			"hl+" = base0D; # Highlight for selected item

			info = base0B; # Info text (usually count of items)
			border = base03; # Border color
			prompt = base0A; # Prompt text color
			pointer = base07; # Pointer color (e.g., > for selected)
			marker = base0C; # Marker color (e.g., for multi-select)
			spinner = base0C; # Spinner color (during search)
		};
	};
}