From c09800fc81011312133e134369b856c498acedb2 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:16:49 +0700 Subject: [PATCH] gemini as default AI; better overview context menu --- .../ags/widgets/overview/overview_hyprland.js | 5 ++++- .config/ags/widgets/sideleft/apiwidgets.js | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.config/ags/widgets/overview/overview_hyprland.js b/.config/ags/widgets/overview/overview_hyprland.js index 053caba6c..27f538ad2 100644 --- a/.config/ags/widgets/overview/overview_hyprland.js +++ b/.config/ags/widgets/overview/overview_hyprland.js @@ -3,6 +3,7 @@ // - Active ws hook optimization: only update when moving to next group // const { Gdk, Gtk } = imports.gi; +const { Gravity } = imports.gi.Gdk; import { SCREEN_HEIGHT, SCREEN_WIDTH } from '../../imports.js'; import App from 'resource:///com/github/Aylur/ags/app.js'; import Variable from 'resource:///com/github/Aylur/ags/variable.js'; @@ -127,7 +128,9 @@ const Window = ({ address, at: [x, y], size: [w, h], workspace: { id, name }, cl menu.connect("selection-done", () => { button.toggleClassName('overview-tasks-window-selected', false); }) - menu.popup_at_pointer(null); // Show the menu at the pointer's position + // menu.popup_at_pointer(null); // Show the menu at the pointer's position + menu.popup_at_widget(button.get_parent(), Gravity.SOUTH, Gravity.NORTH, null); // Show menu below the button + button.connect("destroy", () => menu.destroy()); }, child: Widget.Box({ css: ` diff --git a/.config/ags/widgets/sideleft/apiwidgets.js b/.config/ags/widgets/sideleft/apiwidgets.js index 4ac117f53..76fa680be 100644 --- a/.config/ags/widgets/sideleft/apiwidgets.js +++ b/.config/ags/widgets/sideleft/apiwidgets.js @@ -18,14 +18,6 @@ const TextView = Widget.subclass(Gtk.TextView, "AgsTextView"); const EXPAND_INPUT_THRESHOLD = 30; const APIS = [ - { - name: 'Assistant (ChatGPT 3.5)', - sendCommand: chatGPTSendMessage, - contentWidget: chatGPTView, - commandBar: chatGPTCommands, - tabIcon: chatGPTTabIcon, - placeholderText: 'Message ChatGPT...', - }, { name: 'Assistant (Gemini Pro)', sendCommand: geminiSendMessage, @@ -34,6 +26,14 @@ const APIS = [ tabIcon: geminiTabIcon, placeholderText: 'Message Gemini...', }, + { + name: 'Assistant (ChatGPT 3.5)', + sendCommand: chatGPTSendMessage, + contentWidget: chatGPTView, + commandBar: chatGPTCommands, + tabIcon: chatGPTTabIcon, + placeholderText: 'Message ChatGPT...', + }, { name: 'Waifus', sendCommand: waifuSendMessage,