Centralize some stuff

work
Matthew Ess 2021-01-10 23:19:57 -05:00
parent 2477bacb5d
commit bf0a976d4a
2 changed files with 10 additions and 31 deletions

View File

@ -2,28 +2,6 @@
enable = true; enable = true;
package = pkgs.fish; package = pkgs.fish;
interactiveShellInit = '' interactiveShellInit = ''
echo '(´) welcome (´)'
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
fish_vi_key_bindings
set VIRTUAL_ENV_DISABLE_PROMPT true
alias cat=bat
alias br=broot
alias tree=br
alias ack=rg
alias ag=rg
alias grep=rg
alias sys="sudo systemctl"
alias rebuild="sudo nixos-rebuild switch"
alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager"
alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nix-channel --update; and sudo nixos-rebuild switch --upgrade"
alias clip="xclip -selection c" alias clip="xclip -selection c"
alias cxuse="sudo cachix use -d ~/dotfiles.nix" alias cxuse="sudo cachix use -d ~/dotfiles.nix"
@ -59,14 +37,5 @@
alias wifi="nmcli r w off; nmcli r w on" alias wifi="nmcli r w off; nmcli r w on"
alias nixops=~/dev/nixops/result/bin/nixops alias nixops=~/dev/nixops/result/bin/nixops
bind \cr 'fzy_select_history (commandline -b)'
bind -M insert \cr 'fzy_select_history (commandline -b)'
bind \cf 'fzy_select_directory'
bind -M insert \cf 'fzy_select_directory'
bind -M insert ! __history_previous_command
bind -M insert '$' __history_previous_command_arguments
''; '';
} }

View File

@ -57,6 +57,16 @@ in {
alias rebuild="sudo nixos-rebuild switch" alias rebuild="sudo nixos-rebuild switch"
alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager" alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager"
alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nix-channel --update; and sudo nixos-rebuild switch --upgrade" alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nix-channel --update; and sudo nixos-rebuild switch --upgrade"
bind \cr 'fzy_select_history (commandline -b)'
bind -M insert \cr 'fzy_select_history (commandline -b)'
bind \cf 'fzy_select_directory'
bind -M insert \cf 'fzy_select_directory'
bind -M insert ! __history_previous_command
bind -M insert '$' __history_previous_command_arguments
''; '';
}; };