mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
refactor(fullscreen): Refine fullscreen layering and frame overlay behavior
- Replaced fullscreen hide/reveal toggles with Show Over Fullscreen layer toggles - Added Launcher opt to Show Over Fullscreen setting - Kept fullscreen stacking compositor-owned via top/overlay layer choices - Fixed Hyrland Special Workspaces - Updated DMS Advanced Configuration docs
This commit is contained in:
@@ -449,6 +449,7 @@ Singleton {
|
|||||||
property bool dankLauncherV2UnloadOnClose: false
|
property bool dankLauncherV2UnloadOnClose: false
|
||||||
property bool dankLauncherV2IncludeFilesInAll: false
|
property bool dankLauncherV2IncludeFilesInAll: false
|
||||||
property bool dankLauncherV2IncludeFoldersInAll: false
|
property bool dankLauncherV2IncludeFoldersInAll: false
|
||||||
|
property bool launcherShowOverFullscreen: false
|
||||||
property string launcherStyle: "full"
|
property string launcherStyle: "full"
|
||||||
|
|
||||||
property string _legacyWeatherLocation: "New York, NY"
|
property string _legacyWeatherLocation: "New York, NY"
|
||||||
@@ -606,7 +607,7 @@ Singleton {
|
|||||||
property bool showDock: false
|
property bool showDock: false
|
||||||
property bool dockAutoHide: false
|
property bool dockAutoHide: false
|
||||||
property bool dockSmartAutoHide: false
|
property bool dockSmartAutoHide: false
|
||||||
property bool dockHideOnFullscreen: true
|
property bool dockShowOverFullscreen: false
|
||||||
property bool dockGroupByApp: false
|
property bool dockGroupByApp: false
|
||||||
property bool dockRestoreSpecialWorkspaceOnClick: false
|
property bool dockRestoreSpecialWorkspaceOnClick: false
|
||||||
property bool dockOpenOnOverview: false
|
property bool dockOpenOnOverview: false
|
||||||
@@ -787,6 +788,7 @@ Singleton {
|
|||||||
"popupGapsAuto": true,
|
"popupGapsAuto": true,
|
||||||
"popupGapsManual": 4,
|
"popupGapsManual": 4,
|
||||||
"maximizeDetection": true,
|
"maximizeDetection": true,
|
||||||
|
"showOverFullscreen": false,
|
||||||
"scrollEnabled": true,
|
"scrollEnabled": true,
|
||||||
"scrollXBehavior": "column",
|
"scrollXBehavior": "column",
|
||||||
"scrollYBehavior": "workspace",
|
"scrollYBehavior": "workspace",
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ var SPEC = {
|
|||||||
dankLauncherV2UnloadOnClose: { def: false },
|
dankLauncherV2UnloadOnClose: { def: false },
|
||||||
dankLauncherV2IncludeFilesInAll: { def: false },
|
dankLauncherV2IncludeFilesInAll: { def: false },
|
||||||
dankLauncherV2IncludeFoldersInAll: { def: false },
|
dankLauncherV2IncludeFoldersInAll: { def: false },
|
||||||
|
launcherShowOverFullscreen: { def: false },
|
||||||
launcherStyle: { def: "full" },
|
launcherStyle: { def: "full" },
|
||||||
|
|
||||||
useAutoLocation: { def: false },
|
useAutoLocation: { def: false },
|
||||||
@@ -332,7 +333,7 @@ var SPEC = {
|
|||||||
showDock: { def: false },
|
showDock: { def: false },
|
||||||
dockAutoHide: { def: false },
|
dockAutoHide: { def: false },
|
||||||
dockSmartAutoHide: { def: false },
|
dockSmartAutoHide: { def: false },
|
||||||
dockHideOnFullscreen: { def: true },
|
dockShowOverFullscreen: { def: false },
|
||||||
dockGroupByApp: { def: false },
|
dockGroupByApp: { def: false },
|
||||||
dockRestoreSpecialWorkspaceOnClick: { def: false },
|
dockRestoreSpecialWorkspaceOnClick: { def: false },
|
||||||
dockOpenOnOverview: { def: false },
|
dockOpenOnOverview: { def: false },
|
||||||
@@ -496,7 +497,7 @@ var SPEC = {
|
|||||||
popupGapsAuto: true,
|
popupGapsAuto: true,
|
||||||
popupGapsManual: 4,
|
popupGapsManual: 4,
|
||||||
maximizeDetection: true,
|
maximizeDetection: true,
|
||||||
fullscreenDetection: true,
|
showOverFullscreen: false,
|
||||||
scrollEnabled: true,
|
scrollEnabled: true,
|
||||||
scrollXBehavior: "column",
|
scrollXBehavior: "column",
|
||||||
scrollYBehavior: "workspace",
|
scrollYBehavior: "workspace",
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Item {
|
|||||||
|
|
||||||
readonly property string resolvedConnectedBarSide: frameConnectedMode ? preferredConnectedBarSide : ""
|
readonly property string resolvedConnectedBarSide: frameConnectedMode ? preferredConnectedBarSide : ""
|
||||||
|
|
||||||
readonly property bool frameOwnsConnectedChrome: frameConnectedMode && resolvedConnectedBarSide !== "" && !allowStacking
|
readonly property bool frameOwnsConnectedChrome: frameConnectedMode && resolvedConnectedBarSide !== "" && !allowStacking && CompositorService.usesConnectedFrameChromeForScreen(effectiveScreen)
|
||||||
|
|
||||||
function _dockOccupiesSide(side) {
|
function _dockOccupiesSide(side) {
|
||||||
if (!SettingsData.showDock)
|
if (!SettingsData.showDock)
|
||||||
@@ -58,7 +58,7 @@ Item {
|
|||||||
|
|
||||||
readonly property bool _dockBlocksEmergence: frameOwnsConnectedChrome && _dockOccupiesSide(resolvedConnectedBarSide)
|
readonly property bool _dockBlocksEmergence: frameOwnsConnectedChrome && _dockOccupiesSide(resolvedConnectedBarSide)
|
||||||
|
|
||||||
readonly property bool connectedMotionParity: Theme.isConnectedEffect
|
readonly property bool connectedMotionParity: frameOwnsConnectedChrome
|
||||||
property int animationDuration: connectedMotionParity ? Theme.popoutAnimationDuration : Theme.modalAnimationDuration
|
property int animationDuration: connectedMotionParity ? Theme.popoutAnimationDuration : Theme.modalAnimationDuration
|
||||||
property real animationScaleCollapsed: Theme.effectScaleCollapsed
|
property real animationScaleCollapsed: Theme.effectScaleCollapsed
|
||||||
property real animationOffset: Theme.effectAnimOffset
|
property real animationOffset: Theme.effectAnimOffset
|
||||||
@@ -68,7 +68,7 @@ Item {
|
|||||||
property color borderColor: Theme.outlineMedium
|
property color borderColor: Theme.outlineMedium
|
||||||
property real borderWidth: 0
|
property real borderWidth: 0
|
||||||
property real cornerRadius: Theme.cornerRadius
|
property real cornerRadius: Theme.cornerRadius
|
||||||
readonly property bool connectedSurfaceOverride: Theme.isConnectedEffect
|
readonly property bool connectedSurfaceOverride: frameOwnsConnectedChrome
|
||||||
readonly property color effectiveBackgroundColor: connectedSurfaceOverride ? Theme.connectedSurfaceColor : backgroundColor
|
readonly property color effectiveBackgroundColor: connectedSurfaceOverride ? Theme.connectedSurfaceColor : backgroundColor
|
||||||
readonly property color effectiveBorderColor: connectedSurfaceOverride ? "transparent" : borderColor
|
readonly property color effectiveBorderColor: connectedSurfaceOverride ? "transparent" : borderColor
|
||||||
readonly property real effectiveBorderWidth: connectedSurfaceOverride ? 0 : borderWidth
|
readonly property real effectiveBorderWidth: connectedSurfaceOverride ? 0 : borderWidth
|
||||||
@@ -346,7 +346,7 @@ Item {
|
|||||||
readonly property real shadowFallbackOffset: 6
|
readonly property real shadowFallbackOffset: 6
|
||||||
readonly property real shadowRenderPadding: (!frameOwnsConnectedChrome && root.enableShadow && Theme.elevationEnabled && SettingsData.modalElevationEnabled) ? Theme.elevationRenderPadding(shadowLevel, Theme.elevationLightDirection, shadowFallbackOffset, 8, 16) : 0
|
readonly property real shadowRenderPadding: (!frameOwnsConnectedChrome && root.enableShadow && Theme.elevationEnabled && SettingsData.modalElevationEnabled) ? Theme.elevationRenderPadding(shadowLevel, Theme.elevationLightDirection, shadowFallbackOffset, 8, 16) : 0
|
||||||
readonly property real shadowMotionPadding: {
|
readonly property real shadowMotionPadding: {
|
||||||
if (Theme.isConnectedEffect)
|
if (frameOwnsConnectedChrome)
|
||||||
return 0;
|
return 0;
|
||||||
if (animationType === "slide")
|
if (animationType === "slide")
|
||||||
return 30;
|
return 30;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Item {
|
|||||||
readonly property bool frameOwnsConnectedChrome: impl.item ? (impl.item.frameOwnsConnectedChrome ?? false) : false
|
readonly property bool frameOwnsConnectedChrome: impl.item ? (impl.item.frameOwnsConnectedChrome ?? false) : false
|
||||||
readonly property string resolvedConnectedBarSide: impl.item ? (impl.item.resolvedConnectedBarSide ?? "") : ""
|
readonly property string resolvedConnectedBarSide: impl.item ? (impl.item.resolvedConnectedBarSide ?? "") : ""
|
||||||
readonly property bool launcherArcExtenderActive: impl.item ? (impl.item.launcherArcExtenderActive ?? false) : false
|
readonly property bool launcherArcExtenderActive: impl.item ? (impl.item.launcherArcExtenderActive ?? false) : false
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
|
|
||||||
signal dialogClosed
|
signal dialogClosed
|
||||||
|
|
||||||
@@ -116,6 +117,7 @@ Item {
|
|||||||
if (!it)
|
if (!it)
|
||||||
return;
|
return;
|
||||||
it.modalHandle = root;
|
it.modalHandle = root;
|
||||||
|
it.triggerUsesOverlayLayer = Qt.binding(() => root.triggerUsesOverlayLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|||||||
@@ -13,13 +13,14 @@ Item {
|
|||||||
readonly property var log: Log.scoped("DankLauncherV2ModalConnected")
|
readonly property var log: Log.scoped("DankLauncherV2ModalConnected")
|
||||||
|
|
||||||
property var modalHandle: root
|
property var modalHandle: root
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
property bool spotlightOpen: false
|
property bool spotlightOpen: false
|
||||||
property bool keyboardActive: false
|
property bool keyboardActive: false
|
||||||
property bool contentVisible: false
|
property bool contentVisible: false
|
||||||
readonly property bool launcherMotionVisible: Theme.isConnectedEffect ? _motionActive : (Theme.isDirectionalEffect ? spotlightOpen : _motionActive)
|
readonly property bool launcherMotionVisible: frameOwnsConnectedChrome ? _motionActive : (Theme.isDirectionalEffect ? spotlightOpen : _motionActive)
|
||||||
property var spotlightContent: launcherContentLoader.item
|
property var spotlightContent: launcherContentLoader.item
|
||||||
property bool openedFromOverview: false
|
property bool openedFromOverview: false
|
||||||
property bool isClosing: false
|
property bool isClosing: false
|
||||||
@@ -40,6 +41,21 @@ Item {
|
|||||||
readonly property real screenWidth: effectiveScreen?.width ?? 1920
|
readonly property real screenWidth: effectiveScreen?.width ?? 1920
|
||||||
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
||||||
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
||||||
|
readonly property bool usesOverlayLayer: SettingsData.launcherShowOverFullscreen || triggerUsesOverlayLayer
|
||||||
|
readonly property var effectiveLauncherLayer: {
|
||||||
|
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
||||||
|
case "bottom":
|
||||||
|
log.error("'bottom' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "background":
|
||||||
|
log.error("'background' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "overlay":
|
||||||
|
return WlrLayershell.Overlay;
|
||||||
|
default:
|
||||||
|
return root.usesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly property int baseWidth: {
|
readonly property int baseWidth: {
|
||||||
switch (SettingsData.dankLauncherV2Size) {
|
switch (SettingsData.dankLauncherV2Size) {
|
||||||
@@ -74,7 +90,7 @@ Item {
|
|||||||
|
|
||||||
readonly property string resolvedConnectedBarSide: frameConnectedMode ? preferredConnectedBarSide : ""
|
readonly property string resolvedConnectedBarSide: frameConnectedMode ? preferredConnectedBarSide : ""
|
||||||
|
|
||||||
readonly property bool frameOwnsConnectedChrome: frameConnectedMode && resolvedConnectedBarSide !== ""
|
readonly property bool frameOwnsConnectedChrome: frameConnectedMode && resolvedConnectedBarSide !== "" && CompositorService.usesConnectedFrameChromeForScreen(effectiveScreen)
|
||||||
readonly property bool launcherArcExtenderActive: frameOwnsConnectedChrome && SettingsData.frameLauncherArcExtender && (resolvedConnectedBarSide === "top" || resolvedConnectedBarSide === "bottom")
|
readonly property bool launcherArcExtenderActive: frameOwnsConnectedChrome && SettingsData.frameLauncherArcExtender && (resolvedConnectedBarSide === "top" || resolvedConnectedBarSide === "bottom")
|
||||||
|
|
||||||
function _dockOccupiesSide(side) {
|
function _dockOccupiesSide(side) {
|
||||||
@@ -140,10 +156,10 @@ Item {
|
|||||||
readonly property real modalX: frameOwnsConnectedChrome ? _connectedModalPos.x : ((screenWidth - modalWidth) / 2)
|
readonly property real modalX: frameOwnsConnectedChrome ? _connectedModalPos.x : ((screenWidth - modalWidth) / 2)
|
||||||
readonly property real modalY: frameOwnsConnectedChrome ? _connectedModalPos.y : ((screenHeight - modalHeight) / 2)
|
readonly property real modalY: frameOwnsConnectedChrome ? _connectedModalPos.y : ((screenHeight - modalHeight) / 2)
|
||||||
|
|
||||||
readonly property bool connectedSurfaceOverride: Theme.isConnectedEffect
|
readonly property bool connectedSurfaceOverride: frameOwnsConnectedChrome
|
||||||
readonly property int launcherAnimationDuration: Theme.isConnectedEffect ? Theme.popoutAnimationDuration : Theme.modalAnimationDuration
|
readonly property int launcherAnimationDuration: frameOwnsConnectedChrome ? Theme.popoutAnimationDuration : Theme.modalAnimationDuration
|
||||||
readonly property list<real> launcherEnterCurve: Theme.isConnectedEffect ? Theme.variantPopoutEnterCurve : Theme.variantModalEnterCurve
|
readonly property list<real> launcherEnterCurve: frameOwnsConnectedChrome ? Theme.variantPopoutEnterCurve : Theme.variantModalEnterCurve
|
||||||
readonly property list<real> launcherExitCurve: Theme.isConnectedEffect ? Theme.variantPopoutExitCurve : Theme.variantModalExitCurve
|
readonly property list<real> launcherExitCurve: frameOwnsConnectedChrome ? Theme.variantPopoutExitCurve : Theme.variantModalExitCurve
|
||||||
readonly property color backgroundColor: connectedSurfaceOverride ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
readonly property color backgroundColor: connectedSurfaceOverride ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||||
readonly property real cornerRadius: connectedSurfaceOverride ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
readonly property real cornerRadius: connectedSurfaceOverride ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
||||||
readonly property color borderColor: {
|
readonly property color borderColor: {
|
||||||
@@ -596,7 +612,7 @@ Item {
|
|||||||
readonly property real _rightMargin: contentContainer.dockRight ? contentContainer.dockThickness : (typeof SettingsData !== "undefined" && SettingsData.barPosition === 3 ? Theme.px(42, root.dpr) : 0)
|
readonly property real _rightMargin: contentContainer.dockRight ? contentContainer.dockThickness : (typeof SettingsData !== "undefined" && SettingsData.barPosition === 3 ? Theme.px(42, root.dpr) : 0)
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight:bg"
|
WlrLayershell.namespace: "dms:spotlight:bg"
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||||
|
|
||||||
@@ -669,20 +685,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight"
|
WlrLayershell.namespace: "dms:spotlight"
|
||||||
WlrLayershell.layer: {
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
|
||||||
case "bottom":
|
|
||||||
log.error("'bottom' layer is not valid for modals. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "background":
|
|
||||||
log.error("'background' layer is not valid for modals. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "overlay":
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
default:
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Item {
|
|||||||
readonly property var log: Log.scoped("DankLauncherV2ModalSpotlight")
|
readonly property var log: Log.scoped("DankLauncherV2ModalSpotlight")
|
||||||
|
|
||||||
property var modalHandle: root
|
property var modalHandle: root
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
@@ -29,13 +30,28 @@ Item {
|
|||||||
readonly property real screenWidth: effectiveScreen?.width ?? 1920
|
readonly property real screenWidth: effectiveScreen?.width ?? 1920
|
||||||
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
||||||
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
||||||
|
readonly property bool usesOverlayLayer: SettingsData.launcherShowOverFullscreen || triggerUsesOverlayLayer
|
||||||
|
readonly property var effectiveLauncherLayer: {
|
||||||
|
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
||||||
|
case "bottom":
|
||||||
|
log.error("'bottom' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "background":
|
||||||
|
log.error("'background' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "overlay":
|
||||||
|
return WlrLayershell.Overlay;
|
||||||
|
default:
|
||||||
|
return root.usesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly property int _openDuration: 80
|
readonly property int _openDuration: 80
|
||||||
readonly property int _closeDuration: 70
|
readonly property int _closeDuration: 70
|
||||||
readonly property int _motionDuration: 90
|
readonly property int _motionDuration: 90
|
||||||
|
|
||||||
// Connected frame mode clamps the centered surface inside frame insets.
|
// Connected frame mode clamps the centered surface inside frame insets.
|
||||||
readonly property bool frameConnected: SettingsData.connectedFrameModeActive && !!effectiveScreen && SettingsData.isScreenInPreferences(effectiveScreen, SettingsData.frameScreenPreferences)
|
readonly property bool frameConnected: CompositorService.usesConnectedFrameChromeForScreen(effectiveScreen)
|
||||||
|
|
||||||
function _frameEdgeInset(side) {
|
function _frameEdgeInset(side) {
|
||||||
if (!effectiveScreen || !frameConnected)
|
if (!effectiveScreen || !frameConnected)
|
||||||
@@ -263,7 +279,7 @@ Item {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight:clickcatcher"
|
WlrLayershell.namespace: "dms:spotlight:clickcatcher"
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||||
|
|
||||||
@@ -324,14 +340,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight"
|
WlrLayershell.namespace: "dms:spotlight"
|
||||||
WlrLayershell.layer: {
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
|
||||||
case "overlay":
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
default:
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Item {
|
|||||||
readonly property var log: Log.scoped("DankLauncherV2ModalStandalone")
|
readonly property var log: Log.scoped("DankLauncherV2ModalStandalone")
|
||||||
|
|
||||||
property var modalHandle: root
|
property var modalHandle: root
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
||||||
@@ -31,7 +32,7 @@ Item {
|
|||||||
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
readonly property real screenHeight: effectiveScreen?.height ?? 1080
|
||||||
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
readonly property real dpr: effectiveScreen ? CompositorService.getScreenScale(effectiveScreen) : 1
|
||||||
|
|
||||||
readonly property bool frameOwnsConnectedChrome: SettingsData.connectedFrameModeActive && !!effectiveScreen && SettingsData.isScreenInPreferences(effectiveScreen, SettingsData.frameScreenPreferences)
|
readonly property bool frameOwnsConnectedChrome: CompositorService.usesConnectedFrameChromeForScreen(effectiveScreen)
|
||||||
readonly property string resolvedConnectedBarSide: frameOwnsConnectedChrome ? (SettingsData.frameLauncherEmergeSide || "bottom") : ""
|
readonly property string resolvedConnectedBarSide: frameOwnsConnectedChrome ? (SettingsData.frameLauncherEmergeSide || "bottom") : ""
|
||||||
|
|
||||||
readonly property int baseWidth: {
|
readonly property int baseWidth: {
|
||||||
@@ -79,6 +80,21 @@ Item {
|
|||||||
|
|
||||||
readonly property color backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
readonly property color backgroundColor: Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||||
readonly property bool useBackgroundDarken: !SettingsData.frameEnabled && SettingsData.modalDarkenBackground
|
readonly property bool useBackgroundDarken: !SettingsData.frameEnabled && SettingsData.modalDarkenBackground
|
||||||
|
readonly property bool usesOverlayLayer: useBackgroundDarken || SettingsData.launcherShowOverFullscreen || triggerUsesOverlayLayer
|
||||||
|
readonly property var effectiveLauncherLayer: {
|
||||||
|
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
||||||
|
case "bottom":
|
||||||
|
log.error("'bottom' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "background":
|
||||||
|
log.error("'background' layer is not valid for modals. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "overlay":
|
||||||
|
return WlrLayershell.Overlay;
|
||||||
|
default:
|
||||||
|
return root.usesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
readonly property real cornerRadius: Theme.cornerRadius
|
readonly property real cornerRadius: Theme.cornerRadius
|
||||||
readonly property color borderColor: {
|
readonly property color borderColor: {
|
||||||
if (!SettingsData.dankLauncherV2BorderEnabled)
|
if (!SettingsData.dankLauncherV2BorderEnabled)
|
||||||
@@ -301,7 +317,7 @@ Item {
|
|||||||
updatesEnabled: root.useBackgroundDarken && (spotlightOpen || isClosing)
|
updatesEnabled: root.useBackgroundDarken && (spotlightOpen || isClosing)
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight:clickcatcher"
|
WlrLayershell.namespace: "dms:spotlight:clickcatcher"
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||||
|
|
||||||
@@ -378,22 +394,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:spotlight"
|
WlrLayershell.namespace: "dms:spotlight"
|
||||||
WlrLayershell.layer: {
|
WlrLayershell.layer: root.effectiveLauncherLayer
|
||||||
if (root.useBackgroundDarken)
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
switch (Quickshell.env("DMS_MODAL_LAYER")) {
|
|
||||||
case "bottom":
|
|
||||||
log.error("'bottom' layer is not valid for modals. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "background":
|
|
||||||
log.error("'background' layer is not valid for modals. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "overlay":
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
default:
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: keyboardActive ? (root.useHyprlandFocusGrab ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.Exclusive) : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,15 @@ Item {
|
|||||||
required property var axis
|
required property var axis
|
||||||
required property var barConfig
|
required property var barConfig
|
||||||
|
|
||||||
visible: !SettingsData.frameEnabled
|
readonly property bool frameShapesBar: SettingsData.frameEnabled && barWindow.usesConnectedFrameChrome
|
||||||
|
|
||||||
|
visible: !frameShapesBar
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
readonly property bool gothEnabled: (barConfig?.gothCornersEnabled ?? false) && !barWindow.hasMaximizedToplevel
|
readonly property bool gothEnabled: (barConfig?.gothCornersEnabled ?? false) && !(barWindow.flattenForMaximizedWindow && barWindow.hasMaximizedToplevel)
|
||||||
anchors.leftMargin: -(gothEnabled && axis.isVertical && axis.edge === "right" ? barWindow._wingR : 0)
|
anchors.leftMargin: -(gothEnabled && axis.isVertical && axis.edge === "right" ? barWindow._wingR : 0)
|
||||||
anchors.rightMargin: -(gothEnabled && axis.isVertical && axis.edge === "left" ? barWindow._wingR : 0)
|
anchors.rightMargin: -(gothEnabled && axis.isVertical && axis.edge === "left" ? barWindow._wingR : 0)
|
||||||
anchors.topMargin: -(gothEnabled && !axis.isVertical && axis.edge === "bottom" ? barWindow._wingR : 0)
|
anchors.topMargin: -(gothEnabled && !axis.isVertical && axis.edge === "bottom" ? barWindow._wingR : 0)
|
||||||
@@ -39,11 +41,11 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property real rt: {
|
property real rt: {
|
||||||
if (SettingsData.frameEnabled)
|
if (frameShapesBar)
|
||||||
return SettingsData.frameRounding;
|
return SettingsData.frameRounding;
|
||||||
if (barConfig?.squareCorners ?? false)
|
if (barConfig?.squareCorners ?? false)
|
||||||
return 0;
|
return 0;
|
||||||
if (barWindow.hasMaximizedToplevel)
|
if (barWindow.flattenForMaximizedWindow && barWindow.hasMaximizedToplevel)
|
||||||
return 0;
|
return 0;
|
||||||
return Theme.cornerRadius;
|
return Theme.cornerRadius;
|
||||||
}
|
}
|
||||||
@@ -113,9 +115,32 @@ Item {
|
|||||||
readonly property real shadowOffsetX: Theme.elevationOffsetXFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
readonly property real shadowOffsetX: Theme.elevationOffsetXFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
||||||
readonly property real shadowOffsetY: Theme.elevationOffsetYFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
readonly property real shadowOffsetY: Theme.elevationOffsetYFor(hasPerBarOverride ? null : elevLevel, effectiveShadowDirection, shadowOffsetMagnitude)
|
||||||
|
|
||||||
readonly property string mainPath: generatePathForPosition(width, height)
|
readonly property string mainPath: {
|
||||||
readonly property string borderFullPath: generateBorderFullPath(width, height)
|
frameShapesBar;
|
||||||
readonly property string borderEdgePath: generateBorderEdgePath(width, height)
|
rt;
|
||||||
|
wing;
|
||||||
|
barWindow.flattenForMaximizedWindow;
|
||||||
|
barWindow.hasMaximizedToplevel;
|
||||||
|
width;
|
||||||
|
height;
|
||||||
|
return generatePathForPosition(width, height);
|
||||||
|
}
|
||||||
|
readonly property string borderFullPath: {
|
||||||
|
frameShapesBar;
|
||||||
|
rt;
|
||||||
|
wing;
|
||||||
|
width;
|
||||||
|
height;
|
||||||
|
return generateBorderFullPath(width, height);
|
||||||
|
}
|
||||||
|
readonly property string borderEdgePath: {
|
||||||
|
frameShapesBar;
|
||||||
|
rt;
|
||||||
|
wing;
|
||||||
|
width;
|
||||||
|
height;
|
||||||
|
return generateBorderEdgePath(width, height);
|
||||||
|
}
|
||||||
property bool mainPathCorrectShape: false
|
property bool mainPathCorrectShape: false
|
||||||
property bool borderFullPathCorrectShape: false
|
property bool borderFullPathCorrectShape: false
|
||||||
property bool borderEdgePathCorrectShape: false
|
property bool borderEdgePathCorrectShape: false
|
||||||
@@ -136,6 +161,12 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onFrameShapesBarChanged: {
|
||||||
|
mainPathCorrectShape = false;
|
||||||
|
borderFullPathCorrectShape = false;
|
||||||
|
borderEdgePathCorrectShape = false;
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
@@ -259,7 +290,7 @@ Item {
|
|||||||
h = h - wing;
|
h = h - wing;
|
||||||
const r = wing;
|
const r = wing;
|
||||||
const cr = rt;
|
const cr = rt;
|
||||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
const crE = frameShapesBar ? 0 : cr;
|
||||||
|
|
||||||
let d = `M ${crE} 0`;
|
let d = `M ${crE} 0`;
|
||||||
d += ` L ${w - crE} 0`;
|
d += ` L ${w - crE} 0`;
|
||||||
@@ -290,7 +321,7 @@ Item {
|
|||||||
h = h - wing;
|
h = h - wing;
|
||||||
const r = wing;
|
const r = wing;
|
||||||
const cr = rt;
|
const cr = rt;
|
||||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
const crE = frameShapesBar ? 0 : cr;
|
||||||
|
|
||||||
let d = `M ${crE} ${fullH}`;
|
let d = `M ${crE} ${fullH}`;
|
||||||
d += ` L ${w - crE} ${fullH}`;
|
d += ` L ${w - crE} ${fullH}`;
|
||||||
@@ -320,7 +351,7 @@ Item {
|
|||||||
w = w - wing;
|
w = w - wing;
|
||||||
const r = wing;
|
const r = wing;
|
||||||
const cr = rt;
|
const cr = rt;
|
||||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
const crE = frameShapesBar ? 0 : cr;
|
||||||
|
|
||||||
let d = `M 0 ${crE}`;
|
let d = `M 0 ${crE}`;
|
||||||
d += ` L 0 ${h - crE}`;
|
d += ` L 0 ${h - crE}`;
|
||||||
@@ -351,7 +382,7 @@ Item {
|
|||||||
w = w - wing;
|
w = w - wing;
|
||||||
const r = wing;
|
const r = wing;
|
||||||
const cr = rt;
|
const cr = rt;
|
||||||
const crE = SettingsData.frameEnabled ? 0 : cr;
|
const crE = frameShapesBar ? 0 : cr;
|
||||||
|
|
||||||
let d = `M ${fullW} ${crE}`;
|
let d = `M ${fullW} ${crE}`;
|
||||||
d += ` L ${fullW} ${h - crE}`;
|
d += ` L ${fullW} ${h - crE}`;
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ Item {
|
|||||||
readonly property real innerPadding: barConfig?.innerPadding ?? 4
|
readonly property real innerPadding: barConfig?.innerPadding ?? 4
|
||||||
readonly property real outlineThickness: (barConfig?.widgetOutlineEnabled ?? false) ? (barConfig?.widgetOutlineThickness ?? 1) : 0
|
readonly property real outlineThickness: (barConfig?.widgetOutlineEnabled ?? false) ? (barConfig?.widgetOutlineThickness ?? 1) : 0
|
||||||
readonly property real _edgeBaseMargin: Math.max(Theme.spacingXS, innerPadding * 0.8)
|
readonly property real _edgeBaseMargin: Math.max(Theme.spacingXS, innerPadding * 0.8)
|
||||||
readonly property real _frameEdgeFloorInset: SettingsData.frameEnabled ? Math.max(0, SettingsData.frameThickness - _edgeBaseMargin) : 0
|
|
||||||
readonly property bool _hasBarWindow: barWindow !== undefined && barWindow !== null
|
readonly property bool _hasBarWindow: barWindow !== undefined && barWindow !== null
|
||||||
|
readonly property bool _usesConnectedFrameChrome: _hasBarWindow && (barWindow.usesConnectedFrameChrome ?? false)
|
||||||
|
readonly property real _frameEdgeFloorInset: (SettingsData.frameEnabled && _usesConnectedFrameChrome) ? Math.max(0, SettingsData.frameThickness - _edgeBaseMargin) : 0
|
||||||
readonly property bool _barIsVertical: _hasBarWindow ? barWindow.isVertical : false
|
readonly property bool _barIsVertical: _hasBarWindow ? barWindow.isVertical : false
|
||||||
readonly property string _barScreenName: _hasBarWindow ? (barWindow.screenName || "") : ""
|
readonly property string _barScreenName: _hasBarWindow ? (barWindow.screenName || "") : ""
|
||||||
readonly property bool hasAdjacentTopBarLive: _hasBarWindow && barWindow.hasAdjacentTopBar
|
readonly property bool hasAdjacentTopBarLive: _hasBarWindow && barWindow.hasAdjacentTopBar
|
||||||
@@ -47,22 +48,22 @@ Item {
|
|||||||
_hadAdjacentRightBar = true
|
_hadAdjacentRightBar = true
|
||||||
|
|
||||||
readonly property real _frameLeftInset: {
|
readonly property real _frameLeftInset: {
|
||||||
if (!_hasBarWindow || !SettingsData.frameEnabled || _barIsVertical)
|
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || _barIsVertical)
|
||||||
return 0;
|
return 0;
|
||||||
return hasAdjacentLeftBarLive ? SettingsData.frameBarSize : (_hadAdjacentLeftBar ? _frameEdgeFloorInset : 0);
|
return hasAdjacentLeftBarLive ? SettingsData.frameBarSize : (_hadAdjacentLeftBar ? _frameEdgeFloorInset : 0);
|
||||||
}
|
}
|
||||||
readonly property real _frameRightInset: {
|
readonly property real _frameRightInset: {
|
||||||
if (!_hasBarWindow || !SettingsData.frameEnabled || _barIsVertical)
|
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || _barIsVertical)
|
||||||
return 0;
|
return 0;
|
||||||
return hasAdjacentRightBarLive ? SettingsData.frameBarSize : (_hadAdjacentRightBar ? _frameEdgeFloorInset : 0);
|
return hasAdjacentRightBarLive ? SettingsData.frameBarSize : (_hadAdjacentRightBar ? _frameEdgeFloorInset : 0);
|
||||||
}
|
}
|
||||||
readonly property real _frameTopInset: {
|
readonly property real _frameTopInset: {
|
||||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_barIsVertical)
|
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || !_barIsVertical)
|
||||||
return 0;
|
return 0;
|
||||||
return hasAdjacentTopBarLive ? SettingsData.frameThickness : (_hadAdjacentTopBar ? _frameEdgeFloorInset : 0);
|
return hasAdjacentTopBarLive ? SettingsData.frameThickness : (_hadAdjacentTopBar ? _frameEdgeFloorInset : 0);
|
||||||
}
|
}
|
||||||
readonly property real _frameBottomInset: {
|
readonly property real _frameBottomInset: {
|
||||||
if (!_hasBarWindow || !SettingsData.frameEnabled || !_barIsVertical)
|
if (!_hasBarWindow || !SettingsData.frameEnabled || !_usesConnectedFrameChrome || !_barIsVertical)
|
||||||
return 0;
|
return 0;
|
||||||
return hasAdjacentBottomBarLive ? SettingsData.frameThickness : (_hadAdjacentBottomBar ? _frameEdgeFloorInset : 0);
|
return hasAdjacentBottomBarLive ? SettingsData.frameThickness : (_hadAdjacentBottomBar ? _frameEdgeFloorInset : 0);
|
||||||
}
|
}
|
||||||
@@ -95,7 +96,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on anchors.leftMargin {
|
Behavior on anchors.leftMargin {
|
||||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
@@ -103,7 +104,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on anchors.rightMargin {
|
Behavior on anchors.rightMargin {
|
||||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
@@ -111,7 +112,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on anchors.topMargin {
|
Behavior on anchors.topMargin {
|
||||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
@@ -119,7 +120,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Behavior on anchors.bottomMargin {
|
Behavior on anchors.bottomMargin {
|
||||||
enabled: _animateFrameInsets && SettingsData.frameEnabled
|
enabled: _animateFrameInsets && _usesConnectedFrameChrome
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.shortDuration
|
duration: Theme.shortDuration
|
||||||
easing.type: Easing.OutCubic
|
easing.type: Easing.OutCubic
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ PanelWindow {
|
|||||||
triggerDashTab(2);
|
triggerDashTab(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readonly property bool usesOverlayLayer: CompositorService.framePeerSurfacesUseOverlayForScreen(barWindow.screen) || (barConfig?.showOverFullscreen ?? false)
|
||||||
|
|
||||||
readonly property var dBarLayer: {
|
readonly property var dBarLayer: {
|
||||||
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
||||||
case "bottom":
|
case "bottom":
|
||||||
@@ -119,10 +121,7 @@ PanelWindow {
|
|||||||
case "top":
|
case "top":
|
||||||
return WlrLayer.Top;
|
return WlrLayer.Top;
|
||||||
default:
|
default:
|
||||||
// Elevate to Overlay when Frame is enabled so the bar stays above
|
return barWindow.usesOverlayLayer ? WlrLayer.Overlay : WlrLayer.Top;
|
||||||
// the FrameWindow (WlrLayer.Top) when it is re-mapped on mode switch,
|
|
||||||
// but drop back to Top while a true fullscreen app owns this screen.
|
|
||||||
return SettingsData.frameEnabled && !barWindow.hasFullscreenToplevel ? WlrLayer.Overlay : WlrLayer.Top;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,6 +151,13 @@ PanelWindow {
|
|||||||
onTriggered: barBlur.rebuild()
|
onTriggered: barBlur.rebuild()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: barWindow
|
||||||
|
function onUsesConnectedFrameChromeChanged() {
|
||||||
|
_blurRebuildTimer.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: blurRegionComp
|
id: blurRegionComp
|
||||||
Region {}
|
Region {}
|
||||||
@@ -179,7 +185,7 @@ PanelWindow {
|
|||||||
// In frame mode, FrameWindow owns the blur region for the entire screen edge
|
// In frame mode, FrameWindow owns the blur region for the entire screen edge
|
||||||
// (including the bar area). The bar must not set its own competing blur region
|
// (including the bar area). The bar must not set its own competing blur region
|
||||||
// so that frameBlurEnabled acts as the single control for all blur in frame mode.
|
// so that frameBlurEnabled acts as the single control for all blur in frame mode.
|
||||||
if (SettingsData.frameEnabled)
|
if (SettingsData.frameEnabled && barWindow.usesConnectedFrameChrome)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const widgets = barWindow._blurWidgetItems.filter(w => w && w.visible && w.width > 0 && w.height > 0);
|
const widgets = barWindow._blurWidgetItems.filter(w => w && w.visible && w.width > 0 && w.height > 0);
|
||||||
@@ -292,7 +298,7 @@ PanelWindow {
|
|||||||
readonly property color _surfaceContainer: Theme.surfaceContainer
|
readonly property color _surfaceContainer: Theme.surfaceContainer
|
||||||
readonly property string _barId: barConfig?.id ?? "default"
|
readonly property string _barId: barConfig?.id ?? "default"
|
||||||
property real _backgroundAlpha: barConfig?.transparency ?? 1.0
|
property real _backgroundAlpha: barConfig?.transparency ?? 1.0
|
||||||
readonly property color _bgColor: SettingsData.frameEnabled ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha)
|
readonly property color _bgColor: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? Qt.rgba(SettingsData.effectiveFrameColor.r, SettingsData.effectiveFrameColor.g, SettingsData.effectiveFrameColor.b, SettingsData.frameOpacity) : Theme.withAlpha(_surfaceContainer, _backgroundAlpha)
|
||||||
|
|
||||||
function _updateBackgroundAlpha() {
|
function _updateBackgroundAlpha() {
|
||||||
const live = SettingsData.barConfigs.find(c => c.id === _barId);
|
const live = SettingsData.barConfigs.find(c => c.id === _barId);
|
||||||
@@ -316,16 +322,13 @@ PanelWindow {
|
|||||||
|
|
||||||
property string screenName: modelData.name
|
property string screenName: modelData.name
|
||||||
|
|
||||||
|
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(screenName)
|
||||||
|
|
||||||
|
// Flatten/spacing collapse for maximized windows is only for frame-integrated layout.
|
||||||
|
// When the bar draws its own pill, keep rounded corners and spacing like the dock.
|
||||||
|
readonly property bool flattenForMaximizedWindow: !SettingsData.frameEnabled || usesConnectedFrameChrome
|
||||||
|
|
||||||
property bool hasMaximizedToplevel: false
|
property bool hasMaximizedToplevel: false
|
||||||
readonly property bool hasFullscreenToplevel: {
|
|
||||||
if (!(barConfig?.fullscreenDetection ?? true))
|
|
||||||
return false;
|
|
||||||
CompositorService.sortedToplevels;
|
|
||||||
ToplevelManager.activeToplevel;
|
|
||||||
if (CompositorService.isNiri)
|
|
||||||
NiriService.allWorkspaces;
|
|
||||||
return CompositorService.hasFullscreenToplevelOnScreen(screenName);
|
|
||||||
}
|
|
||||||
property bool shouldHideForWindows: false
|
property bool shouldHideForWindows: false
|
||||||
|
|
||||||
function _updateHasMaximizedToplevel() {
|
function _updateHasMaximizedToplevel() {
|
||||||
@@ -427,7 +430,7 @@ PanelWindow {
|
|||||||
shouldHideForWindows = filtered.length > 0;
|
shouldHideForWindows = filtered.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
property real effectiveSpacing: SettingsData.frameEnabled ? 0 : (hasMaximizedToplevel ? 0 : (barConfig?.spacing ?? 4))
|
property real effectiveSpacing: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? 0 : ((flattenForMaximizedWindow && hasMaximizedToplevel) ? 0 : (barConfig?.spacing ?? 4))
|
||||||
|
|
||||||
Behavior on effectiveSpacing {
|
Behavior on effectiveSpacing {
|
||||||
enabled: barWindow.visible
|
enabled: barWindow.visible
|
||||||
@@ -438,7 +441,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readonly property int notificationCount: NotificationService.notifications.length
|
readonly property int notificationCount: NotificationService.notifications.length
|
||||||
readonly property real effectiveBarThickness: SettingsData.frameEnabled ? SettingsData.frameBarSize : Theme.snap(Math.max(barWindow.widgetThickness + (barConfig?.innerPadding ?? 4) + 4, Theme.barHeight - 4 - (8 - (barConfig?.innerPadding ?? 4))), _dpr)
|
readonly property real effectiveBarThickness: (SettingsData.frameEnabled && usesConnectedFrameChrome) ? SettingsData.frameBarSize : Theme.snap(Math.max(barWindow.widgetThickness + (barConfig?.innerPadding ?? 4) + 4, Theme.barHeight - 4 - (8 - (barConfig?.innerPadding ?? 4))), _dpr)
|
||||||
readonly property bool effectiveOpenOnOverview: SettingsData.frameEnabled ? SettingsData.frameShowOnOverview : (barConfig?.openOnOverview ?? false)
|
readonly property bool effectiveOpenOnOverview: SettingsData.frameEnabled ? SettingsData.frameShowOnOverview : (barConfig?.openOnOverview ?? false)
|
||||||
readonly property real widgetThickness: Theme.snap(Math.max(20, 26 + (barConfig?.innerPadding ?? 4) * 0.6), _dpr)
|
readonly property real widgetThickness: Theme.snap(Math.max(20, 26 + (barConfig?.innerPadding ?? 4) * 0.6), _dpr)
|
||||||
|
|
||||||
@@ -636,9 +639,9 @@ PanelWindow {
|
|||||||
anchors.left: !isVertical ? true : (barPos === SettingsData.Position.Left)
|
anchors.left: !isVertical ? true : (barPos === SettingsData.Position.Left)
|
||||||
anchors.right: !isVertical ? true : (barPos === SettingsData.Position.Right)
|
anchors.right: !isVertical ? true : (barPos === SettingsData.Position.Right)
|
||||||
|
|
||||||
readonly property bool reserveExclusiveWhenAutoHidden: SettingsData.connectedFrameModeActive && !!barWindow.screen && SettingsData.isScreenInPreferences(barWindow.screen, SettingsData.frameScreenPreferences)
|
readonly property bool reserveExclusiveWhenAutoHidden: SettingsData.connectedFrameModeActive && usesConnectedFrameChrome && !!barWindow.screen && SettingsData.isScreenInPreferences(barWindow.screen, SettingsData.frameScreenPreferences)
|
||||||
|
|
||||||
exclusiveZone: (barWindow.hasFullscreenToplevel || !(barConfig?.visible ?? true) || (topBarCore.autoHide && !barWindow.reserveExclusiveWhenAutoHidden)) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (Theme.isConnectedEffect ? 0 : (barConfig?.bottomGap ?? 0)))
|
exclusiveZone: (!(barConfig?.visible ?? true) || (topBarCore.autoHide && !barWindow.reserveExclusiveWhenAutoHidden)) ? -1 : (barWindow.effectiveBarThickness + effectiveSpacing + (usesConnectedFrameChrome ? 0 : (barConfig?.bottomGap ?? 0)))
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: inputMask
|
id: inputMask
|
||||||
@@ -647,9 +650,9 @@ PanelWindow {
|
|||||||
|
|
||||||
readonly property bool inOverviewWithShow: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
readonly property bool inOverviewWithShow: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
||||||
readonly property bool effectiveVisible: (barConfig?.visible ?? true) || inOverviewWithShow
|
readonly property bool effectiveVisible: (barConfig?.visible ?? true) || inOverviewWithShow
|
||||||
readonly property bool showing: effectiveVisible && !barWindow.hasFullscreenToplevel && (topBarCore.reveal || inOverviewWithShow || !topBarCore.autoHide)
|
readonly property bool showing: effectiveVisible && (topBarCore.reveal || inOverviewWithShow || !topBarCore.autoHide)
|
||||||
|
|
||||||
readonly property int maskThickness: barWindow.hasFullscreenToplevel ? 0 : (showing ? barThickness : 1)
|
readonly property int maskThickness: showing ? barThickness : 1
|
||||||
|
|
||||||
x: {
|
x: {
|
||||||
if (!axis.isVertical) {
|
if (!axis.isVertical) {
|
||||||
@@ -826,9 +829,6 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property bool reveal: {
|
property bool reveal: {
|
||||||
if (barWindow.hasFullscreenToplevel)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
const inOverviewWithShow = CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview;
|
const inOverviewWithShow = CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview;
|
||||||
if (inOverviewWithShow)
|
if (inOverviewWithShow)
|
||||||
return true;
|
return true;
|
||||||
@@ -897,9 +897,9 @@ PanelWindow {
|
|||||||
bottom: barWindow.isVertical ? parent.bottom : undefined
|
bottom: barWindow.isVertical ? parent.bottom : undefined
|
||||||
}
|
}
|
||||||
readonly property bool inOverview: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
readonly property bool inOverview: CompositorService.isNiri && NiriService.inOverview && barWindow.effectiveOpenOnOverview
|
||||||
hoverEnabled: (barConfig?.autoHide ?? false) && !inOverview && !barWindow.hasFullscreenToplevel && !topBarCore.popoutPinsReveal
|
hoverEnabled: (barConfig?.autoHide ?? false) && !inOverview && !topBarCore.popoutPinsReveal
|
||||||
acceptedButtons: Qt.NoButton
|
acceptedButtons: Qt.NoButton
|
||||||
enabled: (barConfig?.autoHide ?? false) && !inOverview && !barWindow.hasFullscreenToplevel
|
enabled: (barConfig?.autoHide ?? false) && !inOverview
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: topBarContainer
|
id: topBarContainer
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ BasePill {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property string focusedScreenName: (CompositorService.isHyprland && typeof Hyprland !== "undefined" && Hyprland.focusedWorkspace && Hyprland.focusedWorkspace.monitor ? (Hyprland.focusedWorkspace.monitor.name || "") : CompositorService.isNiri && typeof NiriService !== "undefined" && NiriService.currentOutput ? NiriService.currentOutput : "")
|
readonly property string focusedScreenName: (CompositorService.isHyprland && typeof Hyprland !== "undefined" && Hyprland.focusedWorkspace && Hyprland.focusedWorkspace.monitor ? (Hyprland.focusedWorkspace.monitor.name || "") : CompositorService.isNiri && typeof NiriService !== "undefined" && NiriService.currentOutput ? NiriService.currentOutput : "")
|
||||||
|
readonly property string targetScreenName: parentScreen?.name || focusedScreenName
|
||||||
|
|
||||||
function resolveNotepadInstance() {
|
function resolveNotepadInstance() {
|
||||||
if (typeof notepadSlideoutVariants === "undefined" || !notepadSlideoutVariants || !notepadSlideoutVariants.instances) {
|
if (typeof notepadSlideoutVariants === "undefined" || !notepadSlideoutVariants || !notepadSlideoutVariants.instances) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targetScreen = focusedScreenName;
|
const targetScreen = targetScreenName;
|
||||||
if (targetScreen) {
|
if (targetScreen) {
|
||||||
for (var i = 0; i < notepadSlideoutVariants.instances.length; i++) {
|
for (var i = 0; i < notepadSlideoutVariants.instances.length; i++) {
|
||||||
var slideout = notepadSlideoutVariants.instances[i];
|
var slideout = notepadSlideoutVariants.instances[i];
|
||||||
@@ -34,6 +35,12 @@ BasePill {
|
|||||||
readonly property bool isActive: notepadInstance?.isVisible ?? false
|
readonly property bool isActive: notepadInstance?.isVisible ?? false
|
||||||
property bool isAutoHideBar: false
|
property bool isAutoHideBar: false
|
||||||
|
|
||||||
|
function prepareNotepadInstance(instance) {
|
||||||
|
if (instance)
|
||||||
|
instance.triggerUsesOverlayLayer = root.barUsesOverlayLayer;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
readonly property real minTooltipY: {
|
readonly property real minTooltipY: {
|
||||||
if (!parentScreen || !(axis?.isVertical ?? false)) {
|
if (!parentScreen || !(axis?.isVertical ?? false)) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -68,8 +75,9 @@ BasePill {
|
|||||||
function openTabByIndex(tabIndex) {
|
function openTabByIndex(tabIndex) {
|
||||||
if (tabIndex < 0)
|
if (tabIndex < 0)
|
||||||
return;
|
return;
|
||||||
if (root.notepadInstance && typeof root.notepadInstance.show === "function") {
|
const instance = prepareNotepadInstance(root.notepadInstance);
|
||||||
root.notepadInstance.show();
|
if (instance && typeof instance.show === "function") {
|
||||||
|
instance.show();
|
||||||
}
|
}
|
||||||
Qt.callLater(() => {
|
Qt.callLater(() => {
|
||||||
NotepadStorageService.switchToTab(tabIndex);
|
NotepadStorageService.switchToTab(tabIndex);
|
||||||
@@ -77,8 +85,9 @@ BasePill {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openNewNote() {
|
function openNewNote() {
|
||||||
if (root.notepadInstance && typeof root.notepadInstance.show === "function") {
|
const instance = prepareNotepadInstance(root.notepadInstance);
|
||||||
root.notepadInstance.show();
|
if (instance && typeof instance.show === "function") {
|
||||||
|
instance.show();
|
||||||
}
|
}
|
||||||
Qt.callLater(() => {
|
Qt.callLater(() => {
|
||||||
NotepadStorageService.createNewTab();
|
NotepadStorageService.createNewTab();
|
||||||
@@ -138,7 +147,7 @@ BasePill {
|
|||||||
openContextMenu();
|
openContextMenu();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const inst = root.notepadInstance;
|
const inst = prepareNotepadInstance(root.notepadInstance);
|
||||||
if (inst) {
|
if (inst) {
|
||||||
inst.toggle();
|
inst.toggle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -978,7 +978,7 @@ BasePill {
|
|||||||
|
|
||||||
visible: root.useOverflowPopup && root.menuOpen
|
visible: root.useOverflowPopup && root.menuOpen
|
||||||
screen: root.parentScreen
|
screen: root.parentScreen
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.barUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: {
|
WlrLayershell.keyboardFocus: {
|
||||||
if (!root.menuOpen)
|
if (!root.menuOpen)
|
||||||
@@ -1446,7 +1446,7 @@ BasePill {
|
|||||||
WlrLayershell.namespace: "dms:tray-menu-window"
|
WlrLayershell.namespace: "dms:tray-menu-window"
|
||||||
visible: menuRoot.showMenu && (menuRoot.trayItem?.hasMenu ?? false)
|
visible: menuRoot.showMenu && (menuRoot.trayItem?.hasMenu ?? false)
|
||||||
screen: menuRoot.parentScreen
|
screen: menuRoot.parentScreen
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.barUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: {
|
WlrLayershell.keyboardFocus: {
|
||||||
if (!menuRoot.showMenu)
|
if (!menuRoot.showMenu)
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ Variants {
|
|||||||
|
|
||||||
WindowBlur {
|
WindowBlur {
|
||||||
targetWindow: dock
|
targetWindow: dock
|
||||||
blurEnabled: dock.effectiveBlurEnabled && !SettingsData.connectedFrameModeActive
|
blurEnabled: dock.effectiveBlurEnabled && !dock.usesConnectedFrameChrome
|
||||||
blurX: dockBackground.x + dockContainer.x + dockMouseArea.x + dockCore.x + dockSlide.x
|
blurX: dockBackground.x + dockContainer.x + dockMouseArea.x + dockCore.x + dockSlide.x
|
||||||
blurY: dockBackground.y + dockContainer.y + dockMouseArea.y + dockCore.y + dockSlide.y
|
blurY: dockBackground.y + dockContainer.y + dockMouseArea.y + dockCore.y + dockSlide.y
|
||||||
blurWidth: dock.hasApps && dock.reveal ? dockBackground.width : 0
|
blurWidth: dock.hasApps && dock.reveal ? dockBackground.width : 0
|
||||||
blurHeight: dock.hasApps && dock.reveal ? dockBackground.height : 0
|
blurHeight: dock.hasApps && dock.reveal ? dockBackground.height : 0
|
||||||
blurRadius: Theme.isConnectedEffect ? Theme.connectedCornerRadius : dock.surfaceRadius
|
blurRadius: dock.usesConnectedFrameChrome ? Theme.connectedCornerRadius : dock.surfaceRadius
|
||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:dock"
|
WlrLayershell.namespace: "dms:dock"
|
||||||
WlrLayershell.layer: SettingsData.frameEnabled && !dock.hasFullscreenToplevel ? WlrLayer.Overlay : WlrLayer.Top
|
WlrLayershell.layer: dock.usesOverlayLayer ? WlrLayer.Overlay : WlrLayer.Top
|
||||||
|
|
||||||
readonly property bool isVertical: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right
|
readonly property bool isVertical: SettingsData.dockPosition === SettingsData.Position.Left || SettingsData.dockPosition === SettingsData.Position.Right
|
||||||
|
|
||||||
@@ -50,16 +50,16 @@ Variants {
|
|||||||
readonly property bool connectedBarActiveOnEdge: dockGeometry.connectedBarActiveOnEdge
|
readonly property bool connectedBarActiveOnEdge: dockGeometry.connectedBarActiveOnEdge
|
||||||
readonly property real connectedJoinInset: dockGeometry.connectedJoinInset
|
readonly property real connectedJoinInset: dockGeometry.connectedJoinInset
|
||||||
readonly property real dockFrameInset: dockGeometry.frameInset
|
readonly property real dockFrameInset: dockGeometry.frameInset
|
||||||
readonly property real surfaceRadius: Theme.connectedSurfaceRadius
|
readonly property real surfaceRadius: usesConnectedFrameChrome ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
||||||
readonly property color surfaceColor: Theme.isConnectedEffect ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency)
|
readonly property color surfaceColor: usesConnectedFrameChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, backgroundTransparency)
|
||||||
readonly property color surfaceBorderColor: Theme.isConnectedEffect ? "transparent" : BlurService.borderColor
|
readonly property color surfaceBorderColor: usesConnectedFrameChrome ? "transparent" : BlurService.borderColor
|
||||||
readonly property real surfaceBorderWidth: Theme.isConnectedEffect ? 0 : BlurService.borderWidth
|
readonly property real surfaceBorderWidth: usesConnectedFrameChrome ? 0 : BlurService.borderWidth
|
||||||
readonly property real surfaceTopLeftRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
readonly property real surfaceTopLeftRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceTopRightRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
readonly property real surfaceTopRightRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Top || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceBottomLeftRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
readonly property real surfaceBottomLeftRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Left) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceBottomRightRadius: Theme.isConnectedEffect && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
readonly property real surfaceBottomRightRadius: usesConnectedFrameChrome && (SettingsData.dockPosition === SettingsData.Position.Bottom || SettingsData.dockPosition === SettingsData.Position.Right) ? 0 : surfaceRadius
|
||||||
readonly property real horizontalConnectorExtent: Theme.isConnectedEffect && !isVertical ? Theme.connectedCornerRadius : 0
|
readonly property real horizontalConnectorExtent: usesConnectedFrameChrome && !isVertical ? Theme.connectedCornerRadius : 0
|
||||||
readonly property real verticalConnectorExtent: Theme.isConnectedEffect && isVertical ? Theme.connectedCornerRadius : 0
|
readonly property real verticalConnectorExtent: usesConnectedFrameChrome && isVertical ? Theme.connectedCornerRadius : 0
|
||||||
|
|
||||||
readonly property int hasApps: dockApps.implicitWidth > 0 || dockApps.implicitHeight > 0
|
readonly property int hasApps: dockApps.implicitWidth > 0 || dockApps.implicitHeight > 0
|
||||||
|
|
||||||
@@ -149,7 +149,6 @@ Variants {
|
|||||||
edge: dock.connectedBarSide
|
edge: dock.connectedBarSide
|
||||||
dockVisible: dock.visible
|
dockVisible: dock.visible
|
||||||
autoHide: dock.autoHide
|
autoHide: dock.autoHide
|
||||||
hasFullscreenToplevel: dock.hasFullscreenToplevel
|
|
||||||
iconSize: dock.widgetHeight
|
iconSize: dock.widgetHeight
|
||||||
spacing: SettingsData.dockSpacing
|
spacing: SettingsData.dockSpacing
|
||||||
borderThickness: dock.borderThickness
|
borderThickness: dock.borderThickness
|
||||||
@@ -176,25 +175,13 @@ Variants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readonly property string _dockScreenName: dock.modelData ? dock.modelData.name : (dock.screen ? dock.screen.name : "")
|
readonly property string _dockScreenName: dock.modelData ? dock.modelData.name : (dock.screen ? dock.screen.name : "")
|
||||||
readonly property bool hasFullscreenToplevel: {
|
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(dock._dockScreenName)
|
||||||
if (!SettingsData.dockHideOnFullscreen)
|
readonly property bool usesOverlayLayer: CompositorService.framePeerSurfacesUseOverlayForScreen(dock._dockScreenName) || SettingsData.dockShowOverFullscreen
|
||||||
return false;
|
|
||||||
CompositorService.sortedToplevels;
|
|
||||||
ToplevelManager.activeToplevel;
|
|
||||||
if (CompositorService.isNiri) {
|
|
||||||
NiriService.currentOutput;
|
|
||||||
NiriService.windows;
|
|
||||||
NiriService.allWorkspaces;
|
|
||||||
}
|
|
||||||
if (CompositorService.isHyprland)
|
|
||||||
Hyprland.focusedWorkspace;
|
|
||||||
return CompositorService.hasFullscreenToplevelOnScreen(dock._dockScreenName);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _syncDockChromeState() {
|
function _syncDockChromeState() {
|
||||||
if (!dock._dockScreenName)
|
if (!dock._dockScreenName)
|
||||||
return;
|
return;
|
||||||
if (!SettingsData.connectedFrameModeActive) {
|
if (!dock.usesConnectedFrameChrome) {
|
||||||
ConnectedModeState.clearDockState(dock._dockScreenName);
|
ConnectedModeState.clearDockState(dock._dockScreenName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -212,19 +199,19 @@ Variants {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _syncDockSlide() {
|
function _syncDockSlide() {
|
||||||
if (!dock._dockScreenName || !SettingsData.connectedFrameModeActive)
|
if (!dock._dockScreenName || !dock.usesConnectedFrameChrome)
|
||||||
return;
|
return;
|
||||||
ConnectedModeState.setDockSlide(dock._dockScreenName, dockSlide.x, dockSlide.y);
|
ConnectedModeState.setDockSlide(dock._dockScreenName, dockSlide.x, dockSlide.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
DeferredAction {
|
DeferredAction {
|
||||||
id: dockSlideSync
|
id: dockSlideSync
|
||||||
enabled: SettingsData.connectedFrameModeActive
|
enabled: dock.usesConnectedFrameChrome
|
||||||
onTriggered: dock._syncDockSlide()
|
onTriggered: dock._syncDockSlide()
|
||||||
}
|
}
|
||||||
|
|
||||||
function _queueSlideSync() {
|
function _queueSlideSync() {
|
||||||
if (!SettingsData.connectedFrameModeActive)
|
if (!dock.usesConnectedFrameChrome)
|
||||||
return;
|
return;
|
||||||
dockSlideSync.schedule();
|
dockSlideSync.schedule();
|
||||||
}
|
}
|
||||||
@@ -304,65 +291,10 @@ Variants {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hyprland implementation
|
// Hyprland implementation (current workspace + visible special workspaces)
|
||||||
Hyprland.focusedWorkspace;
|
Hyprland.focusedWorkspace;
|
||||||
const filtered = CompositorService.filterCurrentWorkspace(CompositorService.sortedToplevels, screenName);
|
Hyprland.toplevels;
|
||||||
|
return CompositorService.hyprlandDockOverlapForSmartAutoHide(screenName, SettingsData.dockPosition, dockThickness, screenWidth, screenHeight);
|
||||||
if (filtered.length === 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (let i = 0; i < filtered.length; i++) {
|
|
||||||
const toplevel = filtered[i];
|
|
||||||
|
|
||||||
let hyprToplevel = null;
|
|
||||||
if (Hyprland.toplevels) {
|
|
||||||
const hyprToplevels = Array.from(Hyprland.toplevels.values);
|
|
||||||
for (let j = 0; j < hyprToplevels.length; j++) {
|
|
||||||
if (hyprToplevels[j].wayland === toplevel) {
|
|
||||||
hyprToplevel = hyprToplevels[j];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!hyprToplevel?.lastIpcObject)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
const ipc = hyprToplevel.lastIpcObject;
|
|
||||||
const at = ipc.at;
|
|
||||||
const size = ipc.size;
|
|
||||||
if (!at || !size)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
const monX = hyprToplevel.monitor?.x ?? 0;
|
|
||||||
const monY = hyprToplevel.monitor?.y ?? 0;
|
|
||||||
|
|
||||||
const winX = at[0] - monX;
|
|
||||||
const winY = at[1] - monY;
|
|
||||||
const winW = size[0];
|
|
||||||
const winH = size[1];
|
|
||||||
|
|
||||||
switch (SettingsData.dockPosition) {
|
|
||||||
case SettingsData.Position.Top:
|
|
||||||
if (winY < dockThickness)
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
case SettingsData.Position.Bottom:
|
|
||||||
if (winY + winH > screenHeight - dockThickness)
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
case SettingsData.Position.Left:
|
|
||||||
if (winX < dockThickness)
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
case SettingsData.Position.Right:
|
|
||||||
if (winX + winW > screenWidth - dockThickness)
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
@@ -383,9 +315,6 @@ Variants {
|
|||||||
if (_modalRetractActive)
|
if (_modalRetractActive)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (dock.hasFullscreenToplevel)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (CompositorService.isNiri && NiriService.inOverview && SettingsData.dockOpenOnOverview) {
|
if (CompositorService.isNiri && NiriService.inOverview && SettingsData.dockOpenOnOverview) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -421,7 +350,7 @@ Variants {
|
|||||||
onVisibleChanged: dock._syncDockChromeState()
|
onVisibleChanged: dock._syncDockChromeState()
|
||||||
onHasAppsChanged: dock._syncDockChromeState()
|
onHasAppsChanged: dock._syncDockChromeState()
|
||||||
onConnectedBarSideChanged: dock._syncDockChromeState()
|
onConnectedBarSideChanged: dock._syncDockChromeState()
|
||||||
onHasFullscreenToplevelChanged: dock._syncDockChromeState()
|
onUsesConnectedFrameChromeChanged: dock._syncDockChromeState()
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: SettingsData
|
target: SettingsData
|
||||||
@@ -680,7 +609,7 @@ Variants {
|
|||||||
return 0;
|
return 0;
|
||||||
if (dock.reveal)
|
if (dock.reveal)
|
||||||
return 0;
|
return 0;
|
||||||
if (Theme.isConnectedEffect) {
|
if (dock.usesConnectedFrameChrome) {
|
||||||
const retractDist = dockBackground.width + SettingsData.dockSpacing + 10;
|
const retractDist = dockBackground.width + SettingsData.dockSpacing + 10;
|
||||||
return SettingsData.dockPosition === SettingsData.Position.Right ? retractDist : -retractDist;
|
return SettingsData.dockPosition === SettingsData.Position.Right ? retractDist : -retractDist;
|
||||||
}
|
}
|
||||||
@@ -696,7 +625,7 @@ Variants {
|
|||||||
return 0;
|
return 0;
|
||||||
if (dock.reveal)
|
if (dock.reveal)
|
||||||
return 0;
|
return 0;
|
||||||
if (Theme.isConnectedEffect) {
|
if (dock.usesConnectedFrameChrome) {
|
||||||
const retractDist = dockBackground.height + SettingsData.dockSpacing + 10;
|
const retractDist = dockBackground.height + SettingsData.dockSpacing + 10;
|
||||||
return SettingsData.dockPosition === SettingsData.Position.Bottom ? retractDist : -retractDist;
|
return SettingsData.dockPosition === SettingsData.Position.Bottom ? retractDist : -retractDist;
|
||||||
}
|
}
|
||||||
@@ -711,9 +640,9 @@ Variants {
|
|||||||
Behavior on x {
|
Behavior on x {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: slideXAnimation
|
id: slideXAnimation
|
||||||
duration: Theme.isConnectedEffect ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
duration: dock.usesConnectedFrameChrome ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||||
easing.type: Theme.isConnectedEffect ? Easing.BezierSpline : Easing.OutCubic
|
easing.type: dock.usesConnectedFrameChrome ? Easing.BezierSpline : Easing.OutCubic
|
||||||
easing.bezierCurve: Theme.isConnectedEffect ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
easing.bezierCurve: dock.usesConnectedFrameChrome ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||||
onRunningChanged: if (!running)
|
onRunningChanged: if (!running)
|
||||||
dock._syncDockChromeState()
|
dock._syncDockChromeState()
|
||||||
}
|
}
|
||||||
@@ -722,9 +651,9 @@ Variants {
|
|||||||
Behavior on y {
|
Behavior on y {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: slideYAnimation
|
id: slideYAnimation
|
||||||
duration: Theme.isConnectedEffect ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
duration: dock.usesConnectedFrameChrome ? Theme.variantDuration(Theme.popoutAnimationDuration, dock.reveal) : Theme.shortDuration
|
||||||
easing.type: Theme.isConnectedEffect ? Easing.BezierSpline : Easing.OutCubic
|
easing.type: dock.usesConnectedFrameChrome ? Easing.BezierSpline : Easing.OutCubic
|
||||||
easing.bezierCurve: Theme.isConnectedEffect ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
easing.bezierCurve: dock.usesConnectedFrameChrome ? (dock.reveal ? Theme.variantPopoutEnterCurve : Theme.variantPopoutExitCurve) : []
|
||||||
onRunningChanged: if (!running)
|
onRunningChanged: if (!running)
|
||||||
dock._syncDockChromeState()
|
dock._syncDockChromeState()
|
||||||
}
|
}
|
||||||
@@ -756,12 +685,12 @@ Variants {
|
|||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
|
|
||||||
// Avoid an offscreen texture seam where the connected dock meets the frame.
|
// Avoid an offscreen texture seam where the connected dock meets the frame.
|
||||||
layer.enabled: !Theme.isConnectedEffect
|
layer.enabled: !usesConnectedFrameChrome
|
||||||
clip: false
|
clip: false
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: !SettingsData.connectedFrameModeActive && !(Theme.isConnectedEffect && dock.reveal)
|
visible: !usesConnectedFrameChrome && (!SettingsData.connectedFrameModeActive || dock.reveal)
|
||||||
color: dock.surfaceColor
|
color: dock.surfaceColor
|
||||||
topLeftRadius: dock.surfaceTopLeftRadius
|
topLeftRadius: dock.surfaceTopLeftRadius
|
||||||
topRightRadius: dock.surfaceTopRightRadius
|
topRightRadius: dock.surfaceTopRightRadius
|
||||||
@@ -771,7 +700,7 @@ Variants {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: !SettingsData.connectedFrameModeActive && !(Theme.isConnectedEffect && dock.reveal)
|
visible: !usesConnectedFrameChrome && (!SettingsData.connectedFrameModeActive || dock.reveal)
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
topLeftRadius: dock.surfaceTopLeftRadius
|
topLeftRadius: dock.surfaceTopLeftRadius
|
||||||
topRightRadius: dock.surfaceTopRightRadius
|
topRightRadius: dock.surfaceTopRightRadius
|
||||||
@@ -807,7 +736,7 @@ Variants {
|
|||||||
y: dockBackground.y - borderThickness
|
y: dockBackground.y - borderThickness
|
||||||
width: dockBackground.width + borderThickness * 2
|
width: dockBackground.width + borderThickness * 2
|
||||||
height: dockBackground.height + borderThickness * 2
|
height: dockBackground.height + borderThickness * 2
|
||||||
visible: SettingsData.dockBorderEnabled && dock.hasApps && !Theme.isConnectedEffect
|
visible: SettingsData.dockBorderEnabled && dock.hasApps && !usesConnectedFrameChrome
|
||||||
preferredRendererType: Shape.CurveRenderer
|
preferredRendererType: Shape.CurveRenderer
|
||||||
|
|
||||||
readonly property real borderThickness: Math.max(1, dock.borderThickness)
|
readonly property real borderThickness: Math.max(1, dock.borderThickness)
|
||||||
@@ -883,6 +812,7 @@ Variants {
|
|||||||
isVertical: dock.isVertical
|
isVertical: dock.isVertical
|
||||||
dockScreen: dock.screen
|
dockScreen: dock.screen
|
||||||
iconSize: dock.widgetHeight
|
iconSize: dock.widgetHeight
|
||||||
|
usesOverlayLayer: dock.usesOverlayLayer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ Item {
|
|||||||
property bool isVertical: false
|
property bool isVertical: false
|
||||||
property var dockScreen: null
|
property var dockScreen: null
|
||||||
property real iconSize: 40
|
property real iconSize: 40
|
||||||
|
property bool usesOverlayLayer: false
|
||||||
property int draggedIndex: -1
|
property int draggedIndex: -1
|
||||||
property int dropTargetIndex: -1
|
property int dropTargetIndex: -1
|
||||||
property bool suppressShiftAnimation: false
|
property bool suppressShiftAnimation: false
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ pragma ComponentBehavior: Bound
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import qs.Common
|
import qs.Common
|
||||||
|
import qs.Services
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
@@ -10,7 +11,6 @@ QtObject {
|
|||||||
property string edge: "bottom"
|
property string edge: "bottom"
|
||||||
property bool dockVisible: false
|
property bool dockVisible: false
|
||||||
property bool autoHide: false
|
property bool autoHide: false
|
||||||
property bool hasFullscreenToplevel: false
|
|
||||||
property real iconSize: 40
|
property real iconSize: 40
|
||||||
property real spacing: 4
|
property real spacing: 4
|
||||||
property real borderThickness: 0
|
property real borderThickness: 0
|
||||||
@@ -23,14 +23,14 @@ QtObject {
|
|||||||
return Math.round(value * dpr) / dpr;
|
return Math.round(value * dpr) / dpr;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool frameExclusionActive: SettingsData.frameEnabled && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences)
|
readonly property bool frameExclusionActive: CompositorService.frameWindowVisibleForScreen(screen)
|
||||||
readonly property bool connectedMode: Theme.isConnectedEffect
|
readonly property bool usesConnectedFrameChrome: CompositorService.usesConnectedFrameChromeForScreen(screen)
|
||||||
readonly property bool connectedBarActiveOnEdge: connectedMode && !!screen && SettingsData.getActiveBarEdgesForScreen(screen).includes(edge)
|
readonly property bool connectedBarActiveOnEdge: usesConnectedFrameChrome && !!screen && SettingsData.getActiveBarEdgesForScreen(screen).includes(edge)
|
||||||
|
|
||||||
readonly property real connectedJoinInset: {
|
readonly property real connectedJoinInset: {
|
||||||
if (connectedMode)
|
if (usesConnectedFrameChrome)
|
||||||
return connectedBarActiveOnEdge ? SettingsData.frameBarSize : SettingsData.frameThickness;
|
return connectedBarActiveOnEdge ? SettingsData.frameBarSize : SettingsData.frameThickness;
|
||||||
if (SettingsData.frameEnabled)
|
if (frameExclusionActive)
|
||||||
return SettingsData.frameEdgeInsetForSide(screen, edge);
|
return SettingsData.frameEdgeInsetForSide(screen, edge);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -38,15 +38,15 @@ QtObject {
|
|||||||
readonly property real frameInset: {
|
readonly property real frameInset: {
|
||||||
if (!frameExclusionActive)
|
if (!frameExclusionActive)
|
||||||
return 0;
|
return 0;
|
||||||
if (connectedMode)
|
if (usesConnectedFrameChrome)
|
||||||
return connectedJoinInset;
|
return connectedJoinInset;
|
||||||
return SettingsData.frameThickness;
|
return SettingsData.frameThickness;
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property real effectiveMargin: connectedMode ? 0 : margin
|
readonly property real effectiveMargin: usesConnectedFrameChrome ? 0 : margin
|
||||||
readonly property real visualOffset: connectedMode ? 0 : offset
|
readonly property real visualOffset: usesConnectedFrameChrome ? 0 : offset
|
||||||
readonly property real reserveOffset: offset
|
readonly property real reserveOffset: offset
|
||||||
readonly property real joinedEdgeMargin: connectedMode ? 0 : (barSpacing + effectiveMargin + 1 + borderThickness)
|
readonly property real joinedEdgeMargin: usesConnectedFrameChrome ? 0 : (barSpacing + effectiveMargin + 1 + borderThickness)
|
||||||
readonly property real bodyEdgeMargin: frameInset + joinedEdgeMargin
|
readonly property real bodyEdgeMargin: frameInset + joinedEdgeMargin
|
||||||
|
|
||||||
readonly property real bodyThickness: iconSize + spacing * 2 + borderThickness * 2
|
readonly property real bodyThickness: iconSize + spacing * 2 + borderThickness * 2
|
||||||
@@ -57,5 +57,5 @@ QtObject {
|
|||||||
// Frame/bar edge exclusions already reserve the edge itself, so the dock
|
// Frame/bar edge exclusions already reserve the edge itself, so the dock
|
||||||
// reservation covers only the dock body and user offset beyond that edge.
|
// reservation covers only the dock body and user offset beyond that edge.
|
||||||
readonly property real reserveZone: px(bodyThickness + reserveOffset + effectiveMargin)
|
readonly property real reserveZone: px(bodyThickness + reserveOffset + effectiveMargin)
|
||||||
readonly property bool shouldReserveSpace: dockVisible && !hasFullscreenToplevel && !autoHide && barSpacing <= 0
|
readonly property bool shouldReserveSpace: dockVisible && !autoHide && barSpacing <= 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ Item {
|
|||||||
if (wasDragging || mouse.button !== Qt.LeftButton)
|
if (wasDragging || mouse.button !== Qt.LeftButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PopoutService.toggleDankLauncherV2();
|
PopoutService.toggleDankLauncherV2(dockApps?.usesOverlayLayer ?? false);
|
||||||
}
|
}
|
||||||
onPositionChanged: mouse => {
|
onPositionChanged: mouse => {
|
||||||
if (longPressing && !dragging) {
|
if (longPressing && !dragging) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import QtQuick
|
|||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
|
import qs.Services
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
id: root
|
id: root
|
||||||
@@ -18,7 +19,7 @@ Scope {
|
|||||||
// One thin invisible PanelWindow per edge.
|
// One thin invisible PanelWindow per edge.
|
||||||
// Skips any edge where a bar already provides its own exclusiveZone.
|
// Skips any edge where a bar already provides its own exclusiveZone.
|
||||||
|
|
||||||
readonly property bool screenEnabled: SettingsData.frameEnabled && SettingsData.isScreenInPreferences(root.screen, SettingsData.frameScreenPreferences)
|
readonly property bool screenEnabled: CompositorService.frameWindowVisibleForScreen(root.screen)
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: root.screenEnabled && !root.barEdges.includes("top")
|
active: root.screenEnabled && !root.barEdges.includes("top")
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ PanelWindow {
|
|||||||
required property var targetScreen
|
required property var targetScreen
|
||||||
|
|
||||||
screen: targetScreen
|
screen: targetScreen
|
||||||
visible: _frameActive
|
readonly property bool _frameVisible: CompositorService.frameWindowVisibleForScreen(win.targetScreen)
|
||||||
updatesEnabled: _frameActive
|
visible: win._frameVisible
|
||||||
|
updatesEnabled: win._frameVisible
|
||||||
|
|
||||||
WlrLayershell.namespace: "dms:frame"
|
WlrLayershell.namespace: "dms:frame"
|
||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
@@ -52,7 +53,7 @@ PanelWindow {
|
|||||||
readonly property var _notifState: ConnectedModeState.notificationStates[win._screenName] || ConnectedModeState.emptyNotificationState
|
readonly property var _notifState: ConnectedModeState.notificationStates[win._screenName] || ConnectedModeState.emptyNotificationState
|
||||||
readonly property var _modalState: ConnectedModeState.modalStates[win._screenName] || ConnectedModeState.emptyModalState
|
readonly property var _modalState: ConnectedModeState.modalStates[win._screenName] || ConnectedModeState.emptyModalState
|
||||||
|
|
||||||
readonly property bool _connectedActive: win._frameActive && SettingsData.connectedFrameModeActive
|
readonly property bool _connectedActive: CompositorService.usesConnectedFrameChromeForScreen(win.targetScreen)
|
||||||
readonly property string _barSide: {
|
readonly property string _barSide: {
|
||||||
const edges = win.barEdges;
|
const edges = win.barEdges;
|
||||||
if (edges.includes("top"))
|
if (edges.includes("top"))
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import qs.Widgets
|
|||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: win
|
id: win
|
||||||
|
|
||||||
readonly property bool connectedFrameMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(win.screen, SettingsData.frameScreenPreferences)
|
readonly property bool connectedFrameMode: CompositorService.usesConnectedFrameChromeForScreen(win.screen)
|
||||||
readonly property string notifBarSide: {
|
readonly property string notifBarSide: {
|
||||||
const pos = SettingsData.notificationPopupPosition;
|
const pos = SettingsData.notificationPopupPosition;
|
||||||
if (pos === -1)
|
if (pos === -1)
|
||||||
@@ -370,9 +370,9 @@ PanelWindow {
|
|||||||
return Math.max(0, Math.round(Theme.px(raw, dpr)));
|
return Math.max(0, Math.round(Theme.px(raw, dpr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool frameOnlyNoConnected: SettingsData.frameEnabled && !connectedFrameMode && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences)
|
readonly property bool frameVisibleWithoutConnectedChrome: CompositorService.frameWindowVisibleForScreen(screen) && !connectedFrameMode
|
||||||
|
|
||||||
// Frame ON + Connected OFF. frameEdgeInset is the full bar/frame inset
|
// Frame visible without connected chrome. frameEdgeInset is the full bar/frame inset.
|
||||||
function _frameGapMargin(side) {
|
function _frameGapMargin(side) {
|
||||||
return _frameEdgeInset(side) + Theme.popupDistance;
|
return _frameEdgeInset(side) + Theme.popupDistance;
|
||||||
}
|
}
|
||||||
@@ -387,7 +387,7 @@ PanelWindow {
|
|||||||
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
||||||
return _frameEdgeInset("top") + cornerClear + screenY;
|
return _frameEdgeInset("top") + cornerClear + screenY;
|
||||||
}
|
}
|
||||||
if (frameOnlyNoConnected)
|
if (frameVisibleWithoutConnectedChrome)
|
||||||
return _frameGapMargin("top") + screenY;
|
return _frameGapMargin("top") + screenY;
|
||||||
const barInfo = getBarInfo();
|
const barInfo = getBarInfo();
|
||||||
const base = barInfo.topBar > 0 ? barInfo.topBar : Theme.popupDistance;
|
const base = barInfo.topBar > 0 ? barInfo.topBar : Theme.popupDistance;
|
||||||
@@ -404,7 +404,7 @@ PanelWindow {
|
|||||||
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
const cornerClear = (isCenterPosition || SettingsData.frameCloseGaps) ? 0 : (Theme.px(SettingsData.frameRounding, dpr) + Theme.px(Theme.connectedCornerRadius, dpr));
|
||||||
return _frameEdgeInset("bottom") + cornerClear + screenY;
|
return _frameEdgeInset("bottom") + cornerClear + screenY;
|
||||||
}
|
}
|
||||||
if (frameOnlyNoConnected)
|
if (frameVisibleWithoutConnectedChrome)
|
||||||
return _frameGapMargin("bottom") + screenY;
|
return _frameGapMargin("bottom") + screenY;
|
||||||
const barInfo = getBarInfo();
|
const barInfo = getBarInfo();
|
||||||
const base = barInfo.bottomBar > 0 ? barInfo.bottomBar : Theme.popupDistance;
|
const base = barInfo.bottomBar > 0 ? barInfo.bottomBar : Theme.popupDistance;
|
||||||
@@ -422,7 +422,7 @@ PanelWindow {
|
|||||||
|
|
||||||
if (connectedFrameMode)
|
if (connectedFrameMode)
|
||||||
return _frameEdgeInset("left");
|
return _frameEdgeInset("left");
|
||||||
if (frameOnlyNoConnected)
|
if (frameVisibleWithoutConnectedChrome)
|
||||||
return _frameGapMargin("left");
|
return _frameGapMargin("left");
|
||||||
const barInfo = getBarInfo();
|
const barInfo = getBarInfo();
|
||||||
return barInfo.leftBar > 0 ? barInfo.leftBar : Theme.popupDistance;
|
return barInfo.leftBar > 0 ? barInfo.leftBar : Theme.popupDistance;
|
||||||
@@ -439,7 +439,7 @@ PanelWindow {
|
|||||||
|
|
||||||
if (connectedFrameMode)
|
if (connectedFrameMode)
|
||||||
return _frameEdgeInset("right");
|
return _frameEdgeInset("right");
|
||||||
if (frameOnlyNoConnected)
|
if (frameVisibleWithoutConnectedChrome)
|
||||||
return _frameGapMargin("right");
|
return _frameGapMargin("right");
|
||||||
const barInfo = getBarInfo();
|
const barInfo = getBarInfo();
|
||||||
return barInfo.rightBar > 0 ? barInfo.rightBar : Theme.popupDistance;
|
return barInfo.rightBar > 0 ? barInfo.rightBar : Theme.popupDistance;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ QtObject {
|
|||||||
property var modelData
|
property var modelData
|
||||||
property int topMargin: 0
|
property int topMargin: 0
|
||||||
readonly property bool compactMode: SettingsData.notificationCompactMode
|
readonly property bool compactMode: SettingsData.notificationCompactMode
|
||||||
readonly property bool notificationConnectedMode: SettingsData.frameEnabled && Theme.isConnectedEffect && SettingsData.isScreenInPreferences(manager.modelData, SettingsData.frameScreenPreferences)
|
readonly property bool notificationConnectedMode: CompositorService.usesConnectedFrameChromeForScreen(manager.modelData)
|
||||||
readonly property bool closeGapNotifications: notificationConnectedMode && SettingsData.frameCloseGaps
|
readonly property bool closeGapNotifications: notificationConnectedMode && SettingsData.frameCloseGaps
|
||||||
readonly property string notifBarSide: {
|
readonly property string notifBarSide: {
|
||||||
const pos = SettingsData.notificationPopupPosition;
|
const pos = SettingsData.notificationPopupPosition;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
import qs.Widgets
|
import qs.Widgets
|
||||||
@@ -38,6 +39,18 @@ Item {
|
|||||||
readonly property real rightMargin: !isVerticalOrientation ? (isRightBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
readonly property real rightMargin: !isVerticalOrientation ? (isRightBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
||||||
readonly property real topMargin: isVerticalOrientation ? (isTopBarEdge && isFirst ? barEdgeExtension : (isFirst ? gapExtension : gapExtension / 2)) : 0
|
readonly property real topMargin: isVerticalOrientation ? (isTopBarEdge && isFirst ? barEdgeExtension : (isFirst ? gapExtension : gapExtension / 2)) : 0
|
||||||
readonly property real bottomMargin: isVerticalOrientation ? (isBottomBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
readonly property real bottomMargin: isVerticalOrientation ? (isBottomBarEdge && isLast ? barEdgeExtension : (isLast ? gapExtension : gapExtension / 2)) : 0
|
||||||
|
readonly property bool barUsesOverlayLayer: {
|
||||||
|
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
||||||
|
case "overlay":
|
||||||
|
return true;
|
||||||
|
case "bottom":
|
||||||
|
case "background":
|
||||||
|
case "top":
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return (barConfig?.showOverFullscreen ?? false) || CompositorService.framePeerSurfacesUseOverlayForScreen(parentScreen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
signal rightClicked(real rootX, real rootY)
|
signal rightClicked(real rootX, real rootY)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ Item {
|
|||||||
popupGapsAuto: defaultBar.popupGapsAuto ?? true,
|
popupGapsAuto: defaultBar.popupGapsAuto ?? true,
|
||||||
popupGapsManual: defaultBar.popupGapsManual ?? 4,
|
popupGapsManual: defaultBar.popupGapsManual ?? 4,
|
||||||
maximizeDetection: defaultBar.maximizeDetection ?? true,
|
maximizeDetection: defaultBar.maximizeDetection ?? true,
|
||||||
fullscreenDetection: defaultBar.fullscreenDetection ?? true,
|
showOverFullscreen: defaultBar.showOverFullscreen ?? false,
|
||||||
scrollEnabled: defaultBar.scrollEnabled ?? true,
|
scrollEnabled: defaultBar.scrollEnabled ?? true,
|
||||||
scrollXBehavior: defaultBar.scrollXBehavior ?? "column",
|
scrollXBehavior: defaultBar.scrollXBehavior ?? "column",
|
||||||
scrollYBehavior: defaultBar.scrollYBehavior ?? "workspace",
|
scrollYBehavior: defaultBar.scrollYBehavior ?? "workspace",
|
||||||
@@ -729,11 +729,14 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
text: I18n.tr("Hide When Fullscreen", "bar visibility toggle: hide the bar when a window is fullscreen")
|
settingKey: "barShowOverFullscreen"
|
||||||
checked: selectedBarConfig?.fullscreenDetection ?? true
|
tags: ["bar", "fullscreen", "overlay", "layer"]
|
||||||
|
text: I18n.tr("Show Over Fullscreen", "bar layer toggle: show the bar over fullscreen windows")
|
||||||
|
description: I18n.tr("Use the overlay layer so this bar appears above fullscreen windows")
|
||||||
|
checked: selectedBarConfig?.showOverFullscreen ?? false
|
||||||
onToggled: toggled => {
|
onToggled: toggled => {
|
||||||
SettingsData.updateBarConfig(selectedBarId, {
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
fullscreenDetection: toggled
|
showOverFullscreen: toggled
|
||||||
});
|
});
|
||||||
notifyHorizontalBarChange();
|
notifyHorizontalBarChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,13 +90,13 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
settingKey: "dockHideOnFullscreen"
|
settingKey: "dockShowOverFullscreen"
|
||||||
tags: ["dock", "fullscreen", "hide"]
|
tags: ["dock", "fullscreen", "overlay", "layer"]
|
||||||
text: I18n.tr("Hide When Fullscreen", "dock visibility toggle: hide the dock when a window is fullscreen")
|
text: I18n.tr("Show Over Fullscreen", "dock layer toggle: show the dock over fullscreen windows")
|
||||||
description: I18n.tr("Hide the dock when a window is fullscreen", "dock visibility toggle description")
|
description: I18n.tr("Use the overlay layer so the dock appears above fullscreen windows")
|
||||||
checked: SettingsData.dockHideOnFullscreen
|
checked: SettingsData.dockShowOverFullscreen
|
||||||
visible: SettingsData.showDock
|
visible: SettingsData.showDock
|
||||||
onToggled: checked => SettingsData.set("dockHideOnFullscreen", checked)
|
onToggled: checked => SettingsData.set("dockShowOverFullscreen", checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,15 @@ Item {
|
|||||||
SettingsData.set("launcherStyle", index === 1 ? "spotlight" : "full");
|
SettingsData.set("launcherStyle", index === 1 ? "spotlight" : "full");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
settingKey: "launcherShowOverFullscreen"
|
||||||
|
tags: ["launcher", "fullscreen", "overlay", "layer"]
|
||||||
|
text: I18n.tr("Show Over Fullscreen", "launcher layer toggle: show the launcher over fullscreen windows")
|
||||||
|
description: I18n.tr("Use the overlay layer when opening the launcher")
|
||||||
|
checked: SettingsData.launcherShowOverFullscreen
|
||||||
|
onToggled: checked => SettingsData.set("launcherShowOverFullscreen", checked)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsCard {
|
SettingsCard {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ Singleton {
|
|||||||
signal randrDataReady
|
signal randrDataReady
|
||||||
|
|
||||||
property var sortedToplevels: []
|
property var sortedToplevels: []
|
||||||
|
property var hyprlandVisibleSpecialWorkspaces: ({})
|
||||||
property bool _sortScheduled: false
|
property bool _sortScheduled: false
|
||||||
|
|
||||||
signal toplevelsChanged
|
signal toplevelsChanged
|
||||||
@@ -153,10 +154,14 @@ Singleton {
|
|||||||
enabled: isHyprland
|
enabled: isHyprland
|
||||||
|
|
||||||
function onRawEvent(event) {
|
function onRawEvent(event) {
|
||||||
if (event.name === "openwindow" || event.name === "closewindow" || event.name === "movewindow" || event.name === "movewindowv2" || event.name === "workspace" || event.name === "workspacev2" || event.name === "focusedmon" || event.name === "focusedmonv2" || event.name === "activewindow" || event.name === "activewindowv2" || event.name === "changefloatingmode" || event.name === "fullscreen" || event.name === "moveintogroup" || event.name === "moveoutofgroup") {
|
if (event.name === "openwindow" || event.name === "closewindow" || event.name === "movewindow" || event.name === "movewindowv2" || event.name === "workspace" || event.name === "workspacev2" || event.name === "focusedmon" || event.name === "focusedmonv2" || event.name === "activewindow" || event.name === "activewindowv2" || event.name === "changefloatingmode" || event.name === "fullscreen" || event.name === "moveintogroup" || event.name === "moveoutofgroup" || event.name === "activespecial") {
|
||||||
try {
|
try {
|
||||||
Hyprland.refreshToplevels();
|
Hyprland.refreshToplevels();
|
||||||
|
if (event.name === "workspace" || event.name === "workspacev2" || event.name === "focusedmon" || event.name === "focusedmonv2" || event.name === "activespecial")
|
||||||
|
Hyprland.refreshMonitors();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
if (event.name === "activespecial")
|
||||||
|
root.updateHyprlandVisibleSpecialWorkspaces(event);
|
||||||
root.scheduleSort();
|
root.scheduleSort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,6 +176,7 @@ Singleton {
|
|||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
fetchRandrData();
|
fetchRandrData();
|
||||||
detectCompositor();
|
detectCompositor();
|
||||||
|
updateHyprlandVisibleSpecialWorkspaces(null);
|
||||||
scheduleSort();
|
scheduleSort();
|
||||||
Qt.callLater(() => {
|
Qt.callLater(() => {
|
||||||
NiriService.generateNiriLayoutConfig();
|
NiriService.generateNiriLayoutConfig();
|
||||||
@@ -215,6 +221,81 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _normalizeSpecialWorkspaceName(name) {
|
||||||
|
const raw = String(name ?? "").trim();
|
||||||
|
if (raw.length === 0)
|
||||||
|
return "";
|
||||||
|
if (raw === "special")
|
||||||
|
return "special:special";
|
||||||
|
return raw.startsWith("special:") ? raw : `special:${raw}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _hyprlandRawEventParts(event, argumentCount) {
|
||||||
|
if (!event)
|
||||||
|
return [];
|
||||||
|
try {
|
||||||
|
const parsed = event.parse(argumentCount);
|
||||||
|
if (parsed && parsed.length !== undefined)
|
||||||
|
return parsed;
|
||||||
|
} catch (e) {}
|
||||||
|
const data = String(event.data ?? "");
|
||||||
|
return data.length > 0 ? data.split(",") : [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function _specialWorkspaceNameFromMonitor(monitor) {
|
||||||
|
if (!monitor)
|
||||||
|
return "";
|
||||||
|
const candidates = [
|
||||||
|
monitor.activeSpecialWorkspace?.name,
|
||||||
|
monitor.specialWorkspace?.name,
|
||||||
|
monitor.lastIpcObject?.specialWorkspace?.name,
|
||||||
|
monitor.lastIpcObject?.specialWorkspace,
|
||||||
|
monitor.lastIpcObject?.activeSpecialWorkspace?.name
|
||||||
|
];
|
||||||
|
for (let i = 0; i < candidates.length; i++) {
|
||||||
|
const normalized = _normalizeSpecialWorkspaceName(candidates[i]);
|
||||||
|
if (normalized)
|
||||||
|
return normalized;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateHyprlandVisibleSpecialWorkspaces(event) {
|
||||||
|
if (!isHyprland) {
|
||||||
|
hyprlandVisibleSpecialWorkspaces = ({});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const next = {};
|
||||||
|
try {
|
||||||
|
const monitors = Hyprland.monitors?.values || [];
|
||||||
|
for (const monitor of monitors) {
|
||||||
|
const monitorName = monitor?.name ?? monitor?.lastIpcObject?.name ?? "";
|
||||||
|
if (!monitorName)
|
||||||
|
continue;
|
||||||
|
const specialName = _specialWorkspaceNameFromMonitor(monitor);
|
||||||
|
if (specialName)
|
||||||
|
next[monitorName] = specialName;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log.warn("updateHyprlandVisibleSpecialWorkspaces monitor snapshot failed:", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event?.name === "activespecial") {
|
||||||
|
const parts = _hyprlandRawEventParts(event, 2);
|
||||||
|
const specialName = _normalizeSpecialWorkspaceName(parts[0]);
|
||||||
|
const monitorName = String(parts[1] ?? Hyprland.focusedMonitor?.name ?? Hyprland.focusedWorkspace?.monitor?.name ?? "");
|
||||||
|
if (monitorName) {
|
||||||
|
if (specialName)
|
||||||
|
next[monitorName] = specialName;
|
||||||
|
else
|
||||||
|
delete next[monitorName];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hyprlandVisibleSpecialWorkspaces = next;
|
||||||
|
}
|
||||||
|
|
||||||
function sortHyprlandToplevelsSafe() {
|
function sortHyprlandToplevelsSafe() {
|
||||||
if (!Hyprland.toplevels || !Hyprland.toplevels.values)
|
if (!Hyprland.toplevels || !Hyprland.toplevels.values)
|
||||||
return [];
|
return [];
|
||||||
@@ -451,6 +532,171 @@ Singleton {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _hyprlandToplevelMapped(hyprToplevel) {
|
||||||
|
if (!hyprToplevel)
|
||||||
|
return false;
|
||||||
|
if (hyprToplevel.mapped === false)
|
||||||
|
return false;
|
||||||
|
const ipcMapped = hyprToplevel.lastIpcObject?.mapped;
|
||||||
|
if (ipcMapped === false)
|
||||||
|
return false;
|
||||||
|
if (hyprToplevel.hidden === true)
|
||||||
|
return false;
|
||||||
|
const ipcHidden = hyprToplevel.lastIpcObject?.hidden;
|
||||||
|
if (ipcHidden === true)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hyprlandVisibleSpecialWorkspaceOnScreen(screenOrName) {
|
||||||
|
const screenName = _screenName(screenOrName);
|
||||||
|
if (!isHyprland || !screenName)
|
||||||
|
return "";
|
||||||
|
hyprlandVisibleSpecialWorkspaces;
|
||||||
|
const trackedName = hyprlandVisibleSpecialWorkspaces[screenName] ?? "";
|
||||||
|
if (trackedName)
|
||||||
|
return trackedName;
|
||||||
|
try {
|
||||||
|
const monitor = Hyprland.monitors?.values?.find(m => m.name === screenName);
|
||||||
|
return _specialWorkspaceNameFromMonitor(monitor);
|
||||||
|
} catch (e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hyprlandSpecialWorkspaceBlocksConnectedFrame(screenOrName) {
|
||||||
|
const screenName = _screenName(screenOrName);
|
||||||
|
if (!isHyprland || !screenName || !Hyprland.toplevels?.values)
|
||||||
|
return false;
|
||||||
|
const visibleSpecialWorkspace = hyprlandVisibleSpecialWorkspaceOnScreen(screenName);
|
||||||
|
if (!visibleSpecialWorkspace)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
for (const t of Hyprland.toplevels.values) {
|
||||||
|
const monName = t.monitor?.name ?? t.lastIpcObject?.monitor ?? "";
|
||||||
|
if (monName !== screenName)
|
||||||
|
continue;
|
||||||
|
const wsName = _normalizeSpecialWorkspaceName(t.workspace?.name ?? t.lastIpcObject?.workspace?.name ?? "");
|
||||||
|
if (!wsName || wsName !== visibleSpecialWorkspace)
|
||||||
|
continue;
|
||||||
|
if (_hyprlandToplevelMapped(t))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log.warn("hyprlandSpecialWorkspaceBlocksConnectedFrame failed:", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function connectedFrameBlockedOnScreen(screenOrName) {
|
||||||
|
if (hasFullscreenToplevelOnScreen(screenOrName))
|
||||||
|
return true;
|
||||||
|
return hyprlandSpecialWorkspaceBlocksConnectedFrame(screenOrName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function _screenForName(screenOrName) {
|
||||||
|
if (screenOrName && typeof screenOrName !== "string")
|
||||||
|
return screenOrName;
|
||||||
|
const screenName = _screenName(screenOrName);
|
||||||
|
if (!screenName)
|
||||||
|
return null;
|
||||||
|
const screens = Quickshell.screens || [];
|
||||||
|
for (let i = 0; i < screens.length; i++) {
|
||||||
|
if (screens[i]?.name === screenName)
|
||||||
|
return screens[i];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function frameConfiguredForScreen(screenOrName) {
|
||||||
|
if (!SettingsData.frameEnabled)
|
||||||
|
return false;
|
||||||
|
const screen = _screenForName(screenOrName);
|
||||||
|
if (!screen || !SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function frameWindowVisibleForScreen(screenOrName) {
|
||||||
|
if (!frameConfiguredForScreen(screenOrName))
|
||||||
|
return false;
|
||||||
|
return !connectedFrameBlockedOnScreen(screenOrName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function usesConnectedFrameChromeForScreen(screenOrName) {
|
||||||
|
return SettingsData.connectedFrameModeActive && frameWindowVisibleForScreen(screenOrName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function framePeerSurfacesUseOverlayForScreen(screenOrName) {
|
||||||
|
return frameWindowVisibleForScreen(screenOrName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function hyprlandToplevelOverlapsDockEdge(hyprToplevel, screenName, dockPosition, dockThickness, screenWidth, screenHeight) {
|
||||||
|
if (!hyprToplevel?.lastIpcObject || !screenName)
|
||||||
|
return false;
|
||||||
|
const monName = hyprToplevel.monitor?.name ?? hyprToplevel.lastIpcObject?.monitor ?? "";
|
||||||
|
if (monName && monName !== screenName)
|
||||||
|
return false;
|
||||||
|
const ipc = hyprToplevel.lastIpcObject;
|
||||||
|
const at = ipc.at;
|
||||||
|
const size = ipc.size;
|
||||||
|
if (!at || !size)
|
||||||
|
return false;
|
||||||
|
const monX = hyprToplevel.monitor?.x ?? 0;
|
||||||
|
const monY = hyprToplevel.monitor?.y ?? 0;
|
||||||
|
const winX = at[0] - monX;
|
||||||
|
const winY = at[1] - monY;
|
||||||
|
const winW = size[0];
|
||||||
|
const winH = size[1];
|
||||||
|
switch (dockPosition) {
|
||||||
|
case SettingsData.Position.Top:
|
||||||
|
return winY < dockThickness;
|
||||||
|
case SettingsData.Position.Bottom:
|
||||||
|
return winY + winH > screenHeight - dockThickness;
|
||||||
|
case SettingsData.Position.Left:
|
||||||
|
return winX < dockThickness;
|
||||||
|
case SettingsData.Position.Right:
|
||||||
|
return winX + winW > screenWidth - dockThickness;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hyprlandDockOverlapForSmartAutoHide(screenName, dockPosition, dockThickness, screenWidth, screenHeight) {
|
||||||
|
if (!isHyprland || !screenName || !Hyprland.toplevels?.values)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const filtered = filterCurrentWorkspace(sortedToplevels, screenName);
|
||||||
|
for (let i = 0; i < filtered.length; i++) {
|
||||||
|
const toplevel = filtered[i];
|
||||||
|
let hyprToplevel = null;
|
||||||
|
for (const t of Hyprland.toplevels.values) {
|
||||||
|
if (t.wayland === toplevel) {
|
||||||
|
hyprToplevel = t;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hyprlandToplevelOverlapsDockEdge(hyprToplevel, screenName, dockPosition, dockThickness, screenWidth, screenHeight))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const visibleSpecialWorkspace = hyprlandVisibleSpecialWorkspaceOnScreen(screenName);
|
||||||
|
if (!visibleSpecialWorkspace)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for (const hyprToplevel of Hyprland.toplevels.values) {
|
||||||
|
const wsName = _normalizeSpecialWorkspaceName(hyprToplevel.workspace?.name ?? hyprToplevel.lastIpcObject?.workspace?.name ?? "");
|
||||||
|
if (wsName !== visibleSpecialWorkspace)
|
||||||
|
continue;
|
||||||
|
if (!_hyprlandToplevelMapped(hyprToplevel))
|
||||||
|
continue;
|
||||||
|
if (hyprlandToplevelOverlapsDockEdge(hyprToplevel, screenName, dockPosition, dockThickness, screenWidth, screenHeight))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function filterHyprlandCurrentDisplaySafe(toplevels, screenName) {
|
function filterHyprlandCurrentDisplaySafe(toplevels, screenName) {
|
||||||
if (!toplevels || toplevels.length === 0 || !Hyprland.toplevels)
|
if (!toplevels || toplevels.length === 0 || !Hyprland.toplevels)
|
||||||
return toplevels;
|
return toplevels;
|
||||||
|
|||||||
@@ -500,8 +500,16 @@ Singleton {
|
|||||||
property bool _dankLauncherV2WantsToggle: false
|
property bool _dankLauncherV2WantsToggle: false
|
||||||
property string _dankLauncherV2PendingQuery: ""
|
property string _dankLauncherV2PendingQuery: ""
|
||||||
property string _dankLauncherV2PendingMode: ""
|
property string _dankLauncherV2PendingMode: ""
|
||||||
|
property bool _dankLauncherV2TriggerUsesOverlayLayer: false
|
||||||
|
|
||||||
function openDankLauncherV2() {
|
function _setDankLauncherV2TriggerUsesOverlayLayer(value) {
|
||||||
|
_dankLauncherV2TriggerUsesOverlayLayer = value === true;
|
||||||
|
if (dankLauncherV2Modal)
|
||||||
|
dankLauncherV2Modal.triggerUsesOverlayLayer = _dankLauncherV2TriggerUsesOverlayLayer;
|
||||||
|
}
|
||||||
|
|
||||||
|
function openDankLauncherV2(triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.show();
|
dankLauncherV2Modal.show();
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -511,7 +519,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDankLauncherV2WithQuery(query: string) {
|
function openDankLauncherV2WithQuery(query: string, triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.showWithQuery(query);
|
dankLauncherV2Modal.showWithQuery(query);
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -522,7 +531,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDankLauncherV2WithMode(mode: string) {
|
function openDankLauncherV2WithMode(mode: string, triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.showWithMode(mode);
|
dankLauncherV2Modal.showWithMode(mode);
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -544,7 +554,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleDankLauncherV2() {
|
function toggleDankLauncherV2(triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.toggle();
|
dankLauncherV2Modal.toggle();
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -554,7 +565,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleDankLauncherV2WithMode(mode: string) {
|
function toggleDankLauncherV2WithMode(mode: string, triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.toggleWithMode(mode);
|
dankLauncherV2Modal.toggleWithMode(mode);
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -565,7 +577,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleDankLauncherV2WithQuery(query: string) {
|
function toggleDankLauncherV2WithQuery(query: string, triggerUsesOverlayLayer) {
|
||||||
|
_setDankLauncherV2TriggerUsesOverlayLayer(triggerUsesOverlayLayer);
|
||||||
if (dankLauncherV2Modal) {
|
if (dankLauncherV2Modal) {
|
||||||
dankLauncherV2Modal.toggleWithQuery(query);
|
dankLauncherV2Modal.toggleWithQuery(query);
|
||||||
} else if (dankLauncherV2ModalLoader) {
|
} else if (dankLauncherV2ModalLoader) {
|
||||||
@@ -577,6 +590,8 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _onDankLauncherV2ModalLoaded() {
|
function _onDankLauncherV2ModalLoaded() {
|
||||||
|
if (dankLauncherV2Modal)
|
||||||
|
dankLauncherV2Modal.triggerUsesOverlayLayer = _dankLauncherV2TriggerUsesOverlayLayer;
|
||||||
if (_dankLauncherV2WantsOpen) {
|
if (_dankLauncherV2WantsOpen) {
|
||||||
_dankLauncherV2WantsOpen = false;
|
_dankLauncherV2WantsOpen = false;
|
||||||
if (_dankLauncherV2PendingQuery) {
|
if (_dankLauncherV2PendingQuery) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
import qs.Common
|
import qs.Common
|
||||||
import qs.Services
|
import qs.Services
|
||||||
|
|
||||||
@@ -32,6 +33,7 @@ Item {
|
|||||||
property real storedBarThickness: Theme.barHeight - 4
|
property real storedBarThickness: Theme.barHeight - 4
|
||||||
property real storedBarSpacing: 4
|
property real storedBarSpacing: 4
|
||||||
property var storedBarConfig: null
|
property var storedBarConfig: null
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
property var adjacentBarInfo: ({
|
property var adjacentBarInfo: ({
|
||||||
"topBar": 0,
|
"topBar": 0,
|
||||||
"bottomBar": 0,
|
"bottomBar": 0,
|
||||||
@@ -97,13 +99,29 @@ Item {
|
|||||||
function onConnectedFrameModeActiveChanged() {
|
function onConnectedFrameModeActiveChanged() {
|
||||||
root._maybeResolveBackend();
|
root._maybeResolveBackend();
|
||||||
}
|
}
|
||||||
|
function onFrameEnabledChanged() {
|
||||||
|
root._maybeResolveBackend();
|
||||||
|
}
|
||||||
function onFrameScreenPreferencesChanged() {
|
function onFrameScreenPreferencesChanged() {
|
||||||
root._maybeResolveBackend();
|
root._maybeResolveBackend();
|
||||||
}
|
}
|
||||||
|
function onShowDockChanged() {
|
||||||
|
root._maybeResolveBackend();
|
||||||
|
}
|
||||||
|
function onBarConfigsChanged() {
|
||||||
|
root._maybeResolveBackend();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: CompositorService
|
||||||
|
function onToplevelsChanged() {
|
||||||
|
root._maybeResolveBackend();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _usesConnectedBackendForScreen(targetScreen) {
|
function _usesConnectedBackendForScreen(targetScreen) {
|
||||||
return SettingsData.connectedFrameModeActive && !!targetScreen && SettingsData.isScreenInPreferences(targetScreen, SettingsData.frameScreenPreferences);
|
return CompositorService.usesConnectedFrameChromeForScreen(targetScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _backendForScreen(targetScreen) {
|
function _backendForScreen(targetScreen) {
|
||||||
@@ -151,6 +169,19 @@ Item {
|
|||||||
effectiveBarBottomGap = bottomGap !== undefined ? bottomGap : 0;
|
effectiveBarBottomGap = bottomGap !== undefined ? bottomGap : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _triggerBarUsesOverlayLayer(targetScreen, barConfig) {
|
||||||
|
switch (Quickshell.env("DMS_DANKBAR_LAYER")) {
|
||||||
|
case "overlay":
|
||||||
|
return true;
|
||||||
|
case "bottom":
|
||||||
|
case "background":
|
||||||
|
case "top":
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return (barConfig?.showOverFullscreen ?? false) || CompositorService.framePeerSurfacesUseOverlayForScreen(targetScreen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setTriggerPosition(x, y, width, section, targetScreen, barPosition, barThickness, barSpacing, barConfig) {
|
function setTriggerPosition(x, y, width, section, targetScreen, barPosition, barThickness, barSpacing, barConfig) {
|
||||||
triggerX = x;
|
triggerX = x;
|
||||||
triggerY = y;
|
triggerY = y;
|
||||||
@@ -161,6 +192,7 @@ Item {
|
|||||||
storedBarThickness = barThickness !== undefined ? barThickness : (Theme.barHeight - 4);
|
storedBarThickness = barThickness !== undefined ? barThickness : (Theme.barHeight - 4);
|
||||||
storedBarSpacing = barSpacing !== undefined ? barSpacing : 4;
|
storedBarSpacing = barSpacing !== undefined ? barSpacing : 4;
|
||||||
storedBarConfig = barConfig;
|
storedBarConfig = barConfig;
|
||||||
|
triggerUsesOverlayLayer = _triggerBarUsesOverlayLayer(targetScreen, barConfig);
|
||||||
|
|
||||||
const pos = barPosition !== undefined ? barPosition : 0;
|
const pos = barPosition !== undefined ? barPosition : 0;
|
||||||
const bottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : 0) : 0;
|
const bottomGap = barConfig ? (barConfig.bottomGap !== undefined ? barConfig.bottomGap : 0) : 0;
|
||||||
@@ -221,6 +253,7 @@ Item {
|
|||||||
it.storedBarThickness = Qt.binding(() => root.storedBarThickness);
|
it.storedBarThickness = Qt.binding(() => root.storedBarThickness);
|
||||||
it.storedBarSpacing = Qt.binding(() => root.storedBarSpacing);
|
it.storedBarSpacing = Qt.binding(() => root.storedBarSpacing);
|
||||||
it.storedBarConfig = Qt.binding(() => root.storedBarConfig);
|
it.storedBarConfig = Qt.binding(() => root.storedBarConfig);
|
||||||
|
it.triggerUsesOverlayLayer = Qt.binding(() => root.triggerUsesOverlayLayer);
|
||||||
it.adjacentBarInfo = Qt.binding(() => root.adjacentBarInfo);
|
it.adjacentBarInfo = Qt.binding(() => root.adjacentBarInfo);
|
||||||
it.screen = Qt.binding(() => root.screen);
|
it.screen = Qt.binding(() => root.screen);
|
||||||
it.effectiveBarPosition = Qt.binding(() => root.effectiveBarPosition);
|
it.effectiveBarPosition = Qt.binding(() => root.effectiveBarPosition);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ Item {
|
|||||||
property real storedBarThickness: Theme.barHeight - 4
|
property real storedBarThickness: Theme.barHeight - 4
|
||||||
property real storedBarSpacing: 4
|
property real storedBarSpacing: 4
|
||||||
property var storedBarConfig: null
|
property var storedBarConfig: null
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
property var adjacentBarInfo: ({
|
property var adjacentBarInfo: ({
|
||||||
"topBar": 0,
|
"topBar": 0,
|
||||||
"bottomBar": 0,
|
"bottomBar": 0,
|
||||||
@@ -56,9 +57,23 @@ Item {
|
|||||||
property var screen: null
|
property var screen: null
|
||||||
// Connected resize uses one full-screen surface; body-sized regions are masks.
|
// Connected resize uses one full-screen surface; body-sized regions are masks.
|
||||||
readonly property bool useBackgroundWindow: false
|
readonly property bool useBackgroundWindow: false
|
||||||
|
readonly property var effectivePopoutLayer: {
|
||||||
|
switch (Quickshell.env("DMS_POPOUT_LAYER")) {
|
||||||
|
case "bottom":
|
||||||
|
log.warn("'bottom' layer is not valid for popouts. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "background":
|
||||||
|
log.warn("'background' layer is not valid for popouts. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "overlay":
|
||||||
|
return WlrLayershell.Overlay;
|
||||||
|
default:
|
||||||
|
return root.triggerUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
readonly property real effectiveBarThickness: {
|
readonly property real effectiveBarThickness: {
|
||||||
if (Theme.isConnectedEffect)
|
if (root.usesConnectedSurfaceChrome)
|
||||||
return Math.max(0, storedBarThickness);
|
return Math.max(0, storedBarThickness);
|
||||||
const padding = storedBarConfig ? (storedBarConfig.innerPadding !== undefined ? storedBarConfig.innerPadding : 4) : 4;
|
const padding = storedBarConfig ? (storedBarConfig.innerPadding !== undefined ? storedBarConfig.innerPadding : 4) : 4;
|
||||||
return Math.max(26 + padding * 0.6, Theme.barHeight - 4 - (8 - padding)) + storedBarSpacing;
|
return Math.max(26 + padding * 0.6, Theme.barHeight - 4 - (8 - padding)) + storedBarSpacing;
|
||||||
@@ -345,7 +360,10 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool frameOwnsConnectedChrome: SettingsData.connectedFrameModeActive && !!root.screen && SettingsData.isScreenInPreferences(root.screen, SettingsData.frameScreenPreferences)
|
readonly property bool frameOwnsConnectedChrome: CompositorService.usesConnectedFrameChromeForScreen(root.screen)
|
||||||
|
readonly property bool usesConnectedSurfaceChrome: Theme.isConnectedEffect && !CompositorService.connectedFrameBlockedOnScreen(root.screen)
|
||||||
|
readonly property bool usesLocalConnectedSurfaceChrome: usesConnectedSurfaceChrome && !frameOwnsConnectedChrome
|
||||||
|
onFrameOwnsConnectedChromeChanged: _syncPopoutChromeState()
|
||||||
|
|
||||||
property bool animationsEnabled: true
|
property bool animationsEnabled: true
|
||||||
|
|
||||||
@@ -455,28 +473,23 @@ Item {
|
|||||||
readonly property real dpr: screen ? screen.devicePixelRatio : 1
|
readonly property real dpr: screen ? screen.devicePixelRatio : 1
|
||||||
readonly property bool closeFrameGapsActive: SettingsData.frameCloseGaps && frameOwnsConnectedChrome
|
readonly property bool closeFrameGapsActive: SettingsData.frameCloseGaps && frameOwnsConnectedChrome
|
||||||
readonly property real frameInset: {
|
readonly property real frameInset: {
|
||||||
if (!SettingsData.frameEnabled)
|
if (!root.frameOwnsConnectedChrome)
|
||||||
return 0;
|
return 0;
|
||||||
const ft = SettingsData.frameThickness;
|
const ft = SettingsData.frameThickness;
|
||||||
const fr = SettingsData.frameRounding;
|
const fr = SettingsData.frameRounding;
|
||||||
const ccr = Theme.connectedCornerRadius;
|
const ccr = Theme.connectedCornerRadius;
|
||||||
if (Theme.isConnectedEffect)
|
return Math.max(ft * 4, ft + ccr * 2, fr);
|
||||||
return Math.max(ft * 4, ft + ccr * 2);
|
|
||||||
const useAutoGaps = storedBarConfig?.popupGapsAuto !== undefined ? storedBarConfig.popupGapsAuto : true;
|
|
||||||
const manualGapValue = storedBarConfig?.popupGapsManual !== undefined ? storedBarConfig.popupGapsManual : 6;
|
|
||||||
const gap = useAutoGaps ? Math.max(6, storedBarSpacing) : manualGapValue;
|
|
||||||
return Math.max(ft + gap, fr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _popupGapValue() {
|
function _popupGapValue() {
|
||||||
const useAutoGaps = storedBarConfig?.popupGapsAuto !== undefined ? storedBarConfig.popupGapsAuto : true;
|
const useAutoGaps = storedBarConfig?.popupGapsAuto !== undefined ? storedBarConfig.popupGapsAuto : true;
|
||||||
const manualGapValue = storedBarConfig?.popupGapsManual !== undefined ? storedBarConfig.popupGapsManual : 4;
|
const manualGapValue = storedBarConfig?.popupGapsManual !== undefined ? storedBarConfig.popupGapsManual : 4;
|
||||||
const rawPopupGap = useAutoGaps ? Math.max(4, storedBarSpacing) : manualGapValue;
|
const rawPopupGap = useAutoGaps ? Math.max(4, storedBarSpacing) : manualGapValue;
|
||||||
return Theme.isConnectedEffect ? 0 : rawPopupGap;
|
return root.usesConnectedSurfaceChrome ? 0 : rawPopupGap;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _frameEdgeInset(side) {
|
function _frameEdgeInset(side) {
|
||||||
if (!SettingsData.frameEnabled || !root.screen)
|
if (!root.frameOwnsConnectedChrome || !root.screen)
|
||||||
return 0;
|
return 0;
|
||||||
const edges = SettingsData.getActiveBarEdgesForScreen(root.screen);
|
const edges = SettingsData.getActiveBarEdgesForScreen(root.screen);
|
||||||
const raw = edges.includes(side) ? SettingsData.frameBarSize : SettingsData.frameThickness;
|
const raw = edges.includes(side) ? SettingsData.frameBarSize : SettingsData.frameThickness;
|
||||||
@@ -549,7 +562,7 @@ Item {
|
|||||||
readonly property real shadowFallbackOffset: 6
|
readonly property real shadowFallbackOffset: 6
|
||||||
readonly property real shadowRenderPadding: (Theme.elevationEnabled && SettingsData.popoutElevationEnabled) ? Theme.elevationRenderPadding(shadowLevel, effectiveShadowDirection, shadowFallbackOffset, 8, 16) : 0
|
readonly property real shadowRenderPadding: (Theme.elevationEnabled && SettingsData.popoutElevationEnabled) ? Theme.elevationRenderPadding(shadowLevel, effectiveShadowDirection, shadowFallbackOffset, 8, 16) : 0
|
||||||
readonly property real shadowMotionPadding: {
|
readonly property real shadowMotionPadding: {
|
||||||
if (Theme.isConnectedEffect)
|
if (root.usesConnectedSurfaceChrome)
|
||||||
return Math.max(storedBarSpacing + Theme.connectedCornerRadius + 4, 40);
|
return Math.max(storedBarSpacing + Theme.connectedCornerRadius + 4, 40);
|
||||||
if (Theme.isDirectionalEffect)
|
if (Theme.isDirectionalEffect)
|
||||||
return 16;
|
return 16;
|
||||||
@@ -582,7 +595,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
readonly property real connectedAnchorX: {
|
readonly property real connectedAnchorX: {
|
||||||
if (!Theme.isConnectedEffect)
|
if (!root.usesConnectedSurfaceChrome)
|
||||||
return triggerX;
|
return triggerX;
|
||||||
switch (effectiveBarPosition) {
|
switch (effectiveBarPosition) {
|
||||||
case SettingsData.Position.Left:
|
case SettingsData.Position.Left:
|
||||||
@@ -594,7 +607,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
readonly property real connectedAnchorY: {
|
readonly property real connectedAnchorY: {
|
||||||
if (!Theme.isConnectedEffect)
|
if (!root.usesConnectedSurfaceChrome)
|
||||||
return triggerY;
|
return triggerY;
|
||||||
switch (effectiveBarPosition) {
|
switch (effectiveBarPosition) {
|
||||||
case SettingsData.Position.Top:
|
case SettingsData.Position.Top:
|
||||||
@@ -609,7 +622,7 @@ Item {
|
|||||||
function adjacentBarClearance(exclusion) {
|
function adjacentBarClearance(exclusion) {
|
||||||
if (exclusion <= 0)
|
if (exclusion <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (!Theme.isConnectedEffect)
|
if (!root.usesConnectedSurfaceChrome)
|
||||||
return exclusion;
|
return exclusion;
|
||||||
// In a shared frame corner, the adjacent connected bar already occupies
|
// In a shared frame corner, the adjacent connected bar already occupies
|
||||||
// one rounded-corner radius before the popout's own connector begins.
|
// one rounded-corner radius before the popout's own connector begins.
|
||||||
@@ -641,7 +654,7 @@ Item {
|
|||||||
const popupGap = _popupGapValue();
|
const popupGap = _popupGapValue();
|
||||||
const edgeGapLeft = _edgeGapFor("left", popupGap);
|
const edgeGapLeft = _edgeGapFor("left", popupGap);
|
||||||
const edgeGapRight = _edgeGapFor("right", popupGap);
|
const edgeGapRight = _edgeGapFor("right", popupGap);
|
||||||
const anchorX = Theme.isConnectedEffect ? connectedAnchorX : triggerX;
|
const anchorX = root.usesConnectedSurfaceChrome ? connectedAnchorX : triggerX;
|
||||||
|
|
||||||
switch (effectiveBarPosition) {
|
switch (effectiveBarPosition) {
|
||||||
case SettingsData.Position.Left:
|
case SettingsData.Position.Left:
|
||||||
@@ -662,7 +675,7 @@ Item {
|
|||||||
const popupGap = _popupGapValue();
|
const popupGap = _popupGapValue();
|
||||||
const edgeGapTop = _edgeGapFor("top", popupGap);
|
const edgeGapTop = _edgeGapFor("top", popupGap);
|
||||||
const edgeGapBottom = _edgeGapFor("bottom", popupGap);
|
const edgeGapBottom = _edgeGapFor("bottom", popupGap);
|
||||||
const anchorY = Theme.isConnectedEffect ? connectedAnchorY : triggerY;
|
const anchorY = root.usesConnectedSurfaceChrome ? connectedAnchorY : triggerY;
|
||||||
|
|
||||||
switch (effectiveBarPosition) {
|
switch (effectiveBarPosition) {
|
||||||
case SettingsData.Position.Bottom:
|
case SettingsData.Position.Bottom:
|
||||||
@@ -718,7 +731,7 @@ Item {
|
|||||||
blurEnabled: root.effectiveSurfaceBlurEnabled && !root.frameOwnsConnectedChrome
|
blurEnabled: root.effectiveSurfaceBlurEnabled && !root.frameOwnsConnectedChrome
|
||||||
|
|
||||||
readonly property real s: Math.min(1, contentContainer.scaleValue)
|
readonly property real s: Math.min(1, contentContainer.scaleValue)
|
||||||
readonly property bool trackBlurFromBarEdge: Theme.isConnectedEffect || Theme.isDirectionalEffect
|
readonly property bool trackBlurFromBarEdge: root.usesConnectedSurfaceChrome || Theme.isDirectionalEffect
|
||||||
|
|
||||||
// Directional popouts clip to the bar edge, so the blur needs to grow from
|
// Directional popouts clip to the bar edge, so the blur needs to grow from
|
||||||
// that same edge instead of translating through the bar before settling.
|
// that same edge instead of translating through the bar before settling.
|
||||||
@@ -729,24 +742,11 @@ Item {
|
|||||||
blurY: trackBlurFromBarEdge ? contentContainer.y + (contentContainer.barBottom ? _dyClamp : 0) : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) - contentContainer.verticalConnectorExtent * s
|
blurY: trackBlurFromBarEdge ? contentContainer.y + (contentContainer.barBottom ? _dyClamp : 0) : contentContainer.y + contentContainer.height * (1 - s) * 0.5 + Theme.snap(contentContainer.animY, root.dpr) - contentContainer.verticalConnectorExtent * s
|
||||||
blurWidth: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.width - Math.abs(_dxClamp)) : (contentContainer.width + contentContainer.horizontalConnectorExtent * 2) * s) : 0
|
blurWidth: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.width - Math.abs(_dxClamp)) : (contentContainer.width + contentContainer.horizontalConnectorExtent * 2) * s) : 0
|
||||||
blurHeight: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.height - Math.abs(_dyClamp)) : (contentContainer.height + contentContainer.verticalConnectorExtent * 2) * s) : 0
|
blurHeight: shouldBeVisible ? (trackBlurFromBarEdge ? Math.max(0, contentContainer.height - Math.abs(_dyClamp)) : (contentContainer.height + contentContainer.verticalConnectorExtent * 2) * s) : 0
|
||||||
blurRadius: Theme.isConnectedEffect ? Theme.connectedCornerRadius : Theme.connectedSurfaceRadius
|
blurRadius: root.usesConnectedSurfaceChrome ? Theme.connectedCornerRadius : Theme.cornerRadius
|
||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: root.layerNamespace
|
WlrLayershell.namespace: root.layerNamespace
|
||||||
WlrLayershell.layer: {
|
WlrLayershell.layer: root.effectivePopoutLayer
|
||||||
switch (Quickshell.env("DMS_POPOUT_LAYER")) {
|
|
||||||
case "bottom":
|
|
||||||
log.warn("'bottom' layer is not valid for popouts. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "background":
|
|
||||||
log.warn("'background' layer is not valid for popouts. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "overlay":
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
default:
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: {
|
WlrLayershell.keyboardFocus: {
|
||||||
if (customKeyboardFocus !== null)
|
if (customKeyboardFocus !== null)
|
||||||
@@ -827,22 +827,22 @@ Item {
|
|||||||
readonly property bool barLeft: effectiveBarPosition === SettingsData.Position.Left
|
readonly property bool barLeft: effectiveBarPosition === SettingsData.Position.Left
|
||||||
readonly property bool barRight: effectiveBarPosition === SettingsData.Position.Right
|
readonly property bool barRight: effectiveBarPosition === SettingsData.Position.Right
|
||||||
readonly property string connectedBarSide: barTop ? "top" : (barBottom ? "bottom" : (barLeft ? "left" : "right"))
|
readonly property string connectedBarSide: barTop ? "top" : (barBottom ? "bottom" : (barLeft ? "left" : "right"))
|
||||||
readonly property real surfaceRadius: Theme.connectedSurfaceRadius
|
readonly property real surfaceRadius: root.usesConnectedSurfaceChrome ? Theme.connectedSurfaceRadius : Theme.cornerRadius
|
||||||
readonly property color surfaceColor: Theme.popupLayerColor(Theme.surfaceContainer)
|
readonly property color surfaceColor: root.usesConnectedSurfaceChrome ? Theme.connectedSurfaceColor : Theme.withAlpha(Theme.surfaceContainer, Theme.popupTransparency)
|
||||||
readonly property color surfaceBorderColor: Theme.isConnectedEffect ? "transparent" : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium)
|
readonly property color surfaceBorderColor: root.usesConnectedSurfaceChrome ? "transparent" : (BlurService.enabled ? BlurService.borderColor : Theme.outlineMedium)
|
||||||
readonly property real surfaceBorderWidth: Theme.isConnectedEffect ? 0 : BlurService.borderWidth
|
readonly property real surfaceBorderWidth: root.usesConnectedSurfaceChrome ? 0 : BlurService.borderWidth
|
||||||
readonly property real surfaceTopLeftRadius: Theme.isConnectedEffect && (barTop || barLeft) ? 0 : surfaceRadius
|
readonly property real surfaceTopLeftRadius: root.usesConnectedSurfaceChrome && (barTop || barLeft) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceTopRightRadius: Theme.isConnectedEffect && (barTop || barRight) ? 0 : surfaceRadius
|
readonly property real surfaceTopRightRadius: root.usesConnectedSurfaceChrome && (barTop || barRight) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceBottomLeftRadius: Theme.isConnectedEffect && (barBottom || barLeft) ? 0 : surfaceRadius
|
readonly property real surfaceBottomLeftRadius: root.usesConnectedSurfaceChrome && (barBottom || barLeft) ? 0 : surfaceRadius
|
||||||
readonly property real surfaceBottomRightRadius: Theme.isConnectedEffect && (barBottom || barRight) ? 0 : surfaceRadius
|
readonly property real surfaceBottomRightRadius: root.usesConnectedSurfaceChrome && (barBottom || barRight) ? 0 : surfaceRadius
|
||||||
readonly property bool directionalEffect: Theme.isDirectionalEffect
|
readonly property bool directionalEffect: Theme.isDirectionalEffect
|
||||||
readonly property bool depthEffect: Theme.isDepthEffect
|
readonly property bool depthEffect: Theme.isDepthEffect
|
||||||
readonly property real directionalTravelX: Math.max(root.animationOffset, root.alignedWidth + Theme.spacingL)
|
readonly property real directionalTravelX: Math.max(root.animationOffset, root.alignedWidth + Theme.spacingL)
|
||||||
readonly property real directionalTravelY: Math.max(root.animationOffset, root.alignedHeight + Theme.spacingL)
|
readonly property real directionalTravelY: Math.max(root.animationOffset, root.alignedHeight + Theme.spacingL)
|
||||||
readonly property real depthTravel: Math.max(root.animationOffset * 0.7, 28)
|
readonly property real depthTravel: Math.max(root.animationOffset * 0.7, 28)
|
||||||
readonly property real sectionTilt: (triggerSection === "left" ? -1 : (triggerSection === "right" ? 1 : 0))
|
readonly property real sectionTilt: (triggerSection === "left" ? -1 : (triggerSection === "right" ? 1 : 0))
|
||||||
readonly property real horizontalConnectorExtent: Theme.isConnectedEffect && (barTop || barBottom) ? Theme.connectedCornerRadius : 0
|
readonly property real horizontalConnectorExtent: root.usesConnectedSurfaceChrome && (barTop || barBottom) ? Theme.connectedCornerRadius : 0
|
||||||
readonly property real verticalConnectorExtent: Theme.isConnectedEffect && (barLeft || barRight) ? Theme.connectedCornerRadius : 0
|
readonly property real verticalConnectorExtent: root.usesConnectedSurfaceChrome && (barLeft || barRight) ? Theme.connectedCornerRadius : 0
|
||||||
|
|
||||||
readonly property real offsetX: {
|
readonly property real offsetX: {
|
||||||
if (directionalEffect) {
|
if (directionalEffect) {
|
||||||
@@ -923,10 +923,10 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
id: directionalClipMask
|
id: directionalClipMask
|
||||||
|
|
||||||
readonly property bool shouldClip: Theme.isDirectionalEffect || Theme.isConnectedEffect
|
readonly property bool shouldClip: Theme.isDirectionalEffect || root.usesConnectedSurfaceChrome
|
||||||
readonly property real clipOversize: 1000
|
readonly property real clipOversize: 1000
|
||||||
readonly property real connectedClipAllowance: {
|
readonly property real connectedClipAllowance: {
|
||||||
if (!Theme.isConnectedEffect)
|
if (!root.usesConnectedSurfaceChrome)
|
||||||
return 0;
|
return 0;
|
||||||
if (root.frameOwnsConnectedChrome)
|
if (root.frameOwnsConnectedChrome)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -972,11 +972,11 @@ Item {
|
|||||||
|
|
||||||
ElevationShadow {
|
ElevationShadow {
|
||||||
id: shadowSource
|
id: shadowSource
|
||||||
readonly property real connectorExtent: Theme.isConnectedEffect ? Theme.connectedCornerRadius : 0
|
readonly property real connectorExtent: root.usesConnectedSurfaceChrome ? Theme.connectedCornerRadius : 0
|
||||||
readonly property real extraLeft: Theme.isConnectedEffect && (contentContainer.barTop || contentContainer.barBottom) ? connectorExtent : 0
|
readonly property real extraLeft: root.usesConnectedSurfaceChrome && (contentContainer.barTop || contentContainer.barBottom) ? connectorExtent : 0
|
||||||
readonly property real extraRight: Theme.isConnectedEffect && (contentContainer.barTop || contentContainer.barBottom) ? connectorExtent : 0
|
readonly property real extraRight: root.usesConnectedSurfaceChrome && (contentContainer.barTop || contentContainer.barBottom) ? connectorExtent : 0
|
||||||
readonly property real extraTop: Theme.isConnectedEffect && (contentContainer.barLeft || contentContainer.barRight) ? connectorExtent : 0
|
readonly property real extraTop: root.usesConnectedSurfaceChrome && (contentContainer.barLeft || contentContainer.barRight) ? connectorExtent : 0
|
||||||
readonly property real extraBottom: Theme.isConnectedEffect && (contentContainer.barLeft || contentContainer.barRight) ? connectorExtent : 0
|
readonly property real extraBottom: root.usesConnectedSurfaceChrome && (contentContainer.barLeft || contentContainer.barRight) ? connectorExtent : 0
|
||||||
readonly property real bodyX: extraLeft
|
readonly property real bodyX: extraLeft
|
||||||
readonly property real bodyY: extraTop
|
readonly property real bodyY: extraTop
|
||||||
readonly property real bodyWidth: rollOutAdjuster.baseWidth
|
readonly property real bodyWidth: rollOutAdjuster.baseWidth
|
||||||
@@ -999,12 +999,12 @@ Item {
|
|||||||
targetColor: contentContainer.surfaceColor
|
targetColor: contentContainer.surfaceColor
|
||||||
borderColor: contentContainer.surfaceBorderColor
|
borderColor: contentContainer.surfaceBorderColor
|
||||||
borderWidth: contentContainer.surfaceBorderWidth
|
borderWidth: contentContainer.surfaceBorderWidth
|
||||||
useCustomSource: Theme.isConnectedEffect
|
useCustomSource: root.usesConnectedSurfaceChrome
|
||||||
shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" && !(root.suspendShadowWhileResizing && root._resizeActive) && !root.frameOwnsConnectedChrome
|
shadowEnabled: Theme.elevationEnabled && SettingsData.popoutElevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1" && !(root.suspendShadowWhileResizing && root._resizeActive) && !root.frameOwnsConnectedChrome
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: Theme.isConnectedEffect && !root.frameOwnsConnectedChrome
|
visible: root.usesLocalConnectedSurfaceChrome
|
||||||
clip: false
|
clip: false
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -1020,7 +1020,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConnectedCorner {
|
ConnectedCorner {
|
||||||
visible: Theme.isConnectedEffect
|
visible: root.usesConnectedSurfaceChrome
|
||||||
barSide: contentContainer.connectedBarSide
|
barSide: contentContainer.connectedBarSide
|
||||||
placement: "left"
|
placement: "left"
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -1032,7 +1032,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConnectedCorner {
|
ConnectedCorner {
|
||||||
visible: Theme.isConnectedEffect
|
visible: root.usesConnectedSurfaceChrome
|
||||||
barSide: contentContainer.connectedBarSide
|
barSide: contentContainer.connectedBarSide
|
||||||
placement: "right"
|
placement: "right"
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -1109,7 +1109,7 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: false
|
clip: false
|
||||||
visible: !Theme.isConnectedEffect
|
visible: !root.usesConnectedSurfaceChrome
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ Item {
|
|||||||
property real storedBarThickness: Theme.barHeight - 4
|
property real storedBarThickness: Theme.barHeight - 4
|
||||||
property real storedBarSpacing: 4
|
property real storedBarSpacing: 4
|
||||||
property var storedBarConfig: null
|
property var storedBarConfig: null
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
property var adjacentBarInfo: ({
|
property var adjacentBarInfo: ({
|
||||||
"topBar": 0,
|
"topBar": 0,
|
||||||
"bottomBar": 0,
|
"bottomBar": 0,
|
||||||
@@ -59,11 +60,25 @@ Item {
|
|||||||
"rightBar": 0
|
"rightBar": 0
|
||||||
})
|
})
|
||||||
property var screen: null
|
property var screen: null
|
||||||
readonly property bool frameOnlyNoConnected: SettingsData.frameEnabled && !!screen && SettingsData.isScreenInPreferences(screen, SettingsData.frameScreenPreferences)
|
readonly property bool frameGapStandaloneActive: CompositorService.frameConfiguredForScreen(screen) && !CompositorService.usesConnectedFrameChromeForScreen(screen)
|
||||||
readonly property bool fluidStandaloneActive: Theme.isDirectionalEffect
|
readonly property bool fluidStandaloneActive: Theme.isDirectionalEffect
|
||||||
readonly property bool backgroundDismissWindowRequired: backgroundInteractive
|
readonly property bool backgroundDismissWindowRequired: backgroundInteractive
|
||||||
readonly property bool backgroundWindowRequired: backgroundDismissWindowRequired || root.overlayContent !== null
|
readonly property bool backgroundWindowRequired: backgroundDismissWindowRequired || root.overlayContent !== null
|
||||||
readonly property bool _fullHeight: fullHeightSurface
|
readonly property bool _fullHeight: fullHeightSurface
|
||||||
|
readonly property var effectivePopoutLayer: {
|
||||||
|
switch (Quickshell.env("DMS_POPOUT_LAYER")) {
|
||||||
|
case "bottom":
|
||||||
|
root.log.warn("'bottom' layer is not valid for popouts. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "background":
|
||||||
|
root.log.warn("'background' layer is not valid for popouts. Defaulting to 'top' layer.");
|
||||||
|
return WlrLayershell.Top;
|
||||||
|
case "overlay":
|
||||||
|
return WlrLayershell.Overlay;
|
||||||
|
default:
|
||||||
|
return root.triggerUsesOverlayLayer ? WlrLayershell.Overlay : WlrLayershell.Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function _frameEdgeInset(side) {
|
function _frameEdgeInset(side) {
|
||||||
if (!screen)
|
if (!screen)
|
||||||
@@ -76,7 +91,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _edgeClearance(side, popupGap, adjacentInset) {
|
function _edgeClearance(side, popupGap, adjacentInset) {
|
||||||
if (frameOnlyNoConnected)
|
if (frameGapStandaloneActive)
|
||||||
return Math.max(adjacentInset, _frameGapMargin(side));
|
return Math.max(adjacentInset, _frameGapMargin(side));
|
||||||
return adjacentInset > 0 ? adjacentInset : popupGap;
|
return adjacentInset > 0 ? adjacentInset : popupGap;
|
||||||
}
|
}
|
||||||
@@ -524,7 +539,7 @@ Item {
|
|||||||
updatesEnabled: root.overlayContent !== null || root._bgCommitWindow
|
updatesEnabled: root.overlayContent !== null || root._bgCommitWindow
|
||||||
|
|
||||||
WlrLayershell.namespace: root.layerNamespace + ":background"
|
WlrLayershell.namespace: root.layerNamespace + ":background"
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: root.effectivePopoutLayer
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
|
||||||
|
|
||||||
@@ -602,20 +617,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WlrLayershell.namespace: root.layerNamespace
|
WlrLayershell.namespace: root.layerNamespace
|
||||||
WlrLayershell.layer: {
|
WlrLayershell.layer: root.effectivePopoutLayer
|
||||||
switch (Quickshell.env("DMS_POPOUT_LAYER")) {
|
|
||||||
case "bottom":
|
|
||||||
root.log.warn("'bottom' layer is not valid for popouts. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "background":
|
|
||||||
root.log.warn("'background' layer is not valid for popouts. Defaulting to 'top' layer.");
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
case "overlay":
|
|
||||||
return WlrLayershell.Overlay;
|
|
||||||
default:
|
|
||||||
return WlrLayershell.Top;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
WlrLayershell.exclusiveZone: -1
|
WlrLayershell.exclusiveZone: -1
|
||||||
WlrLayershell.keyboardFocus: {
|
WlrLayershell.keyboardFocus: {
|
||||||
if (customKeyboardFocus !== null)
|
if (customKeyboardFocus !== null)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ PanelWindow {
|
|||||||
property bool isVisible: false
|
property bool isVisible: false
|
||||||
property var targetScreen: null
|
property var targetScreen: null
|
||||||
property var modelData: null
|
property var modelData: null
|
||||||
|
property bool triggerUsesOverlayLayer: false
|
||||||
property real slideoutWidth: 480
|
property real slideoutWidth: 480
|
||||||
property bool expandable: false
|
property bool expandable: false
|
||||||
property bool expandedWidth: false
|
property bool expandedWidth: false
|
||||||
@@ -61,7 +62,7 @@ PanelWindow {
|
|||||||
|
|
||||||
readonly property bool slideoutBlurActive: root.visible && BlurService.enabled && Theme.connectedSurfaceBlurEnabled
|
readonly property bool slideoutBlurActive: root.visible && BlurService.enabled && Theme.connectedSurfaceBlurEnabled
|
||||||
|
|
||||||
WlrLayershell.layer: WlrLayershell.Top
|
WlrLayershell.layer: (triggerUsesOverlayLayer || CompositorService.framePeerSurfacesUseOverlayForScreen(modelData)) ? WlrLayershell.Overlay : WlrLayershell.Top
|
||||||
WlrLayershell.exclusiveZone: 0
|
WlrLayershell.exclusiveZone: 0
|
||||||
WlrLayershell.keyboardFocus: isVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: isVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
|
|
||||||
|
|||||||
@@ -854,6 +854,29 @@
|
|||||||
"icon": "layers",
|
"icon": "layers",
|
||||||
"description": "Override the global shadow with per-bar settings"
|
"description": "Override the global shadow with per-bar settings"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"section": "barShowOverFullscreen",
|
||||||
|
"label": "Show Over Fullscreen",
|
||||||
|
"tabIndex": 3,
|
||||||
|
"category": "Dank Bar",
|
||||||
|
"keywords": [
|
||||||
|
"above",
|
||||||
|
"appears",
|
||||||
|
"bar",
|
||||||
|
"dank",
|
||||||
|
"fullscreen",
|
||||||
|
"layer",
|
||||||
|
"over",
|
||||||
|
"overlay",
|
||||||
|
"panel",
|
||||||
|
"show",
|
||||||
|
"statusbar",
|
||||||
|
"taskbar",
|
||||||
|
"topbar",
|
||||||
|
"windows"
|
||||||
|
],
|
||||||
|
"description": "Use the overlay layer so this bar appears above fullscreen windows"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"section": "barSpacing",
|
"section": "barSpacing",
|
||||||
"label": "Spacing",
|
"label": "Spacing",
|
||||||
@@ -927,20 +950,28 @@
|
|||||||
"tabIndex": 3,
|
"tabIndex": 3,
|
||||||
"category": "Dank Bar",
|
"category": "Dank Bar",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
"above",
|
||||||
|
"appears",
|
||||||
"auto-hide",
|
"auto-hide",
|
||||||
"autohide",
|
"autohide",
|
||||||
"bar",
|
"bar",
|
||||||
"dank",
|
"dank",
|
||||||
|
"fullscreen",
|
||||||
"hidden",
|
"hidden",
|
||||||
"hide",
|
"hide",
|
||||||
|
"layer",
|
||||||
|
"overlay",
|
||||||
"panel",
|
"panel",
|
||||||
"show",
|
"show",
|
||||||
"statusbar",
|
"statusbar",
|
||||||
|
"taskbar",
|
||||||
"topbar",
|
"topbar",
|
||||||
"visibility",
|
"visibility",
|
||||||
"visible"
|
"visible",
|
||||||
|
"windows"
|
||||||
],
|
],
|
||||||
"icon": "visibility_off"
|
"icon": "visibility_off",
|
||||||
|
"description": "Use the overlay layer so this bar appears above fullscreen windows"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"section": "workspaceDragReorder",
|
"section": "workspaceDragReorder",
|
||||||
@@ -1487,22 +1518,6 @@
|
|||||||
],
|
],
|
||||||
"description": "Group multiple windows of the same app together with a window count indicator"
|
"description": "Group multiple windows of the same app together with a window count indicator"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"section": "dockHideOnFullscreen",
|
|
||||||
"label": "Hide When Fullscreen",
|
|
||||||
"tabIndex": 5,
|
|
||||||
"category": "Dock",
|
|
||||||
"keywords": [
|
|
||||||
"dock",
|
|
||||||
"fullscreen",
|
|
||||||
"hide",
|
|
||||||
"launcher bar",
|
|
||||||
"panel",
|
|
||||||
"taskbar",
|
|
||||||
"window"
|
|
||||||
],
|
|
||||||
"description": "Hide the dock when a window is fullscreen"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"section": "dockIconSize",
|
"section": "dockIconSize",
|
||||||
"label": "Icon Size",
|
"label": "Icon Size",
|
||||||
@@ -1742,6 +1757,27 @@
|
|||||||
"taskbar"
|
"taskbar"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"section": "dockShowOverFullscreen",
|
||||||
|
"label": "Show Over Fullscreen",
|
||||||
|
"tabIndex": 5,
|
||||||
|
"category": "Dock",
|
||||||
|
"keywords": [
|
||||||
|
"above",
|
||||||
|
"appears",
|
||||||
|
"dock",
|
||||||
|
"fullscreen",
|
||||||
|
"launcher bar",
|
||||||
|
"layer",
|
||||||
|
"over",
|
||||||
|
"overlay",
|
||||||
|
"panel",
|
||||||
|
"show",
|
||||||
|
"taskbar",
|
||||||
|
"windows"
|
||||||
|
],
|
||||||
|
"description": "Use the overlay layer so the dock appears above fullscreen windows"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"section": "dockShowOverflowBadge",
|
"section": "dockShowOverflowBadge",
|
||||||
"label": "Show Overflow Badge Count",
|
"label": "Show Overflow Badge Count",
|
||||||
@@ -2211,14 +2247,18 @@
|
|||||||
"drawer",
|
"drawer",
|
||||||
"full",
|
"full",
|
||||||
"launcher",
|
"launcher",
|
||||||
|
"layer",
|
||||||
"menu",
|
"menu",
|
||||||
"minimal",
|
"minimal",
|
||||||
|
"opening",
|
||||||
|
"overlay",
|
||||||
"spotlight",
|
"spotlight",
|
||||||
"start",
|
"start",
|
||||||
"start menu",
|
"start menu",
|
||||||
"style"
|
"style"
|
||||||
],
|
],
|
||||||
"icon": "search"
|
"icon": "search",
|
||||||
|
"description": "Use the overlay layer when opening the launcher"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"section": "spotlightCloseNiriOverview",
|
"section": "spotlightCloseNiriOverview",
|
||||||
@@ -2361,6 +2401,29 @@
|
|||||||
],
|
],
|
||||||
"description": "Show mode tabs and keyboard hints at the bottom."
|
"description": "Show mode tabs and keyboard hints at the bottom."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"section": "launcherShowOverFullscreen",
|
||||||
|
"label": "Show Over Fullscreen",
|
||||||
|
"tabIndex": 9,
|
||||||
|
"category": "Launcher",
|
||||||
|
"keywords": [
|
||||||
|
"app drawer",
|
||||||
|
"app menu",
|
||||||
|
"applications",
|
||||||
|
"drawer",
|
||||||
|
"fullscreen",
|
||||||
|
"launcher",
|
||||||
|
"layer",
|
||||||
|
"menu",
|
||||||
|
"opening",
|
||||||
|
"over",
|
||||||
|
"overlay",
|
||||||
|
"show",
|
||||||
|
"start",
|
||||||
|
"start menu"
|
||||||
|
],
|
||||||
|
"description": "Use the overlay layer when opening the launcher"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"section": "launcherLogoSizeOffset",
|
"section": "launcherLogoSizeOffset",
|
||||||
"label": "Size Offset",
|
"label": "Size Offset",
|
||||||
@@ -4738,6 +4801,27 @@
|
|||||||
],
|
],
|
||||||
"description": "Automatically lock the screen when DMS starts"
|
"description": "Automatically lock the screen when DMS starts"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"section": "lockBeforeSuspend",
|
||||||
|
"label": "Lock before suspend",
|
||||||
|
"tabIndex": 11,
|
||||||
|
"category": "Lock Screen",
|
||||||
|
"keywords": [
|
||||||
|
"automatic",
|
||||||
|
"automatically",
|
||||||
|
"before",
|
||||||
|
"lock",
|
||||||
|
"login",
|
||||||
|
"password",
|
||||||
|
"prepares",
|
||||||
|
"screen",
|
||||||
|
"security",
|
||||||
|
"sleep",
|
||||||
|
"suspend",
|
||||||
|
"system"
|
||||||
|
],
|
||||||
|
"description": "Automatically lock the screen when the system prepares to suspend"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"section": "lockScreenNotificationMode",
|
"section": "lockScreenNotificationMode",
|
||||||
"label": "Notification Display",
|
"label": "Notification Display",
|
||||||
@@ -6844,27 +6928,6 @@
|
|||||||
"icon": "schedule",
|
"icon": "schedule",
|
||||||
"description": "Gradually fade the screen before locking with a configurable grace period"
|
"description": "Gradually fade the screen before locking with a configurable grace period"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"section": "lockBeforeSuspend",
|
|
||||||
"label": "Lock before suspend",
|
|
||||||
"tabIndex": 21,
|
|
||||||
"category": "Power & Sleep",
|
|
||||||
"keywords": [
|
|
||||||
"automatically",
|
|
||||||
"before",
|
|
||||||
"energy",
|
|
||||||
"lock",
|
|
||||||
"power",
|
|
||||||
"prepares",
|
|
||||||
"screen",
|
|
||||||
"security",
|
|
||||||
"shutdown",
|
|
||||||
"sleep",
|
|
||||||
"suspend",
|
|
||||||
"system"
|
|
||||||
],
|
|
||||||
"description": "Automatically lock the screen when the system prepares to suspend"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"section": "fadeToLockGracePeriod",
|
"section": "fadeToLockGracePeriod",
|
||||||
"label": "Lock fade grace period",
|
"label": "Lock fade grace period",
|
||||||
|
|||||||
Reference in New Issue
Block a user