INIT - add script, bin & README
This commit is contained in:
commit
6fc70141fc
3
README
Normal file
3
README
Normal file
@ -0,0 +1,3 @@
|
||||
# Install
|
||||
|
||||
[[ -z $(cat ~/bin/dwm-scripts/autostart.sh | grep monitor-rotate) ]] && echo "$(realpath monitor-rotate) &" | tee -a /home/guillaume/bin/dwm-scripts/autostart.sh
|
||||
BIN
autorotate
Executable file
BIN
autorotate
Executable file
Binary file not shown.
19
monitor-rotate
Executable file
19
monitor-rotate
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
export DISPLAY=:0
|
||||
Bin=$(dirname $0)/autorotate
|
||||
|
||||
while IFS= read -r line
|
||||
do
|
||||
if [[ ! -z $(echo $line | grep changed | grep -E "normal|right-up|left-up|bottom-up") ]]
|
||||
then
|
||||
tOrientation=$(echo $line | awk '{print $NF}')
|
||||
case $tOrientation in
|
||||
normal) ${Bin} normal --display eDP-1;;
|
||||
right-up) ${Bin} right --display eDP-1;;
|
||||
left-up) ${Bin} left --display eDP-1;;
|
||||
bottom-up) ${Bin} invert --display eDP-1;;
|
||||
esac
|
||||
|
||||
fi
|
||||
done < <(monitor-sensor)
|
||||
Loading…
x
Reference in New Issue
Block a user