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 bat
btop btop
choose choose
exa eza
fd fd
fzf fzf
gnupg gnupg
ouch ouch
ripgrep ripgrep
tealdeer
zoxide
]; ];
programs = { 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 = { functions = {
expand-dot-to-parent-directory-path = '' expand-dot-to-parent-directory-path = ''
# expand ... to ../.. etc # expand ... to ../.. etc
@ -154,12 +160,6 @@
fish_add_path -a (ruby -e 'print Gem.user_dir')/bin fish_add_path -a (ruby -e 'print Gem.user_dir')/bin
end 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' bind . 'expand-dot-to-parent-directory-path'
if test -d ~/.gnupg if test -d ~/.gnupg
@ -170,15 +170,17 @@
gpg-connect-agent updatestartuptty /bye > /dev/null gpg-connect-agent updatestartuptty /bye > /dev/null
end end
''; '';
interactiveShellInit = '' };
if type -q exa
alias ls 'exa -lFhT --group-directories-first --level 1'
end
if type -q zoxide tealdeer = {
zoxide init --cmd v fish | source enable = true;
end settings = { updates.auto_update = true; };
''; };
zoxide = {
enable = true;
enableFishIntegration = true;
options = [ "--cmd v" ];
}; };
command-not-found.enable = false; command-not-found.enable = false;