workstation/roles/home-cli/files/profile

63 lines
1.8 KiB
Text
Raw Normal View History

#!/bin/sh
2022-08-23 14:10:57 +00:00
if [ -r /usr/local/etc/profile ]
then
. /usr/local/etc/profile
elif [ -r /etc/profile ]
then
. /etc/profile
fi
2022-08-23 12:44:31 +00:00
export ANSIBLE_NOCOWS=1
2022-08-19 14:52:07 +00:00
export BLOCKSIZE=K
export EDITOR=vi
export ENV="$HOME/.shrc"
2022-08-23 12:44:31 +00:00
export HISTCONTROL=ignorespace:ignoredups
2022-08-19 14:52:07 +00:00
export LANG=C
export PAGER=less
2022-08-23 12:44:31 +00:00
export PAPERSIZE=a4
export POWERSHELL_TELEMETRY_OPTOUT=1
export PS1="${PS1:-\$\ }"
export PYTHONWARNINGS=ignore::UserWarning
# Set up XDG variables. See:
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg}
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
2022-08-31 14:40:04 +00:00
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/tmp/.runtime-$(id -un)}"
2022-08-23 12:44:31 +00:00
# Locale and language.
## Clear the existing locale settings and set options I always want.
export TZ=Europe/London # Can override this elsewhere if needed.
2022-08-29 19:08:16 +00:00
if [ -r /etc/locale.conf ]
2022-08-23 12:44:31 +00:00
then
2022-08-29 19:08:16 +00:00
. /etc/locale.conf
2022-08-23 12:44:31 +00:00
fi
2022-08-29 19:08:16 +00:00
if [ -r "$XDG_CONFIG_HOME/locale.conf" ]
2022-08-23 12:44:31 +00:00
then
. "$XDG_CONFIG_HOME/locale.conf"
fi
if [ "${XDG_CURRENT_DESKTOP:-unknown}" = GNOME ]
then
export QT_FONT_DPI=72
fi
# Desktop files (used by desktop environments within both X11 and Wayland) are
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for
# snappy applications' desktop files.
_snap_xdg_path=/var/lib/snapd/desktop
2022-09-05 15:04:17 +00:00
if [ -x /usr/lib/snapd/snapd ] && [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${_snap_xdg_path}:*}" ]
2022-08-23 12:44:31 +00:00
then
XDG_DATA_DIRS="${XDG_DATA_DIRS}:${_snap_xdg_path}"
fi
unset _snap_xdg_path
2021-02-09 16:27:08 +00:00
2022-08-19 14:52:07 +00:00
if [ -r "$HOME/.profile.$(hostname -s)" ]
then
. "$HOME/.profile.$(hostname -s)"
2021-02-09 16:27:08 +00:00
fi