Skip to content

Instantly share code, notes, and snippets.

@DerVerruckteFuchs
Created September 17, 2018 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DerVerruckteFuchs/78b28d3b6990a83a4347afc57d7762ea to your computer and use it in GitHub Desktop.
Save DerVerruckteFuchs/78b28d3b6990a83a4347afc57d7762ea to your computer and use it in GitHub Desktop.
#################
# 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
#
# 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)source /usr/lib/zim/templates/zimrc
zprompt_theme='lean'
# Created by newuser for 5.0.8
#source zim
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
fi
# enable zim modules
zmodules=(input history history-substring-search completion prompt git pacman)
# code completion
autoload -U compinit
compinit
# Completion for kitty
kitty + complete setup zsh | source /dev/stdin
# history settings
umask 022
# for shared history between terminals
setopt INC_APPEND_HISTORY
# for separate history between terminals
#setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt NOTIFY
setopt NOHUP
setopt MAILWARN
HISTFILE=~/.histfile
HISTSIZE=5000
SAVEHIST=5000
# ignore duplicate lines in history
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_SAVE_NO_DUPS
# set aurutils repo dir
export AURDEST=/var/cache/pacman/custom
# Fix Java fonts
export _JAVA_OPTIONS="-Dswing.aatext=true -Dawt.useSystemAAFontSettings=on"
# Load ~/.bcrc for bc
export BC_ENV_ARGS=~/.bcrc
# Default editor
export VISUAL=nvim
export EDITOR="$VISUAL"
# enable cccache
export PATH="/usr/bin/ccache/bin:$PATH"
TERM_NAME=$(echo $TERM | awk -F '-' '{print $2}')
# Enable dynamic title based on running commands
case $TERM in
(*xterm*|xterm-termite*|xterm-kitty*|termite*|kitty*)
# Write some info to terminal title.
# This is seen when the shell prompts for input.
function precmd {
print -Pn "\e]0;$TERM_NAME %(1j,%j job%(2j|s|); ,)%~\a"
}
# Write command and args to terminal title.
# This is seen while the shell waits for a command to complete.
function preexec {
printf "\033]0;%s\a" "$1"
}
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment