dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit c88d26b2f3f12c931e943376873a091a9f0a1541
parent 69466c44f1db2c37c2ae5ec44ab97aa3365d7c1d
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sat, 13 Jan 2018 22:48:05 +0000

Merge branch 'master' of github.com:djmoch/dotfiles

Diffstat:
A.Xresources | 43+++++++++++++++++++++++++++++++++++++++++++
M.config/xfce4/terminal/terminalrc | 2+-
M.lessfilter | 2+-
M.local/bin/my-open | 16+++++++++-------
M.mailcap | 8+++++---
M.muttrc | 8+++++++-
M.profile | 2+-
M.ssh/config | 1+
A.vim/pack/get_plugins | 42++++++++++++++++++++++++++++++++++++++++++
M.vim/vimrc | 2+-
A.xsession | 10++++++++++
11 files changed, 121 insertions(+), 15 deletions(-)

diff --git a/.Xresources b/.Xresources @@ -0,0 +1,43 @@ +! +! ~/.Xresources +! + +#define NOTO -monotype-noto sans-medium-r-normal--11-*-*-*-*-*-*-* +#define MESLO -bitstream-meslo lg m dz-medium-r-normal--11-*-*-*-*-*-*-* + +! Global defaults +*background: #262626 +*foreground: #BCBCBC +*font: -monotype-noto sans-medium-r-normal--11-*-*-*-*-*-*-* +*color0: #1C1C1C +*color8: #444444 +*color1: #AF5F5F +*color9: #FF8700 +*color2: #5F875F +*color10: #87AF87 +*color3: #87875F +*color11: #FFFFAF +*color4: #5F87AF +*color12: #8FAFD7 +*color5: #5F5F87 +*color13: #8787AF +*color6: #5F8787 +*color14: #5FAFAF +*color7: #6C6C6C +*color15: #FFFFFF + +! Xterm +xterm.termName: xterm-256color +xterm*font: -bitstream-meslo lg m dz-medium-r-normal--11-*-*-*-*-*-*-* +xterm*renderFont: true +xterm*faceName: -bitstream-meslo lg m dz-medium-r-normal--11-*-*-*-*-*-*-* +xterm*faceSize: 10.0 + +! Xdvi +xdvi.background: #BCBCBC +xdvi.foreground: #262626 +xdvi.editor: gvim --servername xdvi --remote +%l %f +xdvi.wwwBrowser: my-open +xdvi.expertMode: 31 +xdvi.shrinkFactor: 7 +xdvi.altFont: -monotype-noto sans-medium-r-normal--11-*-*-*-*-*-*-* diff --git a/.config/xfce4/terminal/terminalrc b/.config/xfce4/terminal/terminalrc @@ -6,7 +6,7 @@ MiscBellUrgent=FALSE MiscBordersDefault=TRUE MiscCursorBlinks=TRUE MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK -MiscDefaultGeometry=95x24 +MiscDefaultGeometry=80x24 MiscInheritGeometry=FALSE MiscMenubarDefault=FALSE MiscMouseAutohide=TRUE diff --git a/.lessfilter b/.lessfilter @@ -37,7 +37,7 @@ else tar -tf "$1" ;; *) - grep "#\!/bin/bash" "$1" > /dev/null + grep "#\!/bin/*sh" "$1" > /dev/null if [ "$?" -eq "0" ]; then __pygmentize "$1" "sh" else diff --git a/.local/bin/my-open b/.local/bin/my-open @@ -10,21 +10,23 @@ # # Find handler, if one is available -if which cygstart > /dev/null 2>&1 +if type -p cygstart > /dev/null 2>&1 then handler=cygstart -elif which open > /dev/null 2>&1 -then - handler=open -elif which exo-open > /dev/null 2>&1 +elif type -p exo-open > /dev/null 2>&1 then handler=exo-open -elif which xdg-open > /dev/null 2>&1 +elif type -p xdg-open > /dev/null 2>&1 then handler=xdg-open +# Because of its ambiguity, open (the macOS handler) should always be +# tested last +elif type -p open > /dev/null 2>&1 +then + handler=open else echo "my-open: No suitable handler found" > /dev/stderr exit -1 fi -exec $handler $@ +$handler $@ diff --git a/.mailcap b/.mailcap @@ -1,4 +1,6 @@ text/html; w3m -I %{charset} -T text/html; copiousoutput; -application/pdf; zathura '%s'; test=test -n "$DISPLAY"; -application/pdf; pdftotext '%s' -; copiousoutput; -*/*; my-open '%s'; test=test -n "$DISPLAY"; +application/pdf; pdftotext '%s' -; copiousoutput; test=test -z "$DISPLAY" +application/*; my-open '%s'; needsterminal; test=test -n "$DISPLAY" +image/*; my-open '%s'; needsterminal; test=test -n "$DISPLAY" +audio/*; my-open '%s'; needsterminal; test=test -n "$DISPLAY" +video/*; my-open '%s'; needsterminal; test=test -n "$DISPLAY" diff --git a/.muttrc b/.muttrc @@ -11,7 +11,7 @@ macro index,pager,attach,compose \cb "\ <enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \ "call urlview to extract URLs out of a message" -macro generic,pager <F1> "<shell-escape> less /usr/local/Cellar/mutt/1.6.2/share/doc/mutt/manual.txt<Enter>" "show Mutt documentation" +macro generic,pager <F1> "<shell-escape> less /usr/share/doc/mutt/manual.txt<Enter>" "show Mutt documentation" macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" @@ -25,6 +25,12 @@ unset collapse_unread bind browser y exit bind index - collapse-thread bind index _ collapse-all +bind pager j next-line +bind pager <Down> next-line +bind pager k previous-line +bind pager <Up> previous-line +bind pager \Cu half-up +bind pager \Cd half-down mime_lookup application/octet-stream diff --git a/.profile b/.profile @@ -22,7 +22,7 @@ export EDITOR VISUAL PAGER LESS if type -p lesskey > /dev/null 2>&1 && [ -r "$HOME/.lesskey" ] then - [ -r "$HOME/.less" ] || lesskey + lesskey fi if type -p lesspipe > /dev/null 2>&1 diff --git a/.ssh/config b/.ssh/config @@ -10,6 +10,7 @@ Host dotcom* Host pi raspberrypi HostName raspberrypi.localdomain RemoteForward /run/user/1001/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra + ForwardX11 yes Host github github.com HostName github.com diff --git a/.vim/pack/get_plugins b/.vim/pack/get_plugins @@ -0,0 +1,42 @@ +#!/bin/sh +__clone() +{ + echo "Cloning $1" + git clone https://github.com/$1 > /dev/null 2>&1 +} + +if [ -d bundle/start -o -d bundle/opt ] +then + echo "bundle/start or bundle/opt already exists. Aborting." > 2 + exit 1 +fi + +# Plugins that should always be enabled +mkdir -p bundle/start +cd bundle/start +__clone romainl/Apprentice +__clone tpope/vim-commentary +__clone tpope/vim-eunuch +__clone tpope/vim-fugitive +__clone tpope/vim-obsession +__clone tpope/vim-scriptease +__clone tpope/vim-surround +__clone tpope/vim-unimpaired +__clone tpope/vim-vinegar +__clone Raimondi/delimitMate +__clone junegunn/goyo.vim +__clone junegunn/limelight.vim +__clone ajh17/VimCompletesMe +__clone skammer/vim-css-color +__clone ludovicchabant/vim-gutentags +__clone beloglazov/vim-online-thesaurus +__clone jszakmeister/vim-togglecursor +cd - > /dev/null 2>&1 + +# Plugins used optionally +mkdir -p bundle/opt +cd bundle/opt +__clone jpalardy/vim-slime +cd - > /dev/null 2>&1 + +unset __clone diff --git a/.vim/vimrc b/.vim/vimrc @@ -343,7 +343,7 @@ set statusline+=%{MyFileEncoding()}%y%{OptStatus('ObsessionStatus')} set statusline+=[%p%%][Ln:%l/%L,Col:%v] colorscheme apprentice set ttyfast -if $TERM_PROGRAM=="iTerm.app" || $PATH =~ 'cygdrive' || $COLORTERM =="truecolor" +if $TERM_PROGRAM=="iTerm.app" || $PATH =~ 'cygdrive' || $COLORTERM =="truecolor" || exists('$XTERM_SHELL') set termguicolors if $TERM=='tmux-256color' set t_8f=[38;2;%lu;%lu;%lum diff --git a/.xsession b/.xsession @@ -0,0 +1,10 @@ +#!/bin/sh +# +# ~/.xsession +# + +if [ -d /usr/share/fonts/noto/ ] +then + xset fp+ /usr/share/fonts/noto/ + xset fp rehash +fi