diff --git a/src/main.py b/src/main.py index 17ef9bf..8a9cd58 100644 --- a/src/main.py +++ b/src/main.py @@ -50,8 +50,8 @@ class AlpacaApplication(Adw.Application): def __init__(self, version): super().__init__(application_id='com.jeffser.Alpaca', flags=Gio.ApplicationFlags.DEFAULT_FLAGS) - self.create_action('quit', lambda *_: self.quit(), ['q']) - self.create_action('preferences', lambda *_: AlpacaWindow.show_preferences_dialog(self.props.active_window), ['p']) + self.create_action('quit', lambda *_: self.quit(), ['w']) + self.create_action('preferences', lambda *_: AlpacaWindow.show_preferences_dialog(self.props.active_window), ['comma']) self.create_action('about', self.on_about_action) self.version = version diff --git a/src/window.py b/src/window.py index a14d5a7..e5cd047 100644 --- a/src/window.py +++ b/src/window.py @@ -68,6 +68,7 @@ class AlpacaWindow(Adw.ApplicationWindow): override_HIP_VISIBLE_DEVICES = Gtk.Template.Child() #Elements + split_view_overlay = Gtk.Template.Child() regenerate_button : Gtk.Button = None create_model_base = Gtk.Template.Child() create_model_name = Gtk.Template.Child() @@ -1622,6 +1623,7 @@ Generate a title following these rules: self.get_application().create_action('rename_current_chat', self.current_chat_actions) self.get_application().create_action('export_chat', self.chat_actions) self.get_application().create_action('export_current_chat', self.current_chat_actions) + self.get_application().create_action('toggle_sidebar', lambda *_: self.split_view_overlay.set_show_sidebar(not self.split_view_overlay.get_show_sidebar()), ['F9']) self.message_text_view.connect("paste-clipboard", self.on_clipboard_paste) self.file_preview_remove_button.connect('clicked', lambda button : dialogs.remove_attached_file(self, button.get_name())) self.add_chat_button.connect("clicked", lambda button : self.new_chat()) diff --git a/src/window.ui b/src/window.ui index 3299629..45ff228 100644 --- a/src/window.ui +++ b/src/window.ui @@ -1135,7 +1135,7 @@ By downloading any model you accept their license agreement available on the mod General - <ctrl>Q + <ctrl>W Close application @@ -1153,7 +1153,7 @@ By downloading any model you accept their license agreement available on the mod - <ctrl>P + <ctrl>comma Preferences @@ -1169,6 +1169,12 @@ By downloading any model you accept their license agreement available on the mod Show shortcuts window + + + F9 + Toggle sidebar + +