Git Product home page Git Product logo

thinkpad-yoga-scripts's Introduction

thinkpad-yoga-scripts

A collection of scripts and systemd units to restore functionality of the Lenovo ThinkPad Yoga S1.

These are different from other scripts in that the screen rotation is automated with use of the inbuilt accelerometer. Also, acpid is not used in order to toggle between tablet mode but rather binding to the inbuilt switches.

Tested on Arch Linux with MATE, KDE 4.14, Gnome 3.14. See customization.

Scripts should fix:

  • Screen rotation with accelerometer, including touchscreen, Wacom, and Touchpad/TrackPoint geometries

  • Disabling of Touchscreen with proximity of Wacom digitizer

  • Disabling of Clickpad and TrackPoint when moving to tablet mode

Usage/Customization:

Assuming installed as per the PKGBUILD

Depending whether or not your DE rotates the Wacom orientation with the screen automatically edit the following file accordingly:

/opt/thinkpad-yoga-scripts/rotate/thinkpad-rotate.py

If you want to use an onscreen keyboard other than onboard, or disable opening of any keyboard when moving into tablet mode edit:

/opt/thinkpad-yoga-scripts/tablet/mouse-toggle.sh

If your home directory is not in /home/ or your .Xauthority file is located somewhere other than your home directory you will need to edit the systemd modules. Likewise if your tablets display is not :0.

TODO:

  • Test on different desktop environments (You can help!)

Dependencies

  • xrandr
  • xinput
  • xbindkeys
  • kbd (for setkeycodes)
  • systemd
  • gawk
  • xsetwacom (optional for wacom rotation)
  • onboard (optional for onscreen keyboard)

Manual installation

sudo -s
git clone https://github.com/admiralakber/thinkpad-yoga-scripts /opt/thinkpad-yoga-scripts
cp /opt/thinkpad-yoga-scripts/systemd/* /usr/lib/systemd/system/

systemctl start [email protected]
systemctl start [email protected]
systemctl start yoga-tablet.service

thinkpad-yoga-scripts's People

Contributors

admiralakber avatar ianalis avatar oggy- avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.