From b6a0b393662c6b92a5b283f5ef653db8fcda2a38 Mon Sep 17 00:00:00 2001 From: Fabien LOISON Date: Sat, 14 Nov 2020 16:58:16 +0100 Subject: [PATCH] Allows to config terminal toggle shorcut (closes #50) --- nautilus_terminal/nautilus_terminal.py | 3 ++- .../schemas/org.flozz.nautilus-terminal.gschema.xml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/nautilus_terminal/nautilus_terminal.py b/nautilus_terminal/nautilus_terminal.py index 88f3fe2..0201797 100644 --- a/nautilus_terminal/nautilus_terminal.py +++ b/nautilus_terminal/nautilus_terminal.py @@ -303,7 +303,8 @@ def _build_accels(self): self._nautilus_app.set_accels_for_action("nterm.paste", ["v"]) # ntermwin - self._nautilus_app.set_accels_for_action("ntermwin.terminal-visible", ["F4"]) + accel = self._settings.get_string("toggle-shortcut") + self._nautilus_app.set_accels_for_action("ntermwin.terminal-visible", [accel]) def _spawn_shell(self): if self._shell_pid: diff --git a/nautilus_terminal/schemas/org.flozz.nautilus-terminal.gschema.xml b/nautilus_terminal/schemas/org.flozz.nautilus-terminal.gschema.xml index 3ad0d97..e8e27ed 100644 --- a/nautilus_terminal/schemas/org.flozz.nautilus-terminal.gschema.xml +++ b/nautilus_terminal/schemas/org.flozz.nautilus-terminal.gschema.xml @@ -26,5 +26,10 @@ Nautilus Terminal at the bottom Nautilus Terminal will be shown at the bottom of the windows + + "F4" + Keyboard shortcut to toggle the terminal + The keyboard shortcut to toggle Nautilus Terminal (e.g. "F4", "<Ctrl>F4") +