Properly set up & use XDG dirs
This commit is contained in:
parent
60b247f049
commit
ac8927b994
|
@ -4,15 +4,11 @@
|
|||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_CONFIG_DIR="$HOME/.config"
|
||||
XDG_CACHE_DIR="$HOME/.cache"
|
||||
XDG_DATA_DIR="$HOME/.local/share"
|
||||
XDG_DESKTOP_DIR="$HOME/.local/desktop"
|
||||
XDG_TEMPLATES_DIR="$HOME/.local/templates"
|
||||
XDG_DOWNLOAD_DIR="$HOME/daten/downloads"
|
||||
XDG_MUSIC_DIR="$HOME/"
|
||||
XDG_PICTURES_DIR="$HOME/"
|
||||
XDG_MUSIC_DIR="$HOME/daten/music"
|
||||
XDG_PICTURES_DIR="$HOME/daten/images"
|
||||
XDG_VIDEOS_DIR="$HOME/daten/videos"
|
||||
XDG_DOCUMENTS_DIR="$HOME/daten/Dropbox/dokumente"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/daten/share"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Commands
|
||||
if test "$PWD" = ~ && test "$0" != "$SHELL"; then
|
||||
neofetch --config $(xdg-user-dir CONFIG)/neofetch/config-short.conf
|
||||
neofetch --config $XDG_CONFIG_HOME/neofetch/config-short.conf
|
||||
task next limit:3
|
||||
timew | head -3
|
||||
fi
|
||||
|
@ -12,11 +12,11 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
|||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
export PATH=$HOME/bin:$HOME/.local/bin:$PATH
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
export CONFIG_ZSH="$HOME/.config/zsh"
|
||||
export CONFIG_SHELLS="$HOME/.config/shell"
|
||||
export ZSH="$HOME/.local/share/oh-my-zsh"
|
||||
export CONFIG_ZSH="$XDG_CONFIG_HOME/zsh"
|
||||
export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell"
|
||||
export ZSH="$XDG_DATA_HOME/oh-my-zsh"
|
||||
DEFAULT_USER=$USER
|
||||
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
@ -36,7 +36,6 @@ DISABLE_UNTRACKED_FILES_DIRTY="true" # DOn't mark untracked files as dirty - spe
|
|||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
plugins=(
|
||||
git
|
||||
git-extras
|
||||
git-auto-fetch
|
||||
z
|
||||
fast-syntax-highlighting
|
||||
|
@ -46,7 +45,8 @@ plugins=(
|
|||
|
||||
_comp_options+=(globdots) # Show files starting with dot in autocomplete
|
||||
fpath=($fpath "$CONFIG_ZSH/zsh_completion") # Custom completions
|
||||
ZSH_COMPDUMP="$(xdg-user-dir CACHE)/zsh/zcompdump-$ZSH_VERSION" # Cache completions
|
||||
ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" # Cache completions
|
||||
DISABLE_UPDATE_PROMPT=true
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export XDG_DATA_DIRS="$HOME/.local/xdg:$XDG_DATA_DIRS"
|
||||
export KDEHOME="$HOME/.local/share/kdehome"
|
||||
export KDEHOME="$XDG_DATA_HOME/kdehome"
|
||||
|
|
28
.zprofile
28
.zprofile
|
@ -1,16 +1,24 @@
|
|||
. ~/.profile
|
||||
# red stderr
|
||||
export LD_PRELOAD="/opt/stderred/build/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||
# xdg
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
# zsh config
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
export _Z_DATA="$HOME/.local/share/zsh/z"
|
||||
export HISTFILE="$HOME/.local/share/zsh/history"
|
||||
# programs
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
export _Z_DATA="$XDG_DATA_HOME/zsh/z"
|
||||
export HISTFILE="$XDG_DATA_HOME/zsh/history"
|
||||
# environment
|
||||
export EDITOR=/usr/bin/nvim
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden"
|
||||
export FZF_DEFAULT_OPTS="--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history"
|
||||
# software config
|
||||
export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),del:execute(gio trash {}),change:top"'
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --type file --color=always"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
# adjust programs to use xdg
|
||||
export PASSWORD_STORE_DIR="$HOME/.local/share/pass"
|
||||
export TIMEWARRIORDB="$HOME/.local/share/timewarrior"
|
||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
|
||||
export TIMEWARRIORDB="$XDG_DATA_HOME/timewarrior"
|
||||
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
||||
# red stderr
|
||||
export LD_PRELOAD="/opt/stderred/build/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||
|
||||
$HOME/.local/bin/update-keyboard-layout.sh
|
||||
|
|
Loading…
Reference in New Issue