Last active
June 24, 2025 13:47
-
-
Save sankalpmukim/9d084cf678ce58bab8f442518d1e36a1 to your computer and use it in GitHub Desktop.
simple tmux friendly fish config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if status is-interactive | |
# Commands to run in interactive sessions can go here | |
end | |
# pnpm | |
set -gx PNPM_HOME "/Users/sankalpmukim/.local/share/pnpm" | |
fish_add_path /Users/sankalpmukim/.local/share/pnpm; # this one doesn't work for some reason. but let's try | |
# set --export PATH '$/Users/sankalpmukim/.local/share/pnpm/' $PATH | |
# pnpm end | |
# flyctl | |
set -gx FLYCTL_INSTALL "/Users/sankalpmukim/.fly" | |
fish_add_path $FLYCTL_INSTALL/bin | |
# flyctl end | |
# android studio | |
fish_add_path /Users/sankalpmukim/Android/Sdk/tools/bin | |
fish_add_path /Users/sankalpmukim/Android/Sdk/platform-tools | |
fish_add_path /Users/sankalpmukim/Android/Sdk/emulator | |
fish_add_path /usr/local/android-studio/bin | |
fish_add_path /Users/sankalpmukim/go/bin | |
set -gx ANDROID_HOME /Users/sankalpmukim/Android/Sdk | |
set -gx ANDROID_SDK_ROOT /Users/sankalpmukim/Android/Sdk | |
# android studio end | |
# git aliases | |
alias mpm "git ps && git ch main && git merge dev --no-edit && git ps && git ch dev" | |
# git alias end | |
# go air | |
fish_add_path /Users/sankalpmukim/bin | |
# go air end | |
# add /usr/local/go/bin to path | |
fish_add_path /usr/local/go/bin | |
# kill process by port | |
function kill_process_by_port | |
set port $argv[1] | |
set pid (lsof -t -i :$port) | |
if test -n "$pid" | |
kill $pid > /dev/null 2>&1 | |
if test $status -eq 0 | |
echo "Success" | |
else | |
echo "Failed to kill the process. You may need to run this command with sudo or try again." | |
end | |
else | |
echo "No process found on port $port" | |
end | |
end | |
alias kp "kill_process_by_port" | |
# kill process by port end | |
# nvim -> vim | |
# alias vim nvim | |
# nvim end | |
# copied config from here: | |
# bind -M insert \cg forget | |
# if which asdf > /dev/null; status --is-interactive; and source (brew --prefix asdf)/asdf.fish; end | |
# if which direnv > /dev/null; direnv hook fish | source; end | |
# if which goenv > /dev/null; status --is-interactive; and source (goenv init -|psub); end | |
# if which rbenv > /dev/null; status --is-interactive; and source (rbenv init -|psub); end | |
# if which swiftenv > /dev/null; status --is-interactive; and source (swiftenv init -|psub); end | |
# # tmux new-session -A -s default | |
# if status is-interactive | |
# # Check if we are already in a tmux session | |
# if not set -q TMUX | |
# if test (count (tmux list-sessions -F "#{session_activity} #{session_name}" | sort -rn | cut -d ' ' -f2-)) -gt 0 | |
# # If a session exists, attach to the most recently used one | |
# tmux attach-session -t (tmux list-sessions -F "#{session_activity} #{session_name}" | sort -rn | cut -d ' ' -f2-) | |
# else | |
# # If no session exists, create a new one | |
# tmux | |
# end | |
# end | |
# end | |
set -x ANDROID_HOME $HOME/Android/Sdk | |
set -U fish_user_paths $fish_user_paths $ANDROID_HOME/emulator | |
set -U fish_user_paths $fish_user_paths $ANDROID_HOME/platform-tools | |
set -U fish_user_paths $fish_user_paths /usr/local/go/bin | |
# bun | |
set --export BUN_INSTALL "$HOME/.bun" | |
set --export PATH $BUN_INSTALL/bin $PATH | |
# gopath | |
set -x GOPATH "/Users/sankalpmukim/go" | |
# clipboard copy, paste using xsel | |
alias copy "xsel --clipboard --input" | |
alias paste "xsel --clipboard --output >" | |
# copy git credentials to clipboard | |
alias gcs "cat /Users/sankalpmukim/.git-credentials | copy" | |
# go air alias | |
alias air "/Users/sankalpmukim/go/bin/air" | |
# go air alias end | |
# alias kubectl "minikube kubectl --" | |
fish_add_path "/opt/homebrew/bin/" | |
nvm use lts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nvm use v20.8.1