This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adriano@adriano-Intel-powered-classmate-PC:~$ systemctl status iio-sensor-proxy | |
● iio-sensor-proxy.service - IIO Sensor Proxy service | |
Loaded: loaded (/lib/systemd/system/iio-sensor-proxy.service; static; vendor preset: enabled) | |
Active: inactive (dead) since Fri 2020-06-05 12:23:30 WEST; 2min 5s ago | |
Process: 612 ExecStart=/usr/sbin/iio-sensor-proxy (code=killed, signal=TERM) | |
Main PID: 612 (code=killed, signal=TERM) | |
jun 05 12:22:56 adriano-Intel-powered-classmate-PC systemd[1]: iio-sensor-proxy.service: Service h> | |
jun 05 12:22:58 adriano-Intel-powered-classmate-PC systemd[1]: iio-sensor-proxy.service: Service h> | |
jun 05 12:23:05 adriano-Intel-powered-classmate-PC systemd[1]: iio-sensor-proxy.service: Service h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Application | |
Name=AutoRotate | |
Exec=/usr/local/bin/auto_screen_rotation.sh | |
Terminal=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Auto read accelerometer data stream | |
# OEM install shutdown iio-sensor-proxy service | |
# Avoid need restart system after OEM Install | |
STATUS="$(systemctl is-active iio-sensor-proxy.service)" | |
if [ "${STATUS}" = "active" ]; then | |
echo "iio-sensor-proxy.service is active" | |
else | |
echo "iio-sensor-proxy.service is not active" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Auto read accelerometer data stream | |
[Service] | |
Type=simples | |
Restart=always | |
RestartSec=1 | |
user=root | |
ExecStart=/usr/local/bin/auto_accel_read.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Get input device info | |
# This script parse the output of command: | |
# /proc/bus/input/devices | |
# | |
# How to use: | |
# . /input-device-info.sh | |
# MY_DEVICE_PATH=$(inputDeviceEventHandlerPath "my-device-name") | |
# echo 'MY_DEVICE_PATH:' ${MY_DEVICE_PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Auto rotate screen based on device orientation | |
# Receives input from monitor-sensor (part of iio-sensor-proxy package) | |
# Screen orientation is set based upon accelerometer position | |
# This script should be added to startup applications for the user | |
# Rotates modern Linux desktop screen and input devices to match. Handy for | |
# convertible notebooks. Call this script from panel launchers, keyboard | |
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.). |