From f39f859b92bcdbfe2d176ec4d0c367157cf7cf67 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 15 Feb 2015 18:21:22 +0100 Subject: tex2pdf: Choosing mupdf over evince. --- bin/backup-profiles | 65 ----------------------------------------------------- bin/tex2pdf | 11 +++++++-- 2 files changed, 9 insertions(+), 67 deletions(-) delete mode 100755 bin/backup-profiles (limited to 'bin') diff --git a/bin/backup-profiles b/bin/backup-profiles deleted file mode 100755 index 9e5c9a1..0000000 --- a/bin/backup-profiles +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# -# Backup profiles of firefox and thunderbird to local ownCloud (or other location) while encrypting them using gpg -# - -firefoxPID=`ps -C firefox -o pid=` -thunderbirdPID=`ps -C thunderbird -o pid=` - -firefoxTMP=/tmp/firefox.tgz -thunderbirdTMP=/tmp/thunderbird.tgz -firefoxIF=~/.mozilla/firefox/ -thunderbirdIF=~/.thunderbird/ -profileName=dvzrv -backupEND=-backup -OF=~/ownCloud/backup/web -gpgEND=.gpg - - -if [[ -z "$firefoxPID" ]] -then - echo "Firefox is not running." - echo "Backing up profile." - tar cfPzh $firefoxTMP -C $firefoxIF $profileName - echo "Encrypting profile." - gpg -e -r 'David Runge ' $firefoxTMP - echo "Moving backup to ownCloud." - mv -f $firefoxTMP$gpgEND $OF - echo "Cleaning up." - rm $firefoxTMP - echo "Done." -else - echo "Firefox is still running." - psdStopped=`systemctl status psd |grep inactive` - if [[ ! -z "$psdStopped" ]]; then - echo "psd service running. Trying to use its backup." - tar cfPzh $firefoxTMP -C $firefoxIF $profileName$backupEND - echo "Encrypting profile." - gpg -e -r 'David Runge ' $firefoxTMP - echo "Moving backup to ownCloud." - mv -f $firefoxTMP$gpgEND $OF - echo "Cleaning up." - rm $firefoxTMP - echo "Done." - else - echo "Skipping backup." - fi -fi - -if [[ -z "$thunderbirdPID" ]] -then - echo "Thunderbird is not running." - echo "Backing up profile." - tar cfPz $thunderbirdTMP -C $thunderbirdIF $profileName - echo "Encrypting profile." - gpg -e -r 'David Runge ' $thunderbirdTMP - echo "Moving backup to ownCloud." - mv -f $thunderbirdTMP$gpgEND $OF - echo "Cleaning up." - rm $thunderbirdTMP - echo "Done." -else - echo "Thunderbird is still running." - echo "Skipping backup." -fi - diff --git a/bin/tex2pdf b/bin/tex2pdf index 6eaaef6..fd99224 100755 --- a/bin/tex2pdf +++ b/bin/tex2pdf @@ -1,5 +1,6 @@ #!/bin/bash logdestination="$HOME/.log/tex2pdf.log" +already_open=$(ps aux | grep "$1.pdf" | grep -v "grep") rm -rf $logdestination touch $logdestination echo "tex2pdf called with $1.tex">>$logdestination @@ -18,8 +19,14 @@ echo "################## pdflatex, run #3 #################">>$logdestination echo "#####################################################">>$logdestination pdflatex -interaction=nonstopmode $1.tex>>$logdestination echo "#####################################################">>$logdestination -echo "Launching evince with $1.pdf.">>$logdestination -evince $1.pdf & +echo "Launching mupdf with $1.pdf.">>$logdestination + +if [ -n "$already_open" ]; then + kill "$(echo $already_open | awk '{print $2}')" + echo "Killing pid $(echo $already_open | awk '{print $2}'), which has $1.pdf open already." >>$logdestination +fi +mupdf $1.pdf & + echo "#####################################################">>$logdestination echo "Removing aux,bbl,blg,dvi,lof,log,lot,nav,out,snm,toc.">>$logdestination echo "Current directory: $(pwd) and children of depth 1.">>$logdestination -- cgit v1.2.3-70-g09d2 From 9916de26bf47b1864dc65f4d124c0390525bf173 Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 15 Feb 2015 18:39:10 +0100 Subject: tmux-mem-cpu-load: Removing static binary, in favor of using tmux-plugin-manager --- bin/tmux-mem-cpu-load | Bin 30782 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 bin/tmux-mem-cpu-load (limited to 'bin') diff --git a/bin/tmux-mem-cpu-load b/bin/tmux-mem-cpu-load deleted file mode 100755 index aeb7c7c..0000000 Binary files a/bin/tmux-mem-cpu-load and /dev/null differ -- cgit v1.2.3-70-g09d2 From 6cfbeade23c3fdf5f27885e247913ddb98d25506 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 17 Feb 2015 17:49:39 +0100 Subject: pass2vdirsyncer: Trivial script to ask for the user password on my server with first argument=user; second argument=server. --- bin/pass2vdirsyncer | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/pass2vdirsyncer (limited to 'bin') diff --git a/bin/pass2vdirsyncer b/bin/pass2vdirsyncer new file mode 100755 index 0000000..b3ec7e0 --- /dev/null +++ b/bin/pass2vdirsyncer @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +pass show sleepmap/$1@$2 -- cgit v1.2.3-70-g09d2 From c247adb535bf403441cf865101303d150cad768c Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 3 Mar 2015 19:41:08 +0100 Subject: mirssi: Updating to current server. --- bin/mirssi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/mirssi b/bin/mirssi index 7ce8257..6a9ceaa 100755 --- a/bin/mirssi +++ b/bin/mirssi @@ -7,6 +7,6 @@ PATH=$HOME/bin/:$PATH notify_irssi_server.pl &> /dev/null & pid=$! -ssh -R 7090:localhost:7090 frq +ssh -R 7090:localhost:7090 sleepmap kill $pid -- cgit v1.2.3-70-g09d2 From 6959df1fb9dd3950290cc931fab33f38cfba85a9 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 3 Mar 2015 20:08:08 +0100 Subject: rollback-profile: Changing the backup location. --- bin/rollback-profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/rollback-profile b/bin/rollback-profile index 499d13d..81386b3 100755 --- a/bin/rollback-profile +++ b/bin/rollback-profile @@ -13,7 +13,7 @@ firefoxIF=~/.mozilla/firefox/ thunderbirdIF=~/.thunderbird/ profileName=dvzrv backupEND=-rollback -OF=~/Dropbox/sync/ +OF=~/ownCloud/backup/web/ gpgEND=.gpg tgzEND=.tgz -- cgit v1.2.3-70-g09d2