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

View File

@ -169,24 +169,51 @@
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": "hyprlang",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1709942067,
"narHash": "sha256-DGU4zQDwIx6pXM6oHdA+89UU/QjqE05HiXOvigECJjI=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "a2233d4a2a58233457712acfd88d10a2a8a85711",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprlang": "hyprlang_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2",
"systems": "systems_3",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"dirtyRev": "d6f1b151b2fe85ffbb131cbdd05acefc6a357e81-dirty",
"dirtyShortRev": "d6f1b151-dirty",
"lastModified": 1709720053,
"narHash": "sha256-jAzU4nq4BJDcYZ6RE33vSLe6pRWiXfa1mZ0DD67F79w=",
"type": "git",
"url": "file:///home/admin/programming/outfoxxed/hyprland/hyprland"
"lastModified": 1710026388,
"narHash": "sha256-Z/ReJhaauOe+uThHB1LJ/3tJOnNxdYybS72Z8gkRWT8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "335506d5557b91a0baf974750c353443841e691b",
"type": "github"
},
"original": {
"owner": "hyprwm",
@ -243,19 +270,17 @@
"inputs": {
"nixpkgs": [
"hyprland",
"hyprcursor",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
"systems": "systems_2"
},
"locked": {
"lastModified": 1708787654,
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "0fce791ba2334aca183f2ed42399518947550d0d",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"type": "github"
},
"original": {
@ -266,14 +291,21 @@
},
"hyprlang_2": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1704230242,
"narHash": "sha256-S8DM+frECqmAdaUb3y5n3RjY73ajZcL5rnmx5YO+CkY=",
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "db5e1399b90d5a339330bdd49c5bca6fe58d6f60",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"type": "github"
},
"original": {
@ -282,25 +314,6 @@
"type": "github"
}
},
"hyprpaper": {
"inputs": {
"hyprlang": "hyprlang_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1709070328,
"narHash": "sha256-gTpeu+UZZm/zeM7TRkaPhpUY5aK5Lk3Ybu77zhE1Aas=",
"owner": "hyprwm",
"repo": "Hyprpaper",
"rev": "09c4062659cfaf1bb5ba92532a17e1d131f3b3d2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprpaper",
"type": "github"
}
},
"impurity": {
"locked": {
"lastModified": 1689836741,
@ -360,18 +373,17 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1702645756,
"narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
"owner": "nixos",
"lastModified": 1709479366,
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github"
},
"original": {
"owner": "NixOS",
"id": "nixpkgs",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"nixpkgs-stable": {
@ -390,37 +402,6 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1703637592,
"narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1709479366,
"narHash": "sha256-n6F0n8UV6lnTZbYPl1A9q1BS0p4hduAv1mGAP17CVd0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b8697e57f10292a6165a20f03d2f42920dfaf973",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nur": {
"locked": {
"lastModified": 1709722017,
@ -489,11 +470,10 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-hy3": "hyprland-hy3",
"hyprpaper": "hyprpaper",
"impurity": "impurity",
"nix-index-database": "nix-index-database",
"nixpak": "nixpak",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs",
"nur": "nur",
"quickshell": "quickshell",
"radicle": "radicle",
@ -569,22 +549,37 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1708558866,
"narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=",
"lastModified": 1709983277,
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
"type": "gitlab"
}
},
@ -608,11 +603,11 @@
]
},
"locked": {
"lastModified": 1708696469,
"narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
"lastModified": 1709299639,
"narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
"rev": "2d2fb547178ec025da643db57d40a971507b82fe",
"type": "github"
},
"original": {

View File

@ -48,11 +48,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
hyprpaper = {
url = "github:hyprwm/Hyprpaper";
#inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
# devenv

View File

@ -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}
'';
};
};
}

View File

@ -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
}

View File

Before

Width:  |  Height:  |  Size: 335 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

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 {
}
}
}
}