mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-25 04:14:53 +00:00
more fish initializations
This commit is contained in:
parent
f5508c747c
commit
70d50a8681
@ -1,44 +0,0 @@
|
||||
#!/usr/local/bin/fish
|
||||
|
||||
if status --is-interactive
|
||||
|
||||
# Add directories to path
|
||||
set PATH $PATH \
|
||||
/usr/local/bin \
|
||||
~/.local/bin \
|
||||
$DOTS/bin \
|
||||
~/.cargo/bin
|
||||
|
||||
# Use `vi` in the shell with cursor shapes
|
||||
fish_vi_key_bindings
|
||||
bind yy fish_clipboard_copy
|
||||
bind Y fish_clipboard_copy
|
||||
bind -M visual y fish_clipboard_copy
|
||||
bind p fish_clipboard_paste
|
||||
set -g fish_vi_force_cursor
|
||||
set -g fish_cursor_default block
|
||||
set -g fish_cursor_insert line
|
||||
set -g fish_cursor_visual block
|
||||
set -g fish_cursor_replace_one underscore
|
||||
fish_vi_cursor
|
||||
|
||||
# Autojump
|
||||
zoxide init fish | source
|
||||
|
||||
# Colors
|
||||
if test -e $DOTS/fish.configlink/fish_colors
|
||||
command cat $DOTS/fish.configlink/fish_colors
|
||||
end
|
||||
|
||||
# Fuzzy finder
|
||||
fzf_key_bindings
|
||||
set -gx FZF_DEFAULT_COMMAND 'fd --type file'
|
||||
set -g FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
|
||||
set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
|
||||
|
||||
# Use `starship` prompt
|
||||
starship init fish | source
|
||||
|
||||
# Hook into direnv
|
||||
direnv hook fish | source
|
||||
end
|
@ -1 +0,0 @@
|
||||
]4;1;rgb:cc/24/1d]4;2;rgb:98/97/1a]4;3;rgb:d7/99/21]4;4;rgb:45/85/88]4;5;rgb:b1/62/86]4;6;rgb:68/9d/6a]11;rgb:28/28/28]10;rgb:eb/db/b2]4;0;rgb:28/28/28]4;7;rgb:a8/99/84]4;8;rgb:92/83/74]4;9;rgb:fb/59/34]4;10;rgb:b8/bb/26]4;11;rgb:fa/bd/2f]4;12;rgb:83/a5/98]4;13;rgb:d3/86/9b]4;14;rgb:8e/c0/7c]4;15;rgb:eb/db/b2]4;236;rgb:32/30/2f]4;234;rgb:1d/20/21]4;235;rgb:28/28/28]4;237;rgb:3c/38/36]4;239;rgb:50/49/45]4;241;rgb:66/5c/54]4;243;rgb:7c/6f/64]4;244;rgb:92/83/74]4;245;rgb:92/83/74]4;228;rgb:f2/e5/bc]4;230;rgb:f9/f5/d7]4;229;rgb:fb/f1/c7]4;223;rgb:eb/db/b2]4;250;rgb:d5/c4/a1]4;248;rgb:bd/ae/93]4;246;rgb:a8/99/84]4;167;rgb:fb/49/34]4;142;rgb:b8/bb/26]4;214;rgb:fa/bd/2f]4;109;rgb:83/a5/98]4;175;rgb:d3/86/9b]4;108;rgb:8e/c0/7c]4;208;rgb:fe/80/19]4;88;rgb:9d/00/06]4;100;rgb:79/74/0e]4;136;rgb:b5/76/14]4;24;rgb:07/66/78]4;96;rgb:8f/3f/71]4;66;rgb:42/7b/58]4;130;rgb:af/3a/03
|
@ -3,7 +3,9 @@
|
||||
users.users.${user}.shell = pkgs.fish;
|
||||
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [ fzf exa fd bat ripgrep ];
|
||||
|
||||
home.packages = with pkgs; [ exa fd bat ripgrep ];
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
functions = {
|
||||
@ -40,6 +42,7 @@
|
||||
description = "Tidy up JSON using jq";
|
||||
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
||||
};
|
||||
ls = { body = "exa $argv"; };
|
||||
note = {
|
||||
description = "Edit or create a note";
|
||||
argumentNames = "filename";
|
||||
@ -63,9 +66,19 @@
|
||||
builtins.readFile ../../fish.configlink/functions/syncnotes.fish;
|
||||
};
|
||||
};
|
||||
interactiveShellInit = "";
|
||||
interactiveShellInit = ''
|
||||
bind yy fish_clipboard_copy
|
||||
bind Y fish_clipboard_copy
|
||||
bind -M visual y fish_clipboard_copy
|
||||
bind p fish_clipboard_paste
|
||||
set -g fish_vi_force_cursor
|
||||
set -g fish_cursor_default block
|
||||
set -g fish_cursor_insert line
|
||||
set -g fish_cursor_visual block
|
||||
set -g fish_cursor_replace_one underscore
|
||||
'';
|
||||
loginShellInit = "";
|
||||
shellAliases = { ls = "exa"; };
|
||||
shellAliases = { };
|
||||
shellAbbrs = {
|
||||
|
||||
# Directory aliases
|
||||
@ -141,8 +154,6 @@
|
||||
shellInit = "";
|
||||
};
|
||||
|
||||
home.sessionVariables = { fish_greeting = ""; };
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
@ -153,6 +164,14 @@
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
home.sessionVariables = let fzfCommand = "fd --type file";
|
||||
in {
|
||||
fish_greeting = "";
|
||||
FZF_DEFAULT_COMMAND = fzfCommand;
|
||||
FZF_CTRL_T_COMMAND = fzfCommand;
|
||||
FZF_DEFAULT_OPTS = "-m --height 50% --border";
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
|
Loading…
Reference in New Issue
Block a user