mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-30 04:20:43 +00:00
Define zootdir in profile and move .zshrc
This commit is contained in:
parent
a385f09627
commit
6cd2d962ee
2 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ export XDG_DATA_HOME="$HOME/.local/share"
|
|||
export XDG_RUNTIME_DIR="/run/user/$UID"
|
||||
|
||||
# Pre-Application XDG settings
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
|
||||
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
|
||||
export LESSHISTFILE="-"
|
||||
|
@ -50,6 +51,7 @@ export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
|||
command -v bat > /dev/null && export MANPAGER="sh -c 'col -bx | bat -l man -p'" # Format manuals with bat (colors)
|
||||
|
||||
# Other program settings
|
||||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
||||
export PIPENV_VENV_IN_PROJECT=1 # Force pipenv to create new environments within projects ./.venv
|
||||
#export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
||||
|
||||
|
|
67
home/.config/zsh/.zshrc
Executable file
67
home/.config/zsh/.zshrc
Executable file
|
@ -0,0 +1,67 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
source /etc/profile
|
||||
|
||||
# ZSH Options
|
||||
setopt auto_cd # cd by typing directory name if it's not a command
|
||||
setopt auto_list # automatically list choices on ambiguous completion
|
||||
setopt auto_menu # automatically use menu completion
|
||||
setopt always_to_end # move cursor to end if word had one match
|
||||
setopt interactivecomments # allow comments in interactive mode
|
||||
setopt magicequalsubst # enable filename expansion for arguments of form `x=expression`
|
||||
setopt notify # report the status of background jobs immediately
|
||||
setopt numericglobsort # sort filenames numerically when it makes sense
|
||||
#setopt correct_all # autocorrect commands
|
||||
|
||||
# ZSH files cleanup
|
||||
export ZSH_CACHE="$HOME/.cache/zsh"
|
||||
export ZSH_COMPDUMP="$ZSH_CACHE/zcompdump-$ZSH_VERSION" # for auto/tab completion
|
||||
|
||||
[ -f ~/.zsh-update ] && mv ~/.zsh-update $ZSH_CACHE/.zsh-update
|
||||
[ -f ~/.sudo_as_admin_sucessful ] && rm ~/.sudo_as_admin_successful
|
||||
[ -f ~/.bash_history ] && rm ~/.bash_history
|
||||
|
||||
# History configuration
|
||||
HISTFILE="$ZSH_CACHE/history"
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt appendhistory # save history entries as soon as they are entered
|
||||
setopt hist_ignore_space # ignore commands that start with space
|
||||
setopt hist_verify # show commands with history expansion to user before running it
|
||||
#setopt hist_ignore_dups # ignore duplicated commands history list
|
||||
#setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTFILE
|
||||
#setopt share_history # share command history data between terminals
|
||||
|
||||
# oh-my-zsh configuration (DISABLED by default, if you want oh-my-zsh, uncomment these)
|
||||
#export ZSH="/usr/share/oh-my-zsh"
|
||||
#ZSH_THEME="af-magic"
|
||||
#UPDATE_ZSH_DAYS=8
|
||||
#ENABLE_CORRECTION="false"
|
||||
#source $ZSH/oh-my-zsh.sh # Run oh-my-zsh
|
||||
|
||||
# Completion features (tab)
|
||||
autoload -Uz compinit
|
||||
zmodload -i zsh/complist
|
||||
compinit -d $ZSH_COMPDUMP
|
||||
comp_options+=(globdots)
|
||||
zstyle ':completion:*' menu select # select completions with arrow keys
|
||||
zstyle ':completion:*' group-name '' # group results by category
|
||||
zstyle ':completion:::::' completer _expand _complete _ignored _approximate #enable approximate matches for completio
|
||||
|
||||
# Color support
|
||||
#autoload -U colors && colors
|
||||
|
||||
# Setup aliases
|
||||
[ -f ~/.config/shell/aliases ] && source ~/.config/shell/aliases
|
||||
# Load handlers
|
||||
[ -f ~/.config/shell/handlers ] && source ~/.config/shell/handlers
|
||||
# Load key bindings
|
||||
[ -f ~/.config/shell/keybinds ] && source ~/.config/shell/keybinds
|
||||
# Load prompt
|
||||
[ -f ~/.config/shell/prompt ] && source ~/.config/shell/prompt
|
||||
|
||||
# Load extensions (should be last)
|
||||
. /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh 2>/dev/null # Syntax highlighting
|
||||
. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null # Auto suggestions
|
||||
. /usr/share/autojump/autojump.zsh 2>/dev/null # Auto-Jump
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue