From a495f290bfe88fd8e33754387fa9c4f25eadbc39 Mon Sep 17 00:00:00 2001 From: Phi Date: Sat, 15 Aug 2020 18:15:55 +0200 Subject: [PATCH 1/3] Add a 'title bar at bottom' option --- remotinator | 2 +- terminator | 2 +- terminatorlib/config.py | 1 + terminatorlib/preferences.glade | 16 ++++++++++++++++ terminatorlib/prefseditor.py | 10 ++++++++++ terminatorlib/terminal.py | 9 +++++++-- 6 files changed, 36 insertions(+), 4 deletions(-) diff --git a/remotinator b/remotinator index 46054edb..cb05dd90 100755 --- a/remotinator +++ b/remotinator @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # remotinator - send commands to Terminator via DBus # Copyright (C) 2006-2010 cmsj@tenshu.net diff --git a/terminator b/terminator index 449a2f3a..4b0fcdbf 100755 --- a/terminator +++ b/terminator @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Terminator - multiple gnome terminals in one window # Copyright (C) 2006-2010 cmsj@tenshu.net diff --git a/terminatorlib/config.py b/terminatorlib/config.py index f5b23254..6ede5a2a 100644 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -101,6 +101,7 @@ DEFAULTS = { 'use_custom_url_handler': False, 'custom_url_handler' : '', 'disable_real_transparency' : False, + 'title_at_bottom' : False, 'title_hide_sizetext' : False, 'title_transmit_fg_color' : '#ffffff', 'title_transmit_bg_color' : '#c80003', diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index ee0fb777..e6cea0e9 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -1333,6 +1333,22 @@ False 6 12 + + + Title bar at bottom + False + True + True + False + 0.5 + True + + + + 1 + 0 + + Hide size from title diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index edab9d6b..89232b6d 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -327,6 +327,11 @@ class PrefsEditor: #Hide size text from the title bar widget = guiget('title_hide_sizetextcheck') widget.set_active(self.config['title_hide_sizetext']) + + # title bar at bottom + widget = guiget('title_at_bottom_checkbutton') + widget.set_active(self.config['title_at_bottom']) + #Always split with profile widget = guiget('always_split_with_profile') widget.set_active(self.config['always_split_with_profile']) @@ -765,6 +770,11 @@ class PrefsEditor: self.config['title_hide_sizetext'] = widget.get_active() self.config.save() + def on_title_at_bottom_checkbutton_toggled(self, widget): + """Title at bottom setting changed""" + self.config['title_at_bottom'] = widget.get_active() + self.config.save() + def on_always_split_with_profile_toggled(self, widget): """Always split with profile setting changed""" self.config['always_split_with_profile'] = widget.get_active() diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 3c98239d..82997aa4 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -163,8 +163,13 @@ class Terminal(Gtk.VBox): self.searchbar.connect('end-search', self.on_search_done) self.show() - self.pack_start(self.titlebar, False, True, 0) - self.pack_start(self.terminalbox, True, True, 0) + if self.config['title_at_bottom']: + self.pack_start(self.terminalbox, True, True, 0) + self.pack_start(self.titlebar, False, True, 0) + else: + self.pack_start(self.titlebar, False, True, 0) + self.pack_start(self.terminalbox, True, True, 0) + self.pack_end(self.searchbar, True, True, 0) self.connect_signals() From 70e90ffc16f344a5df833ce8b7c459bb6282a574 Mon Sep 17 00:00:00 2001 From: Phi Date: Sun, 16 Aug 2020 07:21:17 +0200 Subject: [PATCH 2/3] Restore #!/usr/bin/env python --- remotinator | 2 +- terminator | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/remotinator b/remotinator index cb05dd90..46054edb 100755 --- a/remotinator +++ b/remotinator @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # # remotinator - send commands to Terminator via DBus # Copyright (C) 2006-2010 cmsj@tenshu.net diff --git a/terminator b/terminator index 4b0fcdbf..449a2f3a 100755 --- a/terminator +++ b/terminator @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # # Terminator - multiple gnome terminals in one window # Copyright (C) 2006-2010 cmsj@tenshu.net From 5f130c7b91b13f8b294af6fd5cff4755e51d2f68 Mon Sep 17 00:00:00 2001 From: Phi Date: Sun, 16 Aug 2020 10:16:29 +0200 Subject: [PATCH 3/3] Add 'title at bottom' comment to say it require a restart to take effect. --- terminatorlib/preferences.glade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index e6cea0e9..968fe9cb 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -1335,7 +1335,7 @@ 12 - Title bar at bottom + Title bar at bottom (Require restart) False True True