dot

packages and services management
Log | Files | Refs | README

commit e0bad7a33f37b4bc291dfcfb0494bbf1dda7f17f
parent 0da8f39a5dfe21166d829f1ce9c44d3c9e67cca9
Author: sshbio <jd@ssh.bio>
Date:   Fri, 19 Aug 2016 09:04:40 +0200

Added exrc

Diffstat:
MREADME | 30++++++++++++++----------------
Abin/comment | 38++++++++++++++++++++++++++++++++++++++
Abin/headline | 27+++++++++++++++++++++++++++
Dcmus/build.sh | 11-----------
Aex-vi/.exrc | 30++++++++++++++++++++++++++++++
Aex-vi/build.sh | 9+++++++++
Dffmpeg/build.sh | 3---
Minstall.sh | 4++--
Dmupdf/build.sh | 4----
Ms-nail/.mailrc | 1+
Mshell/.profile | 16+++++++++++++++-
Dstagit/build.sh | 4----
Dvalgrind/build.sh | 4----
Mvim/.vimrc | 25++++++++-----------------
Mvis/.config/vis/swiper.lua | 2+-
Mvis/.config/vis/visrc.lua | 19++++++++++++++-----
16 files changed, 159 insertions(+), 68 deletions(-)

diff --git a/README b/README @@ -1,25 +1,26 @@ http://ssh.bio jd@ssh.bio - __ - ________/\__ /\__ \/____ - / __/ __/ __ \/ __ \/\/ __ \ - __\ \_\ \/ / / / /_/ / / /_/ / - \___/___/_/ /_/\____/\/\____/ 's dotfiles -================================================================================ + /\ /\ __ + ________/ /_ / /_ \/____ + / __/ __/ __ \/ __ \/\/ __ \ +__\\\_\\\/// /////_///////_//// +\___/___/\/ / /\____/\/\____/ 's dotfiles +============\/================================================================== -Install + +INSTALL -------------------------------------------------------------------------------- You can get the repo without git with this command, available on most systems: wget -qO- http://github.com/sshbio/Config/tarball/master | tar -xvz -f- - + Then you can link the files, clone my repos (-g), install vim plugins (-v) by running the 'install.sh' script. -Tools I use +TOOLS I USE -------------------------------------------------------------------------------- cgo gopher client http://github.com/kieselsteini/cgo @@ -45,7 +46,7 @@ Tools I use are in .profile -Shell scripts +SHELL SCRIPTS ------------------------------------------------------------------------------- You can see each files header, there are sometimes more detailled @@ -68,21 +69,17 @@ Shell scripts piano Terminal piano! Dvorak layout by default. |TT|TTT|TT|TTT| -Vim plugins +VIM PLUGINS -------------------------------------------------------------------------------- syntastic syntax checker http://github.com/scrooloose/syntastic undotree visual undo http://github.com/mbbill/undotree surround change delimiters http://github.com/tpope/vim-surround - commentary comment code http://github.com/tpope/vim-commentary lion alignment http://github.com/tommcdo/vim-lion supertab tab completion http://github.com/ervandew/supertab - signify VCS +/- gutter http://github.com/mhinz/vim-signify - signature show marks http://github.com/kshenoy/vim-signature - emmet emmet.io https://github.com/mattn/emmet-vim -Projects +PROJECTS -------------------------------------------------------------------------------- cgr Chaos Game plot http://github.com/sshbio/cgr @@ -91,3 +88,4 @@ Projects notes Biology notes http://github.com/sshbio/notes website Website source http://github.com/sshbio/website barkdown Not a text markup http://github.com/sshbio/barkdown + editor Draft for an editor http://github.com/sshbio/editor diff --git a/bin/comment b/bin/comment @@ -0,0 +1,38 @@ +#!/bin/sh +# comment - add comment to a code chunk from stdin +# /\ +# ____ ____ ________ ________ ___ ____ / /_ +# / ___\ / __ \ / __ __ \ / __ __ \ .'__ \ / __ \ / ___\ +# / /__ / /_/ // / / / / // / / / / // ____// / / // / +# \____\ \____/ \/ \/ \/ \/ \/ \/ \___\ \/ \/ \/ +#=============================================================================== + +help=' +' + +while [ $# -gt 0 ] +do + case "$1" in + -t ) type="$2" + * ) printf '%s\n' + esac +done + +case "$(printf %s "$filetype" | tr [A-Z] [a-z])" in +html | xml ) + start='<!' middle='--' end='>' +c | c++ | 'c#' | go | java | js ) + start='/' middle='*' end='/' +lua | sql ) + middle='--' +python | sh | bash | perl | ruby | r | rust | scala ) + middle='#' +haskell ) + start='{' middle='-' end='}' +ocaml | pascal ) + start='(' middle='*' end=')' +php ) + start='<' middle='*' end='>' +lisp + +esac diff --git a/bin/headline b/bin/headline @@ -0,0 +1,27 @@ +#!~/bin/sh +# headline - Insert a header line with info on file 2016/08/16 +# /\ /\ /\ __ +# / /_ ___ _____ ___/ // / \/ ____ ___ +# / __ \ .'__ \ .'__ /.'__ // / /\ / __ \ .'__ \ +# / / / // ____// /_/ // /_/ // / / // / / // ____/ +# \/ \/ \___\ \____/ \____/ \/ \/ \/ \/ \___\ +#=============================================================================== +# +# Format: <comment char> <filename> - <description> <last edit date> +# +# 80 column wide with the date right aligned, no space before comment char. +# It must be the first line of the file, or the second if there is a shebang. + +read -r line + +skip=0 action='append' +case line in +'#!*' ) + skip=1 + read line + ;; +'* - *[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]' ) + + ;; +esac + diff --git a/cmus/build.sh b/cmus/build.sh @@ -1,10 +0,0 @@ -# Console music player - -tar=https://github.com/cmus/cmus/archive/v2.7.1.tar.gz - -build() -{ - ./configure prefix="$PREFIX" - make - make install -}- \ No newline at end of file diff --git a/ex-vi/.exrc b/ex-vi/.exrc @@ -0,0 +1,30 @@ +" ___ __ __ _____ ____ +" .'__ \ \ \' // ____\/ ___\ +" / ____/ ,' ,'/ / / /__ +" \___\ /_,\_\ \/ \____\ +"=============================================================================== +" +" +" OPTIONS +"------------------------------------------------------------------------------- +" +set shiftwidth=8 tabstop=8 hardtabs=8 +set autoindent autoprint +set beautify +set modelines +set showmode showmatch number +set errorbells flash +" +" +" KEYBINDINGS +"------------------------------------------------------------------------------- +" +map g 1G +" +" +" ABBREVIATIONS +"------------------------------------------------------------------------------- +" +abbreviate -_ 80a-A +" + diff --git a/ex-vi/build.sh b/ex-vi/build.sh @@ -0,0 +1,9 @@ +# Modern implementation of Traditionnal Ex and Vi + +tar=http://prdownloads.sourceforge.net/ex-vi/ex-050325.tar.bz2 + +build() +{ + make + cp ex ../bin/ex-vi +} diff --git a/ffmpeg/build.sh b/ffmpeg/build.sh @@ -1,3 +0,0 @@ -# Audio/video converter and player - -tar=http://ffmpeg.org/releases/ffmpeg-3.0.2.tar.bz2 diff --git a/install.sh b/install.sh @@ -14,7 +14,7 @@ case "$1" in mkdir -p "$git" cd "$git" - sed '/^[ \t-]*$/ d; 1,/^Projects$/ d' "$pwd/README" | while read line + sed '/^[ \t-]*$/ d; 1,/^PROJECTS$/ d' "$pwd/README" | while read line do git clone "${line##* }" "${line%% *}" done ;; @@ -52,7 +52,7 @@ case "$1" in IFS="$NL" for p in $(sed '/^[ \t-]*$/ d - 1,/^Vim plugins$/ d; /^Projects$/,$ d' "$pwd/README") + 1,/^VIM PLUGINS$/ d; /^PROJECTS$/,$ d' "$pwd/README") do wget -qO- "${p##* }/archive/master.tar.gz" | tar -xvz -f- -C "$b" & done unset IFS diff --git a/mupdf/build.sh b/mupdf/build.sh @@ -1,3 +0,0 @@ -# Simple PDF viewer and library - -tar=http://mupdf.com/downloads/mupdf-1.9a-source.tar.gz- \ No newline at end of file diff --git a/s-nail/.mailrc b/s-nail/.mailrc @@ -134,6 +134,7 @@ define filter { move (from "@suckless.org") ~/Mail/l.suckless move (to "@suckless.org") ~/Mail/l.suckless + move (cc "@suckless.org") ~/Mail/l.suckless move (from "@fsf.org") ~/Mail/l.fsf diff --git a/shell/.profile b/shell/.profile @@ -7,8 +7,22 @@ #\/============================================================================= export EMAIL='jd@ssh.bio' + + +# Terminal + export LS_COLORS='so=35:tw=91:ow=93' export NCURSES_NO_UTF8_ACS=1 # Fix for dvtm + abduco in TTY +export TERMCAP="vt102|$TERM|dec vt102:"'\ + :do=^J:co#80:li#24:cl=50\E[;H\E[2J:\ + :le=^H:bs:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ + :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ + :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\ + :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ + :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ + :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:vs=\E[?7l:ve=\E[?7h:\ + :mi:al=\E[L:dc=\E[P:dl=\E[M:ei=\E[4l:im=\E[4h:' # For ex-vi to work # Commands @@ -53,7 +67,7 @@ alias la='l -A' alias lla='l -Alh' alias p='pwd' alias weather='curl -4 wttr.in' -alias lines='find . -name *.[ch] | xargs wc -l' +alias lines='find . -name "*.[ch]" | xargs wc -l' alias c='clear' alias a='attach' alias r='run' diff --git a/stagit/build.sh b/stagit/build.sh @@ -1,3 +0,0 @@ -# Static git web interface - -tar=http://dl.2f30.org/releases/stagit-0.4.tar.gz- \ No newline at end of file diff --git a/valgrind/build.sh b/valgrind/build.sh @@ -1,4 +0,0 @@ -# C code syntax checker - -tar=http://valgrind.org/downloads/valgrind-3.11.0.tar.bz2 - diff --git a/vim/.vimrc b/vim/.vimrc @@ -6,7 +6,7 @@ "=============================================================================== -" Settings +" SETTINGS "------------------------------------------------------------------------------- set nocompatible @@ -26,7 +26,6 @@ set visualbell filetype indent plugin on syntax on set omnifunc=syntaxcomplete#Complete " Completion -"set formatoptions=t,c,r,q,a,n,b,j set smarttab shiftwidth=8 tabstop=8 " Tabs set autoindent smartindent " Indentation set textwidth=0 formatprg=fmt " Formatting @@ -42,13 +41,13 @@ set backupdir=~/.vim/tmp,. set directory=~/.vim/tmp,. -" Plugins +" PLUGINS "------------------------------------------------------------------------------- execute pathogen#infect() -" Keys +" KEYS "------------------------------------------------------------------------------- let mapleader = ' ' @@ -66,7 +65,7 @@ nnoremap [e ddkP nnoremap ]e ddp -" Options +" OPTIONS nnoremap cov :if &ve == '' \| se ve=all \| else \| se ve= \| endif<cr>:se ve<cr> nnoremap co- :set cursorline! \| set cursorline? <cr> @@ -81,7 +80,7 @@ nnoremap cos :set spell! \| set spell? <cr> nnoremap cow :set wrap! \| set wrap? <cr> -" Menu +" MENU nnoremap <leader> : nnoremap <leader><leader> :pwd \| tabs \| echo '' \| buffers \| echo ''<cr>: @@ -98,7 +97,7 @@ nnoremap <leader>c :pwd \| echo ' ' \| clist \| echo ' '<cr>:c nnoremap <leader>w :w <cr> -" Macros +" MACROS " Comment column (50) and equal column (30) nnoremap <leader><tab> mzD:set ve=all<cr>050lhP:set ve=<cr>`z @@ -117,25 +116,17 @@ nnoremap <leader>J @qk^ " Extract to another file vnoremap <leader>x "md:enew<cr>"mp -" Re align the whole file -nnoremap <leader>= ggVG= - -" Abbreviations +" ABBREVIATIONS "------------------------------------------------------------------------------- " Rulers iab __ <space><esc>:set ve=all<cr>v080lhr_:set ve=<cr>A iab -_ <space><esc>:set ve=all<cr>v080lhr-:set ve=<cr>A iab =_ <space><esc>:set ve=all<cr>v080lhr=:set ve=<cr>A -iab {1 <esc>:set ve=all<cr>lv080l5hr_:set ve=<cr>3A{<esc>VUA1 -iab {2 <esc>4a{<esc>r2bD:set ve=all<cr>080l5hp:set ve=<cr>VUA - -" Header -iab ^_ <esc>0D!!fig-slash '<c-f>pA'<cr>V5j:s/ *$<cr> -" Autocommands +" AUTOCOMMANDS "------------------------------------------------------------------------------- augroup templates diff --git a/vis/.config/vis/swiper.lua b/vis/.config/vis/swiper.lua @@ -12,7 +12,7 @@ function swiper () local p = io.popen([[ stty="$(stty -g)" stty sane -expand "]] .. vis.win.file.name .. [[" | while read -r line +expand "]] .. vis.win.file.name or '' .. [[" | while read -r line do nl="$((nl + 1))" printf '%6s %s \n' "$nl" "$line" diff --git a/vis/.config/vis/visrc.lua b/vis/.config/vis/visrc.lua @@ -15,7 +15,7 @@ local leader = ' ' -- Runtime options and bindings -------------------------------------------------------------------------------- -vis.events.win_open = function (win) +function vis.events.win_open (win) -- Syntax highlighting for known file types vis.filetype_detect(win) @@ -48,11 +48,19 @@ end -- Status line -------------------------------------------------------------------------------- -vis.events.win_status = function(win) +function vis.events.win_status (win) local left, right = {}, {} - - if vis.modes[vis.mode] ~= '' and vis.win == win then - table.insert(left, vis.modes[vis.mode]) + local modes = { + [vis.MODE_NORMAL] = '', + [vis.MODE_OPERATOR_PENDING] = '', + [vis.MODE_VISUAL] = 'VISUAL', + [vis.MODE_VISUAL_LINE] = 'VISUAL-LINE', + [vis.MODE_INSERT] = 'INSERT', + [vis.MODE_REPLACE] = 'REPLACE', + } + + if modes[vis.mode] ~= '' and vis.win == win then + table.insert(left, modes[vis.mode]) end table.insert( @@ -80,6 +88,7 @@ vis.events.win_status = function(win) if not win.large then table.insert(right, win.cursor.line .. ':' .. win.cursor.col) + if win.file.size > 33554432 or win.cursor.col > 65536 then win.large = true end