reenable sidebar merge
authorMart Lubbers <mart@martlubbers.net>
Sun, 4 Jun 2017 13:19:45 +0000 (15:19 +0200)
committerMart Lubbers <mart@martlubbers.net>
Sun, 4 Jun 2017 13:19:45 +0000 (15:19 +0200)
email/.mutt/muttrc
shell/.local/bin/update [new file with mode: 0755]
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 22f21c2..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
@@ -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 (executable)
index 0000000..086ef27
--- /dev/null
@@ -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"
index b61c651..97ca7c2 100644 (file)
@@ -6,5 +6,5 @@ disfluencies
 cepstral
 diphone
 SDS
-Berenzweig
+Microcontrollers
 tonotopic
index 48c196c..abbfdde 100644 (file)
@@ -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
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"