mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
feat: implement hyprlock and hypridle
This commit is contained in:
parent
870f8fdde5
commit
0d47ab58f5
4 changed files with 146 additions and 8 deletions
99
modules/desktop/hyprland/hyprlock.nix
Normal file
99
modules/desktop/hyprland/hyprlock.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
background = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "desktop-background";
|
||||
version = "0.2";
|
||||
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./backgrounds/unknown.svg
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [pkgs.inkscape];
|
||||
|
||||
buildPhase = ''
|
||||
inkscape -w 3840 -h 2160 backgrounds/unknown.svg -o unknown.png
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/backgrounds
|
||||
cp *.svg *.png $out/share/backgrounds
|
||||
'';
|
||||
};
|
||||
|
||||
# Re-use the same color scheme as in the main Hyprland config
|
||||
color = {
|
||||
bg = "rgb(28, 27, 26)";
|
||||
ui = "rgb(52, 51, 49)";
|
||||
fg = "rgb(218, 216, 206)";
|
||||
transparent = "rgba(0, 0, 0, 0)";
|
||||
};
|
||||
in {
|
||||
config = {
|
||||
fireproof.home-manager.programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = false;
|
||||
grace = 0;
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = {
|
||||
monitor = "";
|
||||
color = color.bg;
|
||||
path = background + "/share/backgrounds/unknown.png";
|
||||
};
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "250, 60";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
outer_color = color.transparent;
|
||||
inner_color = color.ui;
|
||||
font_color = color.fg;
|
||||
fade_on_empty = false;
|
||||
font_family = "Hack Nerd Font";
|
||||
placeholder_text = "";
|
||||
hide_input = false;
|
||||
position = "0, -35";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
rounding = 8;
|
||||
};
|
||||
shape = [
|
||||
{
|
||||
monitor = "";
|
||||
color = color.ui;
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
size = "150, 60";
|
||||
position = "0, 35";
|
||||
rounding = 8;
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo \"<span>$(date +\"%H:%M\")</span>\"";
|
||||
color = color.fg;
|
||||
font_size = 30;
|
||||
font_family = "Hack Nerd Font";
|
||||
position = "0, 35";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue