update fish stuff

This commit is contained in:
insects 2024-11-09 17:33:52 +01:00
parent ce1f7d6169
commit a67d69646f
2 changed files with 13 additions and 33 deletions

View file

@ -3,7 +3,7 @@ padding = { x = 10, y = 10 }
dimensions = { columns = 140, lines = 40 }
[terminal]
shell = "/usr/bin/nu"
shell = "/usr/bin/fish"
[font]
normal = { family = "RecMonoCasual Nerd Font" }

View file

@ -3,11 +3,6 @@ function setpath
test -e $argv[1]; and fish_add_path $argv[1]
end
# Custom greeting
function fish_greeting
echo "Welcome to $(hostname -s)!"
end
if test -z "$XDG_RUNTIME_DIR"
set -x XDG_RUNTIME_DIR "/tmp/$USER-runtime-dir"
if test ! -e "$XDG_RUNTIME_DIR"
@ -17,27 +12,17 @@ if test -z "$XDG_RUNTIME_DIR"
end
# PATH adjustment
setpath /opt/local/bin
setpath /opt/homebrew/bin
setpath ~/.rbenv/shims
setpath ~/.rbenv/bin
setpath ~/.pyenv/shims
setpath ~/.cargo/bin
setpath ~/.local/share/cargo/bin
setpath ~/.ghcup/bin
setpath ~/.cabal/bin
setpath ~/.local/bin
setpath ~/.local/bin/elixir-ls
setpath ~/.rye/shims
setpath ~/.local/share/mise/shims
# Both of these work now apparently?
setpath ~/.emacs.d/bin
setpath ~/.config/emacs/bin
setpath ~/.fly/bin
setpath ~/.nimble/bin
setpath ~/.bun/bin
setpath ~/go/bin
# temp: for overriding the old debian nvim version
setpath /opt/nvim-linux64/bin
# zoxide setup
zoxide init fish | source
@ -46,10 +31,11 @@ zoxide init fish | source
source ~/.config/fish/private.fish
# Environment variables
set -x EDITOR nvim
set -x EDITOR vim
set -x USER lu
set -x SHELL (which fish)
set -x TERM xterm-256color
set -x CARGO_HOME ~/.local/share/cargo
set -x GTK_IM_MODULE ibus
set -x XMODIFIERS @im=ibus
set -x QT_IM_MODULE ibus
@ -65,16 +51,19 @@ set -x TZ_LIST "Europe/Berlin;Berlin,America/New_York;US East,America/Los_Angele
# General Aliases
# Convenience for editing my shell config
alias editconfig "chezmoi edit ~/.config/fish/config.fish; and chezmoi apply; and source ~/.config/fish/config.fish"
alias editconfig "chezmoi edit --watch ~/.config/fish/config.fish; and source ~/.config/fish/config.fish"
# General aliases
alias c clear
alias cl clear
alias ll "ls -lahF --color=always"
alias e "$EDITOR"
alias se sudoedit
alias ec 'nvim --cmd ":lua vim.g.noplugins=1"'
alias cd.. "cd ../"
alias rmrf "rm -rf"
# chezmoi aliases
alias czm chezmoi
alias ce "chezmoi edit --watch"
alias ccd "cd ~/.local/share/chezmoi"
# If nvim is installed, alias vim with it
if command --search nvim >/dev/null
@ -85,18 +74,18 @@ end
alias mkdir "mkdir -p"
alias cp "cp -r"
alias scp "scp -r"
alias vimdiff 'nvim -d --cmd ":lua vim.g.noplugins=1"'
alias apt "sudo apt"
alias doc "sudo docker"
alias docker "sudo docker"
alias systemctl "sudo systemctl"
alias sctl "sudo systemctl"
alias usctl "systemctl --user"
alias doco "sudo docker-compose"
# z is such a weird key to hit frequently, j is much better
alias j z
# Cargoes and Rust-s
alias cg cargo
alias c cargo
alias cr "cargo run"
alias cb "cargo build"
alias ct "cargo test"
@ -110,11 +99,6 @@ alias be "bundle exec"
# cd into a temp directory, very useful!
alias mkt "cd (mktemp -d)"
# tmux aliases
alias tx tmux
alias txls "tmux list-sessions"
alias txa "tmux attach"
# Git Aliases
alias lg lazygit
alias g git
@ -130,10 +114,6 @@ alias gc "g commit"
alias gb "g branch"
alias gaa "g add --all"
alias gco "g checkout"
alias gse "g send-email"
alias wip "g add --all; and g commit -m WIP"
alias squish "gs; and g commit -a --amend -C HEAD"
alias editorigin "git remote set-url origin"
# Load nix profile if nix is installed
if test -e /nix