From 1e8ea6f14dd8ba511aab929a601d1a8fa3a910dd Mon Sep 17 00:00:00 2001 From: David Yang Date: Sat, 26 Mar 2022 19:39:57 +0800 Subject: [PATCH] Reintroduce execute_command dbus hook Command now always creates a new tab to execute the command in --- guake/dbusiface.py | 5 +++++ guake/main.py | 2 +- releasenotes/notes/execute_in_new_tab-6161bba1822b644c.yaml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/execute_in_new_tab-6161bba1822b644c.yaml diff --git a/guake/dbusiface.py b/guake/dbusiface.py index 4589c45bf..2002e7e7c 100755 --- a/guake/dbusiface.py +++ b/guake/dbusiface.py @@ -153,6 +153,11 @@ def reset_colors_current(self): self.guake.reset_terminal_custom_colors(current_terminal=True) self.guake.set_colors_from_settings_on_page(current_terminal_only=True) + @dbus.service.method(DBUS_NAME, in_signature="s") + def execute_command(self, command): + self.guake.add_tab() + self.guake.execute_command(command) + @dbus.service.method(DBUS_NAME, in_signature="i", out_signature="s") def get_tab_name(self, tab_index=0): return self.guake.get_notebook().get_tab_text_index(tab_index) diff --git a/guake/main.py b/guake/main.py index 3228db549..c28db222a 100644 --- a/guake/main.py +++ b/guake/main.py @@ -253,7 +253,7 @@ def main(): dest="command", action="store", default="", - help=_("Execute an arbitrary command in the selected tab."), + help=_("Execute an arbitrary command in a new tab."), ) parser.add_option( diff --git a/releasenotes/notes/execute_in_new_tab-6161bba1822b644c.yaml b/releasenotes/notes/execute_in_new_tab-6161bba1822b644c.yaml new file mode 100644 index 000000000..e698b8c25 --- /dev/null +++ b/releasenotes/notes/execute_in_new_tab-6161bba1822b644c.yaml @@ -0,0 +1,6 @@ +release_summary: > + -e command reinstated and now only runs in new tabs + +security: + - | + guake with the -e flag now always opens a new tab to run commands in