Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run -e in new tabs generated by split vertical/horizontal #2172

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions guake/dbusiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@ def v_split_current_terminal(self):
def h_split_current_terminal(self):
self.guake.get_notebook().get_current_terminal().get_parent().split_h()

@dbus.service.method(DBUS_NAME, in_signature="s")
def v_split_current_terminal_with_command(self, command):
self.guake.get_notebook().get_current_terminal().get_parent().split_v()
self.guake.execute_command(command)

@dbus.service.method(DBUS_NAME, in_signature="s")
def h_split_current_terminal_with_command(self, command):
self.guake.get_notebook().get_current_terminal().get_parent().split_h()
self.guake.execute_command(command)

@dbus.service.method(DBUS_NAME, in_signature="s", out_signature="i")
def get_index_from_uuid(self, tab_uuid):
return self.guake.get_index_from_uuid(tab_uuid)
12 changes: 9 additions & 3 deletions guake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,17 @@ def main():
only_show_hide = options.show

if options.split_vertical:
remote_object.v_split_current_terminal()
if options.command:
remote_object.v_split_current_terminal_with_command(options.command)
else:
remote_object.v_split_current_terminal()
only_show_hide = options.show

if options.split_horizontal:
remote_object.h_split_current_terminal()
if options.command:
remote_object.h_split_current_terminal_with_command(options.command)
else:
remote_object.h_split_current_terminal()
only_show_hide = options.show

if options.selected_terminal:
Expand All @@ -563,7 +569,7 @@ def main():
sys.stderr.write(f"invalid index: {selected}\n")
only_show_hide = options.show

if options.command:
if options.command and not (options.split_vertical or options.split_horizontal):
remote_object.execute_command(options.command)
only_show_hide = options.show

Expand Down
8 changes: 8 additions & 0 deletions releasenotes/notes/execute_split_tabs-44ea0b6657ea45a7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
release_summary: >
execute command flag now runs commands in new split tabs if --split-vertical or --split-horizontal are also provided.


fixes:
- |

- Options --select-tab, --split-vertical (--split-horizontal) and -execute-command not working as before (v. 3.8.4). #2167