zsh: convert config to xdg
parent
86eff57a7e
commit
c449e13acc
|
@ -1,8 +1,5 @@
|
|||
emulate sh -c 'source /etc/profile'
|
||||
|
||||
export PATH="${PATH}:${HOME}/.bin"
|
||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||
|
||||
if [ `tty` = /dev/tty1 ]; then
|
||||
startx
|
||||
fi
|
|
@ -0,0 +1,26 @@
|
|||
export XDG_CONFIG_HOME=${HOME}/.config
|
||||
export XDG_CACHE_HOME=${HOME}/.cache
|
||||
export XDG_DATA_HOME=${HOME}/.local/share
|
||||
|
||||
export PATH="${PATH}:${HOME}/.bin"
|
||||
export PATH="${PATH}:${HOME}/.gem/ruby/2.5.0/bin"
|
||||
|
||||
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
|
||||
|
||||
export HISTFILE="$XDG_DATA_HOME/zsh/history"
|
||||
if [ ! -d $(dirname $HISTFILE) ]; then mkdir -p $(dirname $HISTFILE); fi
|
||||
|
||||
export HISTSIZE=5000
|
||||
export SAVEHIST=5000
|
||||
|
||||
export ZCOMPDUMP=$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
|
||||
if [ ! -d $(dirname $ZCOMPDUMP) ]; then mkdir -p $(dirname $ZCOMPDUMP); fi
|
||||
|
||||
# display time for commands taking longer than this value
|
||||
export REPORTTIME=10
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
export EDITOR=vim
|
||||
export PAGER=less
|
||||
|
||||
export ZDOTDIR=${XDG_CONFIG_HOME}/zsh
|
|
@ -12,13 +12,11 @@ zle -N edit-command-line
|
|||
# https://github.com/zsh-users/zsh-completions
|
||||
[ -d "$HOME/.zsh/zsh-completions/src" ] && fpath=($HOME/.zsh/zsh-completions/src $fpath)
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
autoload -Uz compinit && compinit -d $ZCOMPDUMP
|
||||
|
||||
autoload -U bashcompinit
|
||||
bashcompinit
|
||||
|
||||
zstyle :compinstall filename '/home/gdott9/.zshrc'
|
||||
|
||||
# Display a message when no match
|
||||
#zstyle ':completion:*:warnings' format 'No matches for: %d'
|
||||
|
||||
|
@ -82,8 +80,6 @@ setopt autopushd
|
|||
bindkey -v
|
||||
bindkey -M vicmd v edit-command-line
|
||||
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
# Affiche le mode (normal ou insert) dans le prompt de droite
|
||||
function zle-line-init zle-keymap-select
|
||||
{
|
||||
|
@ -94,19 +90,6 @@ function zle-line-init zle-keymap-select
|
|||
zle -N zle-line-init
|
||||
zle -N zle-keymap-select
|
||||
|
||||
#-------------#
|
||||
# Useful vars #
|
||||
#-------------#
|
||||
export HISTFILE=~/.histfile
|
||||
export HISTSIZE=5000
|
||||
export SAVEHIST=5000
|
||||
|
||||
# display time for commands taking longer than this value
|
||||
export REPORTTIME=10
|
||||
|
||||
export EDITOR=vim
|
||||
export PAGER=less
|
||||
|
||||
if [ $(whoami) = "root" ]
|
||||
then
|
||||
if [ $USER = "root" ]
|
||||
|
@ -123,8 +106,6 @@ fi
|
|||
export PS1='%m%{$fg[$COLOR]%}:%{$reset_color%}%~${vcs_info_msg_0_}%{$fg[$COLOR]%}%#%{$reset_color%} '
|
||||
export PS2="%_> "
|
||||
|
||||
export PATH="${PATH}:${HOME}/.gem/ruby/2.5.0/bin"
|
||||
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
|
||||
export LESS_TERMCAP_md=$'\E[01;31m' # begin bold
|
||||
export LESS_TERMCAP_me=$'\E[0m' # end mode
|
Loading…
Reference in New Issue