Man, am I the greatest
This commit is contained in:
parent
696dcd1d27
commit
0b4e7f9185
13 changed files with 163 additions and 163 deletions
|
@ -70,12 +70,44 @@ zle -N zle-line-init
|
|||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||
|
||||
# Use lf to switch directories and bind it to ctrl-o
|
||||
lfcd () {
|
||||
tmp="$(mktemp -uq)"
|
||||
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
|
||||
lf -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
bindkey -s '^o' '^ulfcd\n'
|
||||
|
||||
bindkey -s '^a' '^ubc -lq\n'
|
||||
|
||||
bindkey -s '^f' '^ucd "$(dirname "$(fzf)")"\n'
|
||||
|
||||
bindkey '^[[P' delete-char
|
||||
|
||||
# Edit line in vim with ctrl-e:
|
||||
autoload edit-command-line; zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
bindkey -M vicmd '^[[P' vi-delete-char
|
||||
bindkey -M vicmd '^e' edit-command-line
|
||||
bindkey -M visual '^[[P' vi-delete
|
||||
|
||||
# Aliases
|
||||
alias sudo='doas'
|
||||
alias neofetch='fastfetch'
|
||||
alias ls='ls -lah'
|
||||
alias vim='nvim'
|
||||
alias wal='hellwal -q'
|
||||
alias patch='bwroot patch'
|
||||
alias tcc='bwroot tcc'
|
||||
alias g++='bwroot g++'
|
||||
alias gcc='bwroot gcc'
|
||||
alias git='bwroot git'
|
||||
alias clang='bwroot clang'
|
||||
alias make='bwroot make'
|
||||
|
||||
# Commands
|
||||
fastfetch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue