Git Product home page Git Product logo

rot8-ext's Introduction

rot8

automatic display rotation using built-in accelerometer

Automatic rotate modern Linux desktop screen and input devices. Handy for convertible touchscreen notebooks like HP Spectre x360, Lenovo IdeaPad Flex or Linux phone like Pinephone.

Compatible with sway and X11.

installation

packages

Available in:

Arch User Repository: rot8-git

Void Package: rot8

manually build from source

Rust language and the cargo package manager are required to build the binary.

$ git clone https://github.com/efernau/rot8
$ cd rot8 && cargo build --release
$ cp target/release/rot8  /usr/bin/rot8

or

$ cargo install rot8

usage

For Sway map your input to the output device:


$ swaymsg input <INPUTDEVICE> map_to_output <OUTPUTDEVICE>

Call rot8 from sway configuration file ~/.config/sway/config:


exec rot8

For X11 set Touchscreen Device


rot8 --touchscreen <TOUCHSCREEN>

This will start the daemon running, continuously checking for rotations.

There are the following args (defaults):


--sleep                 // Set millis to sleep between rotation checks (500)
--display               // Set Display Device (eDP-1)
--touchscreen           // Set Touchscreen Device X11, allows multiple devices (ELAN0732:00 04F3:22E1)
--keyboard              // Set keyboard to deactivate upon rotation, for Sway only
--threshold             // Set a rotation threshold between 0 and 1, higher is more sensitive (0.5)
--normalization-factor  // Set factor for sensor value normalization (1e6)
--invert-x              // Invert readings from the HW x axis
--invert-y              // Invert readings from the HW y axis
--invert-z              // Invert readings from the HW z axis
--oneshot               // Updates the screen rotation just once instead of continuously
--beforehooks           // Execute a custom script before rotation
--hooks                 // Execute a custom script after the rotation has finished
--version               // Returns the rot8 version

You may need to play with the normalization factor (try multiples of 10) and the axis inversions to get the accelerometer readings to calculate right.

rot8-ext's People

Contributors

deadly-platypus avatar dependabot[bot] avatar efernau avatar juanbono avatar markjonestx avatar mirrexagon avatar mnussbaum avatar nicola-sorace avatar seandlg avatar sidju avatar vassili-dev avatar vifino 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.