feat: use plain swaylock for non-swayfx
This commit is contained in:
parent
0ae9142723
commit
3db5914442
2 changed files with 43 additions and 36 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
@ -14,6 +15,7 @@ let
|
|||
red = "#f38ba8";
|
||||
mauve = "#cba6f7";
|
||||
};
|
||||
isSwayFx = osConfig.dotfiles.desktop == "swayfx";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.isGraphical {
|
||||
|
@ -86,23 +88,16 @@ in
|
|||
|
||||
programs.swaylock = lib.mkIf isLinux {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
package = lib.mkIf isSwayFx pkgs.swaylock-effects;
|
||||
settings =
|
||||
{
|
||||
ignore-empty-password = false;
|
||||
font = "IBM Plex Sans";
|
||||
fade-in = "0.2";
|
||||
screenshots = true;
|
||||
|
||||
clock = true;
|
||||
timestr = "%H:%M";
|
||||
datestr = "%A, %d %B";
|
||||
|
||||
indicator = true;
|
||||
indicator-radius = "100";
|
||||
indicator-thickness = "10";
|
||||
|
||||
effect-blur = "30x2";
|
||||
effect-vignette = "0.5:0.5";
|
||||
color = lib.mkIf (!isSwayFx) "000000";
|
||||
|
||||
text-color = "cdd6f4";
|
||||
text-clear-color = "11111b";
|
||||
|
@ -126,6 +121,19 @@ in
|
|||
inside-wrong-color = "f38ba888";
|
||||
line-wrong-color = "f38ba8";
|
||||
ring-wrong-color = "f38ba8";
|
||||
}
|
||||
// (lib.optionalAttrs isSwayFx) {
|
||||
indicator = true;
|
||||
screenshots = true;
|
||||
|
||||
clock = true;
|
||||
timestr = "%H:%M";
|
||||
datestr = "%A, %d %B";
|
||||
|
||||
effect-blur = "30x2";
|
||||
effect-vignette = "0.5:0.5";
|
||||
|
||||
fade-in = "0.2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -90,8 +90,7 @@ in
|
|||
{
|
||||
command = ''
|
||||
swayidle -w \
|
||||
timeout 180 'swaylock -f' \
|
||||
timeout 360 'swaymsg "output * dpms off"' \
|
||||
timeout 300 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'swaylock -f'
|
||||
'';
|
||||
|
@ -217,7 +216,7 @@ in
|
|||
};
|
||||
modes = {
|
||||
"power: (l)ock, (e)xit, (r)eboot, (s)uspend, (h)ibernate, (S)hut off" = {
|
||||
l = "exec --no-startup-id swaylock --color 000000, mode \"default\"";
|
||||
l = "exec --no-startup-id swaylock, mode \"default\"";
|
||||
e = "exec --no-startup-id swaymsg exit, mode \"default\"";
|
||||
r = "exec --no-startup-id systemctl reboot, mode \"default\"";
|
||||
s = "exec --no-startup-id systemctl suspend, mode \"default\"";
|
||||
|
|
Loading…
Reference in a new issue