From 6eda3c674dde7dffbf1c7d7646891fc0cb14fe42 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 8 Mar 2026 21:02:47 +0100 Subject: [PATCH] hefty: use ii overview for now; add global focus scrim --- .../ii/modules/hefty/topLayer/HOverview.qml | 78 +++++++++---------- .../modules/hefty/topLayer/HTopLayerPanel.qml | 31 +++++--- .../ii/panelFamilies/HeftyHypeFamily.qml | 2 +- 3 files changed, 62 insertions(+), 49 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/HOverview.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/HOverview.qml index 1ebea2d10..7844b394e 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/HOverview.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/HOverview.qml @@ -47,48 +47,48 @@ HAbstractMorphedPanel { return MaterialShapes.customPolygon(points, 1, new Offset.Offset(root.screenWidth / 2, edgeGap + contentHeight / 2)) } - // Keybinds - GlobalShortcut { - name: "searchToggle" - description: "Toggles search on press" + // // Keybinds + // GlobalShortcut { + // name: "searchToggle" + // description: "Toggles search on press" - onPressed: { - GlobalStates.overviewOpen = !GlobalStates.overviewOpen; - } - } - GlobalShortcut { - name: "searchToggleRelease" - description: "Toggles search on release" + // onPressed: { + // GlobalStates.overviewOpen = !GlobalStates.overviewOpen; + // } + // } + // GlobalShortcut { + // name: "searchToggleRelease" + // description: "Toggles search on release" - onPressed: { - GlobalStates.superReleaseMightTrigger = true; - } + // onPressed: { + // GlobalStates.superReleaseMightTrigger = true; + // } - onReleased: { - if (!GlobalStates.superReleaseMightTrigger) { - GlobalStates.superReleaseMightTrigger = true; - return; - } - GlobalStates.overviewOpen = !GlobalStates.overviewOpen; - } - } - GlobalShortcut { - name: "searchToggleReleaseInterrupt" - description: "Interrupts possibility of search being toggled on release. " + "This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. " + "To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything." + // onReleased: { + // if (!GlobalStates.superReleaseMightTrigger) { + // GlobalStates.superReleaseMightTrigger = true; + // return; + // } + // GlobalStates.overviewOpen = !GlobalStates.overviewOpen; + // } + // } + // GlobalShortcut { + // name: "searchToggleReleaseInterrupt" + // description: "Interrupts possibility of search being toggled on release. " + "This is necessary because GlobalShortcut.onReleased in quickshell triggers whether or not you press something else while holding the key. " + "To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything." - onPressed: { - GlobalStates.superReleaseMightTrigger = false; - } - } + // onPressed: { + // GlobalStates.superReleaseMightTrigger = false; + // } + // } - Connections { - target: GlobalStates - function onOverviewOpenChanged() { - if (GlobalStates.overviewOpen) { - root.requestFocus(); - } else { - root.dismissed(); - } - } - } + // Connections { + // target: GlobalStates + // function onOverviewOpenChanged() { + // if (GlobalStates.overviewOpen) { + // root.requestFocus(); + // } else { + // root.dismissed(); + // } + // } + // } } \ No newline at end of file diff --git a/dots/.config/quickshell/ii/modules/hefty/topLayer/HTopLayerPanel.qml b/dots/.config/quickshell/ii/modules/hefty/topLayer/HTopLayerPanel.qml index e0241722e..b403f8001 100644 --- a/dots/.config/quickshell/ii/modules/hefty/topLayer/HTopLayerPanel.qml +++ b/dots/.config/quickshell/ii/modules/hefty/topLayer/HTopLayerPanel.qml @@ -2,8 +2,8 @@ import QtQuick import Qt5Compat.GraphicalEffects import Quickshell import Quickshell.Wayland -import Quickshell.Hyprland -import qs +import qs.modules.common +import qs.modules.common.widgets import qs.services import "../../common" import "../../common/widgets/shapes" as S @@ -33,6 +33,18 @@ PanelWindow { mask: root.currentPanel.maskRegion // HyprlandWindow.visibleMask: mask // TODO: use this later to optimize hyprland's rendering + ///////////////// Focus dim ////////////////// + + FadeLoader { + z: 0 + anchors.fill: parent + shown: GlobalFocusGrab.active + sourceComponent: Rectangle { + opacity: 0.4 + color: Appearance.m3colors.m3scrim + } + } + ///////////////// Content ////////////////// property alias roundedPolygon: backgroundShape.roundedPolygon @@ -50,6 +62,7 @@ PanelWindow { } S.ShapeCanvas { id: backgroundShape + z: 1 anchors.fill: parent polygonIsNormalized: false roundedPolygon: MaterialShapes.customPolygon([new MaterialShapes.PointNRound(new Offset.Offset(root.screen.width, 0), new CornerRounding.CornerRounding(9999)),]) @@ -125,13 +138,13 @@ PanelWindow { shown: root.finishedMorphing } - HOverview { - id: overview - load: root.currentPanel === this - shown: root.finishedMorphing - onRequestFocus: root.currentPanel = overview - onDismissed: root.dismiss() - } + // HOverview { + // id: overview + // load: root.currentPanel === this + // shown: root.finishedMorphing + // onRequestFocus: root.currentPanel = overview + // onDismissed: root.dismiss() + // } } //////////////// Components ///////////////// diff --git a/dots/.config/quickshell/ii/panelFamilies/HeftyHypeFamily.qml b/dots/.config/quickshell/ii/panelFamilies/HeftyHypeFamily.qml index 62e969f2f..f4fc13cb1 100644 --- a/dots/.config/quickshell/ii/panelFamilies/HeftyHypeFamily.qml +++ b/dots/.config/quickshell/ii/panelFamilies/HeftyHypeFamily.qml @@ -37,7 +37,7 @@ Scope { PanelLoader { component: OnScreenDisplay {} } PanelLoader { component: OnScreenKeyboard {} } PanelLoader { component: Overlay {} } - // PanelLoader { component: Overview {} } + PanelLoader { component: Overview {} } PanelLoader { component: Polkit {} } PanelLoader { component: RegionSelector {} } PanelLoader { component: ScreenCorners {} }