Skip to content

Instantly share code, notes, and snippets.

@cadebrown
Created January 31, 2022 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cadebrown/975daa6ef2daf9a7a12810501223e07d to your computer and use it in GitHub Desktop.
Save cadebrown/975daa6ef2daf9a7a12810501223e07d to your computer and use it in GitHub Desktop.
# ~/.zshrc - Cade Brown's ZSH and general settings
#
#
# ZSH things
#
# Themes:
# * https://github.com/sindresorhus/pure
# * https://github.com/romkatv/powerlevel10k
#
# Plugins:
# * https://travis.media/top-10-oh-my-zsh-plugins-for-productive-developers/
#
# Ubuntu Things
#
# Single install:
# sudo apt install git vim zsh curl xclip vlc
#
# GNOME things
#
# Fuck GNOME for taking away vertical workspaces:
# * https://github.com/RensAlthuis/vertical-overview
#
# Linux/X11 things
#
# Clipboard/management:
# * https://github.com/astrand/xclip
#
# CUDA/NVIDIA things
#
# Installed weird in Ubuntu by default
# * sudo ln -s /usr/lib/nvidia-cuda-toolkit /usr/lib/cuda
#
#
#
#
# @author: Cade Brown <me@cade.site>
# -*- ENVIRONMENT -*-
export LANG=en_US.UTF-8
export EDITOR='vim'
# cuda install directory
export CUDA=/usr/lib/cuda
export PATH="$CUDA/bin:$HOME/.local/bin:$PATH"
# -*- ALIASES/UTILS -*-
alias s='sudo'
alias v='vim'
alias c='code'
alias o='open'
alias p='python3'
alias a='sudo apt -y'
alias ai='a install'
alias rb='s reboot -h now'
alias sd='s shutdown -h now'
# xclip alias fix
# ... | xc (copy to clipboard)
# xc -o | ... (paste from clipboard)
alias xc='xclip -selection clipboard'
function gacp {
git add . && git commit -m"$@" && git push
}
# enter emscripten env
function em {
source $HOME/prog/emsdk/emsdk_env.sh
}
# -*- ZSH CONFIG -*-
export ZSH="$HOME/.oh-my-zsh"
#ZSH_THEME="afowler"
# for 'powerlevel10k' theme (also, see end of file)
ZSH_THEME="powerlevel10k/powerlevel10k"
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
# for 'pure' theme
#ZSH_THEME=""
#fpath+=$HOME/prog/pure
#autoload -U promptinit; promptinit
#prompt pure
# ZSH settings
zstyle ':omz:update' mode disabled # disable automatic updates
DISABLE_UNTRACKED_FILES_DIRTY="true"
HIST_STAMPS="yyyy-mm-dd"
# now, setup plugins and initialize oh-my-zsh
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
source $ZSH/oh-my-zsh.sh
# for powerlevel10k config
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# -*- OTHER SETUPS -*-
# python startup file, ran on interactive shells
export PYTHONSTARTUP="$HOME/.pythonrc"
# -*- MISC INFO -*-
# Run these for vertical-overview key combos that make sense
#dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-up "['<Super>Page_Up']"
#dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-down "['<Super>Page_Down']"
#dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-up "['<Super><Control>Page_Up']"
#dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-down "['<Super><Control>Page_Down']"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment