]> Freerunner's - dotfiles.git/commitdiff
fish: don't activate venv on launch, provide alias instead
authorAndre Ramnitz <tux.rising@gmail.com>
Sun, 27 Apr 2025 00:58:12 +0000 (02:58 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Sun, 27 Apr 2025 00:58:12 +0000 (02:58 +0200)
dot-config/fish/config.fish
dot-config/fish/functions/venv.fish [new file with mode: 0644]

index bdfefa16f220e24b925c36c541b86c3189b1b970..b8a98694da4d4256142a8df66f5005c667e38faa 100644 (file)
@@ -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 (file)
index 0000000..5c75496
--- /dev/null
@@ -0,0 +1,4 @@
+function venv --wraps='. ~/venv/bin/activate.fish' --description 'alias venv . ~/venv/bin/activate.fish'
+  . ~/venv/bin/activate.fish $argv
+        
+end