[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)

Not reporting is bourgeois


File: 1749730345228.webm (634.18 KB, 1280x1024, wm.webm)

 

This might not sound that impressive, but i've just managed to get program-agnostic rio-style window creation working flawlessly in FVWM. Previously it was a flickery, unreliable mess of xdotool commands, but now it's spawning every window iconified, hooking into the window creation event to set geometry from my rectangle selection program and deiconifying it to its correct position.

If you could keep track of all terminals and from which one a particular program is spawned, you might be able to reach true rio emulation closer than even the plan9port version.

Desktop and window management general, i guess.

Oh neat, it really feels like you're opening a window doing it like that.

this looks like trying to force the sphere through the square shape. x11 doesn't have a concept of processes so you are going to have to do something like write your own terminal emulator that can keep track of things under the hood and then a patch for fvwm to talk with the fake terminal and kind of bypass x11

>>30154
Keeping track of terminals is only a matter of adding a script to /etc/profile, tracing the window creation hierarchy would be the only significant problem and either it's possible to do with a small script, or it's near impossible requiring kludges like polling window focus. Curiously x has some sort of window hierarchy built in, but it doesn't work that way. I'm not really attached to rio emulation anyway, that it could potentially emulate some things better than an actual port just speaks to the strengths of FVWM. The last thing i did was adding keybindings to resume normal window placement or "abort" the window to the rectangle program.

Impressive!

>>30155
>Keeping track of terminals
you have to keep track of what the terminal does, or of all fork calls for that matter, not the terminals themselves

>>30157
I have a very specific scheme in mind, which i'd hoped would be aided by something like inheritable x properties, but since they don't exist a kludge it is:
/etc/profile runs a script writing the window id to /run/foo/$$. If a new window is spawned, get the process id with _NET_WM_PID (fails with 9term, so much for icccm compliance), then walk up the process tree using ps until encountering a process in /run/foo containing the window id with which to set the correct geometry.

>>30158
Wait, i think i've found a near-perfect solution. Terminals mimicing xterm will set the WINDOWID environment variable, so for every non-terminal child process you could get the parent terminal with an SUID script like:
#!/bin/sh
strings /proc/"$1"/environ | grep '^WINDOWID=' | cut -d= -f 2-

>>30152
That's cool and I don't want to sound like a dick but have you considered using 9wm or Wio? They are Rio-like WMs for Linux.

>>30174
In rio only the plan9 terminal (which gets its geometry passed in plan9port) can be created this way. As you can see from the xterms, which don't accept pixel coordinates, my scheme works for every program. Also notice the sloppy focus in the video, what you don't see are the 3x3x5 virtual desktops, so there's that. My next step is programming keybindings that align with my emacs muscle memory to work, but the scripting language is finicky and a module would clearly be overkill.


Unique IPs: 5

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]