Skip to content

Instantly share code, notes, and snippets.

@jwpleow
Last active July 30, 2023 14:23
Show Gist options
  • Select an option

  • Save jwpleow/c4f9307ebebb7ec3e3754551cbee8008 to your computer and use it in GitHub Desktop.

Select an option

Save jwpleow/c4f9307ebebb7ec3e3754551cbee8008 to your computer and use it in GitHub Desktop.
zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
setopt AUTO_PUSHD # pushes the old directory onto the stack
setopt nosharehistory # prevent sharing of history between tmux panes
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git ssh-agent zsh-z zsh-autosuggestions zsh-completions zsh-syntax-highlighting)
autoload -U compinit && compinit
zstyle ':completion:*:directory-stack' list-colors '=(#b) #([0-9]#)*( *)==95=38;5;12'
source $ZSH/oh-my-zsh.sh
zstyle ':completion:*' menu select
# User configuration
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/joel/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/joel/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/joel/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/joel/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# vcpkg
export PATH=$HOME/vcpkg${PATH:+:${PATH}}
alias vcpkg="noglob vcpkg"
export PATH="/usr/lib/ccache:$PATH"
alias initopenvino="source /opt/intel/openvino_2021/bin/setupvars.sh"
# source /opt/ros/noetic/setup.zsh
alias sourceros1="source /opt/ros/noetic/setup.zsh"
alias ninja="ninja -j7"
alias openvpndc="sudo openvpn --config $HOME/.data/vpn/joel/client.ovpn"
alias cmakevcpkg="cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
alias cmakevcpkgorig="cmake -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
alias switchgcc7="sudo update-alternatives --set gcc /usr/bin/gcc-7"
alias switchgcc8="sudo update-alternatives --set gcc /usr/bin/gcc-8"
alias switchgcc9="sudo update-alternatives --set gcc /usr/bin/gcc-9"
alias switchgcc10="sudo update-alternatives --set gcc /usr/bin/gcc-10"
alias switchlld="sudo update-alternatives --set ld /usr/bin/ld.lld-14"
alias switchbfd="sudo update-alternatives --set ld /usr/bin/ld.bfd"
alias switchgold="sudo update-alternatives --set ld /usr/bin/ld.gold"
export PYTHONPATH=$PYTHONPATH:$HOME/Desktop/dash_code/py_server/build/
export PYTHONPATH=$PYTHONPATH:$HOME/Desktop/dash_code/py_realsense_node/build/
export PYTHONPATH=$PYTHONPATH:$HOME/Desktop/dash_code/py_server
export PYTHONPATH=$PYTHONPATH:$HOME/dash_sdk/dash_code/py_server_helper/build
#export PYTHONPATH=$PYTHONPATH:$HOME/dash_code/build/py_server/
#export PYTHONPATH=$PYTHONPATH:$HOME/dash_code/build/py_realsense_node/
#export PYTHONPATH=$PYTHONPATH:$HOME/dash_code/py_server
export ROS_IP="10.0.1.17"
alias runrest="/home/joel/dash_code/build/microservices/robot_rest/dash_service ~/.data/restConfig.json"
alias runspot="python3.7 /home/joel/dash_code/py_server/spotServer.py ~/.data/robotConfig.json"
alias setupsshkey='ssh-copy-id -i "$HOME/.ssh/id_rsa.pub"' # setup: ssh-keygen -t rsa -b 4096 # usage: setupsshkey [email protected]
alias clang-tidy='clang-tidy-13'
## WSL aliases
alias code="/mnt/c/Users/woelt/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment