diff -Nru terminus-1.19.1/data/interface/properties.ui terminus-1.20.0/data/interface/properties.ui --- terminus-1.19.1/data/interface/properties.ui 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/data/interface/properties.ui 2022-11-20 20:52:10.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -204,7 +204,7 @@ - + True False @@ -249,7 +249,6 @@ True True True - rgb(0,0,0) 3 @@ -257,11 +256,10 @@ - + True True True - rgb(238,238,236) 2 @@ -363,7 +361,6 @@ True True True - rgb(255,255,255) 2 @@ -371,11 +368,10 @@ - + True True True - rgb(136,138,133) 2 @@ -383,11 +379,10 @@ - + True True True - rgb(255,255,255) 3 @@ -395,11 +390,10 @@ - + True True True - rgb(255,255,255) 2 @@ -407,11 +401,10 @@ - + True True True - rgb(0,0,0) 3 @@ -531,7 +524,6 @@ 3 4 - 7 @@ -746,17 +738,137 @@ 4 3 6 + 4 True False + start + <b>Top bar</b> + True - 4 - 5 - 6 + 0 + 11 + 10 + + + + + True + False + + + 0 + 12 + 2 + + + + + True + False + 12 + + + 0 + 13 + 2 + + + + + True + False + start + Text + + + 2 + 12 + + + + + True + False + start + Background + + + 3 + 12 + 7 + + + + + True + False + start + Focused terminal: + + + 1 + 13 + + + + + True + False + start + Inactive terminal: + + + 1 + 14 + + + + + True + True + True + + + 2 + 13 + + + + + True + True + True + + + 2 + 14 + + + + + True + True + True + + + 3 + 13 + + + + + True + True + True + + + 3 + 14 @@ -766,8 +878,9 @@ 4 - 6 + 13 6 + 2 diff -Nru terminus-1.19.1/data/org.rastersoft.terminus.gschema.xml terminus-1.20.0/data/org.rastersoft.terminus.gschema.xml --- terminus-1.19.1/data/org.rastersoft.terminus.gschema.xml 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/data/org.rastersoft.terminus.gschema.xml 2022-11-20 20:52:10.000000000 +0000 @@ -21,7 +21,27 @@ Background color The default color used for the terminal background - + + "#000000" + Focused text color + The default color used for the top bar text when a terminal has the keyboard focus + + + "#99C1F1" + Focused background color + The default color used for the top bar text when a terminal has the keyboard focus + + + "#000000" + Inactive text color + The default color used for the top bar text when a terminal doesn't have the keyboard focus + + + "#C0C0C0" + Inactive background color + The default color used for the top bar text when a terminal doesn't have the keyboard focus + + "" Bold color The default color used for the terminal bold letters. An empty string means "use the default color". @@ -208,5 +228,15 @@ Split the current terminal vertically + + BackSpace']]> + Close the active tile + + + + F4']]> + Close the active tile + + diff -Nru terminus-1.19.1/debian/changelog terminus-1.20.0/debian/changelog --- terminus-1.19.1/debian/changelog 2022-10-24 12:16:25.000000000 +0000 +++ terminus-1.20.0/debian/changelog 2022-11-28 11:45:41.000000000 +0000 @@ -1,3 +1,11 @@ +terminus (1.20.0-1) unstable; urgency=medium + + * New upstream version + * Update man page + * Update debian/copyright debian/* year + + -- Barak A. Pearlmutter Mon, 28 Nov 2022 11:45:41 +0000 + terminus (1.19.1-1) unstable; urgency=medium * New upstream version diff -Nru terminus-1.19.1/debian/copyright terminus-1.20.0/debian/copyright --- terminus-1.19.1/debian/copyright 2022-10-24 11:02:01.000000000 +0000 +++ terminus-1.20.0/debian/copyright 2022-11-28 11:44:45.000000000 +0000 @@ -15,7 +15,7 @@ Files: debian/* Copyright: 2016 (C) Raster Software Vigo (Sergio Costas) - 2018 Barak A. Pearlmutter + 2018-2022 Barak A. Pearlmutter License: GPL-3.0 License: GPL-3.0 diff -Nru terminus-1.19.1/debian/patches/debian-changes terminus-1.20.0/debian/patches/debian-changes --- terminus-1.19.1/debian/patches/debian-changes 2022-10-24 12:16:25.000000000 +0000 +++ terminus-1.20.0/debian/patches/debian-changes 2022-11-28 11:45:41.000000000 +0000 @@ -4,8 +4,14 @@ atomic patches. --- /dev/null -+++ terminus-1.19.1/ChangeLog -@@ -0,0 +1,270 @@ ++++ terminus-1.20.0/ChangeLog +@@ -0,0 +1,276 @@ ++terminus (1.19.1-Debian1) sid; urgency=low ++ ++ * Added support for Gnome Shell 43 ++ ++ -- Sergio Costas Rodriguez Thu, 13 Oct 2022 23:55:00 +0200 ++ +terminus (1.19.0-Debian1) sid; urgency=low + + * Added shortcuts for horizontal and vertical split diff -Nru terminus-1.19.1/debian/terminus.1 terminus-1.20.0/debian/terminus.1 --- terminus-1.19.1/debian/terminus.1 2022-09-29 08:52:03.000000000 +0000 +++ terminus-1.20.0/debian/terminus.1 2022-11-28 11:43:03.000000000 +0000 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. -.TH TERMINUS "1" "September 2022" "terminus 1.19.0-1" "User Commands" +.TH TERMINUS "1" "November 2022" "terminus 1.20.0-1" "User Commands" .SH NAME terminus \- Drop-down or in-window terminal for X11 and Wayland .SH DESCRIPTION diff -Nru terminus-1.19.1/HISTORY.md terminus-1.20.0/HISTORY.md --- terminus-1.19.1/HISTORY.md 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/HISTORY.md 2022-11-20 20:52:10.000000000 +0000 @@ -1,5 +1,13 @@ # History of versions # +* Version 1.20.0 (2022-11-20) + * Fixed Guake window zero height on first run + * Fixed Guake keybinding failing until re-set + * Added hotkeys to close a tile and a tab + * Now asks for confirmation when trying to close a terminal with a running program + * Fixed color scheme selection + * Allows to change the top bar colors + * Cleaned the color management code * Version 1.19.1 (2022-10-13) * Added support for Gnome Shell 43 * Version 1.19.0 (2022-09-28) diff -Nru terminus-1.19.1/meson.build terminus-1.20.0/meson.build --- terminus-1.19.1/meson.build 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/meson.build 2022-11-20 20:52:10.000000000 +0000 @@ -1,6 +1,6 @@ project('terminus', ['c','vala'], - version: '1.19.1') + version: '1.20.0') add_global_arguments('-DGETTEXT_PACKAGE="terminus"',language: 'c') diff -Nru terminus-1.19.1/PKGBUILD terminus-1.20.0/PKGBUILD --- terminus-1.19.1/PKGBUILD 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/PKGBUILD 2022-11-20 20:52:10.000000000 +0000 @@ -1,5 +1,5 @@ pkgname=terminus-rastersoft -pkgver=1.19.0 +pkgver=1.20.0 pkgrel=2 pkgdesc="X & Wayland terminal that mixes the capabilities of Guake and Terminator" license=('GPL3') diff -Nru terminus-1.19.1/po/POTFILES.in terminus-1.20.0/po/POTFILES.in --- terminus-1.19.1/po/POTFILES.in 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/po/POTFILES.in 2022-11-20 20:52:10.000000000 +0000 @@ -2,6 +2,7 @@ src/base.vala src/bindkeys.vala src/container.vala +src/keybinding.vala src/notetab.vala src/palete.vala src/params.vala diff -Nru terminus-1.19.1/rpmbuild/SPECS/terminus.spec terminus-1.20.0/rpmbuild/SPECS/terminus.spec --- terminus-1.19.1/rpmbuild/SPECS/terminus.spec 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/rpmbuild/SPECS/terminus.spec 2022-11-20 20:52:10.000000000 +0000 @@ -1,5 +1,5 @@ Name: terminus -Version: 1.19.0 +Version: 1.20.0 Release: 1 License: Unknown/not set Summary: X and Wayland terminal that mixes the capabilities of Guake and Terminator diff -Nru terminus-1.19.1/src/base.vala terminus-1.20.0/src/base.vala --- terminus-1.19.1/src/base.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/base.vala 2022-11-20 20:52:10.000000000 +0000 @@ -25,18 +25,54 @@ */ class Base : Gtk.Notebook { - public signal void - ended(); - public signal void - new_window(); + public signal void ended(); + public signal void new_window(); + public Gtk.Window ?top_window; + private Gtk.MessageDialog notification_window; - public Base(string working_directory, - string[] ?commands) + public Base(string working_directory, + string[] ?commands, + Gtk.Window ?top_window) { this.page_added.connect(this.check_pages); this.page_removed.connect(this.check_pages); this.new_terminal_tab(working_directory, commands); this.scrollable = true; + this.top_window = top_window; + } + + public void + ask_kill_childs(string title, string subtitle, string button_text, Killable obj) + { + this.notification_window = new Gtk.MessageDialog(this.top_window, + Gtk.DialogFlags.MODAL | Gtk.DialogFlags.USE_HEADER_BAR, + Gtk.MessageType.QUESTION, + Gtk.ButtonsType.NONE, + ""+title+""); + this.notification_window.format_secondary_markup(subtitle); + this.notification_window.use_markup = true; + this.notification_window.add_button(_("Cancel"), Gtk.ResponseType.REJECT); + var close_button = this.notification_window.add_button(button_text, Gtk.ResponseType.ACCEPT); + close_button.get_style_context().add_class(Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); + this.notification_window.set_default_response(Gtk.ResponseType.REJECT); + this.notification_window.response.connect((response_id) => { + this.notification_window.hide(); + if (response_id == Gtk.ResponseType.ACCEPT) { + obj.kill_all_children(); + } + }); + this.notification_window.show_all(); + } + + public bool + check_if_running_processes() { + for(var i=0; i. + */ + +using Gdk; + +namespace Terminus { + + class KeyBinding: Object { + public string name; + public string description; + private uint keyval; + private Gdk.ModifierType state; + + public KeyBinding(string name, string description) { + this.name = name; + this.description = description; + Terminus.keybind_settings.changed.connect(this.settings_changed); + this.settings_changed(name); + } + + public void settings_changed(string name) { + uint keyval; + Gdk.ModifierType state; + + if (name != this.name) { + return; + } + + Gtk.accelerator_parse(Terminus.keybind_settings.get_string(this.name), out keyval, out state); + if (keyval < 128) { + keyval &= ~32; + } + this.keyval = keyval; + this.state = state; + } + + public bool check_key(Gdk.EventKey event) { + if ((this.keyval == event.keyval) && (this.state == event.state)) { + return true; + } + return false; + } + } + + class KeyBindings: Object { + public KeyBinding[] key_binding_list; + + public KeyBindings() { + this.key_binding_list = {}; + this.add_keybinding(_("New window"), "new-window"); + this.add_keybinding(_("New tab"), "new-tab"); + this.add_keybinding(_("Next tab"), "next-tab"); + this.add_keybinding(_("Previous tab"), "previous-tab"); + this.add_keybinding(_("Show guake terminal"), "guake-mode"); + this.add_keybinding(_("Copy text into the clipboard"), "copy"); + this.add_keybinding(_("Paste text from the clipboard"), "paste"); + this.add_keybinding(_("Move focus to the terminal on the left"), "terminal-left"); + this.add_keybinding(_("Move focus to the terminal on the right"), "terminal-right"); + this.add_keybinding(_("Move focus to the terminal above"), "terminal-up"); + this.add_keybinding(_("Move focus to the terminal below"), "terminal-down"); + this.add_keybinding(_("Make font bigger"), "font-size-big"); + this.add_keybinding(_("Make font smaller"), "font-size-small"); + this.add_keybinding(_("Reset font size"), "font-size-normal"); + this.add_keybinding(_("Show menu"), "show-menu"); + this.add_keybinding(_("Split horizontally"), "split-horizontally"); + this.add_keybinding(_("Split vertically"), "split-vertically"); + this.add_keybinding(_("Close the active tile"), "close-tile"); + this.add_keybinding(_("Close the active tab"), "close-tab"); + } + + private void add_keybinding(string description, string name) { + this.key_binding_list += new KeyBinding(name, description); + } + + public string? find_key(Gdk.EventKey event) { + Gdk.EventKey eventkey = event.key; + // SHIFT, CTRL, LEFT ALT, ALT+GR + eventkey.state &= Gdk.ModifierType.SHIFT_MASK | Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK | + Gdk.ModifierType.MOD5_MASK; + + if (eventkey.keyval < 128) { + // to avoid problems with upper and lower case + eventkey.keyval &= ~32; + } + foreach(var key in this.key_binding_list) { + if (key.check_key(eventkey)) { + return key.name; + } + } + return null; + } + } +} diff -Nru terminus-1.19.1/src/meson.build terminus-1.20.0/src/meson.build --- terminus-1.19.1/src/meson.build 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/meson.build 2022-11-20 20:52:10.000000000 +0000 @@ -4,7 +4,7 @@ cfg_terminus.set('GETTEXT_PACKAGE', 'terminus') cfg_terminus.set('RELEASE_NAME', 'terminus') cfg_terminus.set('PREFIX', get_option('prefix')) -cfg_terminus.set('VERSION', '1.19.1') +cfg_terminus.set('VERSION', '1.20.0') cfg_terminus.set('TESTSRCDIR', meson.source_root()) cfgfile_2 = configure_file( @@ -27,6 +27,7 @@ terminus_sources += ['base.vala'] terminus_sources += ['bindkeys.vala'] terminus_sources += ['container.vala'] +terminus_sources += ['keybinding.vala'] terminus_sources += ['notetab.vala'] terminus_sources += ['palete.vala'] terminus_sources += ['params.vala'] diff -Nru terminus-1.19.1/src/notetab.vala terminus-1.20.0/src/notetab.vala --- terminus-1.19.1/src/notetab.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/notetab.vala 2022-11-20 20:52:10.000000000 +0000 @@ -24,7 +24,7 @@ * This is the widget put in each tab */ - class Notetab : Gtk.EventBox { + class Notetab : Gtk.EventBox, Killable { private Terminus.Container top_container; private Gtk.Label title; private Terminus.Base main_container; @@ -35,6 +35,9 @@ { this.main_container = main_container; this.top_container = top_container; + this.top_container.close_tab.connect(() => { + this.close_tab(); + }); this.inner_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0); this.title = new Gtk.Label(""); this.title.margin_end = 3; @@ -44,18 +47,36 @@ this.add(this.inner_box); this.show_all(); close_button.clicked.connect(() => { - this.main_container.delete_page(this.top_container); + this.close_tab(); }); this.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK); this.button_release_event.connect((event) => { if (event.button == 2) { - this.main_container.delete_page(this.top_container); + this.close_tab(); return true; } return false; }); } + private void + close_tab() + { + if (this.top_container.check_if_running_processes()) { + this.main_container.ask_kill_childs(_("This tab has running processes inside."), + _("Closing it will kill them."), + _("Close tab"), this); + } else { + this.kill_all_children(); + } + } + + public void + kill_all_children() + { + this.main_container.delete_page(this.top_container); + } + public void change_title(string new_title) { diff -Nru terminus-1.19.1/src/settings.vala terminus-1.20.0/src/settings.vala --- terminus-1.19.1/src/settings.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/settings.vala 2022-11-20 20:52:10.000000000 +0000 @@ -19,6 +19,69 @@ using Gdk; namespace Terminus { + + class HTMLColorButton: Object { + private Gtk.ColorButton color_button; + private Gtk.ToggleButton ?toggle_button; + private string property_name; + private ulong connect_id; + private ulong enable_id; + + public signal void color_set(); + + public HTMLColorButton(Gtk.Builder builder, string color_button, string ?enable_button) { + property_name = color_button.replace("_", "-"); + this.color_button = builder.get_object(color_button) as Gtk.ColorButton; + if (enable_button != null) { + this.toggle_button = builder.get_object(enable_button) as Gtk.ToggleButton; + this.enable_id = this.toggle_button.toggled.connect(() => { + this.set_status(); + }); + } else { + this.toggle_button = null; + } + this.connect_id = this.color_button.color_set.connect(() => { + this.set_status(); + this.color_set(); + }); + var current_color = Gdk.RGBA(); + var parsed = current_color.parse(Terminus.settings.get_string(this.property_name)); + if (this.toggle_button != null) { + this.toggle_button.active = parsed; + this.color_button.sensitive = parsed; + } + if (parsed) { + this.color_button.rgba = current_color; + } + } + + ~HTMLColorButton() { + this.color_button.disconnect(this.connect_id); + this.toggle_button.disconnect(this.enable_id); + } + + public void set_status() { + if (this.toggle_button != null) { + if (!this.toggle_button.active) { + Terminus.settings.set_string(this.property_name, ""); + } + this.color_button.sensitive = this.toggle_button.active; + } else { + var rgba = this.color_button.rgba; + Terminus.settings.set_string(this.property_name, "#%02X%02X%02X".printf( + (uint)(255 * rgba.red), + (uint)(255 * rgba.green), + (uint)(255 * rgba.blue) + )); + } + } + + public void set_rgba(Gdk.RGBA new_color) { + this.color_button.rgba = new_color; + this.set_status(); + } + } + class Properties : Gtk.Window { private Gtk.CheckButton use_system_font; private Gtk.CheckButton infinite_scroll; @@ -29,14 +92,21 @@ private Gtk.CheckButton use_custom_shell; private Gtk.SpinButton scroll_value; private Gtk.Button custom_font; - private Gtk.ColorButton fg_color; - private Gtk.ColorButton bg_color; - private Gtk.ColorButton bold_color; - private Gtk.ColorButton cursor_color_fg; - private Gtk.ColorButton cursor_color_bg; - private Gtk.ColorButton highlight_color_fg; - private Gtk.ColorButton highlight_color_bg; + + private HTMLColorButton fg_color; + private HTMLColorButton bg_color; + private HTMLColorButton bold_color; + private HTMLColorButton cursor_color_fg; + private HTMLColorButton cursor_color_bg; + private HTMLColorButton highlight_color_fg; + private HTMLColorButton highlight_color_bg; + private HTMLColorButton focused_fg_color; + private HTMLColorButton focused_bg_color; + private HTMLColorButton inactive_fg_color; + private HTMLColorButton inactive_bg_color; + private Gtk.ColorButton[] palette_colors; + private Gtk.ComboBox color_scheme; private Gtk.ListStore color_schemes; private Gtk.ComboBox palette_scheme; @@ -45,7 +115,6 @@ private Gtk.ListStore keybindings; private Gtk.Entry custom_shell; - private bool editing_keybind; private bool changing_guake; private string old_keybind; @@ -82,16 +151,22 @@ this.custom_font.sensitive = this.use_system_font.active; }); - this.fg_color = main_window.get_object("text_color") as Gtk.ColorButton; - this.bg_color = main_window.get_object("bg_color") as Gtk.ColorButton; - this.bold_color = main_window.get_object("bold_color") as Gtk.ColorButton; + this.fg_color = new HTMLColorButton(main_window, "fg_color", null); + this.bg_color = new HTMLColorButton(main_window, "bg_color", null); + this.bold_color = new HTMLColorButton(main_window, "bold_color", "use_bold_color"); + this.cursor_color_fg = new HTMLColorButton(main_window, "cursor_fg_color", "use_cursor_color"); + this.cursor_color_bg = new HTMLColorButton(main_window, "cursor_bg_color", "use_cursor_color"); + this.highlight_color_fg = new HTMLColorButton(main_window, "highlight_fg_color", "use_highlight_color"); + this.highlight_color_bg = new HTMLColorButton(main_window, "highlight_bg_color", "use_highlight_color"); + this.focused_fg_color = new HTMLColorButton(main_window, "focused_fg_color", null); + this.focused_bg_color = new HTMLColorButton(main_window, "focused_bg_color", null); + this.inactive_fg_color = new HTMLColorButton(main_window, "inactive_fg_color", null); + this.inactive_bg_color = new HTMLColorButton(main_window, "inactive_bg_color", null); + this.use_bold_color = main_window.get_object("use_bold_color") as Gtk.CheckButton; - this.cursor_color_fg = main_window.get_object("cursor_color_fg") as Gtk.ColorButton; - this.cursor_color_bg = main_window.get_object("cursor_color_bg") as Gtk.ColorButton; this.use_cursor_color = main_window.get_object("use_cursor_color") as Gtk.CheckButton; - this.highlight_color_fg = main_window.get_object("highlight_color_fg") as Gtk.ColorButton; - this.highlight_color_bg = main_window.get_object("highlight_color_bg") as Gtk.ColorButton; this.use_highlight_color = main_window.get_object("use_highlight_color") as Gtk.CheckButton; + this.color_scheme = main_window.get_object("color_scheme") as Gtk.ComboBox; this.color_schemes = main_window.get_object("color_schemes") as Gtk.ListStore; this.palette_scheme = main_window.get_object("palette_scheme") as Gtk.ComboBox; @@ -99,7 +174,7 @@ this.cursor_shape = main_window.get_object("cursor_shape") as Gtk.ComboBox; this.palette_colors = {}; string[] palette_string = Terminus.settings.get_strv("color-palete"); - var tmpcolor = Gdk.RGBA(); + var tmpcolor = Gdk.RGBA(); for (int i = 0; i < 16; i++) { Gtk.ColorButton palette_button = main_window.get_object("palette%d".printf(i)) as Gtk.ColorButton; tmpcolor.parse(palette_string[i]); @@ -107,90 +182,6 @@ this.palette_colors += palette_button; } - var tmp_color = Gdk.RGBA(); - string key; - tmp_color.parse(Terminus.settings.get_string("fg-color")); - this.fg_color.set_rgba(tmp_color); - tmp_color.parse(Terminus.settings.get_string("bg-color")); - this.bg_color.set_rgba(tmp_color); - key = Terminus.settings.get_string("bold-color"); - if (key != "") { - tmp_color.parse(key); - this.bold_color.set_rgba(tmp_color); - this.use_bold_color.active = true; - this.bold_color.sensitive = true; - } else { - this.use_bold_color.active = false; - this.bold_color.sensitive = false; - } - key = Terminus.settings.get_string("highlight-fg-color"); - if (key != "") { - tmp_color.parse(key); - this.highlight_color_fg.set_rgba(tmp_color); - tmp_color.parse(Terminus.settings.get_string("highlight-bg-color")); - this.highlight_color_bg.set_rgba(tmp_color); - this.use_highlight_color.active = true; - this.highlight_color_fg.sensitive = true; - this.highlight_color_bg.sensitive = true; - } else { - this.use_highlight_color.active = false; - this.highlight_color_fg.sensitive = false; - this.highlight_color_bg.sensitive = false; - } - - key = Terminus.settings.get_string("cursor-fg-color"); - if (key != "") { - tmp_color.parse(key); - this.cursor_color_fg.set_rgba(tmp_color); - tmp_color.parse(Terminus.settings.get_string("cursor-bg-color")); - this.cursor_color_bg.set_rgba(tmp_color); - this.use_cursor_color.active = true; - this.cursor_color_fg.sensitive = true; - this.cursor_color_bg.sensitive = true; - } else { - this.use_cursor_color.active = false; - this.cursor_color_fg.sensitive = false; - this.cursor_color_bg.sensitive = false; - } - - this.fg_color.color_set.connect(() => { - this.set_all_properties("fg-color"); - }); - this.bg_color.color_set.connect(() => { - this.set_all_properties("bg-color"); - }); - this.bold_color.color_set.connect(() => { - this.set_all_properties("bold-color"); - }); - this.use_bold_color.toggled.connect_after(() => { - this.bold_color.sensitive = this.use_bold_color.get_active(); - this.set_all_properties("bold-color"); - }); - this.cursor_color_fg.color_set.connect(() => { - this.set_all_properties("cursor-fg-color"); - }); - this.cursor_color_bg.color_set.connect(() => { - this.set_all_properties("cursor-bg-color"); - }); - this.use_cursor_color.toggled.connect_after(() => { - this.cursor_color_fg.sensitive = this.use_cursor_color.get_active(); - this.cursor_color_bg.sensitive = this.use_cursor_color.get_active(); - this.set_all_properties("cursor-fg-color"); - this.set_all_properties("cursor-bg-color"); - }); - this.highlight_color_fg.color_set.connect(() => { - this.set_all_properties("highlight-fg-color"); - }); - this.highlight_color_bg.color_set.connect(() => { - this.set_all_properties("highlight-bg-color"); - }); - this.use_highlight_color.toggled.connect_after(() => { - this.highlight_color_fg.sensitive = this.use_highlight_color.get_active(); - this.highlight_color_bg.sensitive = this.use_highlight_color.get_active(); - this.set_all_properties("highlight-fg-color"); - this.set_all_properties("highlight-bg-color"); - }); - foreach (var button in this.palette_colors) { button.color_set.connect(() => { this.updated_palette(); @@ -220,6 +211,7 @@ this.disable_palette_change = false; this.updated_palette(); }); + this.color_scheme.changed.connect(() => { var selected = this.color_scheme.get_active(); if (selected < 0) { @@ -234,10 +226,15 @@ if (scheme.custom) { return; } - this.fg_color.rgba = scheme.text_fg; - this.bg_color.rgba = scheme.text_bg; - this.set_all_properties("fg-color"); - this.set_all_properties("bg-color"); + this.fg_color.set_rgba(scheme.text_fg); + this.bg_color.set_rgba(scheme.text_bg); + }); + + this.fg_color.color_set.connect(() => { + this.color_scheme.set_active(this.get_current_scheme()); + }); + this.bg_color.color_set.connect(() => { + this.color_scheme.set_active(this.get_current_scheme()); }); var scroll_lines = main_window.get_object("scroll_lines") as Gtk.Adjustment; @@ -271,8 +268,6 @@ Terminus.settings.bind("use-custom-shell", this.use_custom_shell, "active", GLib.SettingsBindFlags.DEFAULT); int counter = -1; - int selected = 0; - int selcount = 0; foreach (var scheme in Terminus.main_root.palettes) { counter++; if ((!scheme.custom) && (scheme.text_fg == null)) { @@ -286,21 +281,14 @@ var id = GLib.Value(typeof(int)); id.set_int(counter); this.color_schemes.set_value(iter, 1, id); - if (scheme.compare_scheme()) { - selected = selcount; - } - selcount++; } + this.color_scheme.set_active(this.get_current_scheme()); this.custom_shell.sensitive = this.use_custom_shell.active; this.custom_font.sensitive = this.use_system_font.active; this.scroll_value.sensitive = !this.infinite_scroll.active; - this.color_scheme.set_active(selected); - counter = -1; - selected = 0; - selcount = 0; foreach (var scheme in Terminus.main_root.palettes) { counter++; if ((!scheme.custom) && (scheme.get_palette().length == 0)) { @@ -314,31 +302,13 @@ var id = GLib.Value(typeof(int)); id.set_int(counter); this.palette_schemes.set_value(iter, 1, id); - if (scheme.compare_palette()) { - selected = selcount; - } - selcount++; } - this.palette_scheme.set_active(selected); + this.palette_scheme.set_active(this.get_current_palette()); this.keybindings = new Gtk.ListStore(3, typeof(string), typeof(string), typeof(string)); - this.add_keybinding(_("New window"), "new-window"); - this.add_keybinding(_("New tab"), "new-tab"); - this.add_keybinding(_("Next tab"), "next-tab"); - this.add_keybinding(_("Previous tab"), "previous-tab"); - this.add_keybinding(_("Show guake terminal"), "guake-mode"); - this.add_keybinding(_("Copy text into the clipboard"), "copy"); - this.add_keybinding(_("Paste text from the clipboard"), "paste"); - this.add_keybinding(_("Move focus to the terminal on the left"), "terminal-left"); - this.add_keybinding(_("Move focus to the terminal on the right"), "terminal-right"); - this.add_keybinding(_("Move focus to the terminal above"), "terminal-up"); - this.add_keybinding(_("Move focus to the terminal below"), "terminal-down"); - this.add_keybinding(_("Make font bigger"), "font-size-big"); - this.add_keybinding(_("Make font smaller"), "font-size-small"); - this.add_keybinding(_("Reset font size"), "font-size-normal"); - this.add_keybinding(_("Show menu"), "show-menu"); - this.add_keybinding(_("Split horizontally"), "split-horizontally"); - this.add_keybinding(_("Split vertically"), "split-vertically"); + foreach (var kb in Terminus.key_bindings.key_binding_list) { + this.add_keybinding(kb.description, kb.name); + } var keybindings_view = main_window.get_object("keybindings") as Gtk.TreeView; keybindings_view.activate_on_single_click = true; @@ -352,110 +322,6 @@ this.key_press_event.connect(this.on_key_press); } - public void - set_all_properties(string ?key) - { - bool changed_text_colors = false; - bool changed = false; - - if (key == "fg-color") { - changed_text_colors = true; - var color = this.fg_color.rgba; - var htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - if (Terminus.settings.get_string("fg-color") != htmlcolor) { - Terminus.settings.set_string("fg-color", htmlcolor); - changed = true; - } - } - - if (key == "bg-color") { - changed_text_colors = true; - var color = this.bg_color.rgba; - var htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - if (Terminus.settings.get_string("bg-color") != htmlcolor) { - Terminus.settings.set_string("bg-color", htmlcolor); - changed = true; - } - } - if (key == "bold-color") { - string htmlcolor; - if (this.use_bold_color.active) { - var color = this.bold_color.rgba; - htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - } else { - htmlcolor = ""; - } - if (Terminus.settings.get_string("bold-color") != htmlcolor) { - Terminus.settings.set_string("bold-color", htmlcolor); - } - } - if ((key == "cursor-fg-color") || changed_text_colors) { - string htmlcolor; - if (this.use_cursor_color.active) { - var color = this.cursor_color_fg.rgba; - htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - } else { - htmlcolor = ""; - } - if ((Terminus.settings.get_string("cursor-fg-color") != htmlcolor) || changed_text_colors) { - Terminus.settings.set_string("cursor-fg-color", htmlcolor); - } - } - if ((key == "cursor-bg-color") || changed_text_colors) { - string htmlcolor; - if (this.use_cursor_color.active) { - var color = this.cursor_color_bg.rgba; - htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - } else { - htmlcolor = ""; - } - if ((Terminus.settings.get_string("cursor-bg-color") != htmlcolor) || changed_text_colors) { - Terminus.settings.set_string("cursor-bg-color", htmlcolor); - } - } - if (key == "highlight-fg-color") { - string htmlcolor; - if (this.use_highlight_color.active) { - var color = this.highlight_color_fg.rgba; - htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - } else { - htmlcolor = ""; - } - if (Terminus.settings.get_string("highlight-fg-color") != htmlcolor) { - Terminus.settings.set_string("highlight-fg-color", htmlcolor); - } - } - if (key == "highlight-bg-color") { - string htmlcolor; - if (this.use_highlight_color.active) { - var color = this.highlight_color_bg.rgba; - htmlcolor = - "#%02X%02X%02X".printf((uint) (255 * color.red), (uint) (255 * color.green), - (uint) (255 * color.blue)); - } else { - htmlcolor = ""; - } - if (Terminus.settings.get_string("highlight-bg-color") != htmlcolor) { - Terminus.settings.set_string("highlight-bg-color", htmlcolor); - } - } - if (changed) { - this.color_scheme.set_active(this.get_current_scheme()); - } - } - private void updated_palette() { diff -Nru terminus-1.19.1/src/terminal.vala terminus-1.20.0/src/terminal.vala --- terminus-1.19.1/src/terminal.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/terminal.vala 2022-11-20 20:52:10.000000000 +0000 @@ -27,7 +27,7 @@ * This is the terminal itself, available in each container. */ - class Terminal : Gtk.Box { + class Terminal : Gtk.Box, Killable { private int pid; private Vte.Terminal vte_terminal; private Gtk.Label title; @@ -43,31 +43,11 @@ private double title_g; private double title_b; - private Gdk.EventKey new_tab_key; - private Gdk.EventKey new_window_key; - private Gdk.EventKey next_tab_key; - private Gdk.EventKey previous_tab_key; - private Gdk.EventKey copy_key; - private Gdk.EventKey paste_key; - private Gdk.EventKey terminal_left_key; - private Gdk.EventKey terminal_right_key; - private Gdk.EventKey terminal_up_key; - private Gdk.EventKey terminal_down_key; - private Gdk.EventKey font_big_key; - private Gdk.EventKey font_small_key; - private Gdk.EventKey font_normal_key; - private Gdk.EventKey show_menu_key; - private Gdk.EventKey split_horizontally_key; - private Gdk.EventKey split_vertically_key; private bool had_focus; - public signal void - ended(Terminus.Terminal terminal); - public signal void - split_horizontal(Terminus.Terminal terminal); - public signal void - split_vertical(Terminus.Terminal terminal); - + public signal void ended(Terminus.Terminal terminal); + public signal void split_horizontal(Terminus.Terminal terminal); + public signal void split_vertical(Terminus.Terminal terminal); private void add_separator() @@ -142,7 +122,7 @@ item = this.new_menu_element(_("Close")); item.activate.connect(() => { - Posix.kill(this.pid, 9); + this.kill_child(); }); this.menu_container.show_all(); } @@ -209,7 +189,7 @@ var label = new Gtk.Label(" X "); label.use_markup = true; this.closeButton.button_release_event.connect((event) => { - Posix.kill(this.pid, Posix.Signal.KILL); + this.kill_child(); return false; }); this.closeButton.add(label); @@ -307,42 +287,7 @@ this.vte_terminal.add_events(Gdk.EventMask.BUTTON_PRESS_MASK); this.vte_terminal.add_events(Gdk.EventMask.SCROLL_MASK); - this.new_tab_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.new_window_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.next_tab_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.previous_tab_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.copy_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.paste_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.terminal_left_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.terminal_right_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.terminal_up_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.terminal_down_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.font_big_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.font_small_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.font_normal_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.show_menu_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.split_horizontally_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - this.split_vertically_key = new Gdk.Event(Gdk.EventType.KEY_RELEASE).key; - - keybind_settings_changed("new-window"); - keybind_settings_changed("new-tab"); - keybind_settings_changed("next-tab"); - keybind_settings_changed("previous-tab"); - keybind_settings_changed("copy"); - keybind_settings_changed("paste"); - keybind_settings_changed("terminal-left"); - keybind_settings_changed("terminal-right"); - keybind_settings_changed("terminal-up"); - keybind_settings_changed("terminal-down"); - keybind_settings_changed("font-size-big"); - keybind_settings_changed("font-size-small"); - keybind_settings_changed("font-size-normal"); - keybind_settings_changed("show-menu"); - keybind_settings_changed("split-horizontally"); - keybind_settings_changed("split-vertically"); - Terminus.settings.changed.connect(this.settings_changed); - Terminus.keybind_settings.changed.connect(this.keybind_settings_changed); this.vte_terminal.key_press_event.connect(this.on_key_press); this.vte_terminal.scroll_event.connect(this.on_scroll); @@ -363,109 +308,70 @@ } public bool - update_title_cb() + has_child_running() { - this.update_title(); + var procdir = GLib.File.new_for_path("/proc"); + var enumerator = procdir.enumerate_children("standard::*", FileQueryInfoFlags.NOFOLLOW_SYMLINKS, null); + FileInfo info = null; + while ((info = enumerator.next_file (null)) != null) { + if (info.get_file_type () != FileType.DIRECTORY) { + continue; + } + var statusFile = GLib.File.new_build_filename("/proc", info.get_name(), "status"); + if (!statusFile.query_exists(null)) { + continue; + } + var is = statusFile.read(null); + Bytes data; + ByteArray buffer = new ByteArray(); + while (true) { + data = is.read_bytes(1024, null); + if (data.get_size() == 0) { + break; + } + buffer.append(data.get_data()); + } + buffer.append({0}); + var lines = ((string)buffer.data).split("\n"); + foreach (var line in lines) { + if (line.has_prefix("PPid:")) { + var ppid = int.parse(line.substring(5)); + if (ppid == this.pid) { + return true; + } + } + } + } return false; } - public void - keybind_settings_changed(string key) + private void + kill_child() { - uint keyval; - Gdk.ModifierType state; - - Gtk.accelerator_parse(Terminus.keybind_settings.get_string(key), out keyval, out state); - if (keyval < 128) { - keyval &= ~32; + if (!this.has_child_running()) { + Posix.kill(this.pid, Posix.Signal.KILL); + } else { + this.top_container.ask_kill_childs(_("This terminal has a process running inside."), + _("Closing it will kill the process."), + _("Close terminal"), + this); } + } - switch (key) { - case "new-window": - this.new_window_key.keyval = keyval; - this.new_window_key.state = state; - break; - - case "new-tab": - this.new_tab_key.keyval = keyval; - this.new_tab_key.state = state; - break; - - case "next-tab": - this.next_tab_key.keyval = keyval; - this.next_tab_key.state = state; - break; - - case "previous-tab": - this.previous_tab_key.keyval = keyval; - this.previous_tab_key.state = state; - break; - - case "copy": - this.copy_key.keyval = keyval; - this.copy_key.state = state; - break; - - case "paste": - this.paste_key.keyval = keyval; - this.paste_key.state = state; - break; - - case "terminal-left": - this.terminal_left_key.keyval = keyval; - this.terminal_left_key.state = state; - break; - - case "terminal-right": - this.terminal_right_key.keyval = keyval; - this.terminal_right_key.state = state; - break; - - case "terminal-up": - this.terminal_up_key.keyval = keyval; - this.terminal_up_key.state = state; - break; - - case "terminal-down": - this.terminal_down_key.keyval = keyval; - this.terminal_down_key.state = state; - break; - - case "font-size-big": - this.font_big_key.keyval = keyval; - this.font_big_key.state = state; - break; - - case "font-size-small": - this.font_small_key.keyval = keyval; - this.font_small_key.state = state; - break; - - case "font-size-normal": - this.font_normal_key.keyval = keyval; - this.font_normal_key.state = state; - break; - - case "show-menu": - this.show_menu_key.keyval = keyval; - this.show_menu_key.state = state; - break; - - case "split-horizontally": - this.split_horizontally_key.keyval = keyval; - this.split_horizontally_key.state = state; - break; - - case "split-vertically": - this.split_vertically_key.keyval = keyval; - this.split_vertically_key.state = state; - break; + public void + kill_all_children() + { + Posix.kill(this.pid, Posix.Signal.KILL); + } - default: - break; - } + public bool + update_title_cb() + { + this.update_title(); + return false; } + public void settings_changed(string key) { @@ -517,6 +423,12 @@ this.vte_terminal.set_color_background(color); break; + case "focused-fg-color": + case "focused-bg-color": + case "inactive-fg-color": + case "inactive-bg-color": + this.update_title(); + break; case "bold-color": this.vte_terminal.set_color_bold(color); break; @@ -578,13 +490,6 @@ } } - private bool - check_key(Gdk.EventKey event, - Gdk.EventKey key) - { - return ((event.keyval == key.keyval) && (event.state == key.state)); - } - public bool on_scroll(Gdk.EventScroll event) { @@ -624,75 +529,65 @@ eventkey.keyval &= ~32; } - if (check_key(eventkey, this.new_window_key)) { + switch(key_bindings.find_key(eventkey)) { + case "new-window": this.main_container.new_terminal_window(); return true; - } - if (check_key(eventkey, this.new_tab_key)) { + case "new-tab": this.main_container.new_terminal_tab("", null); return true; - } - if (check_key(eventkey, this.next_tab_key)) { + case "next-tab": this.main_container.next_tab(); return true; - } - if (check_key(eventkey, this.previous_tab_key)) { + case "previous-tab": this.main_container.prev_tab(); return true; - } - - if (check_key(eventkey, this.copy_key)) { + case "copy": this.do_copy(); return true; - } - if (check_key(eventkey, this.paste_key)) { + case "paste": this.do_paste(); return true; - } - - if (check_key(eventkey, this.terminal_up_key)) { + case "terminal-up": this.container.move_terminal_focus(Terminus.MoveFocus.UP, null, true); return true; - } - if (check_key(eventkey, this.terminal_down_key)) { + case "terminal-down": this.container.move_terminal_focus(Terminus.MoveFocus.DOWN, null, true); return true; - } - if (check_key(eventkey, this.terminal_left_key)) { + case "terminal-left": this.container.move_terminal_focus(Terminus.MoveFocus.LEFT, null, true); return true; - } - if (check_key(eventkey, this.terminal_right_key)) { + case "terminal-right": this.container.move_terminal_focus(Terminus.MoveFocus.RIGHT, null, true); return true; - } - - if (check_key(eventkey, this.font_big_key)) { + case "font-size-big": this.change_zoom(true); return true; - } - if (check_key(eventkey, this.font_small_key)) { + case "font-size-small": this.change_zoom(false); return true; - } - if (check_key(eventkey, this.font_normal_key)) { + case "font-size-normal": this.vte_terminal.font_scale = 1; return true; - } - if (check_key(eventkey, this.show_menu_key)) { + case "show-menu": this.item_copy.sensitive = this.vte_terminal.get_has_selection(); this.menu_container.popup_at_widget(this.vte_terminal, Gdk.Gravity.CENTER, Gdk.Gravity.CENTER, event); return true; - } - if (check_key(eventkey, this.split_horizontally_key)) { + case "split-horizontally": this.split_horizontal(this); return true; - } - if (check_key(eventkey, this.split_vertically_key)) { + case "split-vertically": this.split_vertical(this); return true; + case "close-tile": + this.kill_child(); + return true; + case "close-tab": + this.top_container.ask_close_tab(); + return true; + default: + return false; } - return false; } private void @@ -712,19 +607,18 @@ string fg; string bg; + var tmp_color = Gdk.RGBA(); if (this.vte_terminal.has_focus) { - this.title_r = 1.0; - this.title_g = 0.0; - this.title_b = 0.0; - fg = "#FFFFFF"; - bg = "#FF0000"; + fg = Terminus.settings.get_string("focused-fg-color"); + bg = Terminus.settings.get_string("focused-bg-color"); } else { - this.title_r = 0.6666666; - this.title_g = 0.6666666; - this.title_b = 0.6666666; - fg = "#000000"; - bg = "#AAAAAA"; + fg = Terminus.settings.get_string("inactive-fg-color"); + bg = Terminus.settings.get_string("inactive-bg-color"); } + tmp_color.parse(bg); + this.title_r = tmp_color.red; + this.title_g = tmp_color.green; + this.title_b = tmp_color.blue; this.title.use_markup = true; this.title.label = "%s %ldx%ld".printf(fg, bg, diff -Nru terminus-1.19.1/src/terminus.vala terminus-1.20.0/src/terminus.vala --- terminus-1.19.1/src/terminus.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/terminus.vala 2022-11-20 20:52:10.000000000 +0000 @@ -21,6 +21,7 @@ namespace Terminus { TerminusRoot main_root; + KeyBindings key_bindings; GLib.Settings settings = null; GLib.Settings keybind_settings = null; Terminus.Bindkey bindkey; @@ -91,6 +92,7 @@ protected void do_startup() { + Terminus.key_bindings = new Terminus.KeyBindings(); this.read_color_schemes(GLib.Path.build_filename(Constants.DATADIR, "terminus")); this.read_color_schemes(GLib.Path.build_filename(Environment.get_home_dir(), ".local", @@ -100,8 +102,8 @@ var palette = new Terminus.Terminuspalette(); palette.custom = true; palette.name = _("Custom colors"); - this.palettes.sort(this.ComparePalettes); this.palettes.add(palette); + this.palettes.sort(this.ComparePalettes); var show_guake = new GLib.SimpleAction("show_guake", null); show_guake.activate.connect(() => { @@ -151,6 +153,12 @@ ComparePalettes(Terminuspalette a, Terminuspalette b) { + if (a.custom) { + return -1; + } + if (b.custom) { + return 1; + } if (a.name < b.name) { return -1; } else { @@ -213,7 +221,7 @@ } if (guake_mode) { if (this.guake_terminal == null) { - this.guake_terminal = new Terminus.Base(GLib.Environment.get_home_dir(), null); + this.guake_terminal = new Terminus.Base(GLib.Environment.get_home_dir(), null, null); } window = new Terminus.Window(this, true, diff -Nru terminus-1.19.1/src/window.vala terminus-1.20.0/src/window.vala --- terminus-1.19.1/src/window.vala 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/src/window.vala 2022-11-20 20:52:10.000000000 +0000 @@ -38,7 +38,7 @@ } } - class Window : Gtk.ApplicationWindow { + class Window : Gtk.ApplicationWindow, Killable { public signal void ended(Terminus.Window window); public signal void @@ -62,6 +62,12 @@ return workarea; } + public void + kill_all_children() + { + this.destroy(); + } + public Window(Gtk.Application application, bool guake_mode, string ?working_directory, @@ -75,14 +81,27 @@ this.type_hint = Gdk.WindowTypeHint.NORMAL; this.focus_on_map = true; + this.delete_event.connect(() => { + if (this.terminal.check_if_running_processes()) { + this.terminal.ask_kill_childs(_("This window has running processes inside."), + _("Closing it will kill them."), + _("Close window"), + this); + return true; + } else { + return false; + } + }); + this.destroy.connect((w) => { this.ended(this); }); if (terminal == null) { - this.terminal = new Terminus.Base(working_directory, commands); + this.terminal = new Terminus.Base(working_directory, commands, this); } else { this.terminal = terminal; + terminal.top_window = this; } this.terminal.ended.connect(this.ended_cb); @@ -105,8 +124,8 @@ this.set_properties(); this.current_size = Terminus.settings.get_int("guake-height"); - if ((this.current_size <= 0) && (check_wayland() == 0)) { - this.current_size = this.get_monitor_workarea().height * 3 / 7; + if (this.current_size <= 0) { + this.current_size = 300; Terminus.settings.set_int("guake-height", this.current_size); } this.map.connect_after(this.mapped); diff -Nru terminus-1.19.1/terminus.avprj terminus-1.20.0/terminus.avprj --- terminus-1.19.1/terminus.avprj 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/terminus.avprj 2022-11-20 20:52:10.000000000 +0000 @@ -1,7 +1,7 @@ ### AutoVala Project ### autovala_version: 30 project_name: terminus -project_version: 1.19.1 +project_version: 1.20.0 vala_version: 0.30 custom: terminus_gnome_shell/extension.js share/gnome-shell/extensions/showTerminusQuakeWindow@rastersoft.com @@ -12,7 +12,7 @@ *vapidir: src/vapidir vala_binary: src/terminus -*version: 1.19.1 +*version: 1.20.0 use_gresource: extras_gresource_xml vala_vapi: checkwayland.vapi *vala_package: posix @@ -30,6 +30,7 @@ *vala_source: base.vala *vala_source: bindkeys.vala *vala_source: container.vala +*vala_source: keybinding.vala *vala_source: notetab.vala *vala_source: palete.vala *vala_source: params.vala @@ -48,6 +49,7 @@ *translate: vala src/bindkeys.vala *translate: c src/checkwayland.c *translate: vala src/container.vala +*translate: vala src/keybinding.vala *translate: vala src/notetab.vala *translate: vala src/palete.vala *translate: vala src/params.vala diff -Nru terminus-1.19.1/terminus_gnome_shell/extension.js terminus-1.20.0/terminus_gnome_shell/extension.js --- terminus-1.19.1/terminus_gnome_shell/extension.js 2022-10-13 19:03:20.000000000 +0000 +++ terminus-1.20.0/terminus_gnome_shell/extension.js 2022-11-20 20:52:10.000000000 +0000 @@ -45,7 +45,7 @@ this._enabled = false; this._settings = new Gio.Settings({ schema: 'org.rastersoft.terminus.keybindings' }); this._settings2 = new Gio.Settings({ schema: 'org.rastersoft.terminus' }); - this._settingsChanged(null, "guake-mode"); // copy the guake-mode key to guake-mode-gnome-shell key + this._settingsChanged("guake-mode"); // copy the guake-mode key to guake-mode-gnome-shell key this.terminusInstance = null; this._shown_error = false; this._currentProcess = null;