|
|
Subscribe / Log in / New account

The Wayland Protocol

Drew DeVault has just released a (mostly complete) book on the Wayland display-server protocol under the Creative Commons CC-SA license. "This book will help you establish a firm understanding of the concepts, design, and implementation of Wayland, and equip you with the tools to build your own Wayland client and server applications. Over the course of your reading, we'll build a mental model of Wayland and establish the rationale that went into its design. Within these pages you should find many 'aha!' moments as the intuitive design choices of Wayland become clear, which should help to keep the pages turning." For those who would rather peruse (or contribute to) the Markdown source, it's available here.

to post comments

The Wayland Protocol

Posted May 5, 2020 15:42 UTC (Tue) by dankamongmen (subscriber, #35141) [Link]

Just the first few pages have already convinced me that this is going to be a great payback on invested time. Thanks for posting it, LWN!

The Wayland Protocol

Posted May 5, 2020 16:11 UTC (Tue) by vivo (subscriber, #48315) [Link] (3 responses)

Interesting that a book about a graphical interface protocol has no image whatsoever :=)

The Wayland Protocol

Posted May 8, 2020 1:24 UTC (Fri) by smitty_one_each (subscriber, #28989) [Link] (2 responses)

Can one do ASCII art in Markdown?

Given that it's all UTF-8, can we call it ASCII art?

The Wayland Protocol

Posted May 8, 2020 2:24 UTC (Fri) by mpr22 (subscriber, #60784) [Link] (1 responses)

Unicode art is monochrome pixel art, thanks to the (Extended) Braille codepoints.

(Bonus: unlike ASCII art, as long as it doesn't turn into tofu it survives display in arbitrary proportional fonts.)

The Wayland Protocol

Posted May 8, 2020 3:28 UTC (Fri) by smitty_one_each (subscriber, #28989) [Link]

But the irony of doing unicode art to depict a graphical desktop in Markdown cannot be overlooked.

compilation

Posted May 5, 2020 19:39 UTC (Tue) by rillian (subscriber, #11344) [Link] (2 responses)

If anyone else is confused after checking out the source, one can build the book with:

$ cargo install mdbook
$ mdbook
$ xdg-open book/index.html

compilation

Posted May 6, 2020 4:40 UTC (Wed) by CChittleborough (subscriber, #60775) [Link] (1 responses)

Here’s what I used.
$ git clone https://git.sr.ht/~sircmpwn/wayland-book
$ cargo install mdbook
$ cd ../wayland-book
$ mdbook build
$ xdg-open book/index.html

woops

Posted May 6, 2020 4:43 UTC (Wed) by CChittleborough (subscriber, #60775) [Link]

Correction: <code>$ cd wayland-book</code>.

The Wayland Protocol

Posted May 5, 2020 22:28 UTC (Tue) by cesarb (subscriber, #6266) [Link]

For some reason, the Wayland protocol as explained on this reminded me of io_uring's ring buffers.

The Wayland Protocol

Posted May 6, 2020 9:21 UTC (Wed) by oldtomas (guest, #72579) [Link] (1 responses)

Hm. "...as the intuitive design choices of Wayland become clear" or rather "...as the design choices of Wayland become intuitively clear"?

The Wayland Protocol

Posted May 21, 2020 20:18 UTC (Thu) by dfsmith (guest, #20302) [Link]

Or "as the design choices of Wayland become intuitive"?

XKB ?

Posted May 6, 2020 11:18 UTC (Wed) by ballombe (subscriber, #9523) [Link] (8 responses)

So Wayland is still using XKB ? Does it have a xmodmap replacement?

XKB ?

Posted May 6, 2020 16:51 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (6 responses)

libinput and udev should be able to cover your cases (I believe). Probably warrants more information from more knowledgeable folk since I'm stuck on X since XMonad is basically a hard drug that leaving will end up giving me withdrawal symptoms. All the existing compositors I've seen are i3-like which is…insufficient for me. But I have tried to port everything else in my setup over to the "newer" techs as much as possible given that anchor.

XKB ?

Posted May 6, 2020 20:53 UTC (Wed) by nybble41 (subscriber, #55106) [Link] (1 responses)

Have you tried <https://github.com/waymonad/waymonad>? It's a work in progress, but it's the closest Wayland equivalent to XMonad that I am aware of.

XKB ?

Posted May 6, 2020 23:34 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

I think I had seen that on one of my searches for the current state of the Wayland world. The lack of activity is disappointing, but this is one of those things I'd need to hop in myself to help out with. Maybe I'll find time some day :/ .

XKB ?

Posted May 6, 2020 22:26 UTC (Wed) by whot (subscriber, #50317) [Link] (3 responses)

libinput does very little with key events, it merely passes them on as-is. Key events are only looked at for meta-functionality like disable-while-typing. There's nothing in libinput to change a key code, it sits below the concept of keyboard layouts.

udev uses the 60-keyboard.hwdb file to remap some keys into the *expected* ones. This too sits below the concept of layouts, it merely exists so that the "volume down" key on your laptop actually sends the volume down evdev code rather than the DeathToAllKittens code which the vendor so graciously programmed the firmware for.

Actual user-specific remapping should be done in the keyboard layout, i.e. with XKB because xmodmap isn't a thing in Wayland.

XKB ?

Posted May 6, 2020 23:28 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (2 responses)

Well, found someone who definitely knows more than me at least :) . Thanks for the info.

> Actual user-specific remapping should be done in the keyboard layout

Hmm. I have my caps lock remapped to backspace in udev so that it works on the TTY too. I guess you recommend that being done in xkb instead?

XKB ?

Posted May 7, 2020 0:05 UTC (Thu) by whot (subscriber, #50317) [Link] (1 responses)

changing codes through udev is the software equivalent of changing the physical wiring of the key. it does give you the result you want but its not necessarily what the keyboard manufacturer will recommend as a generically applicable solution.

XKB ?

Posted May 7, 2020 2:34 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

I think that for such a common key like caps lock rewiring, I think I'll assume that it is safer than trying to guess what madness is going on with Fn-modifier scancodes and trying to play around with them. I personally haven't had a need for more exotic remappings, but will keep that in mind when helping out others. Thanks.

XKB ?

Posted May 6, 2020 18:52 UTC (Wed) by floppus (guest, #137245) [Link]

There was an article here recently about changes to XKB that should hopefully make it possible to customize by mere mortals:
https://lwn.net/Articles/811723/


Copyright © 2020, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds