From 4ce2176c82b1a94c4f92228f899c5e3cc0eeb836 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:04:29 -0400 Subject: [PATCH] remove fish configurations --- .config/fish/conf.d/tide.fish | 21 ------- .config/fish/config-darwin.fish | 7 --- .config/fish/config-linux.fish | 6 -- .config/fish/config-npiperelay.fish | 20 ------ .config/fish/config.fish | 63 ------------------- .../functions/fish_user_key_bindings.fish | 11 ---- .config/fish/functions/mpiconnect.fish | 3 - .../fish/functions/peco_change_directory.fish | 27 -------- .../fish/functions/peco_select_history.fish | 15 ----- 9 files changed, 173 deletions(-) delete mode 100644 .config/fish/conf.d/tide.fish delete mode 100644 .config/fish/config-darwin.fish delete mode 100644 .config/fish/config-linux.fish delete mode 100644 .config/fish/config-npiperelay.fish delete mode 100644 .config/fish/config.fish delete mode 100644 .config/fish/functions/fish_user_key_bindings.fish delete mode 100644 .config/fish/functions/mpiconnect.fish delete mode 100644 .config/fish/functions/peco_change_directory.fish delete mode 100644 .config/fish/functions/peco_select_history.fish diff --git a/.config/fish/conf.d/tide.fish b/.config/fish/conf.d/tide.fish deleted file mode 100644 index 3a2410f..0000000 --- a/.config/fish/conf.d/tide.fish +++ /dev/null @@ -1,21 +0,0 @@ -set -g tide_git_bg_color 268bd2 -set -g tide_git_bg_color_unstable C4A000 -set -g tide_git_bg_color_urgent CC0000 -set -g tide_git_branch_color 000000 -set -g tide_git_color_branch 000000 -set -g tide_git_color_conflicted 000000 -set -g tide_git_color_dirty 000000 -set -g tide_git_color_operation 000000 -set -g tide_git_color_staged 000000 -set -g tide_git_color_stash 000000 -set -g tide_git_color_untracked 000000 -set -g tide_git_color_upstream 000000 -set -g tide_git_conflicted_color 000000 -set -g tide_git_dirty_color 000000 -set -g tide_git_icon  -set -g tide_git_operation_color 000000 -set -g tide_git_staged_color 000000 -set -g tide_git_stash_color 000000 -set -g tide_git_untracked_color 000000 -set -g tide_git_upstream_color 000000 -set -g tide_pwd_bg_color 444444 diff --git a/.config/fish/config-darwin.fish b/.config/fish/config-darwin.fish deleted file mode 100644 index 67c62cd..0000000 --- a/.config/fish/config-darwin.fish +++ /dev/null @@ -1,7 +0,0 @@ -# Config file for macOS - -eval "$(/opt/homebrew/bin/brew shellenv)" -# -# set -x NVM_DIR "$HOME/.nvm" -# -# nvm use >/dev/null diff --git a/.config/fish/config-linux.fish b/.config/fish/config-linux.fish deleted file mode 100644 index b6e7a02..0000000 --- a/.config/fish/config-linux.fish +++ /dev/null @@ -1,6 +0,0 @@ -#x-server -set -g DISPLAY $(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 - -if test -x (command -v npiperelay.exe) - source (dirname (status --current-file))/config-npiperelay.fish -end diff --git a/.config/fish/config-npiperelay.fish b/.config/fish/config-npiperelay.fish deleted file mode 100644 index 5622f50..0000000 --- a/.config/fish/config-npiperelay.fish +++ /dev/null @@ -1,20 +0,0 @@ -# Configure ssh forwarding -set -x SSH_AUTH_SOCK $HOME/.ssh/agent.sock - -# use square brackets to generate a regex match for the process we want but that doesn't match the grep command running it! -set ALREADY_RUNNING (ps -aux | grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $status) - -if [ $ALREADY_RUNNING -ne 0 ] - if [ -S $SSH_AUTH_SOCK ] - # not expecting the socket to exist as the forwarding command isn't running (http://www.tldp.org/LDP/abs/html/fto.html) - # echo "removing previous socket..." - rm $SSH_AUTH_SOCK - end - - # echo "Starting SSH-Agent relay..." - # setsid to force new session to keep running - # set socat to listen on $SSH_AUTH_SOCK and forward to npiperelay which then forwards to openssh-ssh-agent on windows - begin - setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork >/dev/null 2>&1 & - end -end diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index 9f269f0..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,63 +0,0 @@ -set fish_greeting "" - -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -status is-interactive && eval $HOME/miniconda3/bin/conda "shell.fish" "hook" $argv | source -# <<< conda initialize <<< - -# Go -set -g GOPATH $HOME/go - -# Add gobin to path -fish_add_path $GOPATH/bin - -# load configuration files based on OS -switch (uname) - case Darwin - set DARWIN_CONFIG (dirname (status --current-file))/config-darwin.fish - if test -f $DARWIN_CONFIG - source $DARWIN_CONFIG - end - case Linux - set LINUX_CONFIG (dirname (status --current-file))/config-linux.fish - if test -f $LINUX_CONFIG - source $LINUX_CONFIG - end -end - -if type -q exa - alias ll "exa -l -g --icons" - alias lla "ll -a" -end - -alias cc clear - -if type -q git - alias g git - alias gb "git branch" - alias gm "git commit" - alias gc "git checkout" - alias gs "git status -sb" - alias gp "git push" - alias gP "git pull --rebase" - alias ga "git add" -end - -if type -q tmux - alias tma "tmux attach" - alias tmls "tmux list-session" - alias tmks "tmux kill-session" -end - -# allow local config overwrite -set LOCAL_CONFIG (dirname (status --current-file))/config-local.fish -if test -f $LOCAL_CONFIG - source $LOCAL_CONFIG -end - -# pnpm -set -gx PNPM_HOME "/Users/jc/Library/pnpm" -if not string match -q -- $PNPM_HOME $PATH - set -gx PATH "$PNPM_HOME" $PATH -end -# pnpm end diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish deleted file mode 100644 index 038e9a8..0000000 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,11 +0,0 @@ -function fish_user_key_bindings - # bind peco functionalities - # search directories - bind \cf peco_change_directory - - # search commandline history - bind \cr peco_select_hisotry - - # prevent iterm close window with ctrl+d - bind \cd delete-char -end diff --git a/.config/fish/functions/mpiconnect.fish b/.config/fish/functions/mpiconnect.fish deleted file mode 100644 index 0ee48ea..0000000 --- a/.config/fish/functions/mpiconnect.fish +++ /dev/null @@ -1,3 +0,0 @@ -function mpiconnect - ssh -Y lcl_uotwlus2341@teach.scinet.utoronto.ca -end diff --git a/.config/fish/functions/peco_change_directory.fish b/.config/fish/functions/peco_change_directory.fish deleted file mode 100644 index ec1a5cd..0000000 --- a/.config/fish/functions/peco_change_directory.fish +++ /dev/null @@ -1,27 +0,0 @@ -function _peco_change_directory - if [ (count $argv) ] - peco --layout=bottom-up --query "$argv " | perl -pe 's/([ ()])/\\\\$1/g' | read foo - else - peco --layout=bottom-up | perl -pe 's/([ ()])/\\\\$1/g' | read foo - end - if [ $foo ] - builtin cd $foo - commandline -r '' - commandline -f repaint - else - commandline '' - end -end - -function peco_change_directory - begin - echo $HOME/.config - # ghq list -p # gh cli replaced this, so it is no longer needed - # list local repositories - find $HOME/ghq -mindepth 2 -maxdepth 2 -type d - # home directory - ls -ad $HOME/*/ | grep -v \.git - # current directory - ls -ad */ | perl -pe "s#^#$PWD/#" | grep -v \.git - end | sed -e 's/\/$//' | awk '!a[$0]++' | _peco_change_directory $argv -end diff --git a/.config/fish/functions/peco_select_history.fish b/.config/fish/functions/peco_select_history.fish deleted file mode 100644 index fae620d..0000000 --- a/.config/fish/functions/peco_select_history.fish +++ /dev/null @@ -1,15 +0,0 @@ -function peco_select_history - if test (count $argv) = 0 - set peco_flags --layout=bottom-up - else - set peco_flags --layout=bottom-up --query "$argv" - end - - history | peco $peco_flags | read foo - - if [ $foo ] - commandline $foo - else - commandline '' - end -end