Profile environment
Profile
Try to keep the $HOME
directory as clean as possible.
Inspired from https://wiki.archlinux.org/index.php/XDG_Base_Directory
Define XDG Home dirs
Make sure the XDG_
variables are set:
export XDG_DATA_HOME="$HOME/.local/share" export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache"
Extend $PATH
export PATH="$HOME/.local/bin":$PATH
Default tools
Editor
Emacs is the $EDITOR
.
export EDITOR="emacsclient"
Terminal
Set the preferred terminal emulator. See man 1 i3-sensible-terminal
.
export TERMINAL=/usr/bin/alacritty
Tools
Docker
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" export MACHINE_STORAGE_PATH="$XDG_DATA_HOME/docker-machine"
Golang
export GOPATH="$XDG_DATA_HOME/go"
And add it to the PATH
.
export PATH=$GOPATH/bin:$PATH
Rust
export CARGO_HOME="$XDG_DATA_HOME/cargo"
Yarn
Add Yarn bin dir to PATH
.
command -v yarn > /dev/null && export PATH=$(yarn global bin):$PATH
GnuPG
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
IRB ruby
export IRBRC="$XDG_CONFIG_HOME/irb/irbrc"
Gem ruby
export GEM_HOME="$XDG_DATA_HOME/gem" export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
Bundler ruby
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME/bundle" export BUNDLE_USER_CACHE="$XDG_CACHE_HOME/bundle" export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME/bundle"
Solargraph
export SOLARGRAPH_CACHE="$XDG_CACHE_HOME/solargraph"
Less
export LESSKEY="$XDG_CONFIG_HOME/less/lesskey" export LESSHISTFILE="$XDG_CACHE_HOME/less/history"
Vim
export VIMINIT="set viminfo+='1000,n$XDG_DATA_HOME/vim/viminfo'"
Units
alias units='units --history=$XDG_CACHE_HOME/units/history'
PostgreSQL
export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc" export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history" export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass" #export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"
Asdf
asdf
is used by the gitlab-development-kit.
export ASDF_CONFIG_FILE="$XDG_CONFIG_HOME/asdf/asdfrc" export ASDF_DATA_DIR="$XDG_DATA_HOME/asdf"
Lolcommits
Tell lolcommits which device to use: HD Pro Webcam C920.
Check which devices are available with:
v4l2-ctl --list-devices
export LOLCOMMITS_DEVICE=$(v4l2-ctl --list-devices | grep -A1 C920 | tail -n1 | tr -d "\s\t")
Qt & KDE
Make sure the icons are shown:
[ "$XDG_CURRENT_DESKTOP" = "KDE" ] || [ "$XDG_CURRENT_DESKTOP" = "GNOME" ] || export QT_QPA_PLATFORMTHEME="qt5ct"
And that they are not too big:
#export XDG_CURRENT_DESKTOP=KDE export KDE_SESSION_VERSION=5 export QT_AUTO_SCREEN_SCALE_FACTOR=0 export QT_FONT_DPI=120
Password store
Encrypt the passwords in password store ASCII armored.
export PASSWORD_STORE_GPG_OPTS=--armor
Wayland
From: https://github.com/swaywm/sway/issues/5008#issuecomment-665972776
# this may fix external monitor problem WLR_DRM_NO_MODIFIERS=1 # force wayland backend for bemenu BEMENU_BACKEND=wayland # Force Wayland backend for qt5 apps QT_QPA_PLATFORM=wayland QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # general XDG_SESSION_TYPE=wayland
Firefox
Force Firefox to use Wayland.
export MOZ_DBUS_REMOTE=1 export MOZ_ENABLE_WAYLAND=1