summaryrefslogtreecommitdiff
path: root/.profile
diff options
context:
space:
mode:
authorWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-11 23:33:16 -0800
committerWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-11 23:33:16 -0800
commit487d64163c59fa3de79b5ff1abf303475395c4a2 (patch)
tree6339b3c8bbf7bdfe10e8c006c9cfbae9f66f527e /.profile
parent88de5bcf9b1598c5ada352d1f3b724423bf7e6ad (diff)
Restructure entire home directory
The new XDG base directories will resemble the Filesystem Hierarchy Standard on Linux or the FreeBSD/OpenBSD directory structure. Refer to the FHS or hier(7). XDG user directories are defined in $XDG_CONFIG_HOME/user-dirs.dirs.
Diffstat (limited to '.profile')
-rw-r--r--.profile16
1 files changed, 13 insertions, 3 deletions
diff --git a/.profile b/.profile
index 5125710..fc5636b 100644
--- a/.profile
+++ b/.profile
@@ -6,14 +6,24 @@
if [ -d "$HOME/bin" ]; then
export PATH="$PATH:$HOME/bin"
fi
-if [ -d "$HOME/.local/bin" ]; then
- export PATH="$PATH:$HOME/.local/bin"
-fi
# Set environment variables.
+# XDG base directories.
+export XDG_CONFIG_HOME="$HOME/etc"
+export XDG_CACHE_HOME="$HOME/var/cache"
+export XDG_DATA_HOME="$HOME/usr/share"
+export XDG_STATE_HOME="$HOME/var/lib"
+
# Set default programs.
export TERMINAL="alacritty"
export PAGER="less"
export EDITOR="nvim"
export BROWSER="brave"
+
+# Clean up home folder.
+# Refer to <https://wiki.archlinux.org/title/XDG_Base_Directory>.
+
+export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
+export GNUPGHOME="$XDG_DATA_HOME/gnupg"
+export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"