-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove unnecessary ignored file * Use proper option for setting color scheme * Enable zsh integration for fzf * Improve commands/options used by fzf * Enable fd * Enable jq Also setup jqp which is a jq playground. * Fix fzf-tab height * Add keybinding to open fzf selected files in hx
- Loading branch information
1 parent
c5d81a1
commit 293a087
Showing
5 changed files
with
62 additions
and
9 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 |
---|---|---|
@@ -1,2 +1 @@ | ||
.direnv | ||
result |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ ... }: | ||
|
||
{ | ||
programs.fd.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 |
---|---|---|
@@ -1,15 +1,50 @@ | ||
{ pkgs, ... }: | ||
|
||
{ config, pkgs, lib, ... }: | ||
let | ||
fd = "${config.programs.fd.package}/bin/fd"; | ||
fileCommand = "${fd} --type=file"; | ||
openWithHx = '' | ||
fzf_with_hx() { | ||
${config.programs.fzf.package}/bin/fzf --multi --bind 'enter:become(${config.programs.helix.package}/bin/hx {+})' | ||
} | ||
bindkey -s '^o' 'fzf_with_hx\n' | ||
''; | ||
in | ||
{ | ||
home = { | ||
packages = [ pkgs.zsh-fzf-tab ]; | ||
sessionVariables.FZF_DEFAULT_OPTS = "--color=bg+:#3B4252,bg:#2E3440,spinner:#81A1C1,hl:#616E88,fg:#D8DEE9,header:#616E88,info:#81A1C1,pointer:#81A1C1,marker:#81A1C1,fg+:#D8DEE9,prompt:#81A1C1,hl+:#81A1C1"; | ||
}; | ||
home.packages = [ pkgs.zsh-fzf-tab ]; | ||
|
||
programs = { | ||
fzf.enable = true; | ||
fzf = { | ||
enable = true; | ||
enableZshIntegration = true; | ||
colors = { | ||
"bg+" = "#3B4252"; | ||
"bg" = "#2E3440"; | ||
"spinner" = "#81A1C1"; | ||
"hl" = "#616E88"; | ||
"fg" = "#D8DEE9"; | ||
"header" = "#616E88"; | ||
"info" = "#81A1C1"; | ||
"pointer" = "#81A1C1"; | ||
"marker" = "#81A1C1"; | ||
"fg+" = "#D8DEE9"; | ||
"prompt" = "#81A1C1"; | ||
"hl+" = "#81A1C1"; | ||
}; | ||
defaultCommand = fileCommand; | ||
defaultOptions = [ | ||
"--height=40%" | ||
"--layout=reverse" | ||
"--info=inline" | ||
"--border" | ||
"--margin=1" | ||
"--padding=1" | ||
]; | ||
fileWidgetCommand = fileCommand; | ||
changeDirWidgetCommand = "${fd} --type=directory"; | ||
}; | ||
zsh.initExtra = '' | ||
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh | ||
''; | ||
zstyle ':fzf-tab:*' fzf-flags --height=40% | ||
'' + lib.optionalString (config.programs.helix.enable) openWithHx; | ||
}; | ||
} |
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,12 @@ | ||
{ pkgs, ... }: | ||
|
||
{ | ||
home.packages = [ | ||
pkgs.jqp | ||
]; | ||
|
||
programs = { | ||
jq.enable = true; | ||
zsh.shellAliases.jqp = "jqp --theme nord"; | ||
}; | ||
} |