diff --git a/.config/ags/widgets/overview/overview_hyprland.js b/.config/ags/widgets/overview/overview_hyprland.js index d49e871a..7f3d6d1a 100644 --- a/.config/ags/widgets/overview/overview_hyprland.js +++ b/.config/ags/widgets/overview/overview_hyprland.js @@ -1,6 +1,7 @@ const { Gdk, Gtk } = imports.gi; 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'; import Widget from 'resource:///com/github/Aylur/ags/widget.js'; import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; @@ -14,6 +15,8 @@ const OVERVIEW_WS_NUM_SCALE = 0.09; const OVERVIEW_WS_NUM_MARGIN_SCALE = 0.07; const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)]; +const overviewTick = Variable(false); + function truncateTitle(str) { let lastDash = -1; let found = -1; // 0: em dash, 1: en dash, 2: minus, 3: vertical bar, 4: middle dot @@ -213,6 +216,7 @@ const workspace = index => { eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY); eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => { Hyprland.sendMessage(`dispatch movetoworkspacesilent ${index},address:${data.get_text()}`) + overviewTick.setValue(!overviewTick.value); }); }, child: fixed, @@ -276,6 +280,7 @@ const OverviewRow = ({ startWorkspace, workspaces, windowName = 'overview' }) => } }, setup: (box) => box + .hook(overviewTick, (box) => box.attribute.update(box)) // .hook(Hyprland, (box, name, data) => { // idk, does this make it lag occasionally? // console.log(name) // if (["changefloatingmode", "movewindow"].includes(name))