Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions home-manager/modules/tools/fzf.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# fzf: mature fuzzy finder (Go), battle-tested shell integrations
# Activates Ctrl+R (history), Ctrl+T (files), Alt+C (dirs) in zsh
# Preview powered by bat + ripgrep (already in core packages)
{
programs.fzf = {
enable = true;
enableZshIntegration = true;

# Respect .gitignore; surface hidden files that aren't git internals
defaultCommand = "rg --files --hidden --follow --glob '!.git'";

defaultOptions = [
"--height=50%"
"--layout=reverse"
"--border=rounded"
"--preview='bat --style=numbers,changes --color=always --line-range=:200 {}'"
"--preview-window=right:55%:wrap"
];

# Ctrl+T file picker
fileWidgetCommand = "rg --files --hidden --follow --glob '!.git'";
fileWidgetOptions = [
"--preview 'bat --style=numbers,changes --color=always --line-range=:300 {}'"
];

# Alt+C directory picker
changeDirWidgetOptions = [
"--preview 'ls -la {}'"
];
};
}
23 changes: 23 additions & 0 deletions home-manager/modules/tools/television.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs, ... }:

# television (tv): modern fuzzy finder (Rust), channel-based architecture
# Unlike fzf's single-stream model, tv has typed "channels":
# tv files, tv text, tv git-log, tv git-refs, tv shell-history, tv env, tv alias
# No automatic shell keybindings — invoked explicitly as `tv [channel]`
# Tradeoff: more structured/visual than fzf, but less drop-in for existing workflows
{
home.packages = [ pkgs.television ];

# Wire `tv` into Ctrl+R for shell history as an fzf alternative
# Remove or adjust if using fzf.nix alongside this module
programs.zsh.initExtra = ''
tv_history() {
local selected
selected=$(tv shell-history 2>/dev/null)
LBUFFER="$selected"
zle redisplay
}
zle -N tv_history
bindkey '^R' tv_history
'';
}
Loading