overview backdrop: test pattern, niri layer-rule in hm-module
This commit is contained in:
parent
622f06249c
commit
7ea1eed8bf
4 changed files with 91 additions and 0 deletions
78
modules/OverviewBackdrop.qml
Normal file
78
modules/OverviewBackdrop.qml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "." as M
|
||||
|
||||
// Rendered in niri's overview backdrop via place-within-backdrop layer rule.
|
||||
// Visible between workspace rows during overview.
|
||||
PanelWindow {
|
||||
id: root
|
||||
|
||||
required property var screen
|
||||
|
||||
color: "transparent"
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
WlrLayershell.namespace: "nova-overview-backdrop"
|
||||
mask: Region {}
|
||||
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
anchors.right: true
|
||||
anchors.bottom: true
|
||||
|
||||
// Test pattern — diagonal gradient with centered label
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: Qt.rgba(M.Theme.base0C.r, M.Theme.base0C.g, M.Theme.base0C.b, 0.15)
|
||||
}
|
||||
GradientStop {
|
||||
position: 0.5
|
||||
color: Qt.rgba(M.Theme.base0E.r, M.Theme.base0E.g, M.Theme.base0E.b, 0.1)
|
||||
}
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: Qt.rgba(M.Theme.base09.r, M.Theme.base09.g, M.Theme.base09.b, 0.15)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Grid of dots as a test pattern
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
columns: Math.floor(width / 80)
|
||||
rows: Math.floor(height / 80)
|
||||
|
||||
Repeater {
|
||||
model: parent.columns * parent.rows
|
||||
Rectangle {
|
||||
width: 80
|
||||
height: 80
|
||||
color: "transparent"
|
||||
Rectangle {
|
||||
anchors.centerIn: parent
|
||||
width: 4
|
||||
height: 4
|
||||
radius: 2
|
||||
color: M.Theme.base0D
|
||||
opacity: 0.2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "nova-shell overview backdrop"
|
||||
color: M.Theme.base05
|
||||
opacity: 0.3
|
||||
font.pixelSize: 24
|
||||
font.family: M.Theme.fontFamily
|
||||
font.letterSpacing: 6
|
||||
}
|
||||
}
|
||||
|
|
@ -34,3 +34,4 @@ Notifications 1.0 Notifications.qml
|
|||
Power 1.0 Power.qml
|
||||
Privacy 1.0 Privacy.qml
|
||||
BackgroundOverlay 1.0 BackgroundOverlay.qml
|
||||
OverviewBackdrop 1.0 OverviewBackdrop.qml
|
||||
|
|
|
|||
|
|
@ -192,6 +192,14 @@ in
|
|||
in
|
||||
(pkgs.formats.json { }).generate "nova-shell-theme.json" finalTheme;
|
||||
|
||||
# Niri layer rules for backdrop placement (requires niri-flake hm module)
|
||||
programs.niri.settings.layer-rules = lib.mkIf (config ? programs && config.programs ? niri) [
|
||||
{
|
||||
matches = [ { namespace = "^nova-overview-backdrop$"; } ];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
systemd.user.services.nova-shell = lib.mkIf cfg.systemd.enable {
|
||||
Unit = {
|
||||
Description = "nova-shell Quickshell bar";
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ ShellRoot {
|
|||
screen: scope.modelData
|
||||
}
|
||||
|
||||
OverviewBackdrop {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
||||
ScreenCorners {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue