From f88ab45b9431df8b12d759ab44a0ef8f2e958ece Mon Sep 17 00:00:00 2001 From: MRAAGH <33424247+MRAAGH@users.noreply.github.com> Date: Wed, 31 Mar 2021 01:20:59 +0200 Subject: [PATCH] Add keybinding for quit (#203) * Add keybinding for quit * Reorder default settings The related keybindings are now located closer together. quit is not commented by default, but instead has an empty list. * No need for braces for a single instruction --- src/config/settings.py | 3 +++ src/gui/UI.qml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/config/settings.py b/src/config/settings.py index b07c7900..e362f395 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -272,6 +272,9 @@ class Keys: # From any terminal, run `socat readline tcp:127.0.0.1:4444` to connect. python_remote_debugger = ["Alt+F1"] + # Quit Mirage + quit = [] + class Scrolling: # Pages and chat timeline scrolling up = ["Alt+Up", "Alt+K"] diff --git a/src/gui/UI.qml b/src/gui/UI.qml index c4e5ba9f..627ddb11 100644 --- a/src/gui/UI.qml +++ b/src/gui/UI.qml @@ -88,6 +88,11 @@ Item { } } + HShortcut { + sequences: window.settings.Keys.quit + onActivated: Qt.quit() + } + HShortcut { sequences: window.settings.Keys.notifications_highlights_only onActivated: