Skip to content

Commit

Permalink
chore: update zshrc
Browse files Browse the repository at this point in the history
linnovs committed Feb 1, 2021

Verified

This commit was signed with the committer’s verified signature.
cwschilly Caleb Schilly
1 parent 9be0041 commit 0f747fa
Showing 3 changed files with 59 additions and 8 deletions.
6 changes: 4 additions & 2 deletions runcoms/zprofile
Original file line number Diff line number Diff line change
@@ -23,8 +23,8 @@ fi
# Editors
#

export EDITOR='vim'
export VISUAL='vim'
export EDITOR='nvim'
export VISUAL='nvim'
if command -v most &>/dev/null
then
export PAGER='most'
@@ -68,6 +68,8 @@ export PYENV_ROOT=$HOME/.pyenv

# Set the list of directories that Zsh searches for programs.
path=(
$HOME/.emacs.d/bin
$HOME/.yarn/bin
$HOME/.local/bin
$HOME/.gem/ruby/2.6.0/bin
/usr/local/{bin,sbin}
8 changes: 8 additions & 0 deletions runcoms/zshenv
Original file line number Diff line number Diff line change
@@ -23,8 +23,16 @@ export KEYTIMEOUT=1
# Enable BUILDKIT for docker
export DOCKER_BUILDKIT=0

# Better yaourt colors
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"

# Enable GO module
export GO111MODULE=on

# GO private repo
export GOPRIVATE=github.com/en-trak

# FZF default command
export FZF_DEFAULT_COMMAND='find . -path "*/\.git" -prune -o -type f -print -o -type l -print | sed s/^..//'

export GITHUB_PERSONAL_TOKEN='defebdc0e529e38d9ca6716a0564651eca870e4a'
53 changes: 47 additions & 6 deletions runcoms/zshrc
Original file line number Diff line number Diff line change
@@ -26,13 +26,19 @@ alias open="xdg-open"

# this will use the xclip to achive maclike copy and paste pipe action
# this will not work if the xclip is not installed
if command -v xclip &> /dev/null
if command -v wl-copy &> /dev/null
then
alias cbcopy='xclip -in -selection clipboard'
alias cbpaste='xclip -out -selection clipboard'
alias cbcopy='wl-copy'
alias cbpaste='wl-paste'
else
alias cbcopy='echo notImplemented'
alias cbpaste='echo notImplemented'
alias cbcopy='echo notImplemented'
alias cbpaste='echo notImplemented'
fi

# this will set vim to be alias of nvim (if nvim is found)
if command -v nvim &> /dev/null
then
alias vim='nvim'
fi

# use for less to have syntax highlight
@@ -60,7 +66,7 @@ export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

alias ssh="TERM=xterm ssh"
alias ssh="TERM=xterm-256color ssh"

wd() {
. /home/linnovs/bin/wd/wd.sh
@@ -75,4 +81,39 @@ tmux_rename() {
fi
}

code() {
if [[ ! -z "$TMUX" ]];then
tmux split-window -l 20% -v -d
vim
fi
}

uuidgenbytes() {
uuid=$(uuidgen | tr -d - )
bytes=""
for i in {1..32..2}
do
bytes+=$(printf '\\\\x%s' "$(echo $uuid | cut -c ${i}-$((i+1)))")
done
echo $bytes
}

uuidtobytes() {
uuid=$(echo $1 | tr -d -)
bytes=""
for i in {1..32..2}
do
bytes+=$(printf '\\\\x%s' "$(echo $uuid | cut -c ${i}-$((i+1)))")
done
echo $bytes
}

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/linnovs/google-cloud-sdk/path.zsh.inc' ]; then . '/home/linnovs/google-cloud-sdk/path.zsh.inc'; fi

# The next line enables shell command completion for gcloud.
if [ -f '/home/linnovs/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/linnovs/google-cloud-sdk/completion.zsh.inc'; fi

0 comments on commit 0f747fa

Please sign in to comment.