Comments (3)
Still WIP, but I've made some changes to accommodate PineTab and similar devices:
Use the correct accelerometer value scale
Not all devices have the accelerometer raw values between 0 and 1 (e.g. PineTab). The correct scale is accessible via sysfs.
Revamped keyboard mode system
I added --keyboard-mode
, which can be one of:
integrated
: The keyboard is an integral part of the device. We will disable the keyboard when the screen is not oriented upright.detachable
: The keyboard is detachable. We will keep the screen oriented upright when the keyboard is attached.none
: We won't touch your keyboard.
After-rotation hook (#4)
You can specify a command to be run in shell after rotation with --rotate-hook
. Useful for forcing a restart of Polybar, for example.
from rot8.
I also have issues with the accelerometer value scale. For my hw (Lenovo Yoga 920), /sys/bus/iio/devices/iio\:device0/in_accel_scale
contains 0.009806650
I believe all that's necessary is to replace / 1e6
with a multiplication of whatever value is read from in_accel_scale
:
Lines 260 to 262 in b7b42d9
Edit: Actually, it should be (raw + offset) * scale
from rot8.
thanks for your commit, sadly not merged.
your problem should now be solved with --normalization-factor
and --invert-y
. the idea with the after-rotation hook and the keybord mode should be implemented. but the change of -k
would be a braking change, see this in the planned rewrite version 0.2.0.
from rot8.
Related Issues (20)
- Multiple -i arguments for Xorg HOT 2
- Not rotating with sway on Surface 3 (non pro) - DSI-1 HOT 3
- Panic on backend HOT 4
- Rotation is off by 180 degrees when in portrait HOT 2
- 'Unable to deserialize swaymsg JSON output' HOT 6
- Packaging for Guix but got issues testing the binary HOT 2
- Finding PID of Xorg is not robust HOT 1
- Errors compiling release build due to strip cargo feature HOT 1
- package availability
- Can't set touchscreen HOT 6
- How to run rot8 on startup? (sway) HOT 10
- Consider the wlr-output-management protocol over swaymsg HOT 3
- Rotation is not applied to the stylus HOT 5
- configuration clarification HOT 2
- (pre)hooks don't work on long-run commands
- `rot8 --oneshot` does not work
- Touchscreen rotation does not trigger the touch calibration HOT 1
- Error: "Failed to get current display rotation" HOT 1
- Configurable/variable rotation thresholds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rot8.