Skip to content

WlrLayershell not defined #1

@SelfMadeSystem

Description

@SelfMadeSystem

I'm trying to get a PanelWindow to act as a background by adding

  // When PanelWindow is backed with WlrLayershell this will work
  WlrLayershell.layer: WlrLayer.Bottom

as shown in the documentation, but when I try to do it, it gives me

config file path: "/home/sms/.config/quickshell/shell.qml"
QQmlComponent: Component is not ready
qsintercept:/home/sms/.config/quickshell/shell.qml:6 Non-existent attached object

failed to create root component
could not create scene graph, exiting
My code
import Quickshell // for ShellRoot and PanelWindow
import QtQuick // for Text

ShellRoot {
  PanelWindow {
    WlrLayershell.layer: WlrLayer.Background

    anchors {
      top: true
      left: true
      right: true
    }

    height: 30

    Text {
      // center the bar in its parent component (the window)
      anchors.centerIn: parent

      text: "hello world"
    }
  }
}

When I do this

    Component.onCompleted: {
      console.log(this)
      if (this.WlrLayershell != null)
      {
        this.WlrLayershell.layer = WlrLayer.Bottom;
      }
    }

it prints out qml: WaylandPanelInterface(0x556a989c1ec0)

I'm using Hyprland on NixOS 24.05

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions