Merge branch 'master' of code.ungleich.ch:nico/nsbin
This commit is contained in:
commit
ba3f8a8d25
10 changed files with 88 additions and 3 deletions
3
i3left
Executable file
3
i3left
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
i3 move workspace to output left
|
3
i3right
Executable file
3
i3right
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
i3 move workspace to output right
|
44
rotate-by-sensor.sh
Executable file
44
rotate-by-sensor.sh
Executable file
|
@ -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
|
||||
)
|
9
screen-always-on
Executable file
9
screen-always-on
Executable file
|
@ -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
|
||||
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
|
||||
|
||||
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 //')
|
||||
|
||||
if [ "$new_data" ]; then
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
onlystatic=""
|
||||
onlystatic="yes"
|
||||
|
||||
if [ $# -ge 1 ]; then
|
||||
onlystatic=yes
|
||||
onlystatic=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
|
|
@ -25,6 +25,8 @@ 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"
|
||||
arrival="2022-05-25"; event="79kg"
|
||||
|
||||
|
||||
export arrival event
|
||||
|
|
17
vpn.sh
Executable file
17
vpn.sh
Executable file
|
@ -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
|
4
x-left-right
Executable file
4
x-left-right
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrandr --output DP3 --auto --left-of eDP1
|
||||
xrandr --output DP2 --auto --right-of eDP1
|
Loading…
Reference in a new issue