dotfiles/.zshrc

75 lines
1.9 KiB
Bash
Raw Normal View History

2019-10-20 16:48:00 +02:00
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=10000
setopt appendhistory
2019-10-20 17:47:29 +02:00
bindkey -v
2019-10-20 16:48:00 +02:00
2019-10-20 17:47:29 +02:00
terminfo_down_sc=$terminfo[cud1]$terminfo[cud1]$terminfo[cuu1]$terminfo[cuu1]$terminfo[sc]$terminfo[cud1]$terminfo[cud1]
#terminfo_down_sc=$terminfo[cud1]$terminfo[cuu1]$terminfo[sc]$terminfo[cud1]
2019-10-20 16:48:00 +02:00
2019-10-20 17:47:29 +02:00
function insert-mode () { echo "%S%F{cyan} -- INSERT -- %f%s" }
function normal-mode () { echo "%S%F{green} -- NORMAL -- %f%s" }
precmd () {
PS1="%{$terminfo_down_sc$VI_MODE$terminfo[rc]%}%F{magenta}%n%f@%F{yellow}%m%f %F{green}%~%f %(!.#.$) "
}
function zle-keymap-select () {
VI_KEYMAP=$KEYMAP
case ${VI_KEYMAP} in
(vicmd) VI_MODE="$(normal-mode)" ;;
(main|viins) VI_MODE="$(insert-mode)" ;;
(*) VI_MODE="$(insert-mode)" ;;
esac
PS1="%{$terminfo_down_sc$VI_MODE$terminfo[rc]%}%F{magenta}%n%f@%F{yellow}%m%f %B%F{cyan}%~%f%b %(!.#.$) "
zle reset-prompt
zle -R
}
2019-10-20 16:48:00 +02:00
2019-10-20 17:47:29 +02:00
function zle-line-init() {
zle -K viins
}
2019-10-20 16:48:00 +02:00
2019-10-20 17:47:29 +02:00
preexec () { print -rn -- $terminfo[el]; }
zle -N zle-line-init
zle -N zle-keymap-select
export KEYTIMEOUT=1
alias ll='ls -alhF'
2019-10-20 17:47:29 +02:00
alias la='ls -A'
alias l='ls -CF'
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
2019-10-20 16:48:00 +02:00
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export SSH_AUTH_SOCK="$(gpgconf --list-dir socketdir)/S.gpg-agent.ssh"
export GPG_TTY=$(tty)
2019-10-20 17:47:29 +02:00
gpg-connect-agent updatestartuptty /bye
2019-10-20 16:48:00 +02:00
export EDITOR=nvim
export TERMINAL=gnome-terminal
export PATH=$HOME/bin:$HOME/.local/bin:$PATH:~/JUCE
2019-10-20 17:47:29 +02:00
export JUCE_PATH=~/JUCE
export FRUT_PATH=~/FRUT
2019-10-20 16:48:00 +02:00
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export CXXFLAGS='-std=c++14'
export LIBGL_ALWAYS_INDIRECT=1