dot

packages and services management
Log | Files | Refs | README

commit c8198154812b81b83082c27616f0b10af711bc33
parent 4f32affab7ca387e91b699b3286e61955d0ac49e
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 25 Aug 2017 01:22:35 +0200

rc: environment variables

Diffstat:
Arc | 32++++++++++++++++++++++++++++++++
Dshell/profile | 22----------------------
Dutils/less/profile | 2--
Dx11/xdg/profile | 17-----------------
4 files changed, 32 insertions(+), 41 deletions(-)

diff --git a/rc b/rc @@ -0,0 +1,32 @@ +export ROOT="$HOME" + +export PATH="$ROOT/bin:$PATH" +export MANPATH="$ROOT/man:$MANPATH" +export C_INCLUDE_PATH="$ROOT/include" +export LIBRARY_PATH="$ROOT/.local/lib" +export LD_LIBRARY_PATH="$ROOT/lib:$LD_LIBRARY_PATH" + +for bin in "$ROOT/pkg"/*/*/bin +do [ -d "$bin" ] && export PATH="$bin:$PATH" +done + +for profile in "$ROOT/pkg"/*/*/profile +do [ -f "$profile" ] && . "$profile" +done +export XDG_DATA_HOME="$ROOT/share" +export XDG_DATA_DIRS="$ROOT/share" + +export XDG_CONFIG_HOME="$ROOT/etc" +export XDG_CONFIG_DIRS="$ROOT/etc" + +export XDG_CACHE_HOME="$ROOT/var/cache" +export XDG_DOWNLOAD_DIR="$ROOT/var/tmp" + +export XDG_MUSIC_DIR="$ROOT/lib/music" +export XDG_VIDEOS_DIR="$ROOT/lib/videos" +export XDG_PICTURES_DIR="$ROOT/lib/images" +export XDG_DOCUMENTS_DIR="$ROOT/lib/documents" + +export XDG_DESKTOP_DIR="/tmp" +export XDG_TEMPLATES_DIR="/tmp" +export XDG_PUBLICSHARE_DIR="/tmp" diff --git a/shell/profile b/shell/profile @@ -1,22 +0,0 @@ -PS1='$( - [ $? = 0 ] || printf "\033[1;31m x\033[m\n " - printf "\n\033[36m%s%s\033[m %s\n" "$(hostname)" "$PWD" "$(git-status)" - [ "$(whoami)" = root ] && printf "#" || printf "$" -) ' -PS2=' : ' -PS3=' : ' - - -alias cl='printf "\033[H\033[2J"' - - -export NAME='Josuah Demangeon' -export TZ='Europe/Paris' -export NICK='josuah' -export MAIL="$ROOT/var/mail/INBOX" -export EMAIL='mail@josuah.net' - -export EDITOR=vim VISUAL=$EDITOR -export PAGER=less MANPAGER=$PAGER - -export TERM=xterm-256color diff --git a/utils/less/profile b/utils/less/profile @@ -1,2 +0,0 @@ -export LESS=-MIRSn -export LESSCHARSET=utf-8 diff --git a/x11/xdg/profile b/x11/xdg/profile @@ -1,17 +0,0 @@ -export XDG_DATA_HOME="$ROOT/share" -export XDG_DATA_DIRS="$ROOT/share" - -export XDG_CONFIG_HOME="$ROOT/etc" -export XDG_CONFIG_DIRS="$ROOT/etc" - -export XDG_CACHE_HOME="$ROOT/var/cache" -export XDG_DOWNLOAD_DIR="$ROOT/var/tmp" - -export XDG_MUSIC_DIR="$ROOT/lib/music" -export XDG_VIDEOS_DIR="$ROOT/lib/videos" -export XDG_PICTURES_DIR="$ROOT/lib/images" -export XDG_DOCUMENTS_DIR="$ROOT/lib/documents" - -export XDG_DESKTOP_DIR="/tmp" -export XDG_TEMPLATES_DIR="/tmp" -export XDG_PUBLICSHARE_DIR="/tmp"