From fdca1b712c9d62213de1002a02b040fa66bfc0f1 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 18 Sep 2020 15:21:29 +0200 Subject: update --- bin/backup | 2 +- bin/backup-clean | 6 +++--- bin/hdmi | 1 + bin/stbip | 7 +++++++ 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 bin/stbip (limited to 'bin') diff --git a/bin/backup b/bin/backup index d56ee7f..72c69c3 100755 --- a/bin/backup +++ b/bin/backup @@ -31,6 +31,6 @@ shift $((OPTIND - 1)) [ "$1" ] && cmd=$1 && shift || cmd="" case $cmd in (""|save) backup ;; -(clean) exec backup-clean ${optv+-$optv} "$@" "$dest";; +(clean) exec backup-clean ${optv+-$optv} "$dest";; (diff) exec diffdir "$@";; esac diff --git a/bin/backup-clean b/bin/backup-clean index d12159d..0c6e38a 100755 --- a/bin/backup-clean +++ b/bin/backup-clean @@ -54,15 +54,15 @@ retention_delay() { } dest=/.history -while getopts :nd:v opt; do +while getopts :nv opt; do case $opt in - (d) dest=$OPTARG ;; (n) optn=1 ;; (v) optv=1 ;; - (*) echo "Usage: $0 [-nv] [-d dir]"; exit 1; + (*) echo "Usage: $0 [-nv] [dir]"; exit 1; esac done shift $((OPTIND - 1)) +[ "$1" ] && dest=$1 # Sorted list of backups, most recent first. lbu=$(ls -rv "$dest") diff --git a/bin/hdmi b/bin/hdmi index f5f7b1f..75e6f37 100755 --- a/bin/hdmi +++ b/bin/hdmi @@ -2,6 +2,7 @@ # Toggle auxiliary HDMI screen on/off when connected/disconnected. opt="--auto --right-of eDP-1" +#opt="--auto --above eDP-1" # Also add the following rule to /etc/udev/rules.d/hdmi.rules # KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi" diff --git a/bin/stbip b/bin/stbip new file mode 100755 index 0000000..e4a51a0 --- /dev/null +++ b/bin/stbip @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check or establish a ssh tunnel for remote acess to syncthing GUI on bip. +netstat -t4ln | grep 9090 || + ssh -N -L 9090:127.0.0.1:8384 bip.im /dev/null 2>&1 & + +xdg-open http://127.0.0.1:9090 -- cgit v1.2.3