Eu escrevi meu próprio script:
Notas: chame-o com python script.py ou OR python script.py prev A partir de um comando personalizado do Compiz OU do atalho de teclado personalizado do Gnome.
#!/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 <[email protected]>
##################################
import os
import wnck
import gtk
import sys
screen = wnck.screen_get_default()
if not (len(sys.argv) >= 2):
sys.exit()
command = sys.argv[1]
while gtk.events_pending():
gtk.main_iteration()
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):
sys.exit()
for w in windows:
if w.get_application() == active_app:
active_windows.append(w)
if len(active_windows) == 0:
sys.exit()
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]
else:
next_window = active_windows[i+1]
break
if (not next_window) or (not previous_window):
sys.exit()
if command == 'next':
next_window.activate(1)
else:
previous_window.activate(1)