dotfiles/.aliases

55 lines
1.9 KiB
Plaintext
Raw Normal View History

2024-02-24 02:38:12 -05:00
# Complex aliasses
## Open notes folder in nvim then return
2024-03-18 14:56:28 -04:00
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" "$HOME/TA/" )
work_dirs=( $(find $work_dirs -maxdepth 0 -type d 2> /dev/null) )
2024-03-18 14:56:28 -04:00
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"
2025-03-27 09:10:04 -04:00
tmux switch-client -t "$(basename -- $goto | tr . _)"
2024-03-18 14:56:28 -04:00
fi
}
2024-02-24 02:38:12 -05:00
# simple
2016-12-15 00:30:09 -05:00
alias clj='rlwrap java -cp ~/Clojure/clojure-1.8.0.jar clojure.main'
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
2017-03-14 10:53:46 -04:00
alias gpwd='pwd | xclip -i -selection clipboard'
alias cdclip="cd \$(xclip -o -selection clipboard)"
alias clipi='xclip -i -selection clipboard'
alias clipo='xclip -o -selection clipboard'
2017-03-11 02:57:12 -05:00
alias ssh-agent='ssh-agent -t 1h'
2024-02-24 02:38:12 -05:00
alias saa='eval $(ssh-agent) && ssh-add'
alias tm='tmux new -A'
2017-11-18 01:00:35 -05:00
alias exfs='sudo zpool import external'
alias uexfs='sudo zpool export external'
alias socks='ssh -D 8081 -C -q -N home-server'
alias gmonitor='while [ true ] ; do nvidia-smi; nvidia-settings -q gpucoretemp | grep gpu; sensors| grep CPU; sleep 1; clear; done'
2023-02-15 15:01:34 -05:00
alias code='code-oss'
2023-02-16 09:24:47 -05:00
alias conda-activate='source /opt/anaconda/bin/activate'
alias conda-deactivete='source /opt/anaconda/bin/deactivate'
2023-05-31 01:03:19 -04:00
alias venv='python -m venv'
alias venv2='python2 -m venv'
alias venv3='python3 -m venv'
alias dotvenv='source .venv/bin/activate'
2024-01-24 14:30:44 -05:00
alias todo='rusty-tasks'
2024-01-29 08:29:53 -05:00
alias ccat='bat'
alias we='watchexec'
2025-03-27 09:10:04 -04:00
alias netcheck='ping 8.8.8.8'