From 253fd4c7112a2faf50b8809fb69fdd966524fa38 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 13 Jun 2024 11:56:36 +0200 Subject: [PATCH] addet oh-my-posh config --- config.fish | 53 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/config.fish b/config.fish index a6ab98e..9b10060 100644 --- a/config.fish +++ b/config.fish @@ -10,35 +10,42 @@ end # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher - # check_fishr -else - notify-send "no fish config.." -end -if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish +function _source + if test -d $HOME/.config/fish/init/ + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + # dep_fisher + # check_fishr + 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 >────────────────────────────────────────────────────────────────── -if command -v zoxide >/dev/null 2>&1 - zoxide init fish | source +function _zox + if command -v zoxide >/dev/null 2>&1 + zoxide init fish | source + 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 +function _omp + 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 + curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin + end end - # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── if test -d $HOME/.config/fish/functions/ set -g theme_nerd_fonts yes @@ -46,3 +53,11 @@ if test -d $HOME/.config/fish/functions/ # 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 + +function main + _source + _zox + _omp +end + +main