This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/prelude

23 lines
831 B
Plaintext
Raw Normal View History

2020-01-17 03:02:53 -06:00
#!/usr/bin/env sh
# these are all paths used across many of the dotfiles and should be assumed to
# be loaded and properly set by every script - this means you are responsible
# for making sure they're loaded!
export XDG_CONFIG_HOME="$HOME/.config"
2020-11-06 00:31:43 -06:00
export DOTFILES_PATH="$XDG_CONFIG_HOME/lytedev-dotfiles"
2020-01-17 03:02:53 -06:00
export ENV_PATH="$HOME/.env"
2020-11-06 00:31:43 -06:00
2020-05-18 15:34:35 -05:00
export TERMINAL="kitty"
2020-01-17 03:02:53 -06:00
# TODO: better logic for auto-detecting alternative home directories?
# 1. check dirname(basename $HOME)) matches username
# 2. check /home/$username
NICE_HOME="$HOME"
[ "$(basename "${HOME}")" = ".home" ] && NICE_HOME="$(realpath "$HOME/..")"
[ -e "${HOME}/.nice_home" ] && NICE_HOME="$(cat "${HOME}/.nice_home")"
[ -e "${ENV_PATH}/.nice_home" ] && NICE_HOME="$(cat "${ENV_PATH}/.nice_home")"
export NICE_HOME
2020-04-20 10:38:19 -05:00
# shellcheck disable=SC1090
2020-01-17 03:02:53 -06:00
. "$DOTFILES_PATH/bin/paths"