From 456358983101dc411997e941530648c72cbe4a5b Mon Sep 17 00:00:00 2001 From: grassblock Date: Sat, 28 Dec 2024 12:17:33 +0800 Subject: [PATCH] feat: fish: cleanup config && add Ghostty support --- .../private_fish/config.fish | 47 +++++-------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/home/private_dot_config/private_fish/config.fish b/home/private_dot_config/private_fish/config.fish index 9f75561..4904aa9 100644 --- a/home/private_dot_config/private_fish/config.fish +++ b/home/private_dot_config/private_fish/config.fish @@ -1,5 +1,16 @@ if status is-interactive # Commands to run in interactive sessions can go here + # zellij init for alacritty + if string match -q -- alacritty $TERM + set -gx ZELLIJ_AUTO_EXIT true + eval (zellij setup --generate-auto-start fish | string collect) + end + # zellij init for alacritty end + + # starship custom conf + set -gx STARSHIP_CONFIG $__fish_config_dir/starship.toml + # starship custom conf end + starship init fish | source # set theme if string match -q -- light (darkman get) @@ -9,27 +20,16 @@ if status is-interactive end end -# zellij init for alacritty -if string match -q -- alacritty $TERM - set -gx ZELLIJ_AUTO_EXIT true - eval (zellij setup --generate-auto-start fish | string collect) -end -# zellij init for alacritty end - -# starship custom conf -set -gx STARSHIP_CONFIG $__fish_config_dir/starship.toml -# starship custom conf end -starship init fish | source # greeting function fish_greeting echo "" # custom motd by fastfetch - if [ $TERM = xterm-kitty ] + if [ $TERM = xterm-kitty ] ; or [ $TERM = xterm-ghostty ] fastfetch -c $__fish_config_dir/fmotd/motd.jsonc else fastfetch -c $__fish_config_dir/fmotd/motd-fallback.jsonc end - echo -e "\nWelcome to fish@$TERM, $USER!" + echo -e "\nHellllllo from fish@$TERM, $USER!" #cat $__fish_config_dir/motd end # greeting end @@ -44,27 +44,6 @@ end # nvm managed npm set -gx PATH "/home/grassblock/.local/share/npm/bin" $PATH -# ssh-agent -#set SSH_ENV_FILE "$HOME/.ssh/agent-environment" -#set SSH_TIMEOUT 86400 # 24 hours in seconds - -#function ssh_start_agent -# ssh-agent -c -t "$SSH_TIMEOUT" > "$SSH_ENV_FILE" -# chmod 600 "$SSH_ENV_FILE" -# source "$SSH_ENV_FILE" -# ssh-add # [] Change to your path -#end - -#if test -f "$SSH_ENV_FILE" -# source "$SSH_ENV_FILE" -# if not ps -p "$SSH_AGENT_PID" > /dev/null -# ssh_start_agent -# end -#else -# ssh_start_agent -#end -## ssh-agent-end - # ssh agent with rbw set -gx SSH_ASKPASS_REQUIRE prefer set -gx SSH_ASKPASS "$HOME/.local/bin/bw-askpass"