From 22bc1e1879da0d99e5e1d79b10742b8cc9fd0521 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 30 May 2024 12:47:11 -0500 Subject: Initial commit --- profile | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 profile (limited to 'profile') diff --git a/profile b/profile new file mode 100644 index 0000000..3625f86 --- /dev/null +++ b/profile @@ -0,0 +1,62 @@ +# ~/.profile -*- sh -*- + +. /etc/profile + +# History +mkdir -p ~/.history +export HISTFILE=~/.history/sh +export HISTSIZE=1000000000000 + +# Environment variables +export ENV="$HOME/.shrc" +export PATH="$HOME/bin:$PATH" +export LC_ALL=en_US.UTF-8 +export CDPATH=:~ +export SUDO=/usr/bin/doas +export EXINIT='set ai ic sm ts=8' +export MISC="$HOME/.misc" +export EDITOR="$(which ed)" +export VISUAL="$(which vi)" + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" + +export XDG_DESKTOP_DIR="$HOME/" +export XDG_DOCUMENTS_DIR="$HOME/doc" +export XDG_DOWNLOAD_DIR="$HOME/tmp" +export XDG_MUSIC_DIR="$HOME/music" +export XDG_PICTURES_DIR="$HOME/img" +export XDG_PUBLICSHARE_DIR="$HOME/.local/share/public" +export XDG_TEMPLATES_DIR="$HOME/.local/templates" +export XDG_VIDEOS_DIR="$HOME/video" + +if test -z "$XDG_RUNTIME_DIR" +then export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir +fi +if ! test -d "$XDG_RUNTIME_DIR" +then + mkdir "$XDG_RUNTIME_DIR" + chmod 0700 "$XDG_RUNTIME_DIR" +fi + +installedp() { which "$1" >/dev/null 2>&1; } + +# SSH +if installedp keychain +then eval $(keychain --quiet --eval --dir "$XDG_RUNTIME_DIR/" --agents ssh) +elif installedp ssh-agent +then eval $(ssh-agent -s) +fi + +# RLWRAP +if installedp rlwrap +then export RLWRAP_HOME=$XDG_DATA_HOME/rlwrap +fi + +# Start X on login +# if test /dev/tty1 = "$(tty)" && test -z "$DISPLAY" +# then startx +# fi -- cgit 1.4.1-21-gabe81