Compare commits
No commits in common. "434d371c57cdae4c0a27bbcadc41e1277163c8af" and "d509b8a15917fd5a2d215c551e682602b1d37450" have entirely different histories.
434d371c57
...
d509b8a159
21
.aliases
21
.aliases
|
|
@ -3,27 +3,6 @@
|
|||
function notes() {cd $HOME/Notes; nvim; cd -;};
|
||||
function sb() {cd $HOME/second-brain/; git pull; nvim; git add .; git commit; git push; cd -;};
|
||||
|
||||
## Open work folder with fuzzy finder
|
||||
function work() {
|
||||
work_dirs=( "$HOME/clones" "$HOME/sandbox" )
|
||||
goto=""
|
||||
if [ ! -z $1 ]; then
|
||||
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf -f $1)
|
||||
fi
|
||||
|
||||
if [ -z "$goto" -o $(wc -l <<< "$goto") -ne 1 ]; then
|
||||
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
|
||||
fi
|
||||
|
||||
[ -z $goto ] && return
|
||||
if [ -z $TMUX ]; then
|
||||
tmux new -A -s "$(basename -- $goto)" -c "$goto"
|
||||
else
|
||||
tmux new -d -s "$(basename -- $goto)" -c "$goto"
|
||||
tmux switch-client -t "$(basename -- $goto)"
|
||||
fi
|
||||
}
|
||||
|
||||
# simple
|
||||
alias clj='rlwrap java -cp ~/Clojure/clojure-1.8.0.jar clojure.main'
|
||||
alias ll='ls -l'
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ set-option -g renumber-windows on
|
|||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
||||
bind-key -n -T prefix k if-shell "${is_vim}" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n -T prefix j if-shell "${is_vim}" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n -T prefix h if-shell "${is_vim}" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n -T prefix l if-shell "${is_vim}" 'send-keys C-l' 'select-pane -R'
|
||||
bind-key -n -r 'C-h' if-shell "${is_vim}" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n -r 'C-j' if-shell "${is_vim}" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n -r 'C-k' if-shell "${is_vim}" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n -r 'C-l' if-shell "${is_vim}" 'send-keys C-l' 'select-pane -R'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
|
|
|
|||
58
.zshrc
58
.zshrc
|
|
@ -1,6 +1,3 @@
|
|||
zmodload zsh/zprof
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$HOME/bin:/usr/local/bin:/usr/lib65/openjdk-17/bin:$PATH
|
||||
|
||||
|
|
@ -112,12 +109,53 @@ export PATH=$HOME/.cargo/bin:$PATH
|
|||
# adding local to path
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
# Open work folder with fuzzy finder
|
||||
function work() {
|
||||
work_dirs=( "$HOME/clones" "$HOME/sandbox" )
|
||||
|
||||
goto=$(find $work_dirs -maxdepth 1 -mindepth 1 -type d | fzf --query=$1 --preview "tree -C -L 2 {}")
|
||||
[ -z $goto ] && return
|
||||
|
||||
if [ -z $TMUX ]
|
||||
then
|
||||
tmux new -A -s "$(basename -- $goto)" -c "$goto"
|
||||
else
|
||||
tmux new -d -s "$(basename -- $goto)" -c "$goto"
|
||||
tmux switch-client -t "$(basename -- $goto)"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# JINA_CLI_BEGIN
|
||||
|
||||
## autocomplete
|
||||
if [[ ! -o interactive ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
compctl -K _jina jina
|
||||
|
||||
_jina() {
|
||||
local words completions
|
||||
read -cA words
|
||||
|
||||
if [ "${#words}" -eq 2 ]; then
|
||||
completions="$(jina commands)"
|
||||
else
|
||||
completions="$(jina completions ${words[2,-2]})"
|
||||
fi
|
||||
|
||||
reply=(${(ps:
|
||||
:)completions})
|
||||
}
|
||||
|
||||
# session-wise fix
|
||||
ulimit -n 4096
|
||||
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
||||
|
||||
# JINA_CLI_END
|
||||
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
nvm() {
|
||||
unset -f nvm
|
||||
export NVM_DIR=~/.nvm
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue