diff --git a/Drawers/Exclusions.qml b/Drawers/Exclusions.qml index 99ad14d..1af46fb 100644 --- a/Drawers/Exclusions.qml +++ b/Drawers/Exclusions.qml @@ -1,6 +1,7 @@ pragma ComponentBehavior: Bound import Quickshell +import Quickshell.Wayland import QtQuick import ZShell.Config import qs.Components @@ -15,6 +16,9 @@ Scope { ExclusionZone { id: top + WlrLayershell.layer: WlrLayer.Overlay + anchors.left: true + anchors.right: true anchors.top: true hasBar: root.geometry.barOnTop } diff --git a/Drawers/Interactions.qml b/Drawers/Interactions.qml index 6f70a2c..85dd0da 100644 --- a/Drawers/Interactions.qml +++ b/Drawers/Interactions.qml @@ -162,6 +162,19 @@ Item { } } + Timer { + id: unhideTimer + + interval: Config.bar.revealDelay + repeat: false + running: false + + onTriggered: { + if (hoverHandler.hovered) + root.bar.isHovered = true; + } + } + HoverHandler { id: hoverHandler @@ -178,7 +191,7 @@ Item { root.popouts.hasCurrent = false; } - if (Config.bar.autoHide) + if (Config.bar.autoHide || root.bar.fullscreen) root.bar.isHovered = false; } } @@ -200,6 +213,9 @@ Item { if (!root.visibilities.bar && Config.bar.autoHide && root.geometry.barContains(x, y, true)) root.bar.isHovered = true; + if (root.bar.fullscreen && !root.bar.isHovered) + unhideTimer.start(); + if (root.panels.sidebar.offsetScale === 1) { const showOsd = root.inRightPanel(root.panels.osdWrapper, x, y); diff --git a/Drawers/Windows.qml b/Drawers/Windows.qml index dc118cc..b87e720 100644 --- a/Drawers/Windows.qml +++ b/Drawers/Windows.qml @@ -51,7 +51,7 @@ CustomWindow { readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen) property var root: Quickshell.shellDir readonly property real sdfBorderOffset: 2 * fsTransitionProg - readonly property real shadowOpacity: 0.7 * (1 - fsTransitionProg) + readonly property real shadowOpacity: 0.7 * (1 - (bar.isHovered ? 0 : fsTransitionProg)) property color surfaceColor: Colors.tPalette.m3surface WlrLayershell.exclusionMode: ExclusionMode.Ignore @@ -59,7 +59,7 @@ CustomWindow { WlrLayershell.layer: (fsTransitionProg > 0 && Config.general.showOverFullscreen) || (hasSpecialWorkspace && hasFullscreenOnNormalWs) ? WlrLayer.Overlay : WlrLayer.Top color: "transparent" contentItem.focus: true - mask: visibilities.isDrawing ? null : (hasFullscreen ? emptyRegion : regions) + mask: visibilities.isDrawing ? null : (hasFullscreen && !bar.isHovered ? emptyRegion : regions) name: "Bar" Behavior on fsTransitionProg { @@ -118,6 +118,12 @@ CustomWindow { x: root.width - width y: panels.osdWrapper.y + bar.implicitHeight } + + Region { + height: geometry.horizontal ? 1 : root.screen.height + width: geometry.horizontal ? root.screen.width : 1 + y: geometry.position === "bottom" ? root.screen.height - 1 : 0 + } } Regions { diff --git a/Modules/Bar/Bar.qml b/Modules/Bar/Bar.qml index d396f8f..f898ae6 100644 --- a/Modules/Bar/Bar.qml +++ b/Modules/Bar/Bar.qml @@ -12,6 +12,7 @@ GridLayout { required property bool fullscreen required property bool horizontal + required property bool isHovered required property Wrapper popouts required property ClipWrapper popoutsWrapper required property ShellScreen screen @@ -92,7 +93,7 @@ GridLayout { delegate: EntryWrapper { HyprsunsetWidget { horizontal: root.horizontal - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -113,7 +114,7 @@ GridLayout { Workspaces { horizontal: root.horizontal screen: root.screen - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -126,7 +127,7 @@ GridLayout { horizontal: root.horizontal loader: root popouts: root.popouts - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -148,7 +149,7 @@ GridLayout { Resources { horizontal: root.horizontal visibilities: root.visibilities - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -159,7 +160,7 @@ GridLayout { delegate: EntryWrapper { UpdatesWidget { horizontal: root.horizontal - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -172,7 +173,7 @@ GridLayout { horizontal: root.horizontal popouts: root.popouts visibilities: root.visibilities - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -186,7 +187,7 @@ GridLayout { loader: root popouts: root.popouts visibilities: root.visibilities - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -198,7 +199,7 @@ GridLayout { WindowTitle { bar: root horizontal: root.horizontal - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } @@ -218,7 +219,7 @@ GridLayout { delegate: EntryWrapper { MediaWidget { horizontal: root.horizontal - visible: !root.fullscreen + visible: !root.fullscreen || root.isHovered } } } diff --git a/Modules/Bar/BarLoader.qml b/Modules/Bar/BarLoader.qml index 2243ad7..e34459f 100644 --- a/Modules/Bar/BarLoader.qml +++ b/Modules/Bar/BarLoader.qml @@ -21,7 +21,7 @@ Item { required property ClipWrapper popoutsWrapper required property string position required property ShellScreen screen - readonly property bool shouldBeVisible: !fullscreen && (!Config.bar.autoHide || visibilities.bar || isHovered) + readonly property bool shouldBeVisible: (!fullscreen && (!Config.bar.autoHide || visibilities.bar)) || isHovered readonly property int vPadding: 6 required property PersistentProperties visibilities @@ -79,7 +79,9 @@ Item { sourceComponent: Bar { fullscreen: root.fullscreen + height: root.contentHeight horizontal: root.horizontal + isHovered: root.isHovered popouts: root.popouts popoutsWrapper: root.popoutsWrapper screen: root.screen diff --git a/Modules/Settings/Pages/Panels/BarPanel.qml b/Modules/Settings/Pages/Panels/BarPanel.qml index 31e613a..c14f3bd 100644 --- a/Modules/Settings/Pages/Panels/BarPanel.qml +++ b/Modules/Settings/Pages/Panels/BarPanel.qml @@ -35,7 +35,6 @@ PageBase { SelectRow { active: Config.bar.position === "top" ? menuItems[0] : Config.bar.position === "left" ? menuItems[1] : menuItems[2] - last: true settingAnchor: "bar-position" subtext: qsTr("Change which edge the bar appears on") text: qsTr("Position") @@ -61,6 +60,28 @@ PageBase { onSelected: item => Config.bar.position = item.value } + ToggleRow { + checked: Config.bar.fullscreenReveal + settingAnchor: "bar-fullscreen-reveal" + subtext: qsTr("Hover top edge to show bar in fullscreen") + text: qsTr("Reveal on edge") + + onToggled: Config.bar.fullscreenReveal = checked + } + + SpinRow { + from: 0 + last: true + settingAnchor: "bar-reveal-delay" + stepSize: 100 + subtext: qsTr("The delay before bar is revealed when cursor is at edge") + text: qsTr("Reveal delay") + to: 2000 + value: Config.bar.revealDelay + + onMoved: v => Config.bar.revealDelay = v + } + // Components SectionHeader { text: qsTr("Components")