Live data from Hacker News

Show HN: Bonk, a command-line tool for X11 window management

github.com

31–40 of 70 posts

Re: Show HN: Bonk, a command-line tool for X11 window management

#31
post #19
post #16

Earlier quoted context omitted.

> The question is "when? I'd say within this year already. Some major parts like explicit sync are being merged already. And all future work (like HDR) will only go to Wayland. Not to X11. So this claim that X11 is a viable option is a fallacy.

It works. Therefore, it's viable. It's my computer. I decide what's "the way to go" or "viable" there. None of your business. No one is forcing you or anyone to use it. This is clearly a "I wrote it because it's useful for me, I put it online for whom it may concern"-type of project. You need to calm your tits and stop shitting all over people's hobby projects.

You can decide whatever you want. Being stuck with unsupported case (X11) you support yourself is "viable" as long as support yourself is something you can do.

Re: Show HN: Bonk, a command-line tool for X11 window management

#32
post #30

Earlier quoted context omitted.

>> Occasionally, I've enjoying playing around with window management and hacking with WMs, using stuff like this and/or xdotool and wmctrl. Ydotool readme: > Currently implemented command(s): > type - Type a string > key - Press keys > mousemove - Move mouse pointer to absolute position > click - Click on mouse buttons So... No.

For what xdotool does - pretty much a substitute. For anything else you need a compositor specific tool. KWin scripts or something might work for KDE: https://develop.kde.org/docs/plasma/kwin/

> For what xdotool does - pretty much a substitute.

No; for just the input functions, and that only if you're not using `--window`, it's a substitute. But xdotool is a lot more than that.

> For anything else you need a compositor specific tool.

Yes, exactly. For the things that were asked for, your best hope is do see if your particular compositor deigned to provide the API surface, and then if it did, write something that uses those non-portable APIs to do what you want.

Re: Show HN: Bonk, a command-line tool for X11 window management

#33
post #30

Earlier quoted context omitted.

For what xdotool does - pretty much a substitute. For anything else you need a compositor specific tool. KWin scripts or something might work for KDE: https://develop.kde.org/docs/plasma/kwin/

> For what xdotool does - pretty much a substitute. No; for just the input functions , and that only if you're not using `--window`, it's a substitute. But xdotool is a lot more than that. > For anything else you need a compositor specific tool. Yes, exactly. For the things that were asked for, your best hope is do see if your particular compositor deigned to provide the API surface, and then if it did, write somethi…

Makes perfect sense for it to be something that interacts with the compositor. So KWin does expose such API. But that's not part of Wayland itself or its protocols.

Want to make it easy? Use KDE which cares about flexibility and write scripts for it. Otherwise - probably tough luck, not sure how much other compositors even care about such things.

Re: Show HN: Bonk, a command-line tool for X11 window management

#34
fascinatedbox, bonk. this person has great names. I hope they can offer their version of a renaming of MacOS releases to avoid the blandish (tho triumphal and majestic, to be sure) Californiaisms. For instance what would this person call MacOS 12, 13, 14?

Re: Show HN: Bonk, a command-line tool for X11 window management

#35
post #25
post #24

Earlier quoted context omitted.

This was the question I came to ask. I've been a Wayland avoider because for me there was nothing "broken" to be fixed. Occasionally, I've enjoying playing around with window management and hacking with WMs, using stuff like this and/or xdotool and wmctrl. I was curious as to what this might be like in Wayland-land? Do tools like this even exist?

Yes: https://github.com/ReimuNotMoe/ydotool

Besides the limitations others have mentioned users should be aware that since ydotool works by writing events directly into /dev/uinput the input will go to whatever happens to be focused at the moment. It will happily type your secrets into a chat window if you move the mouse at the wrong time.

There is no way to do the equivalent of xdotool type --window 0x600005 "my important input"

Re: Show HN: Bonk, a command-line tool for X11 window management

#36
post #35
post #25

Earlier quoted context omitted.

Yes: https://github.com/ReimuNotMoe/ydotool

Besides the limitations others have mentioned users should be aware that since ydotool works by writing events directly into /dev/uinput the input will go to whatever happens to be focused at the moment. It will happily type your secrets into a chat window if you move the mouse at the wrong time. There is no way to do the equivalent of xdotool type --window 0x600005 "my important input"

It's not like xdotool is so secure in the first place. X11 is one huge hole from that perspective. Anything can read anything and all your important input can be read by some other window anyway.

Re: Show HN: Bonk, a command-line tool for X11 window management

#37
post #33

Earlier quoted context omitted.

> For what xdotool does - pretty much a substitute. No; for just the input functions , and that only if you're not using `--window`, it's a substitute. But xdotool is a lot more than that. > For anything else you need a compositor specific tool. Yes, exactly. For the things that were asked for, your best hope is do see if your particular compositor deigned to provide the API surface, and then if it did, write somethi…

Makes perfect sense for it to be something that interacts with the compositor. So KWin does expose such API. But that's not part of Wayland itself or its protocols. Want to make it easy? Use KDE which cares about flexibility and write scripts for it. Otherwise - probably tough luck, not sure how much other compositors even care about such things.

Or I could just use X11, where this is a solved problem using a single API that works on arbitrary window managers / desktop environments. The only problem is people keep showing up to tell me that I need to stop using it and use their feature-poor alternative.

Re: Show HN: Bonk, a command-line tool for X11 window management

#38
post #23

Earlier quoted context omitted.

I tried Wayland (Fedora 39) on two screens and the experience was so terrible and full of bugs I gave up after less than a day. New windows open at random locations and screens no matter what's focused, UI scaling of a window is sometimes wrong for its screen, at least once an hour the screens just go blank for a couple seconds etc. For me it's definitely not usable yet, let alone the "only choice" > All of the effor…

> Yes, because it's still work in progress. And because the X11 maintainers decided that Wayland is the way forward and X11 will simply not get new display features like HDR.

> And because the X11 maintainers decided that Wayland is the way forward and X11 will simply not get new display features like HDR.

Is Wayland a racket? Barely maintain the previous code instead of making clear that others should take it over because you are insterested in something else, then force everyone into your new incomplete code base, and probably bill for the reimplementation of basic capabilities, piece by piece.

OTOH, not everyone involved with X11 thinks it has no future. Keith Packard posted ideas [0] about how to improve it further.

[0] https://keithp.com/x-ideas/

Re: Show HN: Bonk, a command-line tool for X11 window management

#39
post #7

Earlier quoted context omitted.

Wayland is still buggier than a swamp. At this point they're no longer showstopping bugs, but if you don't want to be constantly annoyed by little things not working, X11 is still the way to go.

It depends a lot on your desktop enviornment/window manager, distro, hardware, etc. I personally find Wayland works perfectly out of the box whereas X11 still to this day has issues with basic stuff like screen tearing that needs me to add a line to my xorg config file to enable the driver feature that stops screen tearing. (Note that every other display server has zero issues -- MacOS, Windows, Wayland, etc so the f…

What are you running when you experience screen tearing? I've literally never once encountered it in over 20 years of using X.

Re: Show HN: Bonk, a command-line tool for X11 window management

#40
post #28
post #24

Earlier quoted context omitted.

This was the question I came to ask. I've been a Wayland avoider because for me there was nothing "broken" to be fixed. Occasionally, I've enjoying playing around with window management and hacking with WMs, using stuff like this and/or xdotool and wmctrl. I was curious as to what this might be like in Wayland-land? Do tools like this even exist?

My understanding is that "window managing" tools like this are not possible due to how wayland handles information. Pro: More secure than x11, Con: I can't use wayland. Aside from investing a lot of time learning how to use a tiling wm I dont see how I'm going to get over my addiction to minimizing only the active window. ( xdotool windowminimize $(xdotool getactivewindow) )

For improved security with X11, try firejail+Xpra, or Qubes OS. They will not just help in the graphical front, but also others like processes and storage isolation.
Post reply on HN