dot

packages and services management
Log | Files | Refs | README

commit 4a3d636a91f7d0088fdc362387fcb6252330ec0f
parent 078fdae6aa3cd62fe3cf0582c4453a2b85f25179
Author: josuah <mail@josuah.net>
Date:   Wed, 23 Nov 2016 01:12:56 +0100

Removed README, will add a proper one later

Diffstat:
D.cache/buffer/history | 2--
A.cache/iomenu/history | 3+++
M.config/build/iomenu | 2+-
M.config/build/mandoc | 1+
M.config/build/pcre | 2+-
M.config/git/projects | 3+--
A.config/iomenu/grep | 2++
D.config/themes/bioelectric | 32--------------------------------
D.local/bin/buffer | 159-------------------------------------------------------------------------------
M.profile | 12++++++------
DREADME | 62--------------------------------------------------------------
Minstall | 11+++--------
12 files changed, 18 insertions(+), 273 deletions(-)

diff --git a/.cache/buffer/history b/.cache/buffer/history @@ -1,2 +0,0 @@ -addpart b -barkdown + diff --git a/.cache/iomenu/history b/.cache/iomenu/history @@ -0,0 +1,3 @@ +addpart b +barkdown + +vim diff --git a/.config/build/iomenu b/.config/build/iomenu @@ -1,3 +1,3 @@ # Input/Output interactive menu and completion engine. -tar=http://repo.or.cz/iomenu.git/snapshot/56fc5146059c7204018d2b69160c589b35ba1bf2.tar.gz +tar=http://repo.or.cz/iomenu.git/snapshot/7c22aefd9b7447493f0bdca8c76f89035be2368f.tar.gz diff --git a/.config/build/mandoc b/.config/build/mandoc @@ -11,6 +11,7 @@ SBINDIR="${PREFIX}/sbin" INCLUDEDIR="${PREFIX}/include/mandoc" LIBDIR="${PREFIX}/lib/mandoc" MANDIR="${PREFIX}/man" +BUILD_DB=1 EOF ./configure diff --git a/.config/build/pcre b/.config/build/pcre @@ -1,3 +1,3 @@ # Perl-Compatible Regular Expressions -tar=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar.gz +tar=http://downloads.sourceforge.net/project/pcre/pcre/8.39/pcre-8.39.tar.gz diff --git a/.config/git/projects b/.config/git/projects @@ -2,10 +2,9 @@ http://github.com/josuah/josuah.github.io http://github.com/josuah/iirc http://github.com/josuah/cgr http://github.com/josuah/barkdown -http://github.com/josuah/Notes ../Notes +http://github.com/josuah/notes ssh://repo.or.cz/iomenu.git http://github.com/josuah/vis http://github.com/josuah/fungus-vs-pathogen http://github.com/josuah/miniwi http://github.com/josuah/drawille -http://github.com/josuah/ii diff --git a/.config/iomenu/grep b/.config/iomenu/grep @@ -0,0 +1,2 @@ +Projects +Config diff --git a/.config/themes/bioelectric b/.config/themes/bioelectric @@ -1,32 +0,0 @@ -! black -*.color0: #000d00 -*.color8: #335544 - -! red -*.color1: #bb3300 -*.color9: #ff5522 - -! green -*.color2: #00aa55 -*.color10: #44ff88 - -! yellow -*.color3: #bbbb33 -*.color11: #eeff77 - -! blue -*.color4: #339988 -*.color12: #66ddcc - -! magenta -*.color5: #bb5566 -*.color13: #ec93d3 - -! cyan -*.color6: #339977 -*.color14: #77ddbb - -! white -*.color7: #b4b4b4 -*.color15: #ffffff - diff --git a/.local/bin/buffer b/.local/bin/buffer @@ -1,159 +0,0 @@ -# Detacheable buffer for programs and files - - -CACHE="${XDG_CACHE_HOME:-$HOME/.cache}" - - -usage() -{ - printf '%s\n' "${0##*/} [-w] [cmd [args...]] - - -w update command description using whatis - cmd do not prompt for a command and run CMD right away - args do not prompt for arguments neither and use ARG" -} - - -# -# Update the cache and get the command to run. -# -update_commands_cache() -{ - # get the command name from cache or stest - IFS=':' - if stest -dqr -n "$CACHE/dmenu_run" $PATH - then - stest -flx $PATH | sort -u > "$CACHE/dmenu_run" - cp "$CACHE/dmenu_run" "$CACHE/buffer/run" - fi - unset IFS -} - - -# -# Generate descriptions of commands from whatis(1). This takes a lot of time. -# -update_descriptions_cache() -{ - local whatis - - update_commands_cache - - while IFS= read -r command - do - whatis="$(whatis -s 1 "$command" 2> /dev/null | tail -n 1)" - if [ "$whatis" ] - then - printf '%-20s # %s\n' \ - "$command" "${whatis#* - }" - else - printf '%s\n' "$command" - fi - done < $CACHE/dmenu_run > "$CACHE/buffer/run" -} - - -# -# Prompt for options for a given command and log it to an history file -# -get_options() -{ - local command="$1" - local history - - printf '%s ' "$command" >> "$CACHE/buffer/history" - - while read -r cmd options - do - [ "$command" = "$cmd" -a "$options" ] && printf '%s\n' "$options" - done < $CACHE/buffer/history | - iomenu -c -p "$command" | - tee -a "$CACHE/buffer/history" - - sort -u "$CACHE/buffer/history" -o "$CACHE/buffer/history" -} - - -# -# Prompt for a file path in $HOME and print it. -# -get_path() -{ - printf %s "$HOME" - - find ~ -type f ! -path '*/.cache/*' ! -path '*/.git/*' | - while IFS='' read -r path - do - printf '~%s\n' "${path#$HOME}" - done | iomenu -l 256 | sed 's/^~//' -} - - -# -# Get the options according to the command and run it -# -run() -{ - local command="$1" options="" - local path name - - [ $# -gt 0 ] && shift && options="$*" - - command="${command:-$( - iomenu -l 256 -s '#' << EOF | tr / ! -# -# $(abduco | tr ! / | sed -r '2,$ s/(.*)\t(.*)/\2 # \1/') -# -# Commands -$(cat "$CACHE/buffer/run") -EOF - )}" - - [ -z "$command" ] && exit 1 - - # prompt for option if needed - if [ "${command##* *}" ] - then - [ -z "$options" ] && options="$( get_options "$command")" - - # if '+' is at the end of the options then prompt for a path - if [ -z "${options%%*+}" -a "$options" ] - then - path="$(get_path)" options="${options%+}" - fi - fi - - name="$command${options:+ $options}${path:+ ~${path#$HOME}}" - name="$(printf %s "$name" | tr / !)" - - export TERM='screen' ABDUCO="$command" - - # run new or existing session with this name - if [ "$path" ] - then - exec abduco -e ^Z -A "$name" $command $options "$path" - else - exec abduco -e ^Z -A "$name" $command $options - fi -} - - -main() -{ - mkdir -p "$CACHE/buffer" - - if [ "$1" = -w ] - then - update_descriptions_cache - elif [ $# -gt 0 -a -z "${1##-*}" ] - then - usage - else - update_commands_cache - run $@ - fi - - stty sane -} - -main $@ diff --git a/.profile b/.profile @@ -34,7 +34,7 @@ export PS1='$( printf "\033[?6c" # status line - printf "\n%$(stty size | cut -d " " -f 2)s\r%s\n" \ + printf "\033[K\n%$(stty size | cut -d " " -f 2)s\r%s\033[K\n\033[K" \ "$(status)" "$(status path "$PWD" git "$PWD")" # prompt character @@ -47,15 +47,15 @@ export PS3=' > ' alias l='ls -lh --color' alias la='ls -Alh --color' alias p='$PAGER' -alias a='buffer' -alias b='buffer' -alias v='b $VISUAL +' -alias s='b $SHELL' +alias a='io-abduco' +alias g='io-grep' +alias v='io-abduco $VISUAL +' +alias s='io-abduco $SHELL' +alias m='io-man' alias t='tmux attach &>/dev/null || tmux new' alias f='find . -type f ! -path "*/.git/*" | cut -c 3- | sort | iomenu' alias d='find . -type d ! -path "*/.git/*" | cut -c 3- | sort | iomenu' alias c='cd "$(d)"' -alias g='grep --color=always' alias .p='. ~/.profile' alias cl='printf "\033[s\033[255;0H\033[1J\033[u\033[3A"' alias bh='busybox --help' diff --git a/README b/README @@ -1,62 +0,0 @@ - ,--. ,-- * - | ,--. ---. |- , ,--, - | | | | | | | | | - `--' `--' ' ' ' ' `--| - `--' --------------------------------------------------------------------------------- -CONFIG 2016-10-10 --------------------------------------------------------------------------------- -Portable environment to keep software, configuration and data across devices. - - Config is a collection of POSIX shell scripts to install and - configure programs. - - Each program to install has a script in with an URL download it and - to rules to build it. - - Each program to configure has a directory in the top level with its - configuration files (aka. dotfiles), to link in the home directory. - - -DIRECTORY STRUCTURE --------------------------------------------------------------------------------- - - All file starting with a '.' will be linked in the home directory: - - """ - Config/ Root of the Config repo, to put anywhere - │ - ├─ vim/ - │ ├─ .vimrc Linked as ~/.vimrc - │ └─ .vim/vimrc Linked in ~/.vim/vimrc - │ - ├─ git - │ ├─ config/config Linked in ~/.config/git/config. - │ └─ config/ignore Linked in ~/.config/git/ignore. - │ - ├─ dwm/ - │ ├─ config.h Resource to compile dwm (not linked). - │ └─ dwm-pertag-6.1.diff Patch automatically applied while installing. - │ - ├─ ... - │ - ├─ build/ Script used to download and install programs. - │ ├─ dwm.sh - │ ├─ libcurses.sh - │ └─ ... - │ - └─ SCRIPTS/ - ├─ build.sh Package manager using build/* recipes. - ├─ link.sh Script linking the dotfiles. - └─ ... Other tools for data and configurations... - """ - - As you can see, in each program's directory, you can use "config" - as a shortcut to ".config/program-name/". - - -ENVIRONMENT VARIABLES --------------------------------------------------------------------------------- - - To work properly, Config needs a few environment variables. They - are contained in "SCRIPTS/config/environment". diff --git a/install b/install @@ -39,17 +39,12 @@ git_repos() { local projects="$HOME/Projects" - mkdir -p "$projects" - cd "$projects" - - while read url dir + mkdir -p "$projects" && cd "$projects" && while read url dir do - [ "${dir}" ] && mkdir -p "${dir%/*}" - printf 'cloning %s\n' "${url##*/}" - git clone -q "$url" "$dir" 2> /dev/null & + git clone "$url" & done < ~/.config/git/projects - printf 'still running in the background' + wait }