6

I'm interested in a command to switch to the next/previous application window in Ubuntu 16.04. I know I can do that through Alt+Tab ↹, but I want to know which command is run on the background when the combination is pressed.

One interesting behavior that would be useful (but not necessary) is that this command would not only raise the next application in the Alt+Tab ↹ list, but also raise each window of the same application each time it is invoked, if one application happens to have more than one window open.

Any help on this is appreciated. Thanks!

0

2 Answers 2

6

The shortcuts control the window manager, to do the same using terminal commands there's wmctrl. Here are some usage examples:

  • list the windows being managed by the window manager

    wmctrl -l
    
  • switch to the desktop containing Firefox, raise the window and give it focus

    wmctrl -a firefox
    
  • move Firefox to the current desktop, raise the window and give it focus

    wmctrl -R firefox
    
  • Toggle “fullscreen” and “stay above“ mode for currently active window

    wmctrl -r :ACTIVE: -b toggle,fullscreen,above
    
  • Select a window by clicking on it, maximize it horizontally and make it invisible for the taskbar

    wmctrl -r :SELECT: -b add,maximized_horz,skip_taskbar
    

Read man wmctrl and wmctrl‘s homepage for more. The window properties available for the -b option may partially be specific to the window manager in use, use wmctrl -m to get its name and search from there – or just try it out.

-1

In Ubuntu 17.04 these keyboard commands are active...

ALT+TAB = switch open applications

ALT+` = switch open windows (displayed first by ALT+TAB)

ALT+ESC = switch open windows directly

To check for other useful keyboard commands, open the keyboard settings and check the shortcut settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .