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-02-09 21:08:23 +01:00
|
|
|
export RVM_HOME="$HOME/.rvm"
|
2017-03-11 01:30:22 +01:00
|
|
|
export PATH="$HOME/.local/bin:$CABAL_HOME/bin:$RVM_HOME/bin:$CARGO_HOME/bin:$JAVA_HOME/bin:$PATH"
|
2016-09-21 17:21:42 +02:00
|
|
|
|
|
|
|
# For vim
|
|
|
|
export EDITOR="nvim"
|
|
|
|
#stty -ixon # turn of <C-s> for vimshell
|
|
|
|
|
|
|
|
# Start X if we're in tty1
|
|
|
|
xsession() {
|
|
|
|
startx 2>&1 || vlock
|
|
|
|
sudo poweroff
|
|
|
|
sleep infinity
|
|
|
|
}
|
|
|
|
if tty | grep -q '/dev/tty1'; then xsession; fi
|