summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2020-09-18 15:21:29 +0200
committerMarc Vertes <mvertes@free.fr>2020-09-18 15:21:29 +0200
commitfdca1b712c9d62213de1002a02b040fa66bfc0f1 (patch)
treeb0d52ff09035faf2dd0831cf1a06433fb85cbe07 /bin
parentea18410af09ef8ef4f044079a72c82b2d41151a4 (diff)
update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/backup2
-rwxr-xr-xbin/backup-clean6
-rwxr-xr-xbin/hdmi1
-rwxr-xr-xbin/stbip7
4 files changed, 12 insertions, 4 deletions
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 >/dev/null 2>&1 &
+
+xdg-open http://127.0.0.1:9090