Results 1 to 5 of 5

Thread: A way to raise (maximize) certain windows with keyboard shortcuts

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Beans
    2

    A way to raise (maximize) certain windows with keyboard shortcuts

    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

  2. #2
    Join Date
    May 2008
    Location
    Thrissur, Kerala
    Beans
    461
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Smile Re: A way to raise (maximize) certain windows with keyboard shortcuts

    Hope you can use an icon in a dock for that.
    How can I use a signature in forums?

  3. #3
    Join Date
    Oct 2008
    Beans
    3,509

    Re: A way to raise (maximize) certain windows with keyboard shortcuts

    Quote Originally Posted by zmktmk View Post
    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:
    Code:
    wmctrl -a Firefox || firefox

  4. #4
    Join Date
    Jan 2010
    Beans
    2

    Re: A way to raise (maximize) certain windows with keyboard shortcuts

    Quote Originally Posted by stinkeye View Post
    Code:
    wmctrl -a Firefox || firefox
    This is exactly what I've been looking for. Thanks a lot.

  5. #5
    Join Date
    Jun 2009
    Location
    Earth
    Beans
    59
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: A way to raise (maximize) certain windows with keyboard shortcuts

    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.
    - Frank

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •