Set window title and add support for removing window border
This commit is contained in:
parent
a8707e790f
commit
9914817630
12
terminator
12
terminator
|
@ -22,6 +22,7 @@ Usage: terminator [OPTION] ...
|
||||||
-d, --debug Enable debugging
|
-d, --debug Enable debugging
|
||||||
-m, --maximise Maximise the terminator window when it starts
|
-m, --maximise Maximise the terminator window when it starts
|
||||||
-f, --fullscreen Place the window in its fullscreen state when it starts
|
-f, --fullscreen Place the window in its fullscreen state when it starts
|
||||||
|
-b, --borderless Draw the terminator window without a window border (useful with -m)
|
||||||
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
|
-p, --profile=PROFILE Take settings from gnome-terminal profile PROFILE
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -388,6 +389,7 @@ class Terminator:
|
||||||
self._fullscreen = False
|
self._fullscreen = False
|
||||||
|
|
||||||
self.window = gtk.Window ()
|
self.window = gtk.Window ()
|
||||||
|
self.window.set_title ("Terminator")
|
||||||
self.icon = self.window.render_icon (gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_BUTTON)
|
self.icon = self.window.render_icon (gtk.STOCK_DIALOG_INFO, gtk.ICON_SIZE_BUTTON)
|
||||||
self.window.set_icon (self.icon)
|
self.window.set_icon (self.icon)
|
||||||
|
|
||||||
|
@ -609,8 +611,8 @@ def usage ():
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
# define the options
|
# define the options
|
||||||
short_opts = "hdmfp:"
|
short_opts = "hdmfbp:"
|
||||||
long_opts = ["help", "debug", "maximise", "fullscreen", "profile="]
|
long_opts = ["help", "debug", "maximise", "fullscreen", "borderless", "profile="]
|
||||||
|
|
||||||
# parse the options
|
# parse the options
|
||||||
try:
|
try:
|
||||||
|
@ -624,6 +626,7 @@ if __name__ == '__main__':
|
||||||
profile = "Default"
|
profile = "Default"
|
||||||
maximise = False
|
maximise = False
|
||||||
fullscreen = False
|
fullscreen = False
|
||||||
|
borderless = False
|
||||||
|
|
||||||
# check the options
|
# check the options
|
||||||
for opt, arg in opts:
|
for opt, arg in opts:
|
||||||
|
@ -636,6 +639,8 @@ if __name__ == '__main__':
|
||||||
maximise = True
|
maximise = True
|
||||||
if opt in ("-f", "--fullscreen"):
|
if opt in ("-f", "--fullscreen"):
|
||||||
fullscreen = True
|
fullscreen = True
|
||||||
|
if opt in ("-b", "--borderless"):
|
||||||
|
borderless = True
|
||||||
if opt in ("-p", "--profile"):
|
if opt in ("-p", "--profile"):
|
||||||
profile = arg
|
profile = arg
|
||||||
|
|
||||||
|
@ -649,5 +654,8 @@ if __name__ == '__main__':
|
||||||
elif maximise:
|
elif maximise:
|
||||||
term.maximize ()
|
term.maximize ()
|
||||||
|
|
||||||
|
if borderless:
|
||||||
|
term.window.set_decorated (False)
|
||||||
|
|
||||||
gtk.main ()
|
gtk.main ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue