mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 22:45:37 +00:00
fzf improvements
This commit is contained in:
parent
6a47ffa024
commit
74e53a3cd1
@ -5,6 +5,7 @@
|
|||||||
programs.alacritty.settings = {
|
programs.alacritty.settings = {
|
||||||
font.size = lib.mkForce 20.0;
|
font.size = lib.mkForce 20.0;
|
||||||
shell.program = "${pkgs.fish}/bin/fish";
|
shell.program = "${pkgs.fish}/bin/fish";
|
||||||
|
window.startup_mode = "SimpleFullScreen";
|
||||||
key_bindings = [
|
key_bindings = [
|
||||||
{
|
{
|
||||||
key = "F";
|
key = "F";
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
homebrew.casks = [ "hammerspoon" ];
|
homebrew.casks = [ "hammerspoon" ];
|
||||||
|
|
||||||
system.activationScripts.hammerspoon.text = ''
|
system.activationScripts.postUserActivation.text = ''
|
||||||
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
|
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
|
|
||||||
# Homebrew - Mac-specific packages that aren't in Nix
|
# Homebrew - Mac-specific packages that aren't in Nix
|
||||||
# Requires Homebrew to be installed (works if you rebuild twice)
|
|
||||||
|
# Requires Homebrew to be installed
|
||||||
|
system.activationScripts.preUserActivation.text = ''
|
||||||
|
if ! xcode-select --version 2>/dev/null; then
|
||||||
|
$DRY_RUN_CMD xcode-select --install
|
||||||
|
fi
|
||||||
|
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
||||||
|
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -32,22 +41,6 @@
|
|||||||
|
|
||||||
programs.fish.shellAbbrs.t = "trash";
|
programs.fish.shellAbbrs.t = "trash";
|
||||||
|
|
||||||
home.activation = {
|
|
||||||
|
|
||||||
# Always install homebrew if it doesn't exist
|
|
||||||
installHomeBrew =
|
|
||||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
|
||||||
[ "writeBoundary" ] ''
|
|
||||||
if ! xcode-select --version 2>/dev/null; then
|
|
||||||
$DRY_RUN_CMD xcode-select --install
|
|
||||||
fi
|
|
||||||
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
|
||||||
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.alacritty.settings = {
|
programs.alacritty.settings = {
|
||||||
shell.args = [
|
# shell.args = [
|
||||||
"--login"
|
# "--login"
|
||||||
"--init-command"
|
# "--init-command"
|
||||||
"tmux attach-session -t noah || tmux new-session -s noah"
|
# "tmux attach-session -t noah || tmux new-session -s noah"
|
||||||
];
|
# ];
|
||||||
key_bindings = [
|
key_bindings = [
|
||||||
{
|
{
|
||||||
key = "H";
|
key = "H";
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
set vimfile (
|
set vimfile ( \
|
||||||
rg \
|
rg \
|
||||||
--color=always \
|
--color=always \
|
||||||
--line-number \
|
--line-number \
|
||||||
--no-heading \
|
--no-heading \
|
||||||
--smart-case \
|
--smart-case \
|
||||||
--iglob !/Library/** \
|
--iglob "!/Library/**" \
|
||||||
--iglob !/System/** \
|
--iglob "!/System/**" \
|
||||||
--iglob "!Users/$HOME/Library/*" \
|
--iglob "!Users/$HOME/Library/*" \
|
||||||
|
".*" \
|
||||||
| fzf --ansi \
|
| fzf --ansi \
|
||||||
|
--height "80%" \
|
||||||
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||||
--delimiter : \
|
--delimiter : \
|
||||||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
|
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
|
||||||
)
|
)
|
||||||
and set vimfile (echo $vimfile | tr -d '\r')
|
and set vimfile (echo $vimfile | tr -d '\r' | cut -d':' -f1)
|
||||||
and commandline -r "vim $vimfile"
|
and commandline -r "vim $vimfile"
|
||||||
and commandline -f execute
|
and commandline -f execute
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
--hidden \
|
--hidden \
|
||||||
--exclude ".local/**" \
|
--exclude ".local/**" \
|
||||||
"^.git\$" \
|
"^.git\$" \
|
||||||
|
| xargs dirname \
|
||||||
| fzf)
|
| fzf)
|
||||||
and cd ${config.homePath}/dev/personal/$projdir
|
and cd $projdir
|
||||||
and commandline -f execute
|
and commandline -f execute
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user