Merge branch 'master' of code.ungleich.ch:nico/nsbin
This commit is contained in:
commit
ba3f8a8d25
|
@ -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
|
||||||
|
)
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# -ge 1 ]; then
|
||||||
|
xset +dpms
|
||||||
|
xautolock -enable
|
||||||
|
else
|
||||||
|
xset -dpms
|
||||||
|
xautolock-disable
|
||||||
|
fi
|
|
@ -27,3 +27,6 @@ fi
|
||||||
|
|
||||||
# Dell XPS 13" 2-in-1
|
# Dell XPS 13" 2-in-1
|
||||||
xinput map-to-output "WCOM48EC:00 056A:48EC Touchscreen" eDP-1
|
xinput map-to-output "WCOM48EC:00 056A:48EC Touchscreen" eDP-1
|
||||||
|
|
||||||
|
# Pipewire sound
|
||||||
|
pipewire &
|
||||||
|
|
2
stva.sh
2
stva.sh
|
@ -9,7 +9,7 @@ newfile=~/.stva-new
|
||||||
oldfile=~/.stva-cur
|
oldfile=~/.stva-cur
|
||||||
|
|
||||||
while [ "$new_data" ]; do
|
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 '<td>GL' | sed 's/.*<td>GL //')
|
grep '<td>GL' | sed 's/.*<td>GL //')
|
||||||
|
|
||||||
if [ "$new_data" ]; then
|
if [ "$new_data" ]; then
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
onlystatic=""
|
onlystatic="yes"
|
||||||
|
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
onlystatic=yes
|
onlystatic=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
|
@ -25,6 +25,8 @@ arrival="2019-08-21"; event="Master Thesis"
|
||||||
arrival="2019-09-26"; event="Flying back from Korea"
|
arrival="2019-09-26"; event="Flying back from Korea"
|
||||||
arrival="2019-12-31"; event="1387.24 instances"
|
arrival="2019-12-31"; event="1387.24 instances"
|
||||||
arrival="2020-08-01"; event="83kg"
|
arrival="2020-08-01"; event="83kg"
|
||||||
|
arrival="2022-03-31"; event="79kg"
|
||||||
|
arrival="2022-05-25"; event="79kg"
|
||||||
|
|
||||||
|
|
||||||
export arrival event
|
export arrival event
|
||||||
|
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
xrandr --output DP3 --auto --left-of eDP1
|
||||||
|
xrandr --output DP2 --auto --right-of eDP1
|
Loading…
Reference in New Issue