fish/config.fish
2024-08-02 13:22:30 +02:00

79 lines
4.5 KiB
Fish

if status is-interactive
# ─< Commands to run in interactive sessions can go here >──────────────
function _source
if test -d $HOME/.config/fish/init/
source $HOME/.config/fish/init/setup.fish
# ────────────────────────────────────< setup some stuff >────────────────────────────────────
upin
# dep_fisher
else
notify-send "no fish config.."
end
if test -e $HOME/.config/fish/aliases.fish
source $HOME/.config/fish/aliases.fish
end
end
end
# ╭───────────────────────────────────────────────────╮
# │ FISH CONFIG BY PIKA │
# │ │
# │ If you have any questions, check the git page at: │
# │ https://git.k4li.de/dotfiles/fish.git │
# ╰───────────────────────────────────────────────────╯
# ────────────────────────────────────────< sources >──────────────────────────────────────
function _source
if test -d $HOME/.config/fish/init/
source $HOME/.config/fish/init/setup.fish
# ────────────────────────────────────< setup some stuff >────────────────────────────────────
upin
# dep_fisher
else
notify-send "no fish config.."
end
if test -e $HOME/.config/fish/aliases.fish
source $HOME/.config/fish/aliases.fish
end
end
# ─────────────────────────────────< Environment-Variables >───────────────────────────────
set -p EDITOR (which nvim)
# ────────────────────────────────────────< functions >─────────────────────────────────────
# ─< z stands for Zoxide >──────────────────────────────────────────────────────────────────
function _zox
if command -v zoxide >/dev/null 2>&1
zoxide init fish | source
end
end
# ─< set colorscheme for bobthefish >───────────────────────────────────────────────────────
function _bobfish
if test -d $HOME/.config/fish/functions/bobthefish/
source $HOME/.config/fish/functions/bobthefish/*.fish
set -g theme_nerd_fonts yes
set -g defaults_user (echo $USER)
# available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha)
set -g theme_color_scheme catppuccin-mocha
end
end
# ─< oh-my-posh >───────────────────────────────────────────────────────────────────────────
if command -v oh-my-posh >/dev/null 2>&1
# ─< tokyo-storm config >───────────────────────────────────────────────────────────────────
oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source
# ─< zen config >───────────────────────────────────────────────────────────────────────────
# oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source
else
_bobfish
curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/
end
function main
_source
_zox
end
main