dotfiles.nix/hm-configs/fish.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-11 03:59:20 +00:00
{ pkgs, ... }: {
enable = true;
package = pkgs.fish;
interactiveShellInit = ''
alias clip="xclip -selection c"
alias cxuse="sudo cachix use -d ~/dotfiles.nix"
alias cxpsh="nix-shell --command exit; nix-store -qR --include-outputs (nix-instantiate shell.nix) | cachix push"
alias cxpush=cxpsh
2021-01-11 05:46:25 +00:00
alias code=codium
alias config="code ~/dotfiles.nix"
alias home="vim ~/dotfiles.nix/users/mat-hm.nix +'cd %:p:h'"
2021-01-11 03:59:20 +00:00
alias vims="vim -S Session.vim"
alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto"
alias smallscreen="xrandr --output eDP1 --auto --output HDMI2 --off"
2021-05-05 15:21:02 +00:00
function tmux-ssh -a user -a host -a no_local
if test -z "$no_local"
set host "$host.local"
end
2021-01-11 03:59:20 +00:00
set target "$user@$host"
2021-05-05 15:21:02 +00:00
set session_host (string replace . - "$host" --all)
set session "$user-$session_host"
2021-01-11 03:59:20 +00:00
env TERM=tmux-256color ssh $target -t "tmux -2 attach -t $session || tmux -2 new -s $session"
end
2021-05-05 15:21:02 +00:00
alias pi="tmux-ssh pi pi y"
alias yuri="tmux-ssh root gagarin"
alias tmssh="tmux-ssh mat"
alias soviet="tmssh soviet y"
2021-01-11 03:59:20 +00:00
alias wifi="nmcli r w off; nmcli r w on"
alias nixops=~/dev/nixops/result/bin/nixops
2021-05-05 15:21:02 +00:00
kitty + complete setup fish | source
2021-01-11 03:59:20 +00:00
'';
}