2016-09-21 17:21:42 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# XDG dirs
|
|
|
|
export XDG_DATA_HOME="$HOME/.local/share"
|
|
|
|
export XDG_CONFIG_HOME="$HOME/.config"
|
|
|
|
export XDG_CACHE_HOME="$HOME/.cache"
|
|
|
|
export XDG_RUNTIME_DIR="/tmp/runtime-$(whoami)"
|
|
|
|
mkdir -p "$XDG_RUNTIME_DIR"
|
|
|
|
chmod 0700 "$XDG_RUNTIME_DIR"
|
|
|
|
|
|
|
|
# Local scripts
|
2016-09-29 15:14:48 +02:00
|
|
|
export CABAL_HOME="$HOME/.cabal"
|
|
|
|
export CARGO_HOME="$HOME/.cargo"
|
2017-06-29 09:37:48 +02:00
|
|
|
export RBENV_HOME="$HOME/.rbenv"
|
2019-08-23 17:01:47 +02:00
|
|
|
export JAVA_HOME="/usr/lib/jvm/oracle-jdk/"
|
|
|
|
export TEX_BIN="/opt/texlive/2019/bin/x86_64-linux/"
|
|
|
|
export PATH="$HOME/.local/bin:$CABAL_HOME/bin:$RBENV_HOME/shims:$CARGO_HOME/bin:$JAVA_HOME/bin:$TEX_BIN:$PATH"
|
2016-09-21 17:21:42 +02:00
|
|
|
|
2019-01-22 16:44:07 +01:00
|
|
|
# Environmental settings
|
2019-04-18 17:10:19 +02:00
|
|
|
export ESCDELAY=50 # for dvtm e.a.
|
2018-04-09 18:05:57 +02:00
|
|
|
export EDITOR="vis"
|
2020-04-15 00:29:26 +02:00
|
|
|
export LEDGER_FILE="/data/documents/ledger/all.journal"
|
2019-01-22 16:44:07 +01:00
|
|
|
export LESSHISTFILE=-
|
2017-07-06 14:39:28 +02:00
|
|
|
export FZF_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || rg --files) 2> /dev/null'
|
2019-06-28 09:30:41 +02:00
|
|
|
export LC_ALL=en_US.utf8
|
2017-07-06 14:39:28 +02:00
|
|
|
|
2020-03-14 13:36:54 +01:00
|
|
|
# Select Dock sound card if it's there
|
|
|
|
if [ -e /proc/asound/Dock ]; then
|
|
|
|
export ALSA_CARD=Dock
|
|
|
|
fi
|
|
|
|
|
2019-01-22 16:44:07 +01:00
|
|
|
#stty -ixon # disable <C-s>
|
|
|
|
|
2016-09-21 17:21:42 +02:00
|
|
|
# Start X if we're in tty1
|
|
|
|
xsession() {
|
|
|
|
startx 2>&1 || vlock
|
2018-04-09 18:05:57 +02:00
|
|
|
#sudo poweroff
|
|
|
|
#sleep infinity
|
2016-09-21 17:21:42 +02:00
|
|
|
}
|
|
|
|
if tty | grep -q '/dev/tty1'; then xsession; fi
|