diff --git a/terminator b/terminator index 3ffb1a09..2af3cedb 100755 --- a/terminator +++ b/terminator @@ -97,6 +97,8 @@ if __name__ == '__main__': inside the terminal") parser.add_option ("--working-directory", metavar="DIR", dest="working_directory", help="Set the terminal's working directory") + parser.add_option ("-r", "--role", dest="role", + help="Set custom WM_WINDOW_ROLE property") for item in ['--sm-client-id', '--sm-config-prefix', '--screen']: parser.add_option (item, dest="dummy", action="store", help=SUPPRESS_HELP) @@ -160,7 +162,7 @@ See the following bug report for more details: dbg ('profile_cb: settled on profile: "%s"' % options.profile) term = Terminator (options.profile, command, options.fullscreen, options.maximise, options.borderless, options.no_gconf, - options.geometry, options.hidden, options.forcedtitle) + options.geometry, options.hidden, options.forcedtitle, options.role) term.origcwd = origcwd diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 60c43b0b..2dad6357 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -45,6 +45,7 @@ class TerminatorWindowTitle: _window = None text = None _forced = False + _role = None def __init__ (self, window): self._window = window @@ -168,7 +169,7 @@ class Terminator: def __init__ (self, profile = None, command = None, fullscreen = False, maximise = False, borderless = False, no_gconf = False, - geometry = None, hidden = False, forcedtitle = None): + geometry = None, hidden = False, forcedtitle = None, role=None): self.profile = profile self.command = command @@ -267,6 +268,9 @@ class Terminator: self.set_closebutton_style () self.window = gtk.Window () + if role: + self.window.set_role(role) + self.windowtitle = TerminatorWindowTitle (self.window) if forcedtitle: self.windowtitle.force_title (forcedtitle)