dot

packages and services management
Log | Files | Refs | README

commit 9358d049c8b1562d1cfc55a4292a636c76684e9b
parent 751e43dbca34f9a194d4f2aab66179fbbcb5d886
Author: josuah <mail@josuah.net>
Date:   Sun, 18 Dec 2016 14:52:14 +0000

source build srcipt without running it to set env vars

Diffstat:
M.config/build/variables | 3---
A.config/user-dirs.dirs | 8++++++++
M.local/bin/build | 22++++++++++++++++++----
A.local/bin/tty-theme | 16++++++++++++++++
A.local/share/build/libunibilium | 3+++
M.profile | 13+++----------
M.xinitrc | 2+-
MREADME | 4++--
Dtest | 0
9 files changed, 51 insertions(+), 20 deletions(-)

diff --git a/.config/build/variables b/.config/build/variables @@ -1,6 +1,3 @@ -export PROGRAMS="$HOME/Programs" -export LOCAL="$HOME/.local" - export PATH="$LOCAL/bin:$PATH" export CPATH="$LOCAL/include:$CPATH" export MANPATH="$LOCAL/share/man:$LOCAL/man:$MANPATH" diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DESKTOP_DIR="/tmp" +XDG_DOCUMENTS_DIR="$HOME/documents" +XDG_DOWNLOAD_DIR="$HOME/downloads" +XDG_MUSIC_DIR="$HOME/music" +XDG_PICTURES_DIR="$HOME/images" +XDG_PUBLICSHARE_DIR="/tmp" +XDG_TEMPLATES_DIR="/tmp" +XDG_VIDEOS_DIR="$HOME/videos" diff --git a/.local/bin/build b/.local/bin/build @@ -1,16 +1,26 @@ # Install sources from build receipes +export LOCAL="$HOME/.local" +export CONFIG="${XDG_CONFIG_HOME:-HOME/.config}" +export PROGRAMS="$HOME/programs" +export PATH="$LOCAL/bin:$PATH" +export CPATH="$LOCAL/include:$CPATH" +export MANPATH="$LOCAL/share/man:$LOCAL/man:$MANPATH" +export LIBPATH="$LOCAL/lib:$LIBPATH" +export LD_RUN_PATH="$LOCAL/lib:$LD_RUN_PATH" +export LD_LIBRARY_PATH="$LOCAL/lib:$LD_LIBRARY_PATH" -PROGRAMS="$HOME/Programs" -LOCAL="$HOME/.local" -CONFIG="$HOME/.config" + +# check wether if the script is being sourced or run +if [ "${0##*/}" == build ] +then usage() { local name description - printf '%s\n' " + printf '%s\n' "\ Usage: ${0##*/} COMMAND PACKAGE d[ownload] Download PACKAGE's sources @@ -172,4 +182,8 @@ main() find -L "$LOCAL" -type l -exec rm {} \; } + main $@ + + +fi diff --git a/.local/bin/tty-theme b/.local/bin/tty-theme @@ -0,0 +1,16 @@ +# Set the theme for the tty from a simple theme file format + +set_theme() +{ + while read -r color hex comments + do + [ "$hex" ] printf '033]P%s%s' "$color" "$hex" + done < "$1" +} + +THEMES=' + +0 000000 +1 000000 +' + diff --git a/.local/share/build/libunibilium b/.local/share/build/libunibilium @@ -0,0 +1,3 @@ +# a terminfo parsing library + +tar=http://github.com/mauke/unibilium/archive/master.tar.gz diff --git a/.profile b/.profile @@ -9,12 +9,12 @@ # Prevents to be run twice per session [ "$PROFILE" ] && return 0 || PROFILE=1 -. ~/.config/build/variables - # Environment variables #_______________________________________________________________________________ +. ~/.local/bin/build + export ENV="$HOME/.profile" export TERM='screen' @@ -41,7 +41,7 @@ export XDG_RUNTIME_DIR="$HOME/.cache" export PS1='$( [ $? -eq 0 ] && color=2 || color=1 - printf "\a\n" + printf "\a" # cursor shape it TTY printf "\033[?6c" @@ -51,10 +51,8 @@ export PS1='$( # git branch and status git-prompt - printf "\n" # prompt character - status_path "$PWD" printf "\033[1;30m>\033[0;3%sm>\033[1m>\033[m " "$color" )' export PS2=' > ' @@ -92,11 +90,6 @@ alias lines='find . -name "*.[ch]" | xargs wc -l' #_______________________________________________________________________________ -status_path() -{ -} - - color() { for i in 1 2 3 4 5 6 7 diff --git a/.xinitrc b/.xinitrc @@ -11,4 +11,4 @@ pulseaudio & st -f monospace:pixelsize=14 & -exec 2wm +exec dwm diff --git a/README b/README @@ -9,7 +9,7 @@ ________________________________________________________________________________ Scripts are in .local/bin There is a package manager, that build to download, compile, - and install packages in ~/Programs/<program_name>, and setup + and install packages in ~/programs/<program_name>, and setup symlinks to .local/ as a local root directory. This file is the installer script.' @@ -21,7 +21,7 @@ find -L ~ -type l -exec rm {} \; case "$1" in g | git ) - mkdir -p ~/Projects + mkdir -p ~/projects cd ~/Projects && while read url do git clone $url & done << REPOS ssh://repo.or.cz/iomenu.git diff --git a/test b/test