1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-07 06:55:11 +01:00

Merge branch 'master' of /home/mbscholt/.dot/dotfiles

This commit is contained in:
2018-08-13 14:12:10 +02:00
10 changed files with 289 additions and 62 deletions

View File

@@ -2,7 +2,7 @@
set EDITOR vim set EDITOR vim
# Virtualenv support with virtualfish # Virtualenv support with virtualfish
eval (python -m virtualfish compat_aliases) eval (python3 -m virtualfish compat_aliases)
# Theme options for bobthefish # Theme options for bobthefish
set -g theme_nerd_fonts yes set -g theme_nerd_fonts yes
@@ -18,6 +18,10 @@ set -x VIRTUAL_ENV_DISABLE_PROMPT 1
set -U grcplugin_ls --color set -U grcplugin_ls --color
# PATH # PATH
## If the 'user base' binary directory exists, add it to PATH
if test -x ~/.local/bin
set PATH $PATH ~/.local/bin
end
if test -x ~/.dot/dotfiles/bin if test -x ~/.dot/dotfiles/bin
set PATH $PATH ~/.dot/dotfiles/bin set PATH $PATH ~/.dot/dotfiles/bin
end end
@@ -62,6 +66,7 @@ alias gd "git diff"
alias gst "git status" alias gst "git status"
alias ga "git add -A" alias ga "git add -A"
alias gl "git log" alias gl "git log"
alias gls "git shortlog --summary"
alias gt 'git tag|less' alias gt 'git tag|less'
#alias gad 'git log --pretty='"'"'%at'"'"' | while read d; do date -d "@$d"; done | awk '"'"'{print $1}'"'"' | sort | uniq -c' #alias gad 'git log --pretty='"'"'%at'"'"' | while read d; do date -d "@$d"; done | awk '"'"'{print $1}'"'"' | sort | uniq -c'
@@ -83,7 +88,7 @@ function grepl
end end
## Various ## Various
alias tmux 'tmux -2' #alias tmux 'tmux -2'
alias tmux_reload "tmux source-file ~/.tmux.conf" alias tmux_reload "tmux source-file ~/.tmux.conf"
alias tmux_takeover "tmux detach -a" alias tmux_takeover "tmux detach -a"

View File

@@ -3,6 +3,8 @@ set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value. # Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal tmux-256color-italic set -g default-terminal tmux-256color-italic
#set -g terminal-overrides ',tmux-256color-italic:Tc'
set -ga terminal-overrides ',*256col*:Tc'
# Keep your finger on ctrl, or don't # Keep your finger on ctrl, or don't
bind-key ^D detach-client bind-key ^D detach-client
@@ -123,3 +125,6 @@ bind - \
# Local config # Local config
if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user' if-shell "[ -f ~/.tmux.conf.user ]" 'source ~/.tmux.conf.user'
# reload config with leader-r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."

View File

@@ -71,3 +71,26 @@ varkenshaassaté
sajoerboontjes sajoerboontjes
zonneluifel zonneluifel
stellingkast stellingkast
Hoenderloo
Garmin
Termux
varkenssaté
e-reader
tomatenplant
macarons
bijgekletst
bijgekletst
scoutingterrein
geskipt
runderstoofpot
runderlende
gravelpad
eh
dagteller
proscuitto
zostraks
fusilli
knieschotten
speciaalbiertje
roomyoghurt
badolie

Binary file not shown.

View File

@@ -53,10 +53,10 @@ highlight link todoOperator Operator
" Task statuses " Task statuses
syntax match note "\v^n .*$" syntax match todoNote "\v^n .*$" nextgroup=todoNote
syntax match note "\v n .*$" syntax match todoNote "\v n .*$" nextgroup=todoNote
syntax match note "\v .*$" syntax match todoNote "\v .*$" nextgroup=todoNote
highlight note ctermfg=Grey guifg=#eeeeee highlight todoNote ctermfg=Grey guifg=#eeeeee
syntax match todoStatusDone "\v^v " nextgroup=todoItem skipwhite syntax match todoStatusDone "\v^v " nextgroup=todoItem skipwhite
syntax match todoStatusDone "\v v " nextgroup=todoItem skipwhite syntax match todoStatusDone "\v v " nextgroup=todoItem skipwhite
@@ -75,13 +75,13 @@ syntax match todoStatusTest "\v t " nextgroup=todoItem skipwhite
highlight todoStatusTest ctermfg=darkcyan guifg=#6666ff highlight todoStatusTest ctermfg=darkcyan guifg=#6666ff
syntax match todoStatusTodo "\v^- " nextgroup=todoItem skipwhite syntax match todoStatusTodo "\v^- " nextgroup=todoItem skipwhite
syntax match todoStatusTodo "\v - " nextgroup=todoItem skipwhite syntax match todoStatusTodo "\v .*- " nextgroup=todoItem skipwhite
highlight todoStatusTodo ctermfg=red guifg=#ff0000 highlight todoStatusTodo ctermfg=red guifg=#ff0000
syntax match todoStatusImportant "\v^\> .*$" syntax match todoStatusImportant "\v^\> .*$" nextgroup=todoItem skipwhite
syntax match todoStatusImportant "\v \> .*$" syntax match todoStatusImportant "\v \> .*$" nextgroup=todoItem skipwhite
syntax match todoStatusImportant "\v^! .*$" syntax match todoStatusImportant "\v^! .*$" nextgroup=todoItem skipwhite
syntax match todoStatusImportant "\v ! .*$" syntax match todoStatusImportant "\v ! .*$" nextgroup=todoItem skipwhite
"highlight todoStatusImportant ctermfg=131 guifg=#af5f5f "highlight todoStatusImportant ctermfg=131 guifg=#af5f5f
highlight todoStatusImportant ctermfg=167 guifg=#d75f5f highlight todoStatusImportant ctermfg=167 guifg=#d75f5f
@@ -93,14 +93,16 @@ highlight todoStatusQuestion ctermfg=darkcyan guifg=#6666ff
"syntax match brack /[\[\]]/ | hi brack ctermfg=DarkMagenta "syntax match brack /[\[\]]/ | hi brack ctermfg=DarkMagenta
syntax match timeslot "\v\[.*-.*\] " nextgroup=todoItem skipwhite syntax match timeslot "\v\[.*-.*\] " nextgroup=todoItem skipwhite
highlight timeslot ctermfg=Magenta highlight timeslot ctermfg=Magenta guifg=#d700af
" A todoItem has a subject (e.g., a word that's followed by a ':') " A todoItem has a subject (e.g., a word that's followed by a ':')
syn match todoItem '\i\+:' contained syn match todoItem '[a-zA-Z0-9\-_]\+:' contained
hi todoItem ctermfg=Blue hi todoItem ctermfg=Blue guifg=#87d7ff
highlight link todoStatusDone PreProc highlight link todoStatusDone PreProc
highlight link todoStatusDoing PreProc highlight link todoStatusDoing PreProc
highlight link todoStatusCancelled PreProc
highlight link todoStatusTest PreProc
highlight link todoStatusTodo PreProc highlight link todoStatusTodo PreProc
highlight link todoStatusImportant PreProc highlight link todoStatusImportant PreProc
highlight link todoStatusQuestion PreProc highlight link todoStatusQuestion PreProc

101
.vimrc
View File

@@ -11,7 +11,8 @@ set encoding=utf-8
" change the <Leader> key from \ to , " change the <Leader> key from \ to ,
let mapleader="," let mapleader=","
" Vundle manages the plugins
" == Vundle manages the plugins ================================================
" set the runtime path to include Vundle and initialize " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
@@ -19,7 +20,7 @@ call vundle#begin()
" let Vundle manage Vundle, required " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
" == UI ====== " == Window chrome =============================================================
" Display tags of the current file ordered by scope " Display tags of the current file ordered by scope
" You need ctags: `sudo apt-get install exuberant-ctags` or " You need ctags: `sudo apt-get install exuberant-ctags` or
@@ -41,6 +42,7 @@ Plugin 'bling/vim-bufferline'
" Version control notes in the line number bar " Version control notes in the line number bar
Plugin 'mhinz/vim-signify' Plugin 'mhinz/vim-signify'
" Git wrapper " Git wrapper
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
" fugitive git bindings " fugitive git bindings
@@ -61,11 +63,23 @@ nnoremap <space>go :Git checkout<Space>
nnoremap <space>gps :Dispatch! git push<CR> nnoremap <space>gps :Dispatch! git push<CR>
nnoremap <space>gpl :Dispatch! git pull<CR> nnoremap <space>gpl :Dispatch! git pull<CR>
" Better matching of code pairs
"Plugin 'andymass/vim-matchup'
" Deferred highlighting improves cursor movement performance
"let g:matchup_matchparen_deferred = 1
" Think of sensible.vim as one step above 'nocompatible' mode: a universal " Think of sensible.vim as one step above 'nocompatible' mode: a universal
" set of defaults that (hopefully) everyone can agree on. " set of defaults that (hopefully) everyone can agree on.
Plugin 'tpope/vim-sensible' Plugin 'tpope/vim-sensible'
" Nice colour scheme " Nice colour scheme
Plugin 'jnurmine/Zenburn.git' "Plugin 'jnurmine/Zenburn'
Plugin 'fenetikm/falcon'
"Plugin 'phanviet/vim-monokai-pro'
"Plugin 'dracula/vim'
"Plugin 'sonph/onehalf'
"Plugin 'jacoborus/tender.vim'
" Quick file system tree, mapped to Ctrl+n for quick toggle " Quick file system tree, mapped to Ctrl+n for quick toggle
Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdtree'
map <C-n> :NERDTreeToggle<CR> map <C-n> :NERDTreeToggle<CR>
@@ -74,6 +88,17 @@ let NERDTreeIgnore = ['\.pyc$', 'tags']
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
if has('patch-8.0-1364')
" Easily change position of windows
" Requires vim 8.0.1364 or neovim (exact version uncertain).
"<c-w>gh: soft move left
"<c-w>gj: soft move down
"<c-w>gk: soft move up
"<c-w>gl: soft move right
Plugin 'andymass/vim-tradewinds'
endif
" Rooter changes the working directory to the project root when you open a " Rooter changes the working directory to the project root when you open a
" file or directory. Useful when using fzf for example. " file or directory. Useful when using fzf for example.
Plugin 'airblade/vim-rooter' Plugin 'airblade/vim-rooter'
@@ -155,8 +180,15 @@ Plugin 'ryanoasis/vim-devicons'
" Set guifont when using gvim: " Set guifont when using gvim:
"set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11 "set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
"
" undotree.vim : Display your undo history in a graph.
Plugin 'mbbill/undotree'
nnoremap <Leader>u :UndotreeToggle<CR>
let g:undotree_SetFocusWhenToggle=1 " if undotree is opened, it is likely one
" wants to interact with it.
" == Content convenience ======
" == Content convenience =======================================================
" transparent editing of gpg encrypted files. The filename must have a .gpg, " transparent editing of gpg encrypted files. The filename must have a .gpg,
" .pgp or .asc suffix. " .pgp or .asc suffix.
@@ -243,42 +275,10 @@ let g:ycm_server_python_interpreter = '/usr/bin/python3'
"let g:ycm_server_log_level = 'debug' "let g:ycm_server_log_level = 'debug'
endif endif
" Improved Django handling " Improved Django handling
Plugin 'tweekmonster/django-plus.vim' Plugin 'tweekmonster/django-plus.vim'
" Code checker. For python, install flake8 or pylint, preferably in the
" virtualenv. For Django support, install pylint-django
"Disabled, using ALE instead (see below); the settings here are not needed
"Plugin 'vim-syntastic/syntastic'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_error_symbol = '✗'
let g:syntastic_warning_symbol = '⚠'
"let g:syntastic_python_checkers = ['pylint']
"let g:syntastic_python_checkers = ['pylint', 'flake8', 'pyflakes']
" No silly 80-char line limit. Sorry pep-8. Also, Django support. Disable 'invalid name', 'missing docstring'
"let g:syntastic_python_pylint_post_args="--max-line-length=120 --load-plugins pylint_django -d C0103,C0111"
let g:syntastic_python_pylint_post_args="--max-line-length=120 -d C0103,C0111"
" Use the virtualenv's Python interpreter
"if $VIRTUAL_ENV != ''
" let g:syntastic_python_python_exec = '$VIRTUAL_ENV/bin/python'
"endif
"let g:syntastic_python_checkers=['pylint']
"let g:syntastic_python_python_exec = 'python'
"let g:syntastic_python_pylint_exe = 'python -m pylint'
"let g:syntastic_python_pylint_exe = 'python $(which pylint)'
" Code checker. For python, install flake8 or pylint, preferably in the " Code checker. For python, install flake8 or pylint, preferably in the
" virtualenv. For Django support, install pylint-django " virtualenv. For Django support, install pylint-django
@@ -320,6 +320,8 @@ if v:version >= 704
endif endif
" == Writing prose =============================================================
" Distraction-free writing, start with <Leader>V (\V or ,V in this config) " Distraction-free writing, start with <Leader>V (\V or ,V in this config)
Plugin 'junegunn/goyo.vim' Plugin 'junegunn/goyo.vim'
let g:goyo_width = 120 let g:goyo_width = 120
@@ -344,12 +346,6 @@ let g:pencil#wrapModeDefault = 'soft' " default is 'hard'
nmap <leader>V :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR> nmap <leader>V :Goyo <bar> :Limelight!! <bar> :TogglePencil <CR>
" undotree.vim : Display your undo history in a graph.
Plugin 'mbbill/undotree'
nnoremap <Leader>u :UndotreeToggle<CR>
let g:undotree_SetFocusWhenToggle=1 " if undotree is opened, it is likely one
" wants to interact with it.
" The NERD Commenter: A plugin that allows for easy commenting of code for " The NERD Commenter: A plugin that allows for easy commenting of code for
" many filetypes. " many filetypes.
Plugin 'scrooloose/nerdcommenter' Plugin 'scrooloose/nerdcommenter'
@@ -389,9 +385,12 @@ set statusline+=%{gutentags#statusline()}
let g:gutentags_ctags_exclude = ["*.min.*", "build", ".bundle", ".git", "log", "node_modules", "tmp", "vendor", "*.vim/bundle/*"] let g:gutentags_ctags_exclude = ["*.min.*", "build", ".bundle", ".git", "log", "node_modules", "tmp", "vendor", "*.vim/bundle/*"]
"let g:gutentags_trace = 1 "let g:gutentags_trace = 1
" All of your Plugins must be added before the following line " All of your Plugins must be added before the following line
call vundle#end() " required call vundle#end() " required
filetype plugin indent on " required filetype plugin indent on " required
" == End of plugins ============================================================
"filetype plugin on "filetype plugin on
@@ -441,14 +440,26 @@ set cryptmethod=blowfish2
" Ensure 256 colour support if the terminal supports it " Ensure 256 colour support if the terminal supports it
if &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color-italic" if &term == "xterm" || &term == "xterm-256color" || &term == "screen-bce" || &term == "screen-256color" || &term == "screen" || &term == "tmux-256color-italic"
set t_Co=256 "colorscheme zenburn
colorscheme zenburn colorscheme falcon
"colorscheme monokai_pro
"colorscheme dracula
"colorscheme onehalfdark
"colorscheme tender
" create a bar for airline " create a bar for airline
set laststatus=2 set laststatus=2
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
endif endif
" This is what sets vim to use 24-bit colors. It will also work for any version of neovim
" newer than 0.1.4.
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" Toggle paste and autoindent mode (enable paste so no indention weirdness " Toggle paste and autoindent mode (enable paste so no indention weirdness
" happens when pasting into the current file) " happens when pasting into the current file)
set pastetoggle=<F10> set pastetoggle=<F10>

View File

@@ -135,15 +135,12 @@ else
while read -r FONT; do while read -r FONT; do
install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT" install_font "$SOURCE_DIR/$FONT" "$DEST_DIR/$FONT"
done <<< "$FONTS_VARIOUS" done <<< "$FONTS_VARIOUS"
# Just to be sure, clear your font cache and restart Firefox
if [ ! -e "${HOME}/.config/fontconfig" ]; then if [ ! -e "${HOME}/.config/fontconfig" ]; then
mkdir -p "${HOME}/.config/fontconfig" mkdir -p "${HOME}/.config/fontconfig"
fi fi
if [ ! -e "${HOME}/.config/fontconfig/fonts.conf" ]; then if [ ! -e "${HOME}/.config/fontconfig/fonts.conf" ]; then
ln -s "${SOURCE_DIR}/fonts.conf" "${HOME}/.config/fontconfig/" ln -s "${SOURCE_DIR}/fonts.conf" "${HOME}/.config/fontconfig/"
fi fi
fc-cache -f -v
echo 'You might want to restart your browser'
# Delete obsolete fonts # Delete obsolete fonts
while read -r FONT; do while read -r FONT; do
if [ -L "$DEST_DIR/$FONT" ]; then if [ -L "$DEST_DIR/$FONT" ]; then
@@ -151,6 +148,9 @@ else
rm "$DEST_DIR/$FONT" rm "$DEST_DIR/$FONT"
fi fi
done <<< "$FONTS_DELETE" done <<< "$FONTS_DELETE"
# Just to be sure, clear and refresh your font cache and restart Firefox
fc-cache -f -v
echo 'You might want to restart your browser'
else else
echo "$SOURCE_DIR not found, aborting" echo "$SOURCE_DIR not found, aborting"
fi fi

100
bin/testing/color-24bit.sh Executable file
View File

@@ -0,0 +1,100 @@
#!/bin/bash
# This file was originally taken from iterm2 https://github.com/gnachman/iTerm2/blob/master/tests/24-bit-color.sh
#
# This file echoes a bunch of 24-bit color codes
# to the terminal to demonstrate its functionality.
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
# <r> <g> <b> range from 0 to 255 inclusive.
# The escape sequence ^[0m returns output to default
setBackgroundColor()
{
#printf '\x1bPtmux;\x1b\x1b[48;2;%s;%s;%sm' $1 $2 $3
printf '\x1b[48;2;%s;%s;%sm' $1 $2 $3
}
resetOutput()
{
echo -en "\x1b[0m\n"
}
# Gives a color $1/255 % along HSV
# Who knows what happens when $1 is outside 0-255
# Echoes "$red $green $blue" where
# $red $green and $blue are integers
# ranging between 0 and 255 inclusive
rainbowColor()
{
let h=$1/43
let f=$1-43*$h
let t=$f*255/43
let q=255-t
if [ $h -eq 0 ]
then
echo "255 $t 0"
elif [ $h -eq 1 ]
then
echo "$q 255 0"
elif [ $h -eq 2 ]
then
echo "0 255 $t"
elif [ $h -eq 3 ]
then
echo "0 $q 255"
elif [ $h -eq 4 ]
then
echo "$t 0 255"
elif [ $h -eq 5 ]
then
echo "255 0 $q"
else
# execution should never reach here
echo "0 0 0"
fi
}
for i in `seq 0 127`; do
setBackgroundColor $i 0 0
echo -en " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor $i 0 0
echo -en " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor 0 $i 0
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor 0 $i 0
echo -n " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor 0 0 $i
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor 0 0 $i
echo -n " "
done
resetOutput
for i in `seq 0 127`; do
setBackgroundColor `rainbowColor $i`
echo -n " "
done
resetOutput
for i in `seq 255 -1 128`; do
setBackgroundColor `rainbowColor $i`
echo -n " "
done
resetOutput

67
bin/testing/color-spaces.pl Executable file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.1 1999/07/11 08:49:54 dawes Exp $
print "256 color mode\n\n";
# display back ground colors
for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
# first the system ones:
print "System colors:\n";
for ($color = 0; $color < 8; $color++) {
print "\x1b[${fgbg};5;${color}m::";
}
print "\x1b[0m\n";
for ($color = 8; $color < 16; $color++) {
print "\x1b[${fgbg};5;${color}m::";
}
print "\x1b[0m\n\n";
# now the color cube
print "Color cube, 6x6x6:\n";
for ($green = 0; $green < 6; $green++) {
for ($red = 0; $red < 6; $red++) {
for ($blue = 0; $blue < 6; $blue++) {
$color = 16 + ($red * 36) + ($green * 6) + $blue;
print "\x1b[${fgbg};5;${color}m::";
}
print "\x1b[0m ";
}
print "\n";
}
# now the grayscale ramp
print "Grayscale ramp:\n";
for ($color = 232; $color < 256; $color++) {
print "\x1b[${fgbg};5;${color}m::";
}
print "\x1b[0m\n\n";
}
print "Examples for the 3-byte color mode\n\n";
for ($fgbg = 38; $fgbg <= 48; $fgbg +=10) {
# now the color cube
print "Color cube\n";
for ($green = 0; $green < 256; $green+=51) {
for ($red = 0; $red < 256; $red+=51) {
for ($blue = 0; $blue < 256; $blue+=51) {
print "\x1b[${fgbg};2;${red};${green};${blue}m::";
}
print "\x1b[0m ";
}
print "\n";
}
# now the grayscale ramp
print "Grayscale ramp:\n";
for ($gray = 8; $gray < 256; $gray+=10) {
print "\x1b[${fgbg};2;${gray};${gray};${gray}m::";
}
print "\x1b[0m\n\n";
}

14
bin/testing/color-zigzag.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s s s s s s s s s s s s s s s s;
for (colnum = 0; colnum<256; colnum++) {
r = 255-(colnum*255/255);
g = (colnum*510/255);
b = (colnum*255/255);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'