From 4f0c9175b2bf5519dd696c8a1d2b3f604e325ab3 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Sun, 27 Apr 2025 02:58:12 +0200 Subject: [PATCH] fish: don't activate venv on launch, provide alias instead --- dot-config/fish/config.fish | 12 +++++------- dot-config/fish/functions/venv.fish | 4 ++++ 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 dot-config/fish/functions/venv.fish diff --git a/dot-config/fish/config.fish b/dot-config/fish/config.fish index bdfefa16..b8a98694 100644 --- a/dot-config/fish/config.fish +++ b/dot-config/fish/config.fish @@ -1,7 +1,7 @@ if status is-interactive # Commands to run in interactive sessions can go here # - fish ~/.local/bin/base16-flavours-fish + test -f ~/.local/bin/base16-flavours-fish && fish ~/.local/bin/base16-flavours-fish source ~/.config/fish/functions/eza-aliases.fish source ~/.config/fish/functions/git-aliases.fish set EZA_COLORS "*.patch.skip=38;5;244" @@ -9,12 +9,10 @@ if status is-interactive source (/usr/bin/starship init fish --print-full-init | psub) set -g fish_greeting trap "sh ~/.local/bin/base16-flavours" "SIGUSR1" - . ~/venv/bin/activate.fish end -if test "$DISPLAY" = "" -a "$WAYLAND_DISPLAY" = "" -a "$XDG_VTNR" = 1 - tbsm -end +# set hostname +set -x HOSTNAME (hostname | string split -m1 '.')[1] # support jumping between prompts with foot terminal function mark_prompt_start --on-event fish_prompt @@ -33,5 +31,5 @@ end fish_add_path /home/andy/.local/bin fish_add_path /home/andy/.cargo/bin fish_add_path /home/andy/go/bin -fish_add_path /home/andy/Applications/ -fish_add_path /home/andy/.spicetify +fish_add_path /home/andy/Applications + diff --git a/dot-config/fish/functions/venv.fish b/dot-config/fish/functions/venv.fish new file mode 100644 index 00000000..5c754963 --- /dev/null +++ b/dot-config/fish/functions/venv.fish @@ -0,0 +1,4 @@ +function venv --wraps='. ~/venv/bin/activate.fish' --description 'alias venv . ~/venv/bin/activate.fish' + . ~/venv/bin/activate.fish $argv + +end -- 2.51.2