dotfiles/zshrc

88 lines
2.1 KiB
Bash
Raw Permalink Normal View History

2017-08-23 13:48:49 +00:00
# if [ $VTE_VERSION ]; then
# source /etc/profile.d/vte.sh
# __vte_osc7
# fi
2018-06-17 13:42:11 +00:00
if [[ $TERMINAL == urxvt ]] || [[ $TERM == xterm ]] || [[ $TERM == screen ]]; then
2017-08-23 13:48:49 +00:00
export TERM="xterm-256color"
fi
2018-06-17 13:42:11 +00:00
fpath=(~/projects/scripts/completions/ $fpath)
2018-04-28 07:55:38 +00:00
2017-08-23 13:48:49 +00:00
# zplug management
source ~/.zplug/init.zsh
zplug "zplug/zplug", hook-build:'zplug --self-manage'
zplug "denysdovhan/spaceship-zsh-theme", use:spaceship.zsh, as:theme
# zplug "dracula/zsh", as:theme
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-completions"
zplug "zsh-users/zsh-syntax-highlighting", defer:3
zplug "plugins/pass", from:oh-my-zsh
if ! zplug check; then
zplug install
fi
zplug load
# Theme settings
export SPACESHIP_TIME_SHOW=true
2018-04-28 07:55:38 +00:00
export SPACESHIP_CHAR_SYMBOL="> "
2017-08-23 13:48:49 +00:00
export SPACESHIP_BATTERY_SHOW=false
# Do menu-driven completion.
zstyle ':completion:*' menu select
2018-04-28 07:55:38 +00:00
zstyle ':completion::complete:*' use-cache 1
2017-08-23 13:48:49 +00:00
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=2000
SAVEHIST=1000
setopt beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
2018-04-28 07:55:38 +00:00
zstyle :compinstall filename '~/.zshrc'
2017-08-23 13:48:49 +00:00
autoload -Uz compinit
# End of lines added by compinstall
# Alias definition
2018-09-20 11:43:09 +00:00
# Paranoia
alias rm="rm -i"
alias delete="rm -I"
alias mv="mv -i"
alias cp="cp -ip"
2018-04-28 07:55:38 +00:00
alias ls="ls -F --color=auto"
alias la="ls -FAhl --color=auto"
alias ll="ls -Flh --color=auto"
alias lt="ls -Flhart --color=auto"
alias sl="exa -Fal"
2018-06-17 13:42:11 +00:00
alias lesr="less -R"
alias ip="ip -c"
#alias man="info"
2018-09-20 11:43:09 +00:00
alias filesize="stat -c '%s'"
2018-06-17 13:42:11 +00:00
alias mirror="~/mirrors/websites/mirror"
2018-04-28 07:55:38 +00:00
alias qledger="gpg -o - --decrypt ~/notes/ledger.dat.gpg | ledger -f - "
alias ytda="youtube-dl -f 'bestaudio[ext=webm]/bestaudio'"
alias ytdv="youtube-dl -f 'bestvideo[ext=webm]+bestaudio[ext=webm]/bestvideo+bestaudio'"
2018-09-20 11:43:09 +00:00
alias mpa="mpv --no-vid --loop-playlist=inf"
alias flame="perf script | ~/builds/FlameGraph/stackcollapse-perf.pl | ~/builds/FlameGraph/flamegraph.pl > flamegraph.svg"
alias p6="perl6"
2017-08-23 13:48:49 +00:00
function cheat() {
if [ -n "$1" ]
then
2018-09-20 11:43:47 +00:00
curl "https://cheat.sh/{$@}"
2017-08-23 13:48:49 +00:00
else
2018-09-20 11:43:47 +00:00
curl "https://cheat.sh"
2017-08-23 13:48:49 +00:00
fi
}
# I need my fortune's
if hash fortune 2>/dev/null; then
fortune -a
fi