dot

packages and services management
Log | Files | Refs | README

commit f31c06dbcbd859b6748dc2e22bfc20163f05b4e5
parent 650bea3948911f07b3560f7a31bd1a2c0907bcad
Author: josuah <mail@josuah.net>
Date:   Sun, 20 Nov 2016 20:30:54 +0100

Small fixes again

Diffstat:
M.profile | 6+++---
M.vim/vimrc | 6++----
Mbin/buffer | 25++++++++++++++-----------
Mbin/status | 9++-------
Mbuild/dvtm | 13+++++++++++++
Mbuild/iomenu | 2+-
Mbuild/libncurses | 2+-
7 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/.profile b/.profile @@ -51,11 +51,11 @@ alias b='buffer' alias v='b $VISUAL +' alias s='b $SHELL' alias t='tmux attach &>/dev/null || tmux new' -alias f='find . -type f ! -path "*/.git/*" | sed "s/^\\.\\///" | iomenu' -alias d='find . -type d ! -path "*/.git/*" | sed "s/^\\.\\///" | iomenu' +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 cl='clear' +alias cl='printf "\033[s\033[255;0H\033[1J\033[u\033[3A"' alias bh='busybox --help' alias myip='curl icanhazip.com' alias lines='find . -name "*.[ch]" | xargs wc -l' diff --git a/.vim/vimrc b/.vim/vimrc @@ -38,9 +38,8 @@ cmap jk <C-f> " <Leader> menu nmap <Leader><Leader> : -\ ec ' <w> write <b> buffers <s> set <c> clist </> search ' \| -\ ec ' <e> edit <T> tabs <h> help <t> tags <"> registers' \| -\ ec ' <m> make '"<'>"'marks' \| +\ ec ' <w> write <b> buffers <s> set <t> tags <"> registers' \| +\ ec ' <e> edit <T> tabs <h> help '"<'>"'marks' \| \ <CR>: nmap <Leader>w :w<CR> nmap <Leader>s :set @@ -52,7 +51,6 @@ nmap <Leader>C :cwindow<CR>:set nocursorline<CR> nmap <Leader>t :pwd \| echo '' \| tags \| echo ''<CR>:tag<space> nmap <Leader>" : echo '' \| registers <CR> nmap <Leader>' : echo '' \| marks <CR>:' -nmap <Leader>m :silent make \| redraw! \| clist<CR> " <c>hange <o>ption <...> nmap col :set list ! \| set list ?<CR> diff --git a/bin/buffer b/bin/buffer @@ -1,17 +1,17 @@ -# ---. ,-- ,-- -# |__/ , , |- |- ,--. .,-- -# | \ | | | | |--' | -# ---' `--` ' ' `--' ' 2016-11-16 -#------------------------------------------------------------------------------- # Detacheable buffer for programs and files -# -# External dependencies: stest (dmenu), iomenu, abduco CACHE="${XDG_CACHE_HOME:-$HOME/.cache}" -COMMAND="$2" -NL=' -' TAB=' ' + + +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" +} # @@ -142,9 +142,12 @@ main() { mkdir -p "$CACHE/buffer" - if [ "$1" = -u ] + if [ "$1" = -w ] then update_descriptions_cache + elif [ $# -gt 0 -a -z "${1##-*}" ] + then + usage else update_commands_cache run $@ diff --git a/bin/status b/bin/status @@ -6,9 +6,6 @@ # Plain text status line for wherever useful -STATUS="$HOME/.cache/status" -[ -f "$STATUS/pwd" ] && IFS='' read -r SHELL_PWD < $STATUS/pwd - SEPARATOR=' ' START=' ' STOP=' ' @@ -109,8 +106,8 @@ status_date() # -# Seriously, now that I understood how load average works, I will never -# ever want to look at any CPU percentage usage. Just use /proc/loadavg +# Now that I understand how load average works, I do not even want to look at +# CPU percentage usage. # status_cpu() { @@ -139,8 +136,6 @@ main() { local segment - mkdir -p "$STATUS" - printf "$START" while [ "$#" -gt 0 ] diff --git a/build/dvtm b/build/dvtm @@ -9,6 +9,19 @@ build() cp -f "$CONFIG/$1/config.h" . cp -f "$CONFIG/$1/dvtm-status" . + printf %s "$( + while IFS='' read -r line + do + if [ -z "${line##CFLAGS * ncurses}" ] + then + printf '%s %s\n' \ + "$line" "-I$HOME/.local/include/ncurses" + else + printf '%s\n' "$line" + fi + done < config.mk + )" > config.mk + make && make PREFIX=$PREFIX install clean tic -s dvtm.info diff --git a/build/iomenu b/build/iomenu @@ -1,3 +1,3 @@ # Input/Output interactive menu and completion engine. -tar=http://repo.or.cz/iomenu.git/snapshot/4138689c19cde5ed0224266edd1804b73cd0b025.tar.gz +tar=http://repo.or.cz/iomenu.git/snapshot/56fc5146059c7204018d2b69160c589b35ba1bf2.tar.gz diff --git a/build/libncurses b/build/libncurses @@ -1,3 +1,3 @@ # The almighty ncurses library -tar=http://invisible-mirror.net/archives/ncurses/ncurses-6.0.tar.gz +tar=http://invisible-island.net/datafiles/release/ncurses.tar.gz