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"
|
|
|
|
export PATH="$HOME/.local/bin:$CABAL_HOME/bin:$RBENV_HOME/shims:$CARGO_HOME/bin:$JAVA_HOME/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"
|
2019-05-10 15:08:02 +02:00
|
|
|
export LEDGER_FILE="/data/documents/ledger/ledger.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
|
|
|
|
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
|