Shell config refactor

This commit is contained in:
Agatha Lovelace 2023-12-17 21:08:04 +01:00
parent 7cfb7d1f49
commit c60b412005
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
1 changed files with 19 additions and 17 deletions

View File

@ -10,14 +10,12 @@
bat
btop
choose
exa
eza
fd
fzf
gnupg
ouch
ripgrep
tealdeer
zoxide
];
programs = {
@ -114,6 +112,14 @@
};
}
];
shellAliases = {
ls = "eza -lFhT --group-directories-first --level 1";
cat = "bat";
ip = "ip -color=always";
youtube-dl-audio = ''
yt-dlp --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format best'';
rsync = "rsync -az --partial --info=progress2";
};
functions = {
expand-dot-to-parent-directory-path = ''
# expand ... to ../.. etc
@ -154,12 +160,6 @@
fish_add_path -a (ruby -e 'print Gem.user_dir')/bin
end
# Aliases
alias cat bat
alias ip 'ip -color=always'
alias youtube-dl-audio 'yt-dlp --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format best'
alias rsync 'rsync -az --partial --info=progress2'
bind . 'expand-dot-to-parent-directory-path'
if test -d ~/.gnupg
@ -170,15 +170,17 @@
gpg-connect-agent updatestartuptty /bye > /dev/null
end
'';
interactiveShellInit = ''
if type -q exa
alias ls 'exa -lFhT --group-directories-first --level 1'
end
};
if type -q zoxide
zoxide init --cmd v fish | source
end
'';
tealdeer = {
enable = true;
settings = { updates.auto_update = true; };
};
zoxide = {
enable = true;
enableFishIntegration = true;
options = [ "--cmd v" ];
};
command-not-found.enable = false;