r/archlinux • • 1d ago

SHARE hyprland: Detect programs using XWayland

I wanted to find all software still using XWayland on my system, so I added some lines to my hyprland.lua config file. That's probably trivial for the most of you, but I still wanted to share it. Just add this to the end of your config file and you'll get a notification whenever a software opens a window that relies on XWayland:

hl.on("window.open", function(w)
if w.xwayland then
hl.notification.create({ text = "Window uses XWayland: " .. w.title, timeout = 5000, icon = "warning" })
end
end)

What I found so far:

  • steam (and every menu it opens)
  • vlc
  • ...
0 Upvotes

5 comments sorted by

3

u/ManoDu57 23h ago

Could've used xlsclients to list all Xwayland processes. Simpler, honestly

2

u/lritzdorf 23h ago

Eh, depends what your goal is. That's a separate package (not required for xwayland), and it doesn't notify you in real time like the Hyprland event handler does. Also a good option to know about, though

-1

u/engelmarkus 19h ago

That's the thing, I want to see it in real time while I use my system.

1

u/Embark10 20h ago

sway version:

for_window [shell="xwayland"] title_format "<span background='#FFA0A0' foreground='#000000'>%title (%shell)</span>"