fish: extract plugins config

This commit is contained in:
lelgenio 2022-02-24 11:10:58 -03:00
parent 3353a41950
commit c8901181f2
3 changed files with 28 additions and 17 deletions

View File

@ -15,21 +15,7 @@ if status is-interactive
source {$__fish_config_dir}/keys.fish
source {$__fish_config_dir}/tmux.fish
source {$__fish_config_dir}/colors.fish
if not functions -q fundle
eval (curl -sfL https://git.io/fundle-install)
end
fundle plugin 'FabioAntunes/fish-nvm'
fundle plugin 'edc/bass'
fundle init
{%@@ if starship @@%}
starship init fish | source
# Set cursor shape
printf '\e[5 q' # Bar
{%@@ else @@%}
source {$__fish_config_dir}/prompt.fish
{%@@ endif @@%}
source {$__fish_config_dir}/plugins.fish
end

View File

@ -14,6 +14,8 @@ set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"
set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:/usr/share"
set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:$HOME/.local/share"
set -x XDG_CONFIG_HOME "$HOME/.config/"
for i in ~/.local/bin ~/.local/share/cargo/bin ~/.yarn/bin ~/.factorio/bin/*
test -d "$i";and fish_add_path "$i"
end
@ -42,13 +44,15 @@ end
if test "$USER" != "root"
set -x PYTHONPYCACHEPREFIX "$HOME/.cache/python"
set -x MYPY_CACHE_DIR "$HOME/.cache/mypy"
set -x RUSTUP_HOME $HOME/.local/share/rustup
set -x CARGO_HOME $HOME/.local/share/cargo
set -x RUSTUP_HOME "$HOME/.local/share/rustup"
set -x CARGO_HOME "$HOME/.local/share/cargo"
set -gx NVM_DIR "$HOME/.local/share/nvm"
else
set -e PYTHONPYCACHEPREFIX
set -e MYPY_CACHE_DIR
set -e RUSTUP_HOME
set -e CARGO_HOME
set -ge NVM_DIR
end

View File

@ -0,0 +1,21 @@
set -l NVM_URL "https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh"
if not test -d "$NVM_DIR"
set -e nvm_prefix
mkdir -p "$NVM_DIR"
curl -o- "$NVM_URL" | bash
end
if not functions -q fundle
eval (curl -sfL https://git.io/fundle-install)
end
fundle plugin 'FabioAntunes/fish-nvm'
fundle plugin 'edc/bass'
fundle init
{%@@ if starship @@%}
starship init fish | source
# Set cursor shape
printf '\e[5 q' # Bar
{%@@ else @@%}
source {$__fish_config_dir}/prompt.fish
{%@@ endif @@%}