-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- shell integration - fuzzy completion on `cd <stuff>**` -> Tab - hotkeys - file/folder previews - working with enhancd (`cd`): https://codeberg.org/kiara/cfg/issues/130 - supporting pageup / pagedown: charmbracelet/gum#499 - actually allowing querying out of order - charmbracelet/gum#500 - anyrun-org/anyrun#135
- Loading branch information
1 parent
162976b
commit 28ac8aa
Showing
7 changed files
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,6 @@ | |
]; | ||
}; | ||
|
||
fzf.enable = true; | ||
|
||
# argument completer | ||
carapace = { | ||
enable = true; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{pkgs, inputs, ...}: | ||
|
||
with (import ./commands.nix {inherit pkgs inputs;}); | ||
{ | ||
|
||
programs.fzf = { | ||
enable = true; | ||
# https://github.com/junegunn/fzf#fuzzy-completion-for-bash-and-zsh | ||
enableZshIntegration = true; | ||
# colors = { | ||
# bg = "#000000"; | ||
# "bg+" = "#FF00FF"; | ||
# fg = "#FF00FF"; | ||
# "fg+" = "#000000"; | ||
# }; | ||
defaultOptions = [ | ||
"--sort" | ||
"--height 100%" | ||
"--border" | ||
"--preview '${pistol} {}'" | ||
]; | ||
# hotkeys: https://github.com/junegunn/fzf#key-bindings-for-command-line | ||
# CTRL-T: take file | ||
fileWidgetOptions = [ | ||
"--preview '${pistol} {}'" | ||
]; | ||
# CTRL-R: redo | ||
historyWidgetOptions = [ | ||
"--sort" | ||
"--exact" | ||
"--preview 'echo {}'" | ||
"--preview-window up:3:hidden:wrap" | ||
"--bind 'ctrl-/:toggle-preview'" | ||
"--bind 'ctrl-y:execute-silent(echo -n {2..} | ${wl-copy})+abort'" | ||
"--color header:italic" | ||
"--header 'Press CTRL-Y to copy command into clipboard'" | ||
]; | ||
# ALT-C: cd | ||
changeDirWidgetOptions = [ | ||
"--preview '${pistol} {}'" | ||
]; | ||
}; | ||
|
||
home.sessionVariables.ENHANCD_FILTER = "${fzf} --preview '${pistol} {}'"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
./emacs.nix | ||
./firefox.nix | ||
./font.nix | ||
./fzf.nix | ||
./gammastep.nix | ||
./git.nix | ||
./gtk.nix | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env -S nix shell nixpkgs#wl-clipboard nixpkgs#gum --command sh | ||
cat $1 | gum filter | cut -d ' ' -f 1 | tr -d '\n' | wl-copy | ||
#!/usr/bin/env -S nix shell nixpkgs#wl-clipboard nixpkgs#fzf --command sh | ||
cat $1 | fzf | cut -d ' ' -f 1 | tr -d '\n' | wl-copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters