From 85442404b3b9a3e47839a5d685f899aa9e1a1336 Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:58:32 +0200 Subject: [PATCH] Moved config files to .config directory --- .xinitrc => .config/X11/xinitrc | 0 .gitconfig => .config/git/config | 0 .zaliases => .config/zsh/.zaliases | 2 ++ .config/zsh/.zlogout | 3 +++ .zprofile => .config/zsh/.zprofile | 4 ---- .zshrc => .config/zsh/.zshrc | 14 ++++++-------- .vimrc => .vim/vimrc | 0 .zshenv | 13 +++++++++++++ 8 files changed, 24 insertions(+), 12 deletions(-) rename .xinitrc => .config/X11/xinitrc (100%) rename .gitconfig => .config/git/config (100%) rename .zaliases => .config/zsh/.zaliases (90%) create mode 100644 .config/zsh/.zlogout rename .zprofile => .config/zsh/.zprofile (93%) rename .zshrc => .config/zsh/.zshrc (92%) rename .vimrc => .vim/vimrc (100%) diff --git a/.xinitrc b/.config/X11/xinitrc similarity index 100% rename from .xinitrc rename to .config/X11/xinitrc diff --git a/.gitconfig b/.config/git/config similarity index 100% rename from .gitconfig rename to .config/git/config diff --git a/.zaliases b/.config/zsh/.zaliases similarity index 90% rename from .zaliases rename to .config/zsh/.zaliases index 471e16c..2da9ed9 100644 --- a/.zaliases +++ b/.config/zsh/.zaliases @@ -9,6 +9,8 @@ alias ff="fastfetch" alias sc="shellcheck -s bash" alias ip="ip --color=auto" +wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" + # git init --bare $HOME/.dotfiles # cfg config --local status.showUntrackedFiles no alias cfg="/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME" diff --git a/.config/zsh/.zlogout b/.config/zsh/.zlogout new file mode 100644 index 0000000..dd0b14c --- /dev/null +++ b/.config/zsh/.zlogout @@ -0,0 +1,3 @@ +pkill -u "$USER" -9 ssh-agent +wl-copy -c +cliphist wipe diff --git a/.zprofile b/.config/zsh/.zprofile similarity index 93% rename from .zprofile rename to .config/zsh/.zprofile index 1a94451..3159ade 100644 --- a/.zprofile +++ b/.config/zsh/.zprofile @@ -1,7 +1,3 @@ -typeset -U path PATH -path=(~/.local/bin $path) -export PATH - # SSH Agent if [[ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]]; then pkill -u "$USER" -9 ssh-agent diff --git a/.zshrc b/.config/zsh/.zshrc similarity index 92% rename from .zshrc rename to .config/zsh/.zshrc index e83b362..cc9de15 100644 --- a/.zshrc +++ b/.config/zsh/.zshrc @@ -14,6 +14,7 @@ ENABLE_CORRECTION="true" plugins=(git-prompt sudo zsh-autosuggestions zsh-shift-select) ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh +ZSH_COMPDUMP="$ZSH_CACHE_DIR/.zcompdump" if [[ ! -d $ZSH_CACHE_DIR ]]; then mkdir $ZSH_CACHE_DIR fi @@ -21,24 +22,21 @@ fi # If not running interactively, don't do anything [[ $- != *i* ]] && exit -source $HOME/.zaliases +source $ZDOTDIR/.zaliases # Disable bell unsetopt autocd beep # Enable case-insensitive auto completion -autoload -Uz compinit && compinit -zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' +#autoload -Uz compinit && compinit +#zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' # Set prompt -zmodload zsh/mathfunc -#width=$((int( $COLUMNS / 4 ))) -width=42 -PROMPT="%B%F{198}%n%F{015}@%F{014}%m%F{015}:%F{198}%${width}<..<%~%F{015}> %b%f" +PROMPT="%B%F{198}%n%F{015}@%F{014}%m%F{015}:%F{198}%42<..<%~%F{015}> %b%f" #autoload -Uz promptinit && promptinit # History settings -HISTFILE=~/.zhistory +HISTFILE="$XDG_STATE_HOME/zsh/history" HISTSIZE=10000 SAVEHIST=10000 setopt appendhistory diff --git a/.vimrc b/.vim/vimrc similarity index 100% rename from .vimrc rename to .vim/vimrc diff --git a/.zshenv b/.zshenv index d46bf43..58645e1 100644 --- a/.zshenv +++ b/.zshenv @@ -1 +1,14 @@ export EDITOR=vim + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_STATE_HOME="$HOME/.local/state" + +export ZDOTDIR="$HOME/.config/zsh" +export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" +export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python" + +typeset -U path PATH +path=(~/.local/bin $path) +export PATH