summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbackup-lima1
-rwxr-xr-xf7-script.sh11
-rwxr-xr-xsibsac-vpn16
-rwxr-xr-xtouchpadd-toggle.sh7
4 files changed, 16 insertions, 19 deletions
diff --git a/backup-lima b/backup-lima
index 5bece8b..e1557d9 100755
--- a/backup-lima
+++ b/backup-lima
@@ -10,6 +10,7 @@ DEST=anton@bonn:/mnt/mirror/backup/lima
echo /dev
echo /home/anton/Music
echo /home/anton/Videos
+ echo /home/anton/VirtualBox VMs/
echo /home/anton/.cache
echo /home/anton/.thumbnails
echo /home/anton/.local/share/Trash
diff --git a/f7-script.sh b/f7-script.sh
index 6607b0c..0f2d2d6 100755
--- a/f7-script.sh
+++ b/f7-script.sh
@@ -2,8 +2,8 @@
set -e
-INTERNAL=LVDS1
-EXTERNAL=HDMI1
+INTERNAL=$(xrandr --query | gawk '/^LVDS[0-9] connected /{ print $1; exit }')
+EXTERNAL=$(xrandr --query | gawk '!/^LVDS[0-9]/ && / connected /{print $1; exit }')
show_usage() {
cat <<END
@@ -26,6 +26,7 @@ screen_external() {
}
screen_internal() {
xrandr --output "$INTERNAL" --auto
+ xrandr --output "$EXTERNAL" --off
}
screen_mirror() {
xrandr --output "$INTERNAL" --auto
@@ -52,6 +53,10 @@ screen_toggle() {
screen_get_state() {
SCREEN="$1"
+ if [ -z "$SCREEN" ] ; then
+ echo ""
+ return
+ fi
xrandr --query | grep "^$SCREEN"
#xrandr --query | grep "^$SCREEN" | grep connected | sed 's/.*connected\s*\([^ ]\+\).*/\1/' | grep -o '[0-9]*x[0-9]*' || echo
}
@@ -68,7 +73,7 @@ EXTERNAL_STATE=$(screen_get_state "$EXTERNAL")
EXTERNAL_CONNECTED=$(is_connected "$EXTERNAL_STATE")
if [ -z "$EXTERNAL_CONNECTED" ] ; then
- echo "External monitor $EXTERNAL not connected." >&2
+ screen_internal
exit 0
fi
diff --git a/sibsac-vpn b/sibsac-vpn
deleted file mode 100755
index d139a42..0000000
--- a/sibsac-vpn
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-set -e
-
-echo Connection to the VPN
-sudo /usr/sbin/vpnc sibsac
-
-echo Press any key to disconnect ...
-
-read $disconnect
-
-echo Disconnection from the VPN
-sudo /usr/sbin/vpnc-disconnect
-
-echo VPN should now be disconnected
-
diff --git a/touchpadd-toggle.sh b/touchpadd-toggle.sh
new file mode 100755
index 0000000..368158f
--- /dev/null
+++ b/touchpadd-toggle.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ $(synclient -l | grep TouchpadOff | awk '{ print $3 }') = 1 ] ; then
+ synclient touchpadoff=0
+else
+ synclient touchpadoff=1
+fi