Use quickshell for background
This commit is contained in:
parent
b6bff47ed1
commit
6d493c43b9
10 changed files with 125 additions and 118 deletions
|
@ -1,5 +1,5 @@
|
|||
{ system, inputs, impurity, lib, config, pkgs, ... }: let
|
||||
inherit (inputs) hyprland hyprpaper hyprland-hy3 quickshell;
|
||||
inherit (inputs) hyprland hyprland-hy3 quickshell;
|
||||
|
||||
# I blame home manager
|
||||
wrapper = pkgs.callPackage ({ ... }: pkgs.writeShellScriptBin "hyprland" ''
|
||||
|
@ -43,14 +43,11 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
home-manager.users.${config.main-user} = {
|
||||
imports = [ hyprland.homeManagerModules.default ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wrapper
|
||||
hyprpaper
|
||||
|
||||
# environment programs
|
||||
wl-clipboard
|
||||
|
@ -60,17 +57,6 @@ in {
|
|||
wf-recorder
|
||||
];
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "000000";
|
||||
font-size = 14;
|
||||
ignore-empty-password = true;
|
||||
show-failed-attempts = true;
|
||||
image = "${./5120x1440.png}";
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
|
@ -78,19 +64,10 @@ in {
|
|||
plugins = [ hyprland-hy3.packages.${system}.default ];
|
||||
|
||||
extraConfig = ''
|
||||
exec-once = ${hyprpaper.packages.${system}.default}/bin/hyprpaper
|
||||
source = ${impurity.link ./hyprland.conf}
|
||||
${config.hyprland-session.extraConfig}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ${./5120x1440.png}
|
||||
preload = ${./1920x1080.png}
|
||||
|
||||
wallpaper = DP-1,${./5120x1440.png}
|
||||
wallpaper = eDP-1,${./1920x1080.png}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
exec-once = quickshell -c background
|
||||
|
||||
exec = systemctl start --user emacs.service && emacsclient -e "(setenv \"HYPRLAND_INSTANCE_SIGNATURE\" \"$HYPRLAND_INSTANCE_SIGNATURE\")"
|
||||
|
||||
general {
|
||||
|
@ -60,6 +62,9 @@ gestures {
|
|||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
vrr = 1
|
||||
no_direct_scanout = false
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 335 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
7
modules/user/modules/quickshell/BackgroundImage.qml
Normal file
7
modules/user/modules/quickshell/BackgroundImage.qml
Normal 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")
|
||||
}
|
25
modules/user/modules/quickshell/background/shell.qml
Normal file
25
modules/user/modules/quickshell/background/shell.qml
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue