From: Mart Lubbers Date: Sun, 4 Jun 2017 13:19:45 +0000 (+0200) Subject: reenable sidebar merge X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=4b436b147222f2e4b6be9be24e63114030ffdfd1;hp=a213c41c4b0d432e3a0c620c7d069a78855392f6;p=dotfiles.git reenable sidebar merge --- diff --git a/email/.mutt/muttrc b/email/.mutt/muttrc index 22f21c2..d341140 100644 --- a/email/.mutt/muttrc +++ b/email/.mutt/muttrc @@ -18,6 +18,8 @@ macro attach B "firefox \"data:text/html;base64,$(base64 -w 0 <&0)\" send2-hook "~f mart@martlubbers.net" "set sendmail=\"msmtp -C /home/mrl/.config/msmtp/config -a net\"" send2-hook "~f mart.lubbers@student.ru.nl" "set sendmail=\"msmtp -C /home/mrl/.config/msmtp/config -a ru\"" +#folder-hook . push "~=$" + # Key bindings bind index gg first-entry bind index G last-entry @@ -76,7 +78,7 @@ macro index,pager A \ "add the sender email address to khard" # sidebar -#source ~/.mutt/sidebar.muttrc +source ~/.mutt/sidebar.muttrc # Crypto source ~/.mutt/gpg.muttrc diff --git a/shell/.local/bin/update b/shell/.local/bin/update new file mode 100755 index 0000000..086ef27 --- /dev/null +++ b/shell/.local/bin/update @@ -0,0 +1,17 @@ +#!/bin/sh +DV=/etc/debian_version +NUL='>/dev/null 2>&1' + +cmd() { + if [ -f $DV ] + then + echo -n 'apt-get update && apt-get dist-upgrade -y ' + [ `head -c 1 $DV` -ge 9 ] && echo -n '--' || -n '&& apt-get ' + echo -n 'autoremove --purge && apt-get clean && apt-get autoclean' + else + echo -n 'pacman -Syu && pacman -R `pacman -Qdtq`' + fi +} + +sudo sh -c "`cmd`" +sh -c "offlineimap -u ttyui && vdirsyncer sync && khal $NUL && khard $NUL" diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index b61c651..97ca7c2 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -6,5 +6,5 @@ disfluencies cepstral diphone SDS -Berenzweig +Microcontrollers tonotopic diff --git a/x/.config/i3/config b/x/.config/i3/config index 48c196c..abbfdde 100644 --- a/x/.config/i3/config +++ b/x/.config/i3/config @@ -13,6 +13,9 @@ set $mod Mod4 set $font DejaVu Sans Mono set $fontsize 12 +# lock the screen after 10 minutes +exec xautolock -locker ~/.local/bin/lock.sh & dunst & setxkbmap -layout dvorak,ru,us -variant ,phonetic_dvorak, -option compose:ralt,grp:menu_toggle,caps:super + # Toggle playback bindsym Pause exec mpc toggle # Printscreen diff --git a/x/.local/bin/cloo.gl b/x/.local/bin/cloo.gl index e9abf88..b388052 100755 --- a/x/.local/bin/cloo.gl +++ b/x/.local/bin/cloo.gl @@ -1,3 +1,3 @@ #!/bin/sh perl -pe 's/([^a-zA-Z0-9_.!~*()'\''-])/sprintf("%%%02X",ord($1))/ge' | - xargs -I{} curl -X POST -d "type=regular&token=a&url={}" http://cloo.gl + xargs -I{} curl -X POST -d "type=regular&token=a&url={}" https://cloo.gl diff --git a/x/.local/bin/scr b/x/.local/bin/scr index 32e550c..f34ccaf 100755 --- a/x/.local/bin/scr +++ b/x/.local/bin/scr @@ -2,5 +2,5 @@ [ "$#" -eq 1 ] && CROP="$(slop -t 0 -f "-crop %g")" URL="scr/$(date +%F_%H-%M-%S).png" import -window root $CROP png:- | \ - ssh ygdrassil ssh martlubbers.net "cat \> public_html/$URL" + ssh helheim cat \> /var/www/martlubbers.net/$URL echo "http://martlubbers.net/$URL" | cloo.gl | xclip -f | xargs -I{} notify-send {} diff --git a/x/.local/bin/thumbnailer.sh b/x/.local/bin/thumbnailer.sh new file mode 100755 index 0000000..0867ee9 --- /dev/null +++ b/x/.local/bin/thumbnailer.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +PAGERESIZE=50% + +log () { + echo "$@" >&2 +} + +if [ "$#" -ne 2 ] +then + log "Convert all pdf pages to a montage" + log "Usage: $0 INPUT.pdf OUTPUT.png" + exit 1 +fi +log "Processing $1 to $2" + +TMPDIR="$(mktemp -d)" +log "Temp directory created in $TMPDIR" + +NUMPAGES=$(identify "$1" | wc -l) +log "$NUMPAGES detected" + +log -n "Processing page: " +for ((p=0;p<$NUMPAGES;p++)) +do + convert "$1"[$p] -resize $PAGERESIZE $TMPDIR/$p.png + log -n "$p, " +done +log "done!" + +montage -geometry +0+0 $TMPDIR/*.png "$2" +log "Montaging done" + +rm -r $TMPDIR +log "Cleaned up" + +log "Done"