mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
chore: rename useNvidiaCrashFix -> useCrashFix
This commit is contained in:
parent
a424490090
commit
e87ff22643
2 changed files with 5 additions and 9 deletions
|
@ -44,11 +44,11 @@ in
|
||||||
Whether to set up Hyprlock for screen locking.
|
Whether to set up Hyprlock for screen locking.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
screenlocker.useNvidiaCrashFix = lib.mkOption {
|
screenlocker.useCrashFix = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to use a workaround for Hyprlock background blur not working on Nvidia-based machines. Before locking, a screenshot will be taken and placed at `/tmp/__hyprlock-monitor-screenshot.png`.
|
Whether to use a workaround for Hyprlock background blur not working on some machines. Before locking, a screenshot will be taken and placed at `/tmp/__hyprlock-monitor-screenshot.png`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
screenlocker.monitor = lib.mkOption {
|
screenlocker.monitor = lib.mkOption {
|
||||||
|
@ -229,8 +229,7 @@ in
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion =
|
assertion =
|
||||||
!cfg.screenlocker.useNvidiaCrashFix
|
!cfg.screenlocker.useCrashFix || (cfg.screenlocker.useCrashFix && cfg.screenlocker.monitor != null);
|
||||||
|| (cfg.screenlocker.useNvidiaCrashFix && cfg.screenlocker.monitor != null);
|
|
||||||
message = "To use the Nvidia crash fix, you must set screenlocker.monitor to the monitor you want to use as the lock screen that blurs! Use `hyprctl monitors` to determine the monitor codes (should be something like DP-1, HDMI-A-1, etc).";
|
message = "To use the Nvidia crash fix, you must set screenlocker.monitor to the monitor you want to use as the lock screen that blurs! Use `hyprctl monitors` to determine the monitor codes (should be something like DP-1, HDMI-A-1, etc).";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -58,10 +58,7 @@ in
|
||||||
background = {
|
background = {
|
||||||
monitor = cfg.screenlocker.monitor;
|
monitor = cfg.screenlocker.monitor;
|
||||||
path =
|
path =
|
||||||
if cfg.screenlocker.useNvidiaCrashFix then
|
if cfg.screenlocker.useCrashFix then "/tmp/__hyprlock-monitor-screenshot.png" else "screenshot";
|
||||||
"/tmp/__hyprlock-monitor-screenshot.png"
|
|
||||||
else
|
|
||||||
"screenshot";
|
|
||||||
blur_passes = 3;
|
blur_passes = 3;
|
||||||
blur_size = 7;
|
blur_size = 7;
|
||||||
noise = 0.0117;
|
noise = 0.0117;
|
||||||
|
@ -109,7 +106,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
lock_cmd =
|
lock_cmd =
|
||||||
if cfg.screenlocker.useNvidiaCrashFix then
|
if cfg.screenlocker.useCrashFix then
|
||||||
"pidof hyprlock || ${pkgs.grim}/bin/grim -o ${config.programs.hyprlock.settings.background.monitor} /tmp/__hyprlock-monitor-screenshot.png && ${pkgs.hyprlock}/bin/hyprlock"
|
"pidof hyprlock || ${pkgs.grim}/bin/grim -o ${config.programs.hyprlock.settings.background.monitor} /tmp/__hyprlock-monitor-screenshot.png && ${pkgs.hyprlock}/bin/hyprlock"
|
||||||
else
|
else
|
||||||
"pidof hyprlock || hyprlock";
|
"pidof hyprlock || hyprlock";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue