Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/bin/bash #Tablet mode for Acer R11 Chromebook running Linux #Copyright Kris Occhipinti #http://filmsbykris.com #August 4th 2019 # License GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt #xinput list state_file="$HOME/.tablet_state" device="Elan Touchscreen" if [ ! -f "$state_file" ];then echo "0" > "$state_file" fi state="$(cat $state_file)" #Portrait (left) if [ "$state" = "0" ];then echo "1" > "$state_file" #rotate screen xrandr -o left #rotate mouse xinput set-prop "$device" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 xinput set-prop "$device" --type=float "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 #disable keyboard and touchpad xinput --disable "$(xinput|grep "AT Translated Set 2 keyboard"|cut -d\= -f2|cut -f1)" xinput --disable "$(xinput|grep "Elan Touchpad"|cut -d\= -f2|cut -f1)" else #landscape (normal) echo "0" > "$state_file" xrandr -o normal xinput set-prop "$device" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0 xinput set-prop "$device" --type=float "Coordinate Transformation Matrix" 0 0 0 0 0 0 0 0 0 #enable keyboard and touchpad xinput --enable "$(xinput|grep "AT Translated Set 2 keyboard"|cut -d\= -f2|cut -f1)" xinput --enable "$(xinput|grep "Elan Touchpad"|cut -d\= -f2|cut -f1)" fi
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)