Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #403322
| From | owl <owl@rooftop.invalid> |
|---|---|
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: window grouping updates |
| Date | 2017-03-25 02:15 +0000 |
| Organization | O.W.L. |
| Message-ID | <ahvzuoc93.b8@rooftop.invalid> (permalink) |
| References | (5 earlier) <_IednUJegPx5okjFnZ2dnUU7-emdnZ2d@giganews.com> <x990b.3hgua3@rooftop.invalid> <KIednWTdsZcb80jFnZ2dnUU7-audnZ2d@giganews.com> <ab80zb.3hur@rooftop.invalid> <VcKdncubEcqsWkjFnZ2dnUU7-VWdnZ2d@giganews.com> |
Marek Novotny <marek.novotny@marspolar.com> wrote:
> On 2017-03-25, owl <owl@rooftop.invalid> wrote:
>> Marek Novotny <marek.novotny@marspolar.com> wrote:
>>> On 2017-03-24, owl <owl@rooftop.invalid> wrote:
>>>> Marek Novotny <marek.novotny@marspolar.com> wrote:
>>>>> On 2017-03-24, owl <owl@rooftop.invalid> wrote:
>>>>>> Snit <usenet@gallopinginsanity.com> wrote:
>>>>>>> On 3/23/17, 12:21 AM, in article ac93.g9pl2@rooftop.invalid, "owl"
>>>>>>> <owl@rooftop.invalid> wrote:
>>>>>>>
>>>>>> ...
>>>>>>>> It uses a tempfile in /tmp and cleans up after itself. Hitting the "Stop"
>>>>>>>> button exits cleanly, but if you just close the window instead, there will
>>>>>>>> probably be a "linkem" process hanging around that you'll need to kill,
>>>>>>>> as well as a /tmp/windowlist0xNNNNNNN text file. This linkem process
>>>>>>>> will also keep the windows stuck together as a group until it is killed.
>>>>>>>
>>>>>>> You mean the tool you made based on a whim of mine is not perfect. You suck!
>>>>>>>
>>>>>>
>>>>>> I found out that you can capture the "X" with the following and run the
>>>>>> "stop" function to clean up, so now no leftover processes or files if the
>>>>>> window is closed:
>>>>>>
>>>>>> wm protocol . WM_DELETE_WINDOW {
>>>>>> stop
>>>>>> }
>>>>>>
>>>>>> I've also noticed that the window position relative to the leader window
>>>>>> is offset, and I think that offset is the "Relative upper-left X" and
>>>>>> "Relative upper-left Y" properties. I'll look into adjusting for that.
>>>>>
>>>>> I've played with xmessage and it was offset by the upper left as well.
>>>>> Very likely you're correct.
>>>>>
>>>>
>>>> OK, that that solves those two problems. Now there are two more
>>>> things I want to do.
>>>>
>>>> 1) Make leader window stay above others.
>>>>
>>>> Problem:
>>>> leader currently does not raise on either windowraise or
>>>> click events.
>>>
>>> No idea...
>>>
>>>> 2) When raising other windows, keep manually chosen stack order.
>>>>
>>>> Problem:
>>>> The way I populate the followerids array is sort|uniq the windowlist
>>>> (to get around accidental clicks on windows that are already part
>>>> of the group, when adding windows) and that causes the windowraise
>>>> function to raise them based on the sorted order of the windowids,
>>>> which have nothing to do with the desired manual stack order.
>>>
>>> So maybe you need your own algo rather than using sort | uniq else you
>>> lose the original order. example:
>>>
>>> #!/bin/bash
>>>
>>> arry=( aa bb cc dd aa cc ee ff dd gg )
>>> new=()
>>> let count=0
>>>
>>> for x in ${arry[@]} ; do
>>> for y in ${new[@]} ; do
>>> if [ $x == $y ] ; then
>>> ((count++))
>>> fi
>>> done
>>> if [ $count -eq 0 ] ; then
>>> new+=($x)
>>> else
>>> let count=0
>>> fi
>>> done
>>>
>>> echo "started with ${#arry[@]} elements."
>>> echo "only ${#new[@]} are unique."
>>>
>>> ## END ##
>>>
>>
>> Nah, I just had a brain fart. The windowlistNNN file just has the
>> original added order, so it doesn't matter that it gets resorted.
>> It has nothing to do with the current stack order. xwininfo output has
>> updated stack order, so I just had to parse that against my window list.
>> So part 2 is fixed.
>
> I haven't played with that stuff at all. I wanted to learn a little
> ncurses actually, but haven't got around to that either. Let me know
> when books come out in pill form and you just swallow them...
>
>> As far as raising the leader window, it seems like the best approach
>> is just to keep it on top, but both xprop and wmctrl approaches fail
>> in the script, while an identical wmctrl approach works fine from the
>> command line directly. xprop on the other hand shows that the property
>> updates, but it seems to have no effect. I'll keep futzing with it,
>> but it might be simpler just to right-click->Aways on top.
>
> Sounds like you're almost there. What are your reference tools? The
> Internet or do you have a book you recommend?
>
Internet mostly. If I get deeper into some of this, a book would be
nice though. Right now I pretty much reserve my book reading time for
history and the occasional novel.
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-24 14:58 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-24 10:48 -0500
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-24 18:40 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-24 11:55 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 01:03 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-24 18:15 -0700
Re: window grouping updates Tampon <letsplayfindthestring@bloody.net> - 2017-03-25 02:57 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-24 14:07 -0500
Re: window grouping updates Steve Carroll <fretwizzer@gmail.com> - 2017-03-24 12:14 -0700
Re: window grouping updates Steve Carroll <fretwizzer@gmail.com> - 2017-03-24 12:24 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 01:01 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-24 20:26 -0500
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 02:15 +0000
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 03:59 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-24 21:28 -0700
Re: window grouping updates Tampon <letsplayfindthestring@bloody.net> - 2017-03-25 04:32 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-24 23:47 -0500
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 08:06 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-25 09:33 -0500
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 20:09 +0000
Re: window grouping updates Marek Novotny <marek.novotny@marspolar.com> - 2017-03-25 15:14 -0500
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-25 10:47 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-25 20:12 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-25 13:33 -0700
Re: window grouping updates Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-03-25 22:04 +0100
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-25 14:30 -0700
Re: window grouping updates Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-03-25 22:48 +0100
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-25 15:12 -0700
Re: window grouping updates Peter Köhlmann <peter-koehlmann@t-online.de> - 2017-03-25 23:34 +0100
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-25 17:13 -0700
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 11:50 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-26 20:28 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 13:59 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-26 21:52 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 15:49 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-26 22:59 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 16:07 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-26 23:25 +0000
Re: window grouping updates Tampon <letsplayfindthestring@bloody.net> - 2017-03-26 23:35 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 16:38 -0700
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 16:43 -0700
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-26 19:16 -0700
Re: window grouping updates owl <owl@rooftop.invalid> - 2017-03-27 13:36 +0000
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-27 10:43 -0700
Re: window grouping updates Snit <usenet@gallopinginsanity.com> - 2017-03-24 10:38 -0700
csiph-web