dotfiles/.config/fish/config.fish

120 lines
2.0 KiB
Fish
Raw Permalink Normal View History

2025-01-17 16:01:47 +00:00
#echo Hi Tux!
fish_vi_key_bindings
set ID (id -u)
# Start tmux
if not set -q TMUX; and [ $ID != 0 ]
echo "Setting tmux"
#set -g TMUX tmux new-session -d -s base
#eval $TMUX
#tmux attach-session -d -t base
eval tmux
end
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# PATH
# Local PATH
fish_add_path -a $HOME/.local/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Mason PATH
fish_add_path -a $HOME/.local/share/nvim/mason/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# sbin PATH
fish_add_path -a /sbin
fish_add_path -a /usr/sbin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Rust
fish_add_path -a /usr/local/share/cargo/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Android
fish_add_path -a /usr/share/android-tools
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# rocm
fish_add_path -a /opt/rocm/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Java
#fish_add_path -a /usr/local/jdk-21/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Ltex-LS
#fish_add_path -a /usr/local/share/ltex-ls-16.0.0/bin
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# pyenv
set -x PYENV_ROOT /usr/share/pyenv
fish_add_path -a $PYENV_ROOT/bin
pyenv init - fish | source
status --is-interactive; and pyenv virtualenv-init - | source
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Zig
fish_add_path -a /usr/share/zig
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# VARIABLES
# For Torch
set -gx HSA_OVERRIDE_GFX_VERSION '10.3.0'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# bat
set -x BAT_THEME 'tokyonight_night'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Rust
set -gx CARGO_HOME '/usr/local/share/cargo'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# ssh and gpg
set -x GPG_TTY (tty)
set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye > /dev/null
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Editor
set -gx EDITOR 'nvim'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Manpager
#set -gx PAGER 'nvim +Man!'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Term for ssh
#set -gx TERM 'xterm-256color'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# fzf
set -x FZF_CTRL_T_OPTS "--preview 'bat -n --color=always --line-range :500 {}'"
set -x FZF_ALT_C_OPTS "--preview 'eza --tree --color=always {} | head 200'"
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# ALIAS
# convinience
alias doas="sudo"
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# Neovim
alias vi="nvim"
alias vim="nvim"
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# cat
alias cat="bat"
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# ls
alias ls="eza --color=always --long --git --icons=always --group"
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# mutt
#alias mutt='neomutt'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# rsync
alias rsync='rsync -h -v -r -P -p -t --stats'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# wget folder
alias wget_f='wget -r -np -R "index.html*"'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# btop
alias top='btop'
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# fzf
fzf --fish | source
2025-01-16 15:08:57 +00:00
2025-01-17 16:01:47 +00:00
# git signed
function git --wraps git
switch $argv[1]
case commit
/usr/bin/git commit -S
case tag
/usr/bin/git tag -S
2025-01-16 15:08:57 +00:00
case '*'
2025-01-17 16:01:47 +00:00
/usr/bin/git $argv
end
2025-01-16 15:08:57 +00:00
end