From 2c9e8fea73162d6a98b4cb624843acb60505832c Mon Sep 17 00:00:00 2001 From: Riley Smith Date: Sun, 15 May 2022 22:39:56 -0700 Subject: [PATCH] feat: add zsh package manager --- dot_zshenv | 4 ++++ dot_zshrc | 70 ++++++++---------------------------------------------- 2 files changed, 14 insertions(+), 60 deletions(-) diff --git a/dot_zshenv b/dot_zshenv index bb15fff..afd1d88 100644 --- a/dot_zshenv +++ b/dot_zshenv @@ -3,4 +3,8 @@ if [ -n "$DESKTOP_SESSION" ];then export SSH_AUTH_SOCK fi +. "$HOME/.cargo/env" +export VOLTA_HOME="$HOME/.volta" +export PATH="$HOME/Local Repos/depot_tools:$VOLTA_HOME/bin:/home/pixel/.spicetify:$PATH" +export CHROME_EXECUTABLE=/usr/bin/chromium export SHELL=/bin/zsh diff --git a/dot_zshrc b/dot_zshrc index a52803c..7d1ad5f 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -5,47 +5,16 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] 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" -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" +[[ -f ~/repos/zsh-snap/znap.zsh ]] || + git clone --depth 1 https://github.com/marlonrichert/zsh-snap.git ~/repos/zsh-snap -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" +source ~/repos/zsh-snap/znap.zsh # Uncomment the following line to enable command auto-correction. # ENABLE_CORRECTION="true" @@ -61,32 +30,19 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # much, much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# 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) - -source $ZSH/oh-my-zsh.sh +# OMZ +znap source ohmyzsh/ohmyzsh lib/{git,theme-and-appearance} +znap prompt romkatv/powerlevel10k +# Plugins +znap source marlonrichert/zsh-autocomplete +znap source zsh-users/zsh-autosuggestions # User configuration # aliases # replace ls with exa alias ls="exa" - +alias tree="exa --tree" #replace cat with bat alias cat="bat" @@ -94,11 +50,5 @@ alias cat="bat" alias vim="nvim" alias vi="nvim" -export MOZ_DBUS_REMOTE=1 -export MOZ_ENABLE_WAYLAND=1 -export VOLTA_HOME="$HOME/.volta" -export PATH="$HOME/Local Repos/depot_tools:$VOLTA_HOME/bin:$PATH" -export CHROME_EXECUTABLE=/usr/bin/chromium # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh -export PATH=$PATH:/home/pixel/.spicetify