Page 1 of 1
how to enable rotating display asus t101ha?
Posted: Mon Sep 13, 2021 12:16 pm
by ghoen
I have a possible simple question.
What is the trick to rotate the display of a asus t101ha.
when I boot easys os dunfell then it starts in tablet mode, functions without a problem.
The asus has a keyboard attachted, so it is possible to use it also in a laptop mode.
But I can not find the solution to rotate the screen.
Anybody here with a suggestion.
Kind regards.
Re: how to enable rotating display asus t101ha?
Posted: Mon Sep 13, 2021 11:45 pm
by BologneChe
@ghoen
Try with Zarfy (maybe).
Re: how to enable rotating display asus t101ha?
Posted: Tue Sep 14, 2021 5:27 am
by stemsee
You could also use mY script 'mounter-rotator', which controls rotation also of touchscreen, display, and touchpad independently.
viewtopic.php?f=106&t=2854
- mt.png (9.96 KiB) Viewed 1004 times
Code: Select all
#!/bin/sh
[[ "`whoami`" != "root" ]] && exec sudo -E -S ${0} "$\""
running=`ps -e | grep rotate | wc -l`
[[ "$running" -gt 2 ]] && exit #check if running, one instance only
export TRANSFORM='Coordinate Transformation Matrix'
export OUTPUT_CHARSET=UTF-8
mkfifo -m755 /tmp/RPIPE
exec 3<> /tmp/RPIPE
export connected=`xrandr | grep connected | cut -f1 -d' ' | head -1`
function left (){
events=$(cat /etc/rotate_events)
export touch=`echo "$events" | cut -f2 -d' '`
export pad=`echo "$events" | cut -f1 -d' '`
xrandr --output "$connected" --rotate left
xinput set-prop "$touch" "Evdev Axis Inversion" 0, 1
xinput set-prop "$touch" "Evdev Axes Swap" 1
xinput set-prop "$pad" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
xinput set-prop "$touch" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
echo "left" >/etc/rotate
echo "tooltip:left" >>/tmp/RPIPE
}; export -f left
function right (){
events=$(cat /etc/rotate_events)
export touch=`echo "$events" | cut -f2 -d' '`
export pad=`echo "$events" | cut -f1 -d' '`
xrandr --output "$connected" --rotate right
xinput set-prop "$touch" "Evdev Axis Inversion" 0, 1
xinput set-prop "$touch" "Evdev Axes Swap" 1
xinput set-prop "$pad" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
xinput set-prop "$touch" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
echo "right" >/etc/rotate
echo "tooltip:right" >>/tmp/RPIPE
}; export -f right
function inverted (){
events=$(cat /etc/rotate_events)
touch=`echo "$events" | cut -f2 -d' '`
pad=`echo "$events" | cut -f1 -d' '`
xrandr --output "$connected" --rotate inverted
xinput set-prop "$touch" "Evdev Axis Inversion" 1, 1
xinput set-prop "$touch" "Evdev Axes Swap" 0
xinput set-prop "$pad" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
xinput set-prop "$touch" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
echo "inverted" >/etc/rotate
echo "tooltip:inverted" >>/tmp/RPIPE
}; export -f inverted
function normal (){
events=$(cat /etc/rotate_events)
touch=`echo "$events" | cut -f2 -d' '`
pad=`echo "$events" | cut -f1 -d' '`
xrandr --output "$connected" --rotate normal
xinput set-prop "$touch" "Evdev Axis Inversion" 0, 0
xinput set-prop "$touch" "Evdev Axes Swap" 0
xinput set-prop "$pad" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
xinput set-prop "$touch" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
echo "normal" >/etc/rotate
echo "tooltip:normal" >>/tmp/RPIPE
}; export -f normal
function on_exit (){
rm -f /tmp/RPIPE
}
export -f on_exit
trap "bash -c 'on_exit'" EXIT
( sleep 1; echo "icon:/usr/share/pixmaps/normal.png" >> /tmp/RPIPE ) &
function maingui (){
export WINDOWTITLE="Mounter_Rotator"
sayonara 8 &
yad --center \
--form --item-separator='#' \
--field="Mount:FBTN" "bash -c \"mkdir -p "%3"; mount "%2" "%3" \"" \
--field="Partition:CBE" "`fdisk -l | grep dev | grep -v Disk | awk '{print $1}' | tr '\n' '#'``blkid -o device | tr '\n' '#'`" \
--field="Mount Dir:CBE" `ls /mnt | sed 's|^|/mnt/|g' | tr '\n' '#'``ls /media | sed 's|^|/media/|g' | tr '\n' '#'``ls /aufs | sed 's|^|/aufs/|g' | tr '\n' '#'` \
--field="un-Mount:FBTN" "bash -c \"umount -f -A "%2"; umount -f -A "%3" \"" \
--field="Xinput Events:TXT" "`xinput`" \
--field="touchpad event id=:NUM" "`cat /etc/rotate_events | cut -f1 -d' '`" \
--field="Touchscreen event id=:NUM" "`cat /etc/rotate_events | cut -f2 -d' '`" \
--field="Rotate left:FBTN" "bash -c \"left \"" \
--field="Rotate right:FBTN" "bash -c \"right \"" \
--field="Rotate normal:FBTN" "bash -c \"normal \"" \
--field="Rotate inverted:FBTN" "bash -c \"inverted \"" \
--field="Store Events:FBTN" "bash -c \"echo "%6" "%7" >/etc/rotate_events \"" \
--no-buttons \
--title="$WINDOWTITLE" --window-icon="gtk-refresh" \
--geometry="$(cat /root/.config/geometry/$WINDOWTITLE)" &
}; export -f maingui
yad --notification --listen --text="Rotate Screen: left Click for Normal Orientation" --tray-icon="/usr/share/pixmaps/normal.png" --command="bash -c normal" --menu="Rotate Left!bash -c left!/usr/share/pixmaps/left.png|Rotate right!bash -c right!/usr/share/pixmaps/right.png|Rotate Inverted!bash -c inverted!/usr/share/pixmaps/inverted.png|GUI!bash -c maingui!gtk-open|Close!quit!gtk-cancel" <&3