diff --git a/modules/home/atuin.nix b/modules/home/atuin.nix index 414910d..02cec30 100644 --- a/modules/home/atuin.nix +++ b/modules/home/atuin.nix @@ -2,5 +2,17 @@ programs.atuin = { enable = true; enableFishIntegration = true; + daemon = { + enable = true; + }; + flags = [ + "--disable-up-arrow" + ]; + settings = { + style = "compact"; + inline_height = 0; + show_help = false; + show_tabs = false; + }; }; } diff --git a/modules/home/default.nix b/modules/home/default.nix index 5f1a9dd..86280d4 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -8,6 +8,7 @@ ./bat.nix ./eza.nix ./fish.nix + ./fzf.nix ./git.nix ./lazygit.nix ./mise.nix diff --git a/modules/home/fish.nix b/modules/home/fish.nix index 0050bf5..0f3117a 100644 --- a/modules/home/fish.nix +++ b/modules/home/fish.nix @@ -1,6 +1,15 @@ { programs.fish = { enable = true; + functions = { + open_project = '' + set -l base "$HOME/Projects" + set -l choice (fd -t d -d 1 -a . "$base/Personal" "$base/Work" \ + | string replace -r -- "^$base/" "" \ + | fzf --prompt "project > ") + test -n "$choice"; and cd "$base/$choice" + ''; + }; interactiveShellInit = '' set fish_greeting @@ -32,6 +41,10 @@ set fish_pager_color_description 9ca0b0 set -gx LS_COLORS "$(vivid generate catppuccin-latte)" + + for mode in default insert + bind --mode $mode \cp open_project + end ''; }; } diff --git a/modules/home/fzf.nix b/modules/home/fzf.nix new file mode 100644 index 0000000..a9763b1 --- /dev/null +++ b/modules/home/fzf.nix @@ -0,0 +1,24 @@ +{ + programs.fzf = { + enable = true; + enableFishIntegration = true; + }; + + home.sessionVariables = { + FZF_DEFAULT_OPTS = '' + --bind=alt-k:up,alt-j:down + --expect=tab,enter + --layout=reverse + --delimiter='\t' + --with-nth=1 + --preview-window='border-rounded' --prompt=' ' --marker=' ' --pointer=' ' + --separator='─' --scrollbar='┃' --layout='reverse' + + --color=bg+:#CCD0DA,bg:#EFF1F5,spinner:#DC8A78,hl:#D20F39 + --color=fg:#4C4F69,header:#D20F39,info:#8839EF,pointer:#DC8A78 + --color=marker:#7287FD,fg+:#4C4F69,prompt:#8839EF,hl+:#D20F39 + --color=selected-bg:#BCC0CC + --color=border:#9CA0B0,label:#4C4F69 + ''; + }; +} diff --git a/modules/packages.nix b/modules/packages.nix index 0c5dc9b..e51240e 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -7,7 +7,6 @@ with pkgs; [ docker-compose fastfetch fd - fzf gh git gnupg