#!/bin/fish

# fish settings
set --global fish_key_bindings fish_hybrid_key_bindings
set fish_cursor_default block
set fish_cursor_insert line
set fish_curser_replace_one underscore
set fish_greeting

# starship prompt
eval (starship init fish)

# my aliases
abbr --add grep rg
abbr --add ls eza
abbr --add sl eza
abbr --add ll eza -alF
abbr --add la eza -a
abbr --add l eza
abbr --add lal eza -al
abbr --add cat bat

alias ip 'ip --color=auto'

# add some stuff to the path
fish_add_path $HOME/.local/share/cargo/bin
fish_add_path $HOME/.cache/cabal/bin
fish_add_path $HOME/.local/bin
fish_add_path $HOME/j9.5/bin
fish_add_path $HOME/.local/share/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin
fish_add_path /usr/lib/smlnj/bin
fish_add_path $HOME/.config/emacs/bin
fish_add_path $HOME/.elan/bin
fish_add_path $HOME/.local/share/pack/bin
fish_add_path $HOME/.zvm/bin

set -x XDG_CACHE_HOME $HOME/.cache
set -x XDG_CONFIG_HOME $HOME/.config
set -x XDG_DATA_HOME $HOME/.local/share

# set up bitwarden ssh-agent
set -x SSH_AUTH_SOCK $HOME/.bitwarden-ssh-agent.sock

# set some environment variables 
set -x MANPAGER "less -R --use-color -Dd+r -Du+b"
set -x EDITOR nvim
set -x VISUAL nvim
set -x TERM xterm-256color
set -x BROWSER librewolf

set -x MOZ_ENABLE_WAYLAND 1
set -x ELECTRON_OZONE_PLATFORM_HINT auto
set -x GDK_BACKEND wayland
set -x QT_QPA_PLATFORM wayland

set -x BEMENU_OPTS '--ignorecase --fb "#1e1e2e" --ff "#cdd6f4" --nb "#1e1e2e" --nf "#cdd6f4" --tb "#1e1e2e" --hb "#1e1e2e" --tf "#f5c2e7" --hf "#f9e2af" --af "#cdd6f4" --ab "#1e1e2e" --fn "Iosevka Nerd Font 16" --no-overlap --wrap'

set -x LESSHISTFILE -
set -x ASPELL_CONF "per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_DATA_HOME/aspell/en.pws; repl $XDG_DATA_HOME/aspell/en.prepl"
set -x INPUTRC $HOME/.config/readline/inputrc
set -x HISTFILE $XDG_CACHE_HOME/bash/history
set -x XDG_DATA_HOME $HOME/.local/share
set -x CARGO_HOME $XDG_DATA_HOME/cargo
# set -x GNUPGHOME $XDG_DATA_HOME/gnupg
set -x GPG_TTY (tty)
set -x STACK_XDG 1
set -x GHCUP_USE_XDG_DIRS true
set -x JULIA_DEPOT_PATH $XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH
set -x JUPYTER_CONFIG_DIR $XDG_CONFIG_HOME/jupyter
set -x RUSTUP_HOME $XDG_DATA_HOME/rustup
set -x DOT_SAGE $XDG_CONFIG_HOME/sage
set -x MAXIMA_USERDIR $XDG_CONFIG_HOME/maxima
set -x AGDA_DIR $HOME/.config/agda
set -x PACK_DIR $HOME/.local/share/pack
set -x MIZFILES $HOME/.local/share/mizar
set -x RLWRAP_HOME $XDG_DATA_HOME/rlwrap
set -x WOLFRAM_USERBASE $XDG_CONFIG_HOME/Wolfram
