From 2218de46f7dae92722654e53d86d81254a208cc5 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 12 Apr 2017 09:00:33 +0200 Subject: [PATCH] update submodules, several small changes --- email/.config/offlineimap/config | 2 ++ email/.config/offlineimap/offlineimap.py | 2 +- email/.mutt/checkattach.sh | 35 +++++++++++++++++++ email/.mutt/muttrc | 2 +- haskell/.ghci | 3 +- shell/.bashrc | 3 +- vim/.vim/pack/plugins/start/syntastic | 2 +- vim/.vim/pack/plugins/start/vim-clean | 2 +- vim/.vim/pack/plugins/start/vim-gnupg | 2 +- .../pack/plugins/start/vim-linux-coding-style | 2 +- vim/.vim/pack/plugins/start/vim-praat | 2 +- vim/.vim/pack/plugins/start/vimperator.vim | 2 +- vim/.vimrc | 4 +++ x/.XCompose | 18 ++++++++++ x/.local/bin/fsel | 10 ++++++ x/.local/bin/gvwrap | 2 ++ x/.local/bin/scr | 2 +- 17 files changed, 84 insertions(+), 11 deletions(-) create mode 100755 email/.mutt/checkattach.sh create mode 100755 x/.local/bin/fsel create mode 100755 x/.local/bin/gvwrap diff --git a/email/.config/offlineimap/config b/email/.config/offlineimap/config index 7511a48..06ff078 100644 --- a/email/.config/offlineimap/config +++ b/email/.config/offlineimap/config @@ -19,8 +19,10 @@ type = IMAP folderfilter = lambda x: folderfilter(x) remotepasseval = mailpasswd() remotehost = mail.martlubbers.net +#remotehost = email.martlubbers.net remoteuser = mart@martlubbers.net ssl = yes +#sslcacertfile = /etc/ssl/certs/ca-certificates.crt cert_fingerprint = d8f2613ee3017fe9eaec772cd07094342945f632 [mbnames] diff --git a/email/.config/offlineimap/offlineimap.py b/email/.config/offlineimap/offlineimap.py index 99aeec0..9e1bd88 100644 --- a/email/.config/offlineimap/offlineimap.py +++ b/email/.config/offlineimap/offlineimap.py @@ -13,6 +13,6 @@ def folderfilter(x): if match: return abs(datetime.date.today() - datetime.date(int(match.group(1)), int(match.group(2)), 1) - ).days <= 31*4 + ).days <= 31*6 else: return not x.startswith('archive') diff --git a/email/.mutt/checkattach.sh b/email/.mutt/checkattach.sh new file mode 100755 index 0000000..a5ec900 --- /dev/null +++ b/email/.mutt/checkattach.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if [ $# = 0 ] +then + echo "Usage: $0 /path/to/mailprog> ..." + exit 2 +fi + +KEYWORDS='attach|bijlage|bijgevoegd' +TMF="$(mktemp -t mutt_checkattach.XXXXX)" +cat > "$TMF" + +## Define test for multipart message. +multipart() { + grep -q '^Content-Type: multipart' "$TMF" +} + +## Define test for keyword search. +wordattach() { + grep -v '^>' "$TMF" | grep -E -i -q "$KEYWORDS" +} + +if multipart || ! wordattach +then + "$@" < "$TMF" + EXIT_STATUS=$? +else + EXIT_STATUS=1 +fi + +# Delete the temporary file. +rm -f "$TMF" + +# That's all folks. +exit $EXIT_STATUS diff --git a/email/.mutt/muttrc b/email/.mutt/muttrc index ce3a6e4..634e945 100644 --- a/email/.mutt/muttrc +++ b/email/.mutt/muttrc @@ -11,7 +11,7 @@ set mask="!^\\.[^.]" source ~/.mutt/mailboxes # Receiving, sending and searching -set sendmail="msmtp -C /home/mrl/.config/msmtp/config" +set sendmail="/home/mrl/.mutt/checkattach.sh msmtp -C /home/mrl/.config/msmtp/config" set send_charset="us-ascii:utf-8" macro index,pager $ "offlineimap &" "Force refresh" macro attach B "firefox \"data:text/html;base64,$(base64 -w 0 <&0)\"" diff --git a/haskell/.ghci b/haskell/.ghci index 120ab68..8ad60cd 100644 --- a/haskell/.ghci +++ b/haskell/.ghci @@ -1,2 +1,3 @@ -:set -v0 -Wall +:set -v0 :set prompt "λ. " +:def pf \str -> return $ ":! pointfree \"" ++ str ++ "\"" diff --git a/shell/.bashrc b/shell/.bashrc index 73f61ae..dfab714 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -7,7 +7,7 @@ shopt -s histappend export PROMPT_COMMAND='history -a' export TERMINAL=urxvtcd -export EDITOR=vim +export EDITOR="vim -p" export TERM=screen export BROWSER=firefox export PAGER=less @@ -17,6 +17,7 @@ export NOTMUCH_CONFIG=~/.config/notmuch/config export CLEAN_HOME=/opt/clean export PATH=~/.local/bin:$PATH:$CLEAN_HOME/lib/exe:$CLEAN_HOME/bin +export PATH=$PATH:/opt/texlive/2016/bin/x86_64-linux export GTK_IM_MODULE=xim export QT_IM_MODULE=xim diff --git a/vim/.vim/pack/plugins/start/syntastic b/vim/.vim/pack/plugins/start/syntastic index 734fde7..5d9a0bc 160000 --- a/vim/.vim/pack/plugins/start/syntastic +++ b/vim/.vim/pack/plugins/start/syntastic @@ -1 +1 @@ -Subproject commit 734fde7f0b84ff3f670ab5772ed1b8b0c8c16770 +Subproject commit 5d9a0bc3877aea992292eeb6f318f4321fdef632 diff --git a/vim/.vim/pack/plugins/start/vim-clean b/vim/.vim/pack/plugins/start/vim-clean index 77ee6dd..3cedc48 160000 --- a/vim/.vim/pack/plugins/start/vim-clean +++ b/vim/.vim/pack/plugins/start/vim-clean @@ -1 +1 @@ -Subproject commit 77ee6dd09d76a75cecac4e01a348786c589e9aca +Subproject commit 3cedc48b1ef78666dc033b52ab31e21dbf47fc23 diff --git a/vim/.vim/pack/plugins/start/vim-gnupg b/vim/.vim/pack/plugins/start/vim-gnupg index 454090f..5103285 160000 --- a/vim/.vim/pack/plugins/start/vim-gnupg +++ b/vim/.vim/pack/plugins/start/vim-gnupg @@ -1 +1 @@ -Subproject commit 454090fe40bec3b62e6fd7faa91fd18750705bbb +Subproject commit 5103285d4d59cc9d2d56e6e897b8efbbb460b774 diff --git a/vim/.vim/pack/plugins/start/vim-linux-coding-style b/vim/.vim/pack/plugins/start/vim-linux-coding-style index 70f19ba..7da66c1 160000 --- a/vim/.vim/pack/plugins/start/vim-linux-coding-style +++ b/vim/.vim/pack/plugins/start/vim-linux-coding-style @@ -1 +1 @@ -Subproject commit 70f19ba894e1966e4ce836e66569623c89e9c0b9 +Subproject commit 7da66c1b34dc2976a70c9393c7e0c9f47e129e89 diff --git a/vim/.vim/pack/plugins/start/vim-praat b/vim/.vim/pack/plugins/start/vim-praat index 62116f7..99d318e 160000 --- a/vim/.vim/pack/plugins/start/vim-praat +++ b/vim/.vim/pack/plugins/start/vim-praat @@ -1 +1 @@ -Subproject commit 62116f73b3bb753e7e512c262dd4bc0928b53360 +Subproject commit 99d318ed8da0d398de6e9c7f28a4aed2152e34a0 diff --git a/vim/.vim/pack/plugins/start/vimperator.vim b/vim/.vim/pack/plugins/start/vimperator.vim index 15adb39..7223609 160000 --- a/vim/.vim/pack/plugins/start/vimperator.vim +++ b/vim/.vim/pack/plugins/start/vimperator.vim @@ -1 +1 @@ -Subproject commit 15adb395307f0d6ac99b445b42f631cc9184cbbf +Subproject commit 7223609e73ef2b2e50fd57e5ae729cae0283ef31 diff --git a/vim/.vimrc b/vim/.vimrc index e3bcafd..aebe036 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -42,6 +42,10 @@ map k k nnoremap n nzzzv nnoremap N Nzzzv +" Fold settings +set foldmethod=syntax +set foldlevelstart=99 + " Unbind arrow keys, who has them anyways on the keyboard... for prefix in ['i', 'n', 'v'] for key in ['', '', '', ''] diff --git a/x/.XCompose b/x/.XCompose index 80d69a4..0438a39 100644 --- a/x/.XCompose +++ b/x/.XCompose @@ -1,4 +1,18 @@ include "%L" +# Ligatures and special characters + : "ſ" U017F + : "ʒ" U0292 + : "ꜵ" UA735 + : "Ꜵ" UA734 + : "ꜷ" UA737 + : "Ꜷ" UA736 + : "ꜷ" UA739 + : "Ꜷ" UA738 + : "ꜷ" UA73D + : "Ꜷ" UA73C + : "ꝏ" UA73F + : "ꝏ" UA73E + # Lowercase greek letters. : "α" U03B1 : "β" U03B2 @@ -211,3 +225,7 @@ include "%L" : "Ⅽ" U216D : "Ⅾ" U216E : "Ⅿ" U216F + +# Swastika's + : "卍" U534D + : "卐" U5350 diff --git a/x/.local/bin/fsel b/x/.local/bin/fsel new file mode 100755 index 0000000..73cc3ca --- /dev/null +++ b/x/.local/bin/fsel @@ -0,0 +1,10 @@ +#!/bin/sh +DIR=~ +while [ ! -f "$DIR" ]; do + NEWDIR="$(ls -1 "$@" "$DIR" | dmenu -l 20)" + if [ -z "$NEWDIR" ]; then + exit; + fi + DIR="$(readlink -f "$DIR/$NEWDIR")" +done +echo "$DIR" diff --git a/x/.local/bin/gvwrap b/x/.local/bin/gvwrap new file mode 100755 index 0000000..39b8a83 --- /dev/null +++ b/x/.local/bin/gvwrap @@ -0,0 +1,2 @@ +#!/bin/sh +gv "$(fsel)" diff --git a/x/.local/bin/scr b/x/.local/bin/scr index 5197c21..32e550c 100755 --- a/x/.local/bin/scr +++ b/x/.local/bin/scr @@ -3,4 +3,4 @@ URL="scr/$(date +%F_%H-%M-%S).png" import -window root $CROP png:- | \ ssh ygdrassil ssh martlubbers.net "cat \> public_html/$URL" -echo "http://martlubbers.net/$URL" | xclip -f | xargs -I{} notify-send {} +echo "http://martlubbers.net/$URL" | cloo.gl | xclip -f | xargs -I{} notify-send {} -- 2.20.1