Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I accidentally got this, and now it defaults to Wayland which completely broke my workflow. That is because, in Wayland, there is no API to list what windows are on your desktop! [1]

Managed to get back to X11, for some reason the logoff button does not work anymore but at least my monitoring scripts do.

[1] https://github.com/Kalmat/PyWinCtl/blob/master/README.md#lin...



How did you "accidentally" manage to get this? It isn't even in Arch stable yet?

The only distro shipping it right now seems to be KDE neon, whose entire premise is shipping KDE stuff as soon as possible...


NixOS unstable has it too I think. It was merged yesterday at least.


And openSUSE Argon/Krypton


Yes.


Did you also garbage collect the old generation by accident?


I used to be a user of Wayland but since Firefox defaulted to it and I found that Picture-in-Picture doesn't work, I've since dropped back to X.

DuckDucking it, I couldn't find a solution, but I hope someone can tell me there is.

Outside of things like this (and finding the right screen recording program) I didn't really notice a difference.


This is the solution as I recall (stolen from reddit post cited at bottom):

Step 1: Right click an open Picture-in-Picture window. In the context menu, select "More Actions" -> "Configure Special Window Settings...". This will populate most of the window settings for you.

Step 2: Click "Add Property..." and select "Window title". The newly added row's text field should read "Picture-in-Picture". Change the dropdown option from "Unimportant" to "Exact Match". (All PiP windows in Firefox use this title and by making it Exact Match the rule shouldn't affect any other Firefox windows.)

Step 3: Click "Add Property..." again and this time select "Keep above other windows". The dropdown in the newly added row should be set to "Apply Initially". Select the "Yes" radio button if it isn't already. (As a note, I think that didn't work for me as I have it set to "Force" rather than "Apply Initially")

Step 4: Click "OK". That's it. No more manually setting Keep Above every time you open a PiP.

Since doing the above it's just worked without issue, though it was annoying that it was broken in the first place.

https://old.reddit.com/r/kde/comments/osjt3p/firefox_wayland...


Maybe I'm missing something, but Picture-in-Picture has worked for years in Wayland Firefox for me. You do have to enable it in `about:preferences`, there's a toggle called: "Enable picture-in-picture video controls"


Are you sure it wasn't running under XWayland? Firefox has had wayland support turned off by default until just recently.


I'm sure because I have a high DPI screen and the font rendering in Xwayland is jarringly noticeable.


On which Desktop Environment/wayland compositor? I am pretty sure Firefox Picture in picture works as intented (tiny window, stays on top of things) on GNOME's wayland session, and on Plasma 5.27.x I was able to make it work with a few KWin rules set by GUI (I would love to share the details, but I don't have my Plasma machine with me currently).


To my knowledge there currently isn't a solution, but it is being worked on/discussed: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/m...


That is the state of a lot of things in Wayland. They seem to remain that way for a long time, alas.


What compositor? I use Hyprland and Firefox/Chromium Picture in Picture, and as far as I can tell, works as expected. I just hit the PiP button and it pops the video out into a new tiled window that I can toggle floating if I want. Just tried on a windows machine and, as far as I could tell, it was the same.


Many Wayland compositors provide an API to list the windows. I don't know about Plasma 6, but in Wayland it's up to the compositor to provide such API as far as I know.


> Many Wayland compositors provide an API to list the windows.

KWin does as well (workspace.activeWindow, workspace.windowList).


I found no way of calling KWin functions other than piping javascript into dbus and parsing the reply via journalctl, which... lol?

https://unix.stackexchange.com/questions/706477/is-there-a-w...


Yeah, I think the way you're supposed to do that is you install the kwin script which gives you the option to "connect" to various signals and then communicate the results via dbus to your service / listener (I don't think the script itself can host a dbus service which would be much simpler). One thing I got from looking at this is that KDE's documentation about scripting is either absolutely terrible, insufficient, or non existing.


So you need a separate implementation for each compositor? Count me out.


Most compositors use a common framework like wlroots. Those that don't, like kwin, provide their own API support which their own tools consume.


Yep. The only compositors of any significance that do not use wlroots are Gnome/Mutter and KWin. I guess Weston is also an independent compositor, but I don't think anyone actually uses that.


Weston is mostly used for car entertainment systems, as a replacement for Windows CE.

It, along with the more modern wlroots-based alternative Cage, have become the de-facto Wayland window manager for when you don't actually want to display framed windows, and just want to fork the codebase and display some fullscreen GLES-based graphics in a kiosk instead. These IoT use cases were part of the original motivation for Wayland in the first place.


I'm on proprietary NVIDIA, so haven't actually quite joined the Glorious Wayland Master Race yet. I use Weston on X11 to host Waydroid for my Android game development. Works rather well. I hope Weston development doesn't end up moribund because a few folks like me actually use it.


It's not dead, but it's gotten way more patches upstreamed from the automobile industry than anything desktop related. So any sort of Linux desktop testing is likely very minimal.

There should be plenty of alternatives you can run in windowed mode if Weston stops working: https://wiki.archlinux.org/title/Wayland#Compositors


Additionally, there is an (experimental) effort by a KDE developer to further generalize KWin's functionality by ripping out most of what it does into a separate wlroots-compatible library - https://github.com/winft/theseus-ship


So you need a separate CSS engine for each browser? Count me out.


Wayland is like if every single CSS property needed to be written with both "-moz-" and "-webkit-" prefixes forever, instead of the different CSS engines having any standard properties.


But many Wayland protocols are actually becoming shared. For example, Plasma 6 replaced a "-kde-shell" protocol with the standardized "layer-shell" protocol.


Can you recommend one?


It really depends on your preferences. I use Sway. getting a list of windows is as easy as running `swaymsg -t get_tree`.


Are there non-tiling window managers that do this? Sway is like, the gold standard and everyone knows about it. But it's also for people who like tiles.


There's an experimental tool `wlrctl`: https://git.sr.ht/~brocellous/wlrctl

It's not well documented, but you can do this to get a list of your windows: `wlrctl toplevel list`

And this to get the currently focussed window(s): `wlrctl toplevel list state:focused`


It says a lot about the difficulty of writing great software that it has taken around 15 years to get a list windows out of Wayland. But it looks like wlroots was a tipping point where the ecosystem started to function in a healthy manner.


Your comment reminds me so vividly of the time when I had time and I could invest tens of hours deep in that sort of nonsense.

No thank you.


For real dude... "my logout button doesn't work"? Crazy! I used to love tinkering with linux in college, started with Ubuntu 7.04(?) Feisty Fawn. Today I use Linux Mint 22(?) - what distro do you use that's hands off?


I'm in college and still prioritize stability (at least in day-to-day use). Which doesn't always work out, because yesterday my laptop wouldn't boot...


MacOS


Windows 11 with WSL


My brother uses this as well. It didn't work out well for me but it may have just been too soon, I tried to use WSL when it came out. Must be much better and seamless now.


The first WSL was a Linux system call emulator using Windows NT kernel's multi identity features. While it is an impressive feat of engineering showing off NT's strengths, many of the syscalls were missing. The programs had to operate on Windows file system which likes bulk operations and try and fail kind of a pattern. So it was slow.

WSL2 is fantastic. It is a lightweight Hyper V VM so programs run at native speed. You can do nested virtualization with W11. The file system is ext4 on a virtual HD file so, progams optimised for Linux don't suffer. It even comes with its own Wayland compositor running on top of a high performance GL <-> DX translation layer. It comes with systemd support so one can run regular systemd services like nix daemon.


OpenSUSE.


Oh Gerald, do wheel me back into my pleasure dome please, I've had quite enough of this silliness.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: