Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I miss from DockBarX is the possibility of adding keyboard shortcuts for switching to the next/previous windows in the group of windows for an application, and the next/previous applications.

Is there a way I could have this with Unity? Perhaps Unity already offers such features that I do not know about? normal behavior?

Also, I would like to preempt the suggestion that I simply shorten the default width of windows to accommodate the for the launcher. Firstly, this defeats the purpose of having purchased a monitor this wide in the first place; 1024 pixels is an important minimum width to meet because many popular websites are de

share|improve this question
up vote 1 down vote accepted

I wrote my own script:

Notes: call it with python next OR python prev FROM a Compiz custom command OR Gnome custom keyboard shortcut.

#!/usr/bin/env python
# by desgua
# version 0.1.3 - May 06 2011
# To minimize with unity Launcher
# Modified for next/previous active windows by Andrei Canciu <>
import os
import wnck
import gtk 
import sys 
screen = wnck.screen_get_default()

if not (len(sys.argv) >= 2): 

command = sys.argv[1]

while gtk.events_pending():

windows = screen.get_windows()
active_app = screen.get_active_window().get_application()
active_window = screen.get_active_window()
active_windows = []
previous_window = None
next_window = None

if (len(windows) == 0) or (not active_app) or (not active_window):
for w in windows:
    if w.get_application() == active_app:

if len(active_windows) == 0:

for i in range(0, len(active_windows)):
  current_window = active_windows[i]
  if current_window == active_window:
    previous_window = active_windows[i-1]
    if i+1 >= len(active_windows):
      next_window = active_windows[0]
      next_window = active_windows[i+1]


if (not next_window) or (not previous_window):

if command == 'next':
share|improve this answer
Actually the above script is an exercise in futility. There are plugins in Compiz (CCSM) including the default "Static Application Switcher" that have the possibility to switch between windows in a group. The above script can still be used as a base for some more complicated processing. – user12681 May 23 '11 at 3:23

It's easy just press Alt+Ctrl+TAB

share|improve this answer
Apparently, Alt+Ctrl+TAB is the same as Alt+Tab only that all the windows of all the apps are laid down there. This is not what I want though. In DockBarX, I could have a shortcut that would only switch among the windows of a single app. I guess a custom script can always be written - I just hoped there was an easier way to do it. – user12681 May 18 '11 at 22:03
Actually, it's exactly the same as Ctrl+TAB. Perhaps this is not working in Ubuntu/Unity. Anyway, I just wrote my own script, see below. – user12681 May 21 '11 at 4:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.