PDA

View Full Version : [SOLVED] A way to raise (maximize) certain windows with keyboard shortcuts



zmktmk
January 15th, 2010, 03:45 PM
Hi,

I'm looking for a way to raise (maximize) a window running some certain application (eg. firefox) with a gnome keyboard shortcut.
I know that some window managers (eg. xmonad) have the possibility to bind a "run or raise" action to a key, that raises a window with an app when it hasn't been launched, or launches it otherwise.
If you know any feature, tool that I could make use of, please help.

TIA,
Tomek

hariks0
January 15th, 2010, 04:18 PM
Hope you can use an icon in a dock for that.

stinkeye
January 15th, 2010, 07:56 PM
Hi,

I'm looking for a way to raise (maximize) a window running some certain application (eg. firefox) with a gnome keyboard shortcut.
I know that some window managers (eg. xmonad) have the possibility to bind a "run or raise" action to a key, that raises a window with an app when it hasn't been launched, or launches it otherwise.
If you know any feature, tool that I could make use of, please help.

TIA,
Tomek
wmctrl allows you to do various window manager actions from the command line. A useful feature is "wmctrl -a <str>", which will switch to a window containing the string <str> in the title. For example, to activate a firefox window, and start firefox if there is no such window, use the following command:

wmctrl -a Firefox || firefox

zmktmk
January 19th, 2010, 10:36 AM
wmctrl -a Firefox || firefox

This is exactly what I've been looking for. Thanks a lot.

fbicknel
March 25th, 2011, 03:30 PM
Ok, folks... here's an interesting dilemma:

This solution worked perfectly one day, but now I have to wrap the command line in sh -c '...' to get it to work.

What changed, I wonder?

Here's what changed:


Upgraded this morning (snip from log attached)

Admittedly there might be a better thread for this, but I couldn't find one. It's more menu related than wmctrl, I would assume.