From b70083a5f4404e2422ff0a0aadd023a661164fae Mon Sep 17 00:00:00 2001 From: Juhani Krekelä Date: Fri, 25 Jun 2021 17:59:53 +0300 Subject: Add feature to open a new terminal Add ability to open a new weltschmerz terminal, either from context menu or with a key combination. The new terminal is opened in the directory indicated with OSC 7, allowing quickly opening additional terminals while working. Preferably this would launch the user's preferred terminal, as defined in per-user settings, but this is not possible with glib[1]. For this reason the option always launches another weltschmerz. weltschmerz is launched using bare Process.spawn_async() on the name of the program as defined in weltschmerz.vala. We considered using the AppInfo database to retrieve the name of executable instead, but as there is no way to query the database for terminal emulators we would have to go through every single program installed on the computer and try to find one called weltschmerz. As the change would merely replace the requirement of having weltschmerz in PATH with the requirement of having a .desktop file with the name in one of the standardized locations, this would not be worth it. [1] https://gitlab.gnome.org/GNOME/glib/-/issues/338 --- terminal.ui | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'terminal.ui') diff --git a/terminal.ui b/terminal.ui index c22fbec..345c543 100644 --- a/terminal.ui +++ b/terminal.ui @@ -52,6 +52,11 @@ False document-open + + True + False + utilities-terminal + True False @@ -92,6 +97,19 @@ False + + + Open _terminal + True + False + Open new terminal window in the current directory + True + open_terminal_item_image + False + + + + _Open directory -- cgit v1.2.3-2-gb3c3