diff --git a/terminatorlib/titlebar.py b/terminatorlib/titlebar.py index 7f2e23fb..9150f9b0 100755 --- a/terminatorlib/titlebar.py +++ b/terminatorlib/titlebar.py @@ -5,6 +5,7 @@ import gtk import gobject +import random from version import APP_NAME from util import dbg @@ -233,6 +234,15 @@ class Titlebar(gtk.EventBox): def create_group(self): """Create a new group""" + defaultgroups=set(['Alpha','Beta','Gamma','Delta','Epsilon','Zeta','Eta', + 'Theta','Iota','Kappa','Lambda','Mu','Nu','Xi', + 'Omnicron','Pi','Rho','Sigma','Tau','Upsilon','Phi', + 'Chi','Psi','Omega']) + currentgroups=set(self.terminator.groups) + freegroups = list(defaultgroups-currentgroups) + random.shuffle(freegroups) + if self.groupentry.get_text()=='' and freegroups: + self.groupentry.set_text(freegroups.pop()) self.groupentry.show() self.groupentry.grab_focus() self.update_visibility()