1
0
Fork 0
nixos-config/home-common/configs/zshrc
Malte Brandy 074a7f21ab
Nonatomic
2018-04-27 23:48:56 +02:00

31 lines
732 B
Bash

if [[ -z "$TMUX" ]] {
session=$(tmux ls | grep -v attached | head -1 | cut -f1 -d:)
if [[ -n $session ]] {
exec tmux attach -t $session;
} else {
exec tmux;
}
}
precmd() {
local s=$? c=( $(fc -L -D -l -1) )
if [[ $launched && "${c[2]}" != "0:00" ]] {
eventc command $([[ ${s} == 0 ]] && echo success || echo failure) -d command="\"${c[3,-1]}\"" -d time="\"${c[2]}\"" -d host="\"$HOST\""
} else {
export launched=true;
}
}
alias c=cdr
alias s='sudo systemctl'
alias u='systemctl --user'
alias m=man
alias t="tmux attach"
alias tn="tmux new-session"
alias w="develop-here"
alias ls=exa
export BROWSER=qutebrowser
export EDITOR=nvim
export MANPAGER="most -s"
bindkey '^R' history-incremental-pattern-search-backward