Skip to content

Commit

Permalink
Add hotkey to select all text
Browse files Browse the repository at this point in the history
  • Loading branch information
hackedd authored and Davidy22 committed Dec 3, 2022
1 parent 86bb9b5 commit 2e5e309
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions guake/data/org.guake.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@
<summary>Paste clipboard.</summary>
<description>Paste the clipboard content.</description>
</key>
<key name="select-all" type="s">
<default>'&lt;Control&gt;&lt;Shift&gt;a'</default>
<summary>Select all.</summary>
<description>Select all contents of the currently active terminal.</description>
</key>
<key name="toggle-fullscreen" type="s">
<default>'F11'</default>
<summary>Toggle Fullscreen.</summary>
Expand Down
4 changes: 4 additions & 0 deletions guake/guake_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,10 @@ def accel_paste_clipboard(self, *args):
self.get_notebook().get_current_terminal().paste_clipboard()
return True

def accel_select_all(self, *args):
self.get_notebook().get_current_terminal().select_all()
return True

def accel_toggle_hide_on_lose_focus(self, *args):
"""Callback toggle whether the window should hide when it loses
focus. Called by the accel key.
Expand Down
3 changes: 2 additions & 1 deletion guake/keybindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def x(*args):
("next-tab-alt", self.guake.accel_next),
("clipboard-copy", self.guake.accel_copy_clipboard),
("clipboard-paste", self.guake.accel_paste_clipboard),
("select-all", self.guake.accel_select_all),
("quit", self.guake.accel_quit),
("zoom-in", self.guake.accel_zoom_in),
("zoom-in-alt", self.guake.accel_zoom_in),
Expand Down Expand Up @@ -198,7 +199,7 @@ def x(*args):
]
for key, _ in self.keys:
guake.settings.keybindingsLocal.onChangedValue(key, self.reload_accelerators)
self.reload_accelerators()
self.reload_accelerators()

def reload_global(self, settings, key, user_data):
value = settings.get_string(key)
Expand Down
1 change: 1 addition & 0 deletions guake/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"keys": [
{"key": "clipboard-copy", "label": _("Copy text to clipboard")},
{"key": "clipboard-paste", "label": _("Paste text from clipboard")},
{"key": "select-all", "label": _("Select all")},
],
},
{
Expand Down
3 changes: 3 additions & 0 deletions releasenotes/notes/select-all-hotkey-92ca2a0014ca25b1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
features:
- |
- Add a new hotkey to select all text in the current terminal.

0 comments on commit 2e5e309

Please sign in to comment.