dotfiles/zsh/.zimrc

221 lines
5.5 KiB
Plaintext
Raw Normal View History

2018-04-05 13:06:54 +02:00
#################
# CORE SETTINGS #
#################
#
# Zim settings
#
# Select what modules you would like enabled.
# The second line of modules may depend on options set by modules in the first line.
# These dependencies are noted on the respective module's README.md.
zmodules=(directory environment git history input utility meta custom \
syntax-highlighting history-substring-search prompt completion)
###################
# MODULE SETTINGS #
###################
#
# Prompt
#
# Set your desired prompt here
zprompt_theme='steeef'
#
# Completion
#
# set an optional host-specific filename for the completion cache file
# if none is provided, the default '.zcompdump' is used.
#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
#
# Utility
#
# Uncomment to enable command correction prompts
# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
#setopt CORRECT
#
# Environment
#
# Set the string below to the desired terminal title format string.
2018-05-16 07:07:29 +02:00
# The terminal title is redrawn upon directory change, however, variables like
2018-04-05 13:06:54 +02:00
# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# The example below uses the following format: 'username@host:/current/directory'
ztermtitle='%n@%m:%~'
#
# Input
#
# Uncomment to enable double-dot expansion.
# This appends '../' to your input for each '.' you type after an initial '..'
#zdouble_dot_expand='true'
#
# Syntax-Highlighting
#
# This determines what highlighters will be used with the syntax-highlighting module.
# Documentation of the highlighters can be found here:
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
# For (u)rxvt, termite and gnome-terminal users,
# removing the 'cursor' highlighter will fix the disappearing cursor problem
zhighlighters=(main brackets cursor)
#
# SSH
#
# Load these ssh identities with the ssh module
#zssh_ids=(id_rsa)
#
# Pacman
#
# Set (optional) pacman front-end.
#zpacman_frontend='powerpill'
# Load any helper scripts as defined here
#zpacman_helper=(aur)
#################
# CORE SETTINGS #
#################
#
# Zim settings
#
# Select what modules you would like enabled.
# The second line of modules may depend on options set by modules in the first line.
# These dependencies are noted on the respective module's README.md.
zmodules=(directory environment git history input utility meta custom \
syntax-highlighting history-substring-search prompt completion \
pacman git-info fasd )
source ~/.zim/modules/zsh-autosuggestions/zsh-autosuggestions.zsh
###################
# MODULE SETTINGS #
###################
#
# Prompt
#
# Set your desired prompt here
zprompt_theme='steeef'
#
# Completion
#
# set an optional host-specific filename for the completion cache file
# if none is provided, the default '.zcompdump' is used.
#zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}"
#
# Utility
#
# Uncomment to enable command correction prompts
# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
setopt CORRECT
#
# Environment
#
# Set the string below to the desired terminal title format string.
# The terminal title is redrawn upon directory change, however, variables like
# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# The example below uses the following format: 'username@host:/current/directory'
ztermtitle='%n@%m:%~'
#
# Input
#
# Uncomment to enable double-dot expansion.
# This appends '../' to your input for each '.' you type after an initial '..'
#zdouble_dot_expand='true'
#
# Syntax-Highlighting
#
# This determines what highlighters will be used with the syntax-highlighting module.
# Documentation of the highlighters can be found here:
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md
# For (u)rxvt, termite and gnome-terminal users,
# removing the 'cursor' highlighter will fix the disappearing cursor problem
zhighlighters=(main brackets)
#
# SSH
#
# Load these ssh identities with the ssh module
zssh_ids=(id_rsa)
# URXVT fix
autoload -Uz add-zsh-hook
function xterm_title_precmd () {
print -Pn '\e]2;%n@%m:%~\a'
}
if [[ "$TERM" == (screen*|xterm*|rxvt*) ]]; then
add-zsh-hook -Uz precmd xterm_title_precmd
# add-zsh-hook -Uz preexec xterm_title_preexec
fi
alias -g cb="xclip -selection clipboard"
alias -g tb="nc termbin.com 9999 | xclip -selection clipboard"
alias -g sshot='xfce4-screenshooter -o "$(which xclip) -i -t image/png -selection clipboard" $@'
alias -g steam-wine='WINEDEBUG=-all wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-cef-sandbox >/dev/null 2>&1 &'
2018-05-16 07:07:29 +02:00
# thefuck
fuck () {
TF_PYTHONIOENCODING=$PYTHONIOENCODING;
export TF_SHELL=zsh;
export TF_ALIAS=fuck;
export TF_SHELL_ALIASES=$(alias);
export TF_HISTORY="$(fc -ln -10)";
export PYTHONIOENCODING=utf-8;
TF_CMD=$(
thefuck THEFUCK_ARGUMENT_PLACEHOLDER $@
) && eval $TF_CMD;
unset TF_HISTORY;
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
test -n "$TF_CMD" && print -s $TF_CMD
}
2018-04-05 13:06:54 +02:00
# Set (optional) pacman front-end.
# zpacman_frontend='powerpill'
# Load any helper scripts as defined here
zpacman_helper=(aur)
export VISUAL="vim"
export PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
2018-05-16 07:07:29 +02:00
[[ -z "$TMUX" ]] && exec tmux -u