about summary refs log tree commit diff stats
path: root/profile/xdg.sh
blob: a4e395fc505c3707346dd70ea572e4ef1e4c11ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# XDG compliance (miscellaneous)

# If an XDG-complaint variable makes more sense somewhere else, it'll be
# moved there (e.g., HISTFILE is in history.bash).  So variables might
# move /out/ of this directory, but they probably won't move /in/.

# See also https://github.com/b3nj5m1n/xdg-ninja,
# https://wiki.archlinux.org/title/XDG_Base_Directory#Support

# Readline
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
export RLWRAP_HOME="$XDG_DATA_HOME/rlwrap"

# Less
export LESSKEY="$XDG_CONFIG_HOME/less/lesskey"
export LESSHISTFILE="$XDG_CACHE_HOME/less/history"
mkdir -p "$XDG_CACHE_HOME/less"

# Vim
export VIMINIT="source ${XDG_CONFIG_HOME:=$HOME/.config}/vim/vimrc"

# Weechat
export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"

# Lynx
export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"

# Xorg
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$HOME}"
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
export USERXSESSION="$XDG_CACHE_HOME/X11/xsession"
export ALTUSERXSESSION="$XDG_CACHE_HOME/X11/Xsession"
export ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors"



# Notmuch -- https://notmuchmail.org/pipermail/notmuch/2011/007007.html
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:=$HOME/.config}/notmuch/default/config"

# GNUPG
export GNUPGHOME="$XDG_DATA_HOME/gnupg"

# ICEauthority
export ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority"

# mbsync (requires alias)
export MBSYNC_CONFIG_HOME="$XDG_CONFIG_HOME/isync/mbsyncrc"
alias mbsync='command mbsync -c "$MBSYNC_CONFIG_HOME"'

# npm
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"

# bash-complete
export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME/bash/completion"

# aspell
ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf"
ASPELL_CONF="$ASPELL_CONF; personal $XDG_CONFIG_HOME/aspell/en.pws"
ASPELL_CONF="$ASPELL_CONF; repl $XDG_CONFIG_HOME/aspell/en.prepl"
mkdir -p "$XDG_CONFIG_HOME/aspell"
export ASPELL_CONF

# Xcompose
export XCOMPOSEFILE="$XDG_CONFIG_HOME/xorg/xcompose"
export XCOMPOSECACHE="$XDG_CACHE_HOME/xorg/xcompose"

# sqlite
export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
alias sqlite3='sqlite3 -init "$XDG_CONFIG_HOME/sqlite3/sqliterc"'

# python
export PYTHONSTARTUPFILE="$XDG_CONFIG_HOME/python/startup"
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python"
export PYTHON_EGG_CACHE="$XDG_CACHE_HOME/python/eggs"
export PYTHONUSERBASE="$XDG_DATA_HOME/python"

# wget
export WGETRC="$XDG_CONFIG_HOME/wget/config"
mkdir -p "$XDG_CONFIG_HOME/wget"
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'

# dvdcss
export DVDCSS_HOME="$XDG_CACHE_HOME/dvdcss"