desktop is building I guess, idk, need to start commiting stuff eventually lmao
This commit is contained in:
41
modules/home/desktop/hyprland/services/hypridle/default.nix
Normal file
41
modules/home/desktop/hyprland/services/hypridle/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
};
|
||||
listener = [
|
||||
# {
|
||||
# timeout = 300; # 5min
|
||||
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
# on-resume = "brightnessctl -r"; # monitor backlight restore.
|
||||
# }
|
||||
{
|
||||
timeout = cfg.hypridle.lockScreenTimer;
|
||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
||||
}
|
||||
{
|
||||
timeout = cfg.hypridle.screenOffTimer;
|
||||
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||
}
|
||||
{
|
||||
timeout = cfg.hypridle.suspendTimer;
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
modules/home/desktop/hyprland/services/hyprlock/default.nix
Normal file
47
modules/home/desktop/hyprland/services/hyprlock/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = cfg.wallpaper; # supports png, jpg, webp (no animations, though)
|
||||
color = "rgba(25, 20, 20, 1.0)";
|
||||
|
||||
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
|
||||
blur_passes = "3"; # 0 disables blurring
|
||||
blur_size = "7";
|
||||
noise = "0.0117";
|
||||
contrast = "0.8916";
|
||||
brightness = "0.8172";
|
||||
vibrancy = "0.1696";
|
||||
vibrancy_darkness = "0.0";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = cfg.primaryDisplay;
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
bothlock_color = -1;
|
||||
outline_thickness = 5;
|
||||
placeholder_text = ''<span foreground="##cad3f5">Password...</span>'';
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/home/desktop/hyprland/services/hyprpaper/default.nix
Normal file
18
modules/home/desktop/hyprland/services/hyprpaper/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, lib, namespace, ... }:
|
||||
let
|
||||
cfg = config.${namespace}.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
imports = [ ../../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ "/run/wallpaper.jpg" ];
|
||||
wallpaper = "/run/wallpaper.jpg";
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user