icewm icon indicating copy to clipboard operation
icewm copied to clipboard

Feature Request | RFC : Raise Window by signal

Open dagbdagb opened this issue 5 years ago • 5 comments

Hi.

If this is the wrong place for this, feel free to close.

TL;DR Can I (via a script or other utility) raise a window in icewm (satisfying one or more parameters), by catching one or more signals, without giving said window input focus?

As many other oldtimers (and probably a lot of people younger than myself), I keep an irssi session running in a terminal at all times. I have occasionally looked into ways to automatically raise this terminal window by some mechanism, but never found something which appeared workable without messy scripting and piping well above my threshold for messy scripting and piping.

Today I found some simple code which allows for signalling an XRaiseWindow by window-name. Promising, but apparently icewm sets some property on the window so it does not work. It does allow for setting the input focus though. Which is exactly the opposite of what I want. :-)

And so I started wondering if maybe some of the icewm contributors may have suggestions for how to achieve what I want, and if icewm by itself or through additional code/features can do what I want. I don't think icewm necessarily needs to be part of the solution, here. But perhaps it makes for a compelling window manager feature? Open minds and all that...

I run irssi in a screen session accessed via ssh. This may be too specific a setup for creating a generic solution. Or maybe not. I have been pondering the use of the visual bell as a cue/signal for raising the window. That would possibly be useful in my scenario, but others might like to make use of some other property.

I would appreciate any useful input regarding this.

dagbdagb avatar Mar 27 '19 13:03 dagbdagb

To follow up on my own issue: 'wmctrl -r irc -b toggle,above' will raise my irc session without giving focus. (my irssi host is named irc....). Doing it again removes the 'above' flag but leaves the window in place. Nice.

Must see if i can trig that bell and catch that signal somehow.

Also found icewmhint. Not sure if it would offer me anything over wmctrl, though.

I guess what I am looking for/hinting at is a generic solution for configuring 'signal'/'action' pairs per window. Maybe wmctrl is just that, and I just need to connect the dots.

dagbdagb avatar Mar 27 '19 14:03 dagbdagb

Check out xdotool as well. You might consider setting the "urgent" flag on the window so Ice will glow the panel entry as well.

bbidulock avatar Mar 29 '19 06:03 bbidulock

Could you clarify the meaning of 'signal'? "catching one or more signals"??

gijsbers avatar May 23 '19 19:05 gijsbers

Sure.

Anything which can be detected but isn't considered 'input' in the traditional sense. I mentioned the keyboard bell above as one possibility. Another could be (signalling via) the window title. Or even some sort of out-of-band mechanism, where a program running on an external machine connects to a socket and provides a command to raise windows with some particular attribute.

Again, my use-case is irssi inside screen. But no reason to let that guide a solution.

I wonder why my wmctrl command above now gives my irssi window focus. While opening a new lxterm does not provide the new window with focus. Something has clearly reversed.

dagbdagb avatar May 23 '19 20:05 dagbdagb

Because irssi is a text application, the link to window manager is weak. You could also monitor the pty mtime.

gijsbers avatar Jun 08 '19 06:06 gijsbers