Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add keyword instructions for tablet input devices #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 36 additions & 3 deletions pages/Configuring/Keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,49 @@ Inside of it, put your config options. All options from the `input` category

force_no_accel, follow_mouse, float_switch_override_focus

Properties that change names:
Properties that change names according to the device name:

```plain
touchdevice:transform -> transform
touchdevice:output -> output
<touchdevice>:transform -> transform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats with the <>?

I'd just do touchdevice:transform, tablet:transform -> transform

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the <> is to indicate that it's a placeholder for the actual device name. If found that it is sometimes unclear in the wiki where verbatim text is meant and where a placeholder is meant, which is especially confusing for words that could be used as class names. So I believe that we should indicate placeholders as such, if there's a better way how I'm all ear ;).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk what I proposed seems clearer. The wiki shows what global options change names.

<touchdevice>:output -> output
```

where `<touchdevice>` is again the device as obtained by `hyprctl devices`.

Example for tablet with touch screen and stylus:
```plain
> hyprctl devices
ppenguin marked this conversation as resolved.
Show resolved Hide resolved
...
Tablets:
Tablet at 2a54080:
elan2514:00-04f3:29f5-stylus


Touch:
Touch Device at 2b53430:
elan2514:00-04f3:29f5
...
```

you can rotate the screen, touch and stylus together dynamically by doing
```bash
hyprctl --batch "keyword device:elan2514:00-04f3:29f5:transform 1 ; keyword device:elan2514:00-04f3:29f5-stylus:transform 1 ; keyword monitor eDP-1,transform,1"
```

(If you combine the above with [iio-sensor-proxy](https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/) you can easily achieve fully automatic rotation for tablets/2-in-1
based on the acceleration sensor. [Example one-liner to run as a user-service](https://github.com/ppenguin/nixos-modules/blob/main/home-manager/iiorient.nix#L3)).

You can also use the `output` setting for tablets to bind them to outputs. Remember to
use the name of the `Tablet` and not `Tablet Pad` or `Tablet tool`.

E.g. for the above touch screen in a portrait orientation, you could write:
```ini
device:elan2514:00-04f3:29f5 {
transform=1
output=eDP-1
}
```

Additional properties only present in per-device configs:
```plain
enabled -> (only for mice / touchpads / keyboards) enables / disables the device (connects / disconnects from the on-screen cursor) - default: Enabled
Expand Down