hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
17.4k stars 718 forks source link

Touch mapping issue #6054

Open Kwanky-Millet opened 2 weeks ago

Kwanky-Millet commented 2 weeks ago

Description

Hey. I have a laptop with two touchscreens and the touches aren't mapped correctly. Regardless of the touchdevice, the touch gets registered on the active monitor.

I got some support from the discord server and they mentioned that it isn't currently possible to map multiple tablets and that I should open an issue here.

This is my hyprctl devices output:

mice:
    Mouse at 5a6e68678e80:
        elan1406:00-04f3:3101-mouse
            default speed: 0.00000
    Mouse at 5a6e684b42c0:
        elan1406:00-04f3:3101-touchpad
            default speed: 0.00000
    Mouse at 5a6e694ff220:
        logitech-g304-1
            default speed: 0.00000

Keyboards:
    Keyboard at 5a6e68624a50:
        power-button
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e6867a530:
        video-bus
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e68614910:
        video-bus-1
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e68642530:
        power-button-1
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e68628ca0:
        elan1406:00-04f3:3101-keyboard
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e687ee780:
        asus-wmi-hotkeys
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e68864590:
        at-translated-set-2-keyboard
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e687dd800:
        asus-touchpad/numpad
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: no
    Keyboard at 5a6e68779e80:
        logitech-g304
            rules: r "", m "", l "us", v "", o ""
            active keymap: English (US)
            main: yes

Tablets:
    Tablet at 5a6e684e2390:
        elan9008:00-04f3:29b6-stylus
            size: 342.7096774193548x194.06451612903226mm
    Tablet at 5a6e67bd5d80:
        elan9009:00-04f3:29a1-stylus
            size: 342.7096774193548x97.52380952380952mm

Touch:
    Touch Device at 5a6e6843a2b0:
        elan9008:00-04f3:29b6
    Touch Device at 5a6e683ef170:
        elan9009:00-04f3:29a1

Switches:
    Switch Device at 5a6e68595610:
        Lid Switch

Thanks in advance!

vaxerski commented 2 weeks ago

config? Also are you on git?

Kwanky-Millet commented 2 weeks ago

Nope, pacman. Is it preferred to use git?

Config file:

#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,3840x2160,0x0,2
monitor=DP-2,3840x1100,0x1080,2

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
exec-once = waybar

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# Some default env vars.
env = XCURSOR_SIZE,24

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 10

    blur {
        enabled = true
        size = 3
        passes = 1
    }

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = true
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = off
}

misc {
    disable_hyprland_logo = true
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = Alt

# System keybinds

# Shutdown system
bind = $mainMod SHIFT, Escape, exec, poweroff
bind = $mainMod, Escape, exec, reboot

# Set brightness using brightnessctl
binde = , XF86MonBrightnessUp, exec, brightnessctl set +5%
binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
binde = SHIFT, XF86MonBrightnessUp, exec, brightnessctl set +1%
binde = SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%-

# Set volume and mic using pactl
binde = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%
binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%
binde = SHIFT, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
binde = SHIFT, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%

# Capture screenshots with grim
bind = , Print, exec, grim -o eDP-1
bind = SHIFT, Print, exec, grim -g "$(slurp)"
bind = $mainMod, Print, exec, grim -o eDP-1 - | wl-copy

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod SHIFT, E, exit,
bind = $mainMod, V, togglefloating,

# Move focus with mainMod + arrow/vi keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d

# Move windows with mainMod SHIFT + arrow/vi keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, h, movewindow, l
bind = $mainMod SHIFT, l, movewindow, r
bind = $mainMod SHIFT, k, movewindow, u
bind = $mainMod SHIFT, j, movewindow, d

# Toggle active with mainMod + Tab keys
bind = $mainMod, Tab, cyclenext
bind = $mainMod, Tab, bringactivetotop

# Toggle fullscreen wirh mainMod + F keys
bind = $mainMod, F, fullscreen

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Getting required variables
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

# Getting numpad service started
exec-once=sudo systemctl start asus_touchpad_numpad.service

# App keybinds
bind = $mainMod, Return, exec, alacritty
bind = $mainMod SHIFT, F, exec, mullvad-browser
bind = $mainMod SHIFT, D, exec, webcord
bind = $mainMod SHIFT, C, exec, chromium -incognito
vaxerski commented 2 weeks ago

well it would be nice to test on git because there is a chance its fixed there already

Kwanky-Millet commented 2 weeks ago

Sure, thanks. I will try that in a couple of weeks (post my exams) and get back to you.