enable calendar, add urls newsboat, update to tl2019, output jpg for resize script...
authorMart Lubbers <mart@martlubbers.net>
Wed, 5 Jun 2019 09:43:52 +0000 (11:43 +0200)
committerMart Lubbers <mart@martlubbers.net>
Wed, 5 Jun 2019 09:43:52 +0000 (11:43 +0200)
email/.local/bin/newmail.sh
newsboat/.config/newsboat/urls
shell/.bashrc
shell/.local/bin/ac3fix [new file with mode: 0755]
shell/.local/bin/resize.sh
shell/.local/bin/wipe [new file with mode: 0755]
vim/.vimrc

index 4f62eb4..a1828a0 100755 (executable)
@@ -8,4 +8,4 @@ then
        notify-send "$newmail new emails!"
 fi
 notmuch new
-#vdirsyncer sync
+vdirsyncer sync
index e68166e..3c6ece6 100644 (file)
@@ -21,3 +21,6 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA yt
 https://www.youtube.com/feeds/videos.xml?channel_id=UC-7I1gU1r6PxBSl87o-7YEQ yt "Drauga1"
 https://www.youtube.com/feeds/videos.xml?channel_id=UC1ydE9gDHTdvbNVIgEKIKzw yt "VWestlife"
 https://www.youtube.com/feeds/videos.xml?channel_id=UCSE6yilNScIz1SLTNQvrXMw yt "Vinheteiro"
+https://www.youtube.com/feeds/videos.xml?channel_id=UCnCE0-pPZuit8aud1l9rhkA yt "Whisky.com"
+https://www.youtube.com/feeds/videos.xml?channel_id=UCb45YJUy9zAzhPaduyMM-_w yt "Janet Devlin"
+https://www.youtube.com/feeds/videos.xml?channel_id=UCxDZs_ltFFvn0FDHT6kmoXA yt "Bald and bankrupt"
index 156d908..0d2a2c9 100644 (file)
@@ -24,12 +24,13 @@ export CLEAN_HOME=/opt/clean
 
 export PATH=~/.local/bin:$PATH
 export PATH=$PATH:$CLEAN_HOME/lib/exe:$CLEAN_HOME/bin
-export PATH=$PATH:/opt/texlive/2018/bin/x86_64-linux:/opt/zotero:/opt/arduino:/opt/beets/bin
+export PATH=$PATH:/opt/texlive/2019/bin/x86_64-linux:/opt/zotero:/opt/arduino:/opt/beets/bin
 
-export MANPATH=~/.local/share/man:/opt/texlive/2018/texmf-dist/doc/man:./arduino/java/man:$MANPATH
+export MANPATH=~/.local/share/man:/opt/texlive/2019/texmf-dist/doc/man:./arduino/java/man:$MANPATH
 
 export GTK_IM_MODULE=xim
 export QT_IM_MODULE=xim
+export QT_QPA_PLATFORMTHEME=qt5ct
 
 alias ls='ls --color=auto'
 alias grep='grep --color=auto'
diff --git a/shell/.local/bin/ac3fix b/shell/.local/bin/ac3fix
new file mode 100755 (executable)
index 0000000..4b46afe
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+if [ $# -eq 0 ]
+then
+       echo "Usage $0 [file1 [file2 ..]]" >&2
+fi
+
+while (( "$#" ))
+do
+       ffmpeg -i "$1" -acodec ac3 -vcodec copy "ac3-$1"
+       shift
+done
index 295bcd7..008ef4e 100755 (executable)
@@ -40,9 +40,9 @@ while true; do
        CUR=$((CUR+D*STEP))
        STEP=$((STEP/2))
        if [[ $PREV -eq $CUR ]]; then break; fi
-       if [[ $(convert "$1" -resize ${CUR}x png:- | wc -c) -ge $TGT ]]; 
+       if [[ $(convert "$1" -resize ${CUR}x jpg:- | wc -c) -ge $TGT ]]; 
        then D=-1; else D=1; fi
        echo -n "$CUR," >&2
 done
 echo -e "\b " >&2
-convert "$1" -resize "${CUR}x" png:-
+convert "$1" -resize "${CUR}x" jpg:-
diff --git a/shell/.local/bin/wipe b/shell/.local/bin/wipe
new file mode 100755 (executable)
index 0000000..9a2717f
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -ue
+
+if [ $# -eq 1 ]; then
+       dev=$1
+elif [ $# -eq 0 ]; then
+       select dev in $(ls /sys/class/block/); do break; done
+else
+       echo "Usage: $0 [device]"
+       echo "e.g.: $0 /dev/sda"
+       exit 1
+fi
+
+size="$(($(cat "/sys/class/block/$dev/size")*512))"
+dev="/dev/$dev"
+echo "Select $dev with size $(numfmt --to=iec-i $size) or $size bytes"
+
+read -p "Are you sure? It will wipe $dev [y/n]" r
+if [ "$r" != y ]; then
+       echo "Answer y to proceed"
+       exit 1
+fi
+
+pv -aeprts "$size" /dev/zero | sudo dd of="$dev" bs=4096
+sync
index 42d87df..3479ab3 100644 (file)
@@ -5,6 +5,8 @@ autocmd! bufwritepost .vimrc source %
 syntax enable
 filetype indent plugin on
 color torte
+
+" Settings
 set encoding=utf-8
 set history=1000
 set number
@@ -22,8 +24,11 @@ set textwidth=79
 set shiftwidth=4
 set tabstop=4
 set nowrap
-
-" List characters to mark trailing whitespace etc
+set lazyredraw
+set smartcase
+set ignorecase
+set scrolloff=1
+set sidescrolloff=1
 set listchars=nbsp:¬,tab:▸\ ,eol:↩,extends:»,precedes:«,trail:•
 set list
 
@@ -57,7 +62,7 @@ map Q <Nop>
 set foldmethod=marker
 set foldlevelstart=99
 
-" Unbind arrow keys, who has them anyways on the keyboard...
+" Unbind arrow keys, who has them anyway on the keyboard...
 for prefix in ['i', 'n', 'v']
        for key in ['<UP>', '<DOWN>', '<LEFT>', '<RIGHT>']
                exe prefix . "noremap " . key . " <Nop>"
@@ -80,6 +85,3 @@ let g:syntastic_check_on_wq = 0
 
 " Vimtex options
 let g:vimtex_compiler_enabled = 0
-
-" Background transparency
-hi Normal guibg=NONE ctermbg=NONE