show notification in fullscreen
This commit is contained in:
@@ -209,6 +209,7 @@ Singleton {
|
|||||||
return {
|
return {
|
||||||
logo: general.logo,
|
logo: general.logo,
|
||||||
wallpaperPath: general.wallpaperPath,
|
wallpaperPath: general.wallpaperPath,
|
||||||
|
showOverFullscreen: general.showOverFullscreen,
|
||||||
desktopIcons: general.desktopIcons,
|
desktopIcons: general.desktopIcons,
|
||||||
dateFormat: general.dateFormat,
|
dateFormat: general.dateFormat,
|
||||||
color: {
|
color: {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ JsonObject {
|
|||||||
property Idle idle: Idle {
|
property Idle idle: Idle {
|
||||||
}
|
}
|
||||||
property string logo: ""
|
property string logo: ""
|
||||||
|
property bool showOverFullscreen: true
|
||||||
property string wallpaperPath: Quickshell.env("HOME") + "/Pictures/Wallpapers"
|
property string wallpaperPath: Quickshell.env("HOME") + "/Pictures/Wallpapers"
|
||||||
|
|
||||||
component Apps: JsonObject {
|
component Apps: JsonObject {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item bar
|
required property Item bar
|
||||||
|
required property real borderThickness
|
||||||
property bool dashboardShortcutActive
|
property bool dashboardShortcutActive
|
||||||
required property Drawing drawing
|
required property Drawing drawing
|
||||||
required property DrawingInput input
|
required property DrawingInput input
|
||||||
@@ -48,7 +49,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function withinPanelWidth(panel: Item, x: real, y: real): bool {
|
function withinPanelWidth(panel: Item, x: real, y: real): bool {
|
||||||
const panelX = panel.x;
|
const panelX = panel.x + root.borderThickness;
|
||||||
return x >= panelX && x <= panelX + panel.width;
|
return x >= panelX && x <= panelX + panel.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -20,6 +20,7 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property Item bar
|
required property Item bar
|
||||||
|
required property real borderThickness
|
||||||
readonly property alias clipboard: clipboard
|
readonly property alias clipboard: clipboard
|
||||||
readonly property alias dashboard: dashboard
|
readonly property alias dashboard: dashboard
|
||||||
readonly property alias dashboardWrapper: dashboardWrapper
|
readonly property alias dashboardWrapper: dashboardWrapper
|
||||||
@@ -43,7 +44,7 @@ Item {
|
|||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Config.barConfig.border
|
anchors.margins: borderThickness
|
||||||
anchors.topMargin: bar.implicitHeight
|
anchors.topMargin: bar.implicitHeight
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -99,6 +100,7 @@ Item {
|
|||||||
id: popouts
|
id: popouts
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
borderThickness: root.borderThickness
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+53
-17
@@ -18,18 +18,47 @@ CustomWindow {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property alias bar: bar
|
readonly property alias bar: bar
|
||||||
readonly property bool hasFullscreen: Hypr.monitorFor(screen)?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2)
|
readonly property real borderLayoutThickness: hasFullscreen ? 0 : Config.barConfig.border
|
||||||
|
readonly property real borderRounding: Config.barConfig.rounding * (1 - fsTransitionProg)
|
||||||
|
readonly property real borderThickness: Config.barConfig.border * (1 - fsTransitionProg)
|
||||||
|
property real fsTransitionProg: hasFullscreen ? 1 : 0
|
||||||
|
readonly property bool hasFullscreen: {
|
||||||
|
if (hasSpecialWorkspace) {
|
||||||
|
const specialName = monitor?.lastIpcObject.specialWorkspace?.name;
|
||||||
|
if (!specialName)
|
||||||
|
return false;
|
||||||
|
const specialWs = Hypr.workspaces.values.find(ws => ws.name === specialName);
|
||||||
|
return specialWs?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false;
|
||||||
|
}
|
||||||
|
return hasFullscreenOnNormalWs;
|
||||||
|
}
|
||||||
|
readonly property bool hasFullscreenOnNormalWs: monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false
|
||||||
|
readonly property bool hasSpecialWorkspace: (monitor?.lastIpcObject.specialWorkspace?.name.length ?? 0) > 0
|
||||||
readonly property alias interactionWrapper: interactions
|
readonly property alias interactionWrapper: interactions
|
||||||
readonly property alias menuRegion: menuPopoutRegion
|
readonly property alias menuRegion: menuPopoutRegion
|
||||||
|
readonly property HyprlandMonitor monitor: Hypr.monitorFor(screen)
|
||||||
property var root: Quickshell.shellDir
|
property var root: Quickshell.shellDir
|
||||||
|
readonly property real sdfBorderOffset: 2 * fsTransitionProg
|
||||||
|
readonly property real shadowOpacity: 0.7 * (1 - fsTransitionProg)
|
||||||
|
property color surfaceColor: DynamicColors.tPalette.m3surface
|
||||||
|
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||||
// WlrLayershell.keyboardFocus: visibilities.dock || visibilities.launcher || visibilities.sidebar || visibilities.dashboard || visibilities.settings || visibilities.resources ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.settings ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
|
WlrLayershell.layer: (fsTransitionProg > 0 && Config.general.showOverFullscreen) || (hasSpecialWorkspace && hasFullscreenOnNormalWs) ? WlrLayer.Overlay : WlrLayer.Top
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
contentItem.focus: true
|
contentItem.focus: true
|
||||||
mask: visibilities.isDrawing ? null : region
|
mask: visibilities.isDrawing ? null : (hasFullscreen ? emptyRegion : region)
|
||||||
name: "Bar"
|
name: "Bar"
|
||||||
|
|
||||||
|
Behavior on fsTransitionProg {
|
||||||
|
Anim {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Behavior on surfaceColor {
|
||||||
|
CAnim {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contentItem.Keys.onEscapePressed: {
|
contentItem.Keys.onEscapePressed: {
|
||||||
if (Config.barConfig.autoHide)
|
if (Config.barConfig.autoHide)
|
||||||
visibilities.bar = false;
|
visibilities.bar = false;
|
||||||
@@ -61,6 +90,15 @@ CustomWindow {
|
|||||||
intersection: Intersection.Subtract
|
intersection: Intersection.Subtract
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
id: emptyRegion
|
||||||
|
|
||||||
|
height: panels.notifications.height
|
||||||
|
width: panels.notifications.width
|
||||||
|
x: panels.notifications.x + root.borderThickness
|
||||||
|
y: panels.notifications.y + bar.implicitHeight
|
||||||
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
id: region
|
id: region
|
||||||
|
|
||||||
@@ -150,35 +188,30 @@ CustomWindow {
|
|||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
opacity: Appearance.transparency.enabled ? DynamicColors.transparency.base : 1
|
opacity: root.surfaceColor.a
|
||||||
|
|
||||||
layer.effect: MultiEffect {
|
layer.effect: MultiEffect {
|
||||||
blurMax: 32
|
blurMax: 32
|
||||||
shadowColor: Qt.alpha(DynamicColors.palette.m3shadow, 1)
|
shadowColor: Qt.alpha(DynamicColors.palette.m3shadow, Math.max(0, root.shadowOpacity))
|
||||||
shadowEnabled: true
|
shadowEnabled: true
|
||||||
}
|
}
|
||||||
|
|
||||||
BlobGroup {
|
BlobGroup {
|
||||||
id: blobGroup
|
id: blobGroup
|
||||||
|
|
||||||
color: DynamicColors.palette.m3surface
|
color: root.surfaceColor
|
||||||
smoothing: Config.barConfig.smoothing
|
smoothing: Config.barConfig.smoothing
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
CAnim {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlobInvertedRect {
|
BlobInvertedRect {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -50
|
anchors.margins: -50
|
||||||
borderBottom: Config.barConfig.border - anchors.margins
|
borderBottom: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
borderLeft: Config.barConfig.border - anchors.margins
|
borderLeft: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
borderRight: Config.barConfig.border - anchors.margins
|
borderRight: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
borderTop: bar.implicitHeight - anchors.margins
|
borderTop: bar.implicitHeight - anchors.margins - root.sdfBorderOffset
|
||||||
group: blobGroup
|
group: blobGroup
|
||||||
radius: Config.barConfig.rounding
|
radius: root.borderRounding
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelBg {
|
PanelBg {
|
||||||
@@ -351,6 +384,7 @@ CustomWindow {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
bar: bar
|
bar: bar
|
||||||
|
borderThickness: root.borderLayoutThickness
|
||||||
drawing: drawingLoader.item
|
drawing: drawingLoader.item
|
||||||
enabled: true
|
enabled: true
|
||||||
input: inputLoader.item
|
input: inputLoader.item
|
||||||
@@ -363,6 +397,7 @@ CustomWindow {
|
|||||||
id: panels
|
id: panels
|
||||||
|
|
||||||
bar: bar
|
bar: bar
|
||||||
|
borderThickness: root.borderThickness
|
||||||
drawingItem: drawingLoader.item
|
drawingItem: drawingLoader.item
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
visibilities: visibilities
|
visibilities: visibilities
|
||||||
@@ -407,6 +442,7 @@ CustomWindow {
|
|||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
fullscreen: root.hasFullscreen
|
||||||
popouts: panels.popouts
|
popouts: panels.popouts
|
||||||
popoutsWrapper: panels.popoutsWrapper
|
popoutsWrapper: panels.popoutsWrapper
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
@@ -423,7 +459,7 @@ CustomWindow {
|
|||||||
implicitHeight: panel.height
|
implicitHeight: panel.height
|
||||||
implicitWidth: panel.width
|
implicitWidth: panel.width
|
||||||
radius: Appearance.rounding.smallest
|
radius: Appearance.rounding.smallest
|
||||||
x: panel.x + Config.barConfig.border
|
x: panel.x + root.borderThickness
|
||||||
y: panel.y + bar.implicitHeight
|
y: panel.y + bar.implicitHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ RowLayout {
|
|||||||
required property Wrapper popouts
|
required property Wrapper popouts
|
||||||
required property ClipWrapper popoutsWrapper
|
required property ClipWrapper popoutsWrapper
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
|
required property bool fullscreen
|
||||||
readonly property int vPadding: 6
|
readonly property int vPadding: 6
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
@@ -91,6 +92,7 @@ RowLayout {
|
|||||||
|
|
||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: HyprsunsetWidget {
|
sourceComponent: HyprsunsetWidget {
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,6 +111,7 @@ RowLayout {
|
|||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: Workspaces {
|
sourceComponent: Workspaces {
|
||||||
screen: root.screen
|
screen: root.screen
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,6 +123,7 @@ RowLayout {
|
|||||||
sourceComponent: TrayWidget {
|
sourceComponent: TrayWidget {
|
||||||
loader: root
|
loader: root
|
||||||
popouts: root.popouts
|
popouts: root.popouts
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,6 +134,7 @@ RowLayout {
|
|||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: Resources {
|
sourceComponent: Resources {
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,6 +144,7 @@ RowLayout {
|
|||||||
|
|
||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: UpdatesWidget {
|
sourceComponent: UpdatesWidget {
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,6 +156,7 @@ RowLayout {
|
|||||||
sourceComponent: NotifBell {
|
sourceComponent: NotifBell {
|
||||||
popouts: root.popouts
|
popouts: root.popouts
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -162,6 +169,7 @@ RowLayout {
|
|||||||
loader: root
|
loader: root
|
||||||
popouts: root.popouts
|
popouts: root.popouts
|
||||||
visibilities: root.visibilities
|
visibilities: root.visibilities
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -172,6 +180,7 @@ RowLayout {
|
|||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: WindowTitle {
|
sourceComponent: WindowTitle {
|
||||||
bar: root
|
bar: root
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,6 +199,7 @@ RowLayout {
|
|||||||
|
|
||||||
delegate: WrappedLoader {
|
delegate: WrappedLoader {
|
||||||
sourceComponent: MediaWidget {
|
sourceComponent: MediaWidget {
|
||||||
|
visible: !root.fullscreen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,12 +17,13 @@ Item {
|
|||||||
|
|
||||||
readonly property int contentHeight: Config.barConfig.height + padding * 2
|
readonly property int contentHeight: Config.barConfig.height + padding * 2
|
||||||
readonly property int exclusiveZone: Config.barConfig.autoHide ? Config.barConfig.border : contentHeight
|
readonly property int exclusiveZone: Config.barConfig.autoHide ? Config.barConfig.border : contentHeight
|
||||||
|
required property bool fullscreen
|
||||||
property bool isHovered
|
property bool isHovered
|
||||||
readonly property int padding: Math.max(Appearance.padding.smaller, Config.barConfig.border)
|
readonly property int padding: Math.max(Appearance.padding.smaller, Config.barConfig.border)
|
||||||
required property Wrapper popouts
|
required property Wrapper popouts
|
||||||
required property ClipWrapper popoutsWrapper
|
required property ClipWrapper popoutsWrapper
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
readonly property bool shouldBeVisible: (!Config.barConfig.autoHide || visibilities.bar || isHovered)
|
readonly property bool shouldBeVisible: !fullscreen && (!Config.barConfig.autoHide || visibilities.bar || isHovered)
|
||||||
readonly property int vPadding: 6
|
readonly property int vPadding: 6
|
||||||
required property PersistentProperties visibilities
|
required property PersistentProperties visibilities
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ Item {
|
|||||||
content.item?.checkPopout(x);
|
content.item?.checkPopout(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitHeight: Config.barConfig.border
|
implicitHeight: fullscreen ? 0 : Config.barConfig.border
|
||||||
visible: height > Config.barConfig.border
|
visible: height > Config.barConfig.border
|
||||||
|
|
||||||
states: State {
|
states: State {
|
||||||
@@ -75,6 +76,7 @@ Item {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
sourceComponent: Bar {
|
sourceComponent: Bar {
|
||||||
|
fullscreen: root.fullscreen
|
||||||
height: root.contentHeight
|
height: root.contentHeight
|
||||||
popouts: root.popouts
|
popouts: root.popouts
|
||||||
popoutsWrapper: root.popoutsWrapper
|
popoutsWrapper: root.popoutsWrapper
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import qs.Config
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
required property real borderThickness
|
||||||
readonly property alias content: content
|
readonly property alias content: content
|
||||||
property real offsetScale: y > 0 || content.hasCurrent ? 0 : 1
|
property real offsetScale: y > 0 || content.hasCurrent ? 0 : 1
|
||||||
required property ShellScreen screen
|
required property ShellScreen screen
|
||||||
@@ -17,7 +18,7 @@ Item {
|
|||||||
implicitWidth: content.implicitWidth
|
implicitWidth: content.implicitWidth
|
||||||
visible: width > 0 && height > 0
|
visible: width > 0 && height > 0
|
||||||
x: {
|
x: {
|
||||||
const off = content.currentCenter - Config.barConfig.border - content.nonAnimWidth / 2;
|
const off = content.currentCenter - borderThickness - content.nonAnimWidth / 2;
|
||||||
const diff = parent.width - Math.floor(off + content.nonAnimWidth);
|
const diff = parent.width - Math.floor(off + content.nonAnimWidth);
|
||||||
if (diff < 0)
|
if (diff < 0)
|
||||||
return off + diff;
|
return off + diff;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ CustomRect {
|
|||||||
required property NotifServer.Notif modelData
|
required property NotifServer.Notif modelData
|
||||||
readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2
|
readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2
|
||||||
|
|
||||||
|
clip: true
|
||||||
color: root.modelData.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3secondaryContainer : DynamicColors.tPalette.m3surfaceContainer
|
color: root.modelData.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3secondaryContainer : DynamicColors.tPalette.m3surfaceContainer
|
||||||
implicitHeight: inner.implicitHeight
|
implicitHeight: inner.implicitHeight
|
||||||
implicitWidth: Config.notifs.sizes.width
|
implicitWidth: Config.notifs.sizes.width
|
||||||
@@ -435,6 +436,7 @@ CustomRect {
|
|||||||
|
|
||||||
StateLayer {
|
StateLayer {
|
||||||
color: root.modelData.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onSecondary : DynamicColors.palette.m3onSurface
|
color: root.modelData.urgency === NotificationUrgency.Critical ? DynamicColors.palette.m3onSecondary : DynamicColors.palette.m3onSurface
|
||||||
|
enabled: root.expanded
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|||||||
Reference in New Issue
Block a user