Adventures in wayland

Configuring Gnome Wayland:

I installed a minimal gnome to try and iron out problems/eventual transition to wayland.

Mouse Gestures:

Mouse gestures work out of the box with libinput-gestures, but some
of the tools e.g. xdotool do not, as they only work in X.

There is a package in the AUR called ydotool which offers some
limited xdotool features. The window functions are not available, but
the key function is.

Here is my current libinput-gestures.conf file. It works in Gnome Wayland
and in KDE Plasma (X):

gesture: pinch in    2 /usr/bin/mute
gesture: swipe up    3 ydotool key "Ctrl+F10"
gesture: swipe down  3 ydotool key "Ctrl+F8"
gesture: swipe left  3 ydotool key "x"
gesture: swipe right 3 ydotool key "d"

The first 3 entries explained:

  • Two finger pinch in activates the mute toggle:
amixer -D pulse set Master 1+ toggle
  • Three finger swipe down:
    ctrl+f10 is a plasma shortcut to activate show desktop grid.

  • Three finger swipe up:
    ctrl+f8 is a plasma shortcut - windows expose.

  • Three finger swipe left & right:
    Use ydotool to send the key to my browser, "x"=browser history back,
    "d"= browser history forwards. These are set in Firefox using the vim
    vixen addon.

So far so good. Mouse gestures work.

Xcape replacement:

I make extensive use of xcape/xmdomap to enhance my keyboard:
Tapping the following keys:

  • Left Control - Launches terminal.
  • Right Control - Launches one of my scripts
  • Caps lock launches Emacs.
  • Left shift - Sends a set of keystrokes.
  • Right shift - Launches/switches to Dolphin.
  • Left Alt - Launches browser.

Holding the key down, the key acts as normal.

Currently AltGr and the menu key are set to home & end, via xmodmap.
This is a laptop and it prevents me over stretching.

I have tried osm but cannot get it to
work, mouse cursor disappears and other problems.

This is it so far, wayland would still be fairly usable, but I would lose a lot of functionality. Will keep trying :smiley:


I wonder how your experiences will be like on sway. Since that the most polish wm for wayland.

Should be identical :smiley:

Interesting find:

Works really well, with:

Some minor niggles, currently I get a "#" iinstead of a "\" from the sample code, have logged an issue.

Replacing xcape in wayland:


 1 community/kernel-headers-musl 3.12.6_6-1 [installed]
 2 community/musl 1.1.22-2 [installed]
  1. clone to a directory in
    your home:
mkdir git
cd git 
git clone
cd evdoublebind
cp evdoublebind.c evdoublebind.c.orig ## Backup the sample file.
  1. Edit evdoublebind.c - Some examples:
# Tap left shift for opening bracket:
{.key = KEY_LEFTSHIFT, .tap_key = KEY_9,  .tap_modifier = KEY_LEFTSHIFT},

# Tap left shift to send two keystrokes:

# Tap left control to send super + t :
{.key = KEY_LEFTCTRL,  .tap_key = KEY_T, .tap_modifier = KEY_LEFTMETA},

# More examples:
{.key = KEY_RIGHTCTRL, .tap_key = KEY_E, .tap_modifier = KEY_LEFTMETA},
{.key = KEY_LEFTALT,   .tap_key = KEY_W, .tap_modifier = KEY_LEFTMETA},
{.key = KEY_CAPSLOCK,  .tap_key = KEY_E, .tap_modifier = KEY_LEFTMETA},
{.key = KEY_LEFTMETA,  .tap_key = KEY_F1, .tap_modifier = KEY_LEFTALT}

The full list of available keys is in:

  1. Compile:
  1. Launch:
evdoublebind /dev/input/event4 &

Where /dev/input/event4 is your keyboard.

You can find the event number from the handler line in:

cat /proc/bus/input/devices

Using the gnome shell extension run-or-raise in combination with evdoublebind it is possible to launch applications by tapping a modifier key:

<Super>t,sakura -e tmux,sakura,

Launches sakura if the left ctrl is tapped.

The question I'm asking myself is if Wayland actually has any future replacing X.

What do you think?

Wayland been taking it time. It been ready in the smartphone space for sometime. But at a desktop/window manager space. Not so much. This been taking it time. We are starting to see more thing like web browser starting to add wayland in it beta forms. GNOME and sway been the two biggest players. KDE have been a bumpy ride. But they started later. Even nvidia is helping out KDE for it wayland support. So it only a matter of time. As of when. Maybe another 2 more year. When thing get more stable and usable at a consumer level. The more desktop start to make there move to wayland. The more we see software make the move to try to support wayland. Like MATE is working on wayland. [ sarcasm ] As for xfce supporting wayland. Give them another 200 year latter. Maybe they might make it a support After wayland get replace ^.~ [ /sarcasm ]

1 Like

It's not too bad, very quick. Firefox does not play well and the Fedora wayland version plays even worse (haven't had time to test if it is an addon).

But if I want to use emacs, I have to boot X, still can't get the elusive space to hyper combo.