Use quickshell for background

This commit is contained in:
outfoxxed 2024-03-10 05:38:24 -07:00
parent b6bff47ed1
commit 6d493c43b9
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
10 changed files with 125 additions and 118 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -0,0 +1,7 @@
import QtQuick
import Quickshell
Image {
required property ShellScreen screen;
source: Qt.resolvedUrl(screen.name == "DP-1" ? "5120x1440.png" : "1920x1080.png")
}

View file

@ -0,0 +1,25 @@
import Quickshell
import Quickshell.Wayland
import ".."
ShellRoot {
Variants {
variants: Quickshell.screens.map(screen => ({ screen }))
PanelWindow {
id: window
WlrLayershell.layer: Layer.Background
anchors {
top: true
bottom: true
left: true
right: true
}
BackgroundImage {
anchors.fill: parent
screen: window.screen
}
}
}
}

View file

@ -1,12 +1,13 @@
{ inputs, pkgs, lib, system, impurity, ... }: let
inherit (inputs) quickshell;
in {
home.packages = [
home.packages = with pkgs; [
quickshell.packages.${system}.default
pamtester # lockscreen
];
xdg.configFile."quickshell/manifest.conf".text = lib.generators.toKeyValue {} {
background = impurity.link ./background;
lockscreen = impurity.link ./lockscreen;
};
}

View file

@ -1,6 +1,7 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import ".."
ShellRoot {
AuthContext {
@ -17,9 +18,11 @@ ShellRoot {
}
SessionLockSurface {
Image {
id: surface
BackgroundImage {
anchors.fill: parent
source: `../../../../hyprland/${screen.name == "DP-1" ? "5120x1440" : "1920x1080"}.png`
screen: surface.screen
}
Lockscreen {
@ -28,5 +31,4 @@ ShellRoot {
}
}
}
}