Initial commit implementing reveal on hover in fullscreen
C++ / fmt (pull_request) Successful in 5s
JS/TS / fmt (pull_request) Successful in 20s
JS/TS / lint (pull_request) Successful in 26s
Python / fmt (pull_request) Successful in 34s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 59s
Python / typecheck (pull_request) Failing after 1m2s
C++ / build (pull_request) Successful in 1m50s
Rust / fmt (pull_request) Successful in 46s
Rust / build (pull_request) Successful in 1m40s
Python / buildcheck (pull_request) Successful in 2m27s
Rust / clippy (pull_request) Successful in 2m5s
C++ / clang-tidy (pull_request) Successful in 5m56s

This commit is contained in:
2026-08-12 01:35:23 +02:00
parent c29b91cd26
commit 439a14d29e
8 changed files with 65 additions and 15 deletions
+2
View File
@@ -57,10 +57,12 @@ JsonObject {
enabled: true enabled: true
}, },
] ]
property bool fullscreenReveal: true
property int height: 34 property int height: 34
property bool hideWhenNotif: false property bool hideWhenNotif: false
property Popouts popouts: Popouts { property Popouts popouts: Popouts {
} }
property int revealDelay: 300
property int rounding: 8 property int rounding: 8
property int smoothing: 32 property int smoothing: 32
property Tray tray: Tray { property Tray tray: Tray {
+4
View File
@@ -1,6 +1,7 @@
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import Quickshell import Quickshell
import Quickshell.Wayland
import QtQuick import QtQuick
import qs.Config import qs.Config
import qs.Components import qs.Components
@@ -14,6 +15,9 @@ Scope {
ExclusionZone { ExclusionZone {
id: top id: top
WlrLayershell.layer: WlrLayer.Overlay
anchors.left: true
anchors.right: true
anchors.top: true anchors.top: true
exclusiveZone: root.bar.exclusiveZone exclusiveZone: root.bar.exclusiveZone
} }
+17 -1
View File
@@ -158,6 +158,19 @@ Item {
} }
} }
Timer {
id: unhideTimer
interval: Config.bar.revealDelay
repeat: false
running: false
onTriggered: {
if (hoverHandler.hovered)
root.bar.isHovered = true;
}
}
HoverHandler { HoverHandler {
id: hoverHandler id: hoverHandler
@@ -174,7 +187,7 @@ Item {
root.popouts.hasCurrent = false; root.popouts.hasCurrent = false;
} }
if (Config.bar.autoHide) if (Config.bar.autoHide || root.bar.fullscreen)
root.bar.isHovered = false; root.bar.isHovered = false;
} }
} }
@@ -196,6 +209,9 @@ Item {
if (!root.visibilities.bar && Config.bar.autoHide && y < root.bar.implicitHeight) if (!root.visibilities.bar && Config.bar.autoHide && y < root.bar.implicitHeight)
root.bar.isHovered = true; root.bar.isHovered = true;
if (root.bar.fullscreen && !root.bar.isHovered)
unhideTimer.start();
if (root.panels.sidebar.offsetScale === 1) { if (root.panels.sidebar.offsetScale === 1) {
const showOsd = root.inRightPanel(root.panels.osdWrapper, x, y); const showOsd = root.inRightPanel(root.panels.osdWrapper, x, y);
+1 -1
View File
@@ -17,7 +17,7 @@ Region {
intersection: Intersection.Xor intersection: Intersection.Xor
width: win.width - win.borderThickness * 2 - win.dragMaskPadding * 2 width: win.width - win.borderThickness * 2 - win.dragMaskPadding * 2
x: win.borderThickness + win.dragMaskPadding x: win.borderThickness + win.dragMaskPadding
y: bar.implicitHeight + win.dragMaskPadding y: bar.implicitHeight + win.dragMaskPadding + (bar.fullscreen ? 1 : 0)
R { R {
panel: root.panels.dashboardWrapper panel: root.panels.dashboardWrapper
+7 -2
View File
@@ -49,7 +49,7 @@ CustomWindow {
readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen) readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen)
property var root: Quickshell.shellDir property var root: Quickshell.shellDir
readonly property real sdfBorderOffset: 2 * fsTransitionProg 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: DynamicColors.tPalette.m3surface property color surfaceColor: DynamicColors.tPalette.m3surface
WlrLayershell.exclusionMode: ExclusionMode.Ignore WlrLayershell.exclusionMode: ExclusionMode.Ignore
@@ -57,7 +57,7 @@ CustomWindow {
WlrLayershell.layer: (fsTransitionProg > 0 && Config.general.showOverFullscreen) || (hasSpecialWorkspace && hasFullscreenOnNormalWs) ? WlrLayer.Overlay : WlrLayer.Top WlrLayershell.layer: (fsTransitionProg > 0 && Config.general.showOverFullscreen) || (hasSpecialWorkspace && hasFullscreenOnNormalWs) ? WlrLayer.Overlay : WlrLayer.Top
color: "transparent" color: "transparent"
contentItem.focus: true contentItem.focus: true
mask: visibilities.isDrawing ? null : (hasFullscreen ? emptyRegion : regions) mask: visibilities.isDrawing ? null : (hasFullscreen && !bar.isHovered ? emptyRegion : regions)
name: "Bar" name: "Bar"
Behavior on fsTransitionProg { Behavior on fsTransitionProg {
@@ -108,6 +108,11 @@ CustomWindow {
x: root.width - width x: root.width - width
y: panels.osdWrapper.y + bar.implicitHeight y: panels.osdWrapper.y + bar.implicitHeight
} }
Region {
height: 1
width: root.screen.width
}
} }
Regions { Regions {
+10 -9
View File
@@ -13,6 +13,7 @@ RowLayout {
id: root id: root
required property bool fullscreen required property bool fullscreen
required property bool isHovered
required property Wrapper popouts required property Wrapper popouts
required property ClipWrapper popoutsWrapper required property ClipWrapper popoutsWrapper
required property ShellScreen screen required property ShellScreen screen
@@ -85,7 +86,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
HyprsunsetWidget { HyprsunsetWidget {
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -104,7 +105,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
Workspaces { Workspaces {
screen: root.screen screen: root.screen
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -116,7 +117,7 @@ RowLayout {
TrayIcons { TrayIcons {
loader: root loader: root
popouts: root.popouts popouts: root.popouts
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -136,7 +137,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
Resources { Resources {
visibilities: root.visibilities visibilities: root.visibilities
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -146,7 +147,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
UpdatesWidget { UpdatesWidget {
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -158,7 +159,7 @@ RowLayout {
NotifBell { NotifBell {
popouts: root.popouts popouts: root.popouts
visibilities: root.visibilities visibilities: root.visibilities
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -171,7 +172,7 @@ RowLayout {
loader: root loader: root
popouts: root.popouts popouts: root.popouts
visibilities: root.visibilities visibilities: root.visibilities
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -182,7 +183,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
WindowTitle { WindowTitle {
bar: root bar: root
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
@@ -201,7 +202,7 @@ RowLayout {
delegate: EntryWrapper { delegate: EntryWrapper {
MediaWidget { MediaWidget {
visible: !root.fullscreen visible: !root.fullscreen || root.isHovered
} }
} }
} }
+2 -1
View File
@@ -23,7 +23,7 @@ Item {
required property Wrapper popouts required property Wrapper popouts
required property ClipWrapper popoutsWrapper required property ClipWrapper popoutsWrapper
required property ShellScreen screen 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 readonly property int vPadding: 6
required property PersistentProperties visibilities required property PersistentProperties visibilities
@@ -78,6 +78,7 @@ Item {
sourceComponent: Bar { sourceComponent: Bar {
fullscreen: root.fullscreen fullscreen: root.fullscreen
height: root.contentHeight height: root.contentHeight
isHovered: root.isHovered
popouts: root.popouts popouts: root.popouts
popoutsWrapper: root.popoutsWrapper popoutsWrapper: root.popoutsWrapper
screen: root.screen screen: root.screen
+22 -1
View File
@@ -25,7 +25,6 @@ PageBase {
ToggleRow { ToggleRow {
checked: Config.bar.autoHide checked: Config.bar.autoHide
first: true first: true
last: true
settingAnchor: "bar-autohide" settingAnchor: "bar-autohide"
subtext: qsTr("Hide the bar, reveal on hover") subtext: qsTr("Hide the bar, reveal on hover")
text: qsTr("Auto hide") text: qsTr("Auto hide")
@@ -33,6 +32,28 @@ PageBase {
onToggled: Config.bar.autoHide = checked onToggled: Config.bar.autoHide = checked
} }
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 // Components
SectionHeader { SectionHeader {
text: qsTr("Components") text: qsTr("Components")