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

[SDDM] Touchpad tap to select #1084

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kRHYME7
Copy link
Collaborator

@kRHYME7 kRHYME7 commented Mar 14, 2024

MERGE REQUEST

Full discussion at #1081

For laptop/touchpad users:

  • tap to select an option

Here's the list added to the xorg.conf.d/

Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
Option "NaturalScrolling" "on"
Option "MiddleEmulation" "on"
Option "DisableWhileTyping" "on"

@sandeng1440
Copy link

It looks good. I believe that libinput is already a dependency for something else in Hyprdots, so this should do it.

@prasanthrangan
Copy link
Owner

is this only valid for x11?? what if you set it to wayland, will this be necessary??

@sandeng1440
Copy link

sandeng1440 commented Mar 16, 2024

@prasanthrangan
Yes it's only valid for X11 For wayland there's a different way to solve it. I haven't done enough reading on it to know exactly how to solve for wayland.

This issue was brought up in sddm repo here. Apparently it's the wayland compositor that is supposed to deal with it.

@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 16, 2024

Trying wayland, the touchpad tap to select is not enable by default. Can't find anything to enable it

[General]
DisplayServer=wayland-user
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=Hyprland

Important

This layer shell is included in layer-shell-qt and layer-shell-qt5. The latter package is needed until SDDM drops Qt5, otherwise you will get a black screen. [6]

hyprwm/Hyprland#820
To be able to use sddm on wayland we needed a wayland compositor. Hyprland do not yet support this hyprwm/Hyprland#820.

Unfortunately even if Hyprland by default has tap-to-click by default it did not work.
image

UPDATE:

[Wayland]
CompositorCommand=Hyprland

This part is useless

@sandeng1440
Copy link

@kRHYME7
There are 2 compositors:

  1. Hyprland: It does not run until sddm tells it to. Therefore it cannot be the compositor managing sddm.
  2. Weston: I believe is the compositor that is running before sddm and manages sddm.

I found this out when I clicked on the WM selector on sddm.

@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 16, 2024

By default DisplayServer=wayland attempts to use weston, even if it's not installed, to use a different Wayland compositor, enter the program and relevant arguments to the CompositorCommand option as described in SDDM#KDE / KWin, see also sddm.conf(5) for more.

  1. Yeah I think Hyprland soon would have it's own DM so this won't be posible
  2. We should find an option for weston to have tap-to-click.

Tested weston, tap to click is enabled by default. But I don't think

Maybe my configuration is wrong ?

[General]
DisplayServer=wayland-user
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=weston

One more

Can we add some kde settings, should sddm respects that?

image

@sandeng1440
Copy link

sandeng1440 commented Mar 16, 2024

Wayland Solution FOUND


EDIT: I had put in the wrong sddm.conf
EDIT 2: wrong one again. (I just can't copy to clipboard from nvim)

I used weston as the compositor. It is the default wayland compositor set in sddm.
All I had to do is add /etc/xdg/weston/weston.ini and then populated it with the following contents found at this arch wiki on weston

[core]
# xwayland support
xwayland=true

[libinput]
enable-tap=true

[input]
touchpad_tap_to_click=true

[shell]
#background-image=/usr/share/backgrounds/gnome/Aqua.jpg
background-type=scale-crop
background-color=0xff000000
#background-color=0xff002244
#panel-color=0x90ff0000
panel-color=0x00ffffff
panel-position=bottom
#clock-format=none
#animation=zoom
#startup-animation=none
close-animation=none
focus-animation=dim-layer
#binding-modifier=ctrl
num-workspaces=6
locking=false
cursor-theme=Adwaita
cursor-size=24

# tablet options
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
#animation=fade

# for Laptop displays
[output]
name=LVDS1
mode=preferred
#mode=1680x1050
#transform=rotate-90

#[output]
#name=VGA1
# The following sets the mode with a modeline, you can get modelines for your preffered resolutions using the cvt utility
#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
#transform=flipped

#[output]
#name=X1
#mode=1024x768
#transform=flipped-rotate-270

# on screen keyboard input method
#[input-method]
#path=/usr/lib/weston/weston-keyboard

[keyboard]
keymap_rules=evdev
#keymap_layout=us,de
#keymap_variant=colemak,
#keymap_options=grp:shifts_toggle
#keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel
repeat-rate=30
repeat-delay=300

# keymap_options from /usr/share/X11/xkb/rules/base.lst
#numlock-on=true

[terminal]
font=monospace
font-size=18

[launcher]
icon=/usr/share/weston/icon_flower.png
path=/usr/bin/weston-flower

[launcher]
icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png
path=/usr/bin/weston-terminal --shell=/usr/bin/bash

#[launcher]
#icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png
#path=/usr/bin/gnome-terminal

[launcher]
icon=/usr/share/icons/hicolor/32x32/apps/firefox.png
path=MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox

#[launcher]
#icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png
#path=/usr/bin/st alsamixer -c0

Sddm.conf

Here's what my /etc/sddm.conf.d/sddm.conf looks like:

[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false

# Name of session file for autologin session (if empty try last logged in)
Session=

# Username for autologin session
User=


[General]
# Which display server should be used.
# Valid values are: x11, x11-user, wayland. Wayland support is experimental
# DisplayServer=x11
DisplayServer=wayland

# Comma-separated list of environment variables to be set
GreeterEnvironment=

# Halt command
HaltCommand=/usr/bin/systemctl poweroff

# Input method module
InputMethod=qtvirtualkeyboard

# Comma-separated list of Linux namespaces for user session to enter
Namespaces=

# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=none

# Reboot command
RebootCommand=/usr/bin/systemctl reboot


[Theme]
# Current theme name
Current=

# Cursor size used in the greeter
CursorSize=

# Cursor theme used in the greeter
CursorTheme=

# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7

# Enable display of custom user avatars
EnableAvatars=true

# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces

# Font used in the greeter
Font=

# Theme directory path
ThemeDir=/usr/share/sddm/themes


[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/bin:/usr/bin:/bin

# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=

# Comma-separated list of users that should not be listed
HideUsers=

# Maximum user id for displayed users
MaximumUid=60513

# Minimum user id for displayed users
MinimumUid=1000

# Remember the session of the last successfully logged in user
RememberLastSession=true

# Remember the last successfully logged in user
RememberLastUser=true

# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=true


[Wayland]
# Path of the Wayland compositor to execute when starting the greeter
CompositorCommand=weston --shell=kiosk

# Enable Qt's automatic high-DPI scaling
EnableHiDPI=true

# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session

# Comma-separated list of directories containing available Wayland sessions
SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions

# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log


[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup

# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop

# Enable Qt's automatic high-DPI scaling
EnableHiDPI=true

# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp

# Path to X server binary
ServerPath=/usr/bin/X

# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession

# Comma-separated list of directories containing available X sessions
SessionDir=/usr/local/share/xsessions,/usr/share/xsessions

# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log

# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr

@sandeng1440
Copy link

TLDR


Basically, the only change I made is add /etc/xdg/weston/weston.ini and then changed the DisplayServer option in sddm from DisplayServer=x11 to DisplayServer=wayland

@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 17, 2024

Cool! Only problem we might face is if weston is not present by default
How did you get your weston? i have 2 machines, my other one do not have weston.

paru -Qi weston    

Also, should it be fine if we added weston as dependency so that we can composite sddm on wayland?

@sandeng1440
Copy link

@kRHYME7
I didn't install weston myself. I think it's a dependency of something in Hyprdots. Lemme setup a VM to see if it's installed by Hyprdots.

@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 17, 2024

Try to run pacman -Qi weston maybe it give you lead to why this is installed

@sandeng1440
Copy link

@kRHYME7
Here is the result of yay -Qi weston

Name            : weston
Version         : 13.0.0-1
Description     : Reference implementation of a Wayland compositor
Architecture    : x86_64
URL             : https://wayland.freedesktop.org/
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : glibc  wayland  libxkbcommon  libinput  libunwind  pixman  libdrm  pam  systemd-libs  cairo  libpng  libjpeg-turbo  libwebp  mesa
                  libegl  libgles  glib2  pango  lcms2  mtdev  libx11  libxcb  dbus  libva  libxcursor  colord  seatd  gstreamer
                  gst-plugins-base-libs
Optional Deps   : xorg-xwayland: support x11 backend [installed]
                  libpipewire: support pipewire backend [installed]
                  freerdp: support rdp backend
                  neatvnc: support vnc backend
Required By     : None
Optional For    : xwayland-run-git
Conflicts With  : None
Replaces        : None
Installed Size  : 5.92 MiB
Packager        : Sébastien Luttringer <seblu@archlinux.org>
Build Date      : Sun 17 Dec 2023 01:57:38 PM EAT
Install Date    : Wed 21 Feb 2024 08:18:01 AM EAT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

@kRHYME7 kRHYME7 changed the title [Feature] Touchpad tap to select [SDDM] Touchpad tap to select Mar 19, 2024
@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 19, 2024

I had a fresh install of hyprdots and weston is not present.

@prasanthrangan
Copy link
Owner

same here, weston is not installed by default... but for some reason setting sddm DisplayServer to wayland still works.... which is strange.....

@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Mar 19, 2024

same here, weston is not installed by default... but for some reason setting sddm DisplayServer to wayland still works.... which is strange.....

Maybe on fallback mode? Or hyprland now can manage sddm layer?

@kRHYME7 kRHYME7 marked this pull request as draft April 24, 2024 15:23
@kRHYME7
Copy link
Collaborator Author

kRHYME7 commented Apr 24, 2024

Draft this as sddm actually can recognize hyprland in test-mode
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants