From 959a6001e8817f45ffcb198d57519484bee05e74 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 31 Jan 2022 10:15:10 +0100 Subject: [PATCH 01/11] Start pipewire after i3 after dbus --- start-post-i3 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/start-post-i3 b/start-post-i3 index 567fc01..4a38efd 100755 --- a/start-post-i3 +++ b/start-post-i3 @@ -27,3 +27,6 @@ fi # Dell XPS 13" 2-in-1 xinput map-to-output "WCOM48EC:00 056A:48EC Touchscreen" eDP-1 + +# Pipewire sound +pipewire & From 541dd508b3e8acfcb4de8f9bceb35498f961dd6a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2022 08:26:43 +0100 Subject: [PATCH 02/11] update until event --- until-event | 1 + 1 file changed, 1 insertion(+) diff --git a/until-event b/until-event index 960888e..ba9314e 100755 --- a/until-event +++ b/until-event @@ -25,6 +25,7 @@ arrival="2019-08-21"; event="Master Thesis" arrival="2019-09-26"; event="Flying back from Korea" arrival="2019-12-31"; event="1387.24 instances" arrival="2020-08-01"; event="83kg" +arrival="2022-03-31"; event="79kg" export arrival event From a3350778e3c8f96c8a03c6af95dea227785bce3c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Feb 2022 13:46:10 +0100 Subject: [PATCH 03/11] updated by /home/nico/bin/sync-all-repos on nb3 --- until-event | 1 + vpn | 1 + vpn.sh | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 vpn create mode 100644 vpn.sh diff --git a/until-event b/until-event index ba9314e..05171c0 100755 --- a/until-event +++ b/until-event @@ -26,6 +26,7 @@ arrival="2019-09-26"; event="Flying back from Korea" arrival="2019-12-31"; event="1387.24 instances" arrival="2020-08-01"; event="83kg" arrival="2022-03-31"; event="79kg" +arrival="2022-05-25"; event="79kg" export arrival event diff --git a/vpn b/vpn new file mode 100644 index 0000000..792d600 --- /dev/null +++ b/vpn @@ -0,0 +1 @@ +# diff --git a/vpn.sh b/vpn.sh new file mode 100644 index 0000000..2c6e670 --- /dev/null +++ b/vpn.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# 2022-02-10, 10:25, Nico Schottelius + +set -e + +case "$1" in + lf) + sudo openconnect --protocol=gp portal.techcorpapps.com --user nschottelius + ;; + lx) + cd ~/Nextcloud/luxembourg/nico/ + sudo openvpn --config nico.ovpn + ;; + *) + echo "$0 lf lx" + ;; +esac From 10db59ca20c6660c57765002cc9a4061907a67e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2022 12:47:48 +0100 Subject: [PATCH 04/11] +vpn --- vpn | 1 - vpn.sh | 0 2 files changed, 1 deletion(-) delete mode 100644 vpn mode change 100644 => 100755 vpn.sh diff --git a/vpn b/vpn deleted file mode 100644 index 792d600..0000000 --- a/vpn +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/vpn.sh b/vpn.sh old mode 100644 new mode 100755 From 0136343f0fda8fc6178f7ec34c3b9cbed54f781a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2022 22:13:08 +0100 Subject: [PATCH 05/11] Add script to rotate screen based on sensor --- rotate-by-sensor.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 rotate-by-sensor.sh diff --git a/rotate-by-sensor.sh b/rotate-by-sensor.sh new file mode 100755 index 0000000..adfa208 --- /dev/null +++ b/rotate-by-sensor.sh @@ -0,0 +1,44 @@ +#!/bin/sh +# 2022-02-22, Nico Schottelius +# Inspired by https://gist.github.com/Links2004/5976ce97a14dabf773c3ff98d03c0f61 + +output=$(xrandr | awk '/connected primary/ { print $1 }') +input=$(xinput --list | grep -e "Pen Pen" | sed 's/.*id=\([0-9]*\).*/\1/') + +monitor-sensor | ( + while true; do + read line + ORIENTATION=$(echo $line | awk -F: '/Accelerometer orientation changed:/ { print $2 } ' | sed 's/ *//') + + # Check if we are matching on a correct line, if not, skip + if [ -z "$ORIENTATION" ]; then + continue + fi + + echo $ORIENTATION + + case "$ORIENTATION" in + normal) + rotate="normal" + matrix="1 0 0 0 1 0 0 0 1" + ;; + bottom-up) + rotate="inverted" + matrix="-1 0 1 0 -1 1 0 0 1" + ;; + right-up) + rotate="right" + matrix="0 1 0 -1 0 1 0 0 1" + ;; + left-up) + rotate="left" + matrix="0 -1 1 1 0 0 0 0 1" + ;; + esac + +# set -x + xrandr --output ${output} --rotate ${rotate} + xinput set-prop ${input} 'Coordinate Transformation Matrix' ${matrix} +# set +x + done +) From 42cf4c291a3d60e9f05f24fe964497cf6a7ff33b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2022 18:12:30 +0100 Subject: [PATCH 06/11] sync-all-repos: static ones only by default --- sync-all-repos | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync-all-repos b/sync-all-repos index 881f624..5772a27 100755 --- a/sync-all-repos +++ b/sync-all-repos @@ -1,9 +1,9 @@ #!/bin/sh -onlystatic="" +onlystatic="yes" if [ $# -ge 1 ]; then - onlystatic=yes + onlystatic="" fi set -e From 72fa4f22d070a34e7722023316d2278e80c43050 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2022 19:33:39 +0100 Subject: [PATCH 07/11] Add script for monitoring machines to keep the screen on --- screen-always-on | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 screen-always-on diff --git a/screen-always-on b/screen-always-on new file mode 100644 index 0000000..43ab036 --- /dev/null +++ b/screen-always-on @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $# -ge 1 ]; then + xset +dpms + xautolock -enable +else + xset -dpms + xautolock-disable +fi From a75840ebb775e18bd8d1150b486ce940e47f577d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 13 Apr 2022 19:05:39 +0200 Subject: [PATCH 08/11] stva.sh: add filter --- stva.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stva.sh b/stva.sh index 006c4bd..929a174 100755 --- a/stva.sh +++ b/stva.sh @@ -9,7 +9,7 @@ newfile=~/.stva-new oldfile=~/.stva-cur while [ "$new_data" ]; do - new_data=$(curl -Ls https://e-schild.stva.gl.ch/?page=${i} | \ + new_data=$(curl -Ls "https://e-schild.stva.gl.ch/?page=${i}&category=1" | \ grep 'GL' | sed 's/.*GL //') if [ "$new_data" ]; then From 795c7d5d8139eb93e560d3d2b95795ae8641b96a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 20 Apr 2022 11:50:45 +0200 Subject: [PATCH 09/11] updated by /home/nico/bin/sync-all-repos on mirror1 --- screen-always-on | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 screen-always-on diff --git a/screen-always-on b/screen-always-on old mode 100644 new mode 100755 From cabfa1a981196bd84895e06d6da848a35c8e2611 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 8 May 2022 20:13:48 +0200 Subject: [PATCH 10/11] +i3right/i3left --- i3left | 3 +++ i3right | 3 +++ 2 files changed, 6 insertions(+) create mode 100755 i3left create mode 100755 i3right diff --git a/i3left b/i3left new file mode 100755 index 0000000..bc86b83 --- /dev/null +++ b/i3left @@ -0,0 +1,3 @@ +#!/bin/sh + +i3 move workspace to output left diff --git a/i3right b/i3right new file mode 100755 index 0000000..2f5dbd4 --- /dev/null +++ b/i3right @@ -0,0 +1,3 @@ +#!/bin/sh + +i3 move workspace to output right From 64e6d2a5c4f16446cd768ddb097975dd949a488b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 9 May 2022 09:55:07 +0200 Subject: [PATCH 11/11] Add script to enable monitors on the left and on the right --- x-left-right | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 x-left-right diff --git a/x-left-right b/x-left-right new file mode 100755 index 0000000..a44a4df --- /dev/null +++ b/x-left-right @@ -0,0 +1,4 @@ +#!/bin/sh + +xrandr --output DP3 --auto --left-of eDP1 +xrandr --output DP2 --auto --right-of eDP1