v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
686 stars 57 forks source link

[feature request] Add Wayland support #159

Open sarether opened 2 years ago

sarether commented 2 years ago

Add Wayland support (without Xwayland). And thinner widgets in height like 9.3 version (9.3 is latest with "normal" height ).

afrischk commented 2 years ago

What is necessary for native wayland support? Any pointers? I am a newbie in this field but maybe I can work on a PR...

I am asking because I switched from i3 to sway a couple of days ago and wanted to use yad to build a small shutdown menu with the --notification feature which seems to be not available with native wayland main.c#L879

v1cont commented 2 years ago

i don't use wayland. that's why i cannot add wayland support to yad

sarether commented 2 years ago

i don't use wayland. that's why i cannot add wayland support to yad

Me too, but it would be nice if YAD worked without XWayland. There have been many cases recently (not mine).

sonic2kk commented 2 years ago

Yad seems to mostly work under Wayland, but a few features such as tabs (#109) and tray icons. So I think it's more a case of improving Wayland support. I'm not in any way familiar with the internal workings of Yad or Wayland implementations, but it seems like XDG Foreign Protol (which seems like an in-development spec?) should implement some of the functionality needed for tabs to work on Wayland.

I guess for improved Wayland support it'll need to be contributed by someone else and it'll require waiting for the Wayland spec to implement features needed for Yad to have full Wayland support (i.e., alternatives to what is used on X11).

Improved Native Wayland support would be excellent for Yad at some point in the future :pray:

Dreded commented 7 months ago

adding GDK_BACKEND=x11 before each yad call seems to make tabs etc work

#!/bin/bash
GDK_BACKEND=x11 yad --plug=12345 --tabnum=1 --text="first tab with text" &>res1 &
GDK_BACKEND=x11 yad --plug=12345 --tabnum=2 --text="second tab" --entry &>res2 &
GDK_BACKEND=x11 yad --notebook --key=12345 --tab="Tab 1" --tab="Tab 2"