Adds ability to override the WMCLASS_NAME of a window.

This commit is contained in:
Stephen Boddy 2012-06-28 15:38:01 +02:00
parent 1e68ae9107
commit bc9539f187
3 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,9 @@ Set the terminal's working directory
.B \-r, \-\-role=ROLE
Set a custom WM_WINDOW_ROLE property on the window
.TP
.B \-c, \-\-classname=CLASSNAME
Set a custom name (WM_CLASS) property on the window
.TP
.B \-l, \-\-layout=LAYOUT
Start Terminator with a specific layout. The argument here is the name
of a saved layout.

View File

@ -66,6 +66,8 @@ command to execute inside the terminal, and its arguments'))
dest='working_directory', help=_('Set the working directory'))
parser.add_option('-r', '--role', dest='role', help=_('Set a custom \
WM_WINDOW_ROLE property on the window'))
parser.add_option('-c', '--classname', dest='classname', help=_('Set a \
custom name (WM_CLASS) property on the window'))
parser.add_option('-l', '--layout', dest='layout', help=_('Select a layout'))
parser.add_option('-p', '--profile', dest='profile', help=_('Use a \
different profile as the default'))

View File

@ -76,6 +76,9 @@ class Window(Container, gtk.Window):
if options.role is not None:
self.set_role(options.role)
if options.classname is not None:
self.set_wmclass(options.classname, self.wmclass_class)
if options.geometry is not None:
if not self.parse_geometry(options.geometry):
err('Window::__init__: Unable to parse geometry: %s' %