On Wednesday, July 17, 2019 at 10:33:28 AM UTC-5, Chris George wrote:
>> I think Edward might have to answer that question.
Sounds likely, yes.
It seems that the X11 window system, that underlies most of the popular
Linux windows managers (including xfce) has tools for handling window state.
So the following fussy, fragile, and inscrutable one line command, using
archaic and arcane xdotool and wmctrl X11 tools, happens to place my Leo
window exactly what I want:
leo & xdotool search --sync --onlyvisible --name leo ; xdotool windowmove
$(wmctrl
-l -p -G -x | awk '/launchLeo.py/ && $6 > 2000 { print $1 }') 232 107
where "leo" is a binary compiled from the following C code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define __unused__ __attribute__((unused))
int main(int argc __unused__, char **argv __unused__)
{
setenv("PYTHONPATH", "/usr/lib64/python3.6/site-packages", 1);
execl("/usr/bin/python3", "python3",
"/home/some_masked_subdir/leo/leo-editor/launchLeo.py",
"--window-size=1276x2315", NULL);
fprintf(stderr, "exec failed: ");
perror("/usr/bin/python3
/home/some_masked_subdir/leo-editor/launchLeo.py");
exit(1);
}
All of which is proof that Perl hackers do not have an exclusive patent on
"write once, read never" one liners.
Thanks, Chris, for the reminder that it probably wasn't Leo itself that
endeavored to manage the placement of its window. That sufficiently
renewed my focus on potential solutions using xfce, or in my case, the
underlying X11 tools.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/fc6a73f7-b4c2-4174-a6bb-31e0ea47ee1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.