update spelling, cloo.gl, scr, new mailserver etc etc
authorMart Lubbers <mart@martlubbers.net>
Sun, 4 Jun 2017 13:15:54 +0000 (15:15 +0200)
committerMart Lubbers <mart@martlubbers.net>
Sun, 4 Jun 2017 13:15:54 +0000 (15:15 +0200)
email/.config/msmtp/config
email/.config/offlineimap/config
email/.mutt/muttrc
shell/.local/bin/update [new file with mode: 0644]
vim/.vim/spell/en.utf-8.add
x/.config/i3/config
x/.local/bin/cloo.gl
x/.local/bin/scr
x/.local/bin/thumbnailer.sh [new file with mode: 0755]

index 0df2a96..02408df 100644 (file)
@@ -1,9 +1,9 @@
 account net
-host mail.martlubbers.net
+host lubbers.email
 port 587
 auth on
 tls on
-tls_fingerprint D8:F2:61:3E:E3:01:7F:E9:EA:EC:77:2C:D0:70:94:34:29:45:F6:32
+tls_fingerprint 4A:52:04:FA:E6:05:84:76:D7:A4:F1:28:9C:95:EF:3E:19:52:44:78:73:67:8D:C2:98:ED:B1:81:8B:A7:3B:9A
 user mart@martlubbers.net
 passwordeval pass mail/mart@martlubbers.net
 from mart@martlubbers.net
index 06ff078..07fff2e 100644 (file)
@@ -18,12 +18,10 @@ localfolders = ~/.mutt/mail
 type = IMAP
 folderfilter = lambda x: folderfilter(x)
 remotepasseval = mailpasswd()
-remotehost = mail.martlubbers.net
-#remotehost = email.martlubbers.net
+remotehost = lubbers.email
 remoteuser = mart@martlubbers.net
 ssl = yes
-#sslcacertfile = /etc/ssl/certs/ca-certificates.crt
-cert_fingerprint = d8f2613ee3017fe9eaec772cd07094342945f632
+sslcacertfile = /etc/ssl/certs/ca-certificates.crt
 
 [mbnames]
 enabled = yes
index 71e7bdf..d341140 100644 (file)
@@ -18,6 +18,8 @@ macro attach B "<pipe-entry>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 "<delete-pattern>~=<enter>$"
+
 # Key bindings
 bind index gg first-entry
 bind index G last-entry
diff --git a/shell/.local/bin/update b/shell/.local/bin/update
new file mode 100644 (file)
index 0000000..a25812b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+DV=/etc/debian_version
+
+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 && khard'
index 072289c..f82bc52 100644 (file)
@@ -6,3 +6,4 @@ disfluencies
 cepstral
 diphone
 SDS
+Microcontrollers
index 1bd00f5..ec33dfc 100644 (file)
@@ -14,7 +14,7 @@ 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
+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
index e9abf88..b388052 100755 (executable)
@@ -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
index 32e550c..f34ccaf 100755 (executable)
@@ -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 (executable)
index 0000000..0867ee9
--- /dev/null
@@ -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"