dotfiles/.config/fish/config.fish

129 lines
2.4 KiB
Fish
Raw Permalink Normal View History

#echo Hi Hexley!
fish_vi_key_bindings
set ID (id -u)
2025-01-16 17:57:57 +00:00
# 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
2025-01-16 17:57:57 +00:00
eval tmux
end
# PATH
# Homebrew
fish_add_path -a /opt/homebrew/bin
fish_add_path -a /opt/homebrew/sbin
# Local PATH
fish_add_path -a $HOME/.local/bin
# Mason PATH
fish_add_path -a $HOME/.local/share/nvim/mason/bin
# Java
fish_add_path -a /opt/homebrew/Cellar/openjdk/23.0.1/bin
# Ruby
fish_add_path -a /opt/homebrew/opt/ruby/bin
fish_add_path -a /opt/homebrew/lib/ruby/gems/3.4.0/bin
# Zig
fish_add_path -a /opt/zig
# pyenv
set -x PYENV_ROOT "$HOME/.pyenv"
fish_add_path -a $PYENV_ROOT/bin
pyenv init - | source
status --is-interactive; and pyenv virtualenv-init - | source
# VARIABLES
if [ $ID != 0 ]
# 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
end
2025-01-16 15:02:44 +00:00
2025-01-16 17:57:57 +00:00
# bat
set -x BAT_THEME 'tokyonight_night'
# Editor
set -x EDITOR 'nvim'
2025-01-16 15:02:44 +00:00
# Manpager
2025-01-16 17:57:57 +00:00
#set -x PAGER 'nvim +Man!'
# 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:02:44 +00:00
# Term for ssh
#export TERM='xterm-256color'
2025-01-16 15:02:44 +00:00
# Homebrew
set -x HOMEBREW_NO_AUTO_UPDATE 1
set -x HOMEBREW_NO_ENV_HINTS 1
2025-01-16 15:02:44 +00:00
# DBUS for zathura
#export DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/(id -u)
#export DBUS_SESSION_BUS_ADDRESS='unix:path='$DBUS_LAUNCHD_SESSION_BUS_SOCKET
#if pgrep -x dbus-daemon &> /dev/null
# printf (_ "%sdbus-daemon%s is running\n") (set_color red) (set_color normal)
#else
# #echo "dbus-daemon is not running"
# dbus-daemon --fork --session --address=$DBUS_SESSION_BUS_ADDRESS
#end
2025-01-16 15:02:44 +00:00
# ALIAS
# convinience
alias doas='sudo'
2025-01-16 15:02:44 +00:00
# neovim
alias vi='nvim'
alias vim='nvim'
2025-01-16 15:02:44 +00:00
2025-01-16 17:57:57 +00:00
# cat
alias cat="bat"
# ls
alias ls="eza --color=always --long --git --icons=always --group"
# thefuck
thefuck --alias | source
# mutt
#alias mutt='neomutt'
2025-01-16 15:02:44 +00:00
# rsync
alias rsync='rsync -h -v -r -P -p -t --stats'
2025-01-16 15:02:44 +00:00
# wget folder
alias wget_f='wget -r -np -R "index.html*"'
2025-01-16 15:02:44 +00:00
# btop
alias top='btop'
2025-01-16 15:02:44 +00:00
2025-01-16 17:57:57 +00:00
# zoxide
alias cd="z"
# fzf
fzf --fish | source
# zoxide
zoxide init fish | source
# 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:02:44 +00:00
case '*'
/usr/bin/git $argv
end
2025-01-16 15:02:44 +00:00
end