Remix.run Logo
yjftsjthsd-h 2 days ago

What I really want, but don't have the technical skill to write unfortunately:), is a window manager or compositor that lets me set the size of a window and the viewport into that window independently. That is, formalize the approach that yes this window is rendering as if it was taking up half the screen but I only need to actually see this tiny slice of it, so just give me a window that shows that piece

porridgeraisin 2 days ago | parent | next [-]

This should be possible on X11 using standard extensions. XCompositeRedirectWindow to render your window to a virtual buffer, get pixmap, bind pixmap to new croppedWindow as a GL texture, here apply a crop transform. Then optionally unmap original window. Finally, we have to remap input events. This is trivial browser-style event interception, XSelectInput, change x,y, XSendEvent. I can try to make it work sometime this week. A CLI tool you'd use like `xcropwindow windowID x y dx dy`. As a side effect, this way you can have multiple viewports into different parts of a window. But there's probably a few deal-breaker edge cases I'm missing.

On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff.

wing-_-nuts 2 days ago | parent | next [-]

>On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff.

I really tried switching over to sway / wayland a couple years back, but there were just so. many. things. which, despite wayland being 'the future' and 'ready for prime time' among proponents just bugged the heck out of me.

Why is it an act of congress to setup screen sharing / recording. Like sure it works for this one fork of OBS but if I'm trying to set up a telehealth session with my doctor all of a sudden I can't share my screen? Or global hotkeys don't work? I can't easily redshift my monitor at night? Pulse audio is jank for some unknown reason (Idk if this was even related)

It was just death by a thousand cuts. When it really came down to it, wayland added nothing but headaches to my life without any discernible benefit. None of it's 'selling points' meant anything to me.

Then suddenly I remembered I'm no longer the early adopter / OSS enthusiast I was in my youth. I'm now a grumpy grey beard who just wants things to work. I installed pop 22 with gnome on xorg and went on with my life. I think it's pretty telling that cosmic was released in alpha this time last year and it's still there today. While I realize that writing a DE is a big undertaking, they were basically trying for a fresh rewrite of gnome's UI in rust under wayland. No way it would have taken this long if they were targeting x.

seaal a day ago | parent [-]

Thing have come so far in the past couple years that I'm not sure anything you mentioned is even a problem anymore. Global hotkeys work, pulse audio just works, screen sharing just works, redshifting is no issue?

https://wiki.hypr.land/Configuring/Binds/#global-keybinds

https://wiki.hypr.land/Hypr-Ecosystem/hyprsunset/

https://wiki.hypr.land/Useful-Utilities/Screen-Sharing/

porridgeraisin 17 hours ago | parent [-]

> Hotkeys

Bullshit.

No one cares that I can go and register global hotkeys in the compositor config file. The whole point is that apps do it themselves. If you still want a security theater, then add a prompt or what macos has where you go give it permissions.

https://wearewaylandnow.com/

If you see the global hotkeys section. It still has a lot of caveats. Bonus: see what's needed for push to talk to work...

The benchmark before wayland becomes default is:

Do OBS start recording shortcuts work.

And does discord push to talk work.

Today on KDE and GNOME the answer is no.

Any distro/DE that pushes wayland as a default without the answer to both of these questions being yes is pure cancer.

For anyone interested, there is a dbus API to register shortcuts that I believe KDE supports, gnome does only since the last 6 months, and hyprland/sway don't, and likely won't. Obviously, app developers aren't going to use it with such fragmented support.

Further reading(2024): https://dec05eba.com/2024/03/29/wayland-global-hotkeys-short...

yjftsjthsd-h 2 days ago | parent | prev [-]

> On the other hand, the Great Wayland Security Theater probably doesn't admit such riff-raff.

I'm pretty sure it's doable, but it probably does need to be baked into the compositor. But since there are compositors that can do full immersive 3D environments with windows moving around in them, I can't believe that there's any manipulation of the contents of a window that you can't do in Wayland.

Of course, being able to add it as tiny helper program is probably something that's going to be specific to X11, or possibly (best case) require non-portable APIs that are specific to individual compositors in Wayland.

2 days ago | parent | next [-]
[deleted]
porridgeraisin 2 days ago | parent | prev [-]

Yeah of course the compositor can do anything, but that's completely useless. Community applications need to be able to do it. Such applications are easily the most popular productivity applications on every other OS. If they're oh-so-concerned about security, a featureful accessibility API like the one macos has is table stakes, and needs to be developed before anything else. Its disgusting to release half baked theater like wayland does. </rant>

abhinavk 2 days ago | parent | prev [-]

Do you mean something like this?

https://github.com/dawsers/scroll?tab=readme-ov-file#content...