diff --git a/home/apps/rice.nix b/home/apps/rice.nix index a7f0d51..7222a8b 100644 --- a/home/apps/rice.nix +++ b/home/apps/rice.nix @@ -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,47 +88,53 @@ in programs.swaylock = lib.mkIf isLinux { enable = true; - package = pkgs.swaylock-effects; - settings = { - ignore-empty-password = false; - font = "IBM Plex Sans"; - fade-in = "0.2"; - screenshots = true; + package = lib.mkIf isSwayFx pkgs.swaylock-effects; + settings = + { + ignore-empty-password = false; + font = "IBM Plex Sans"; - clock = true; - timestr = "%H:%M"; - datestr = "%A, %d %B"; + indicator-radius = "100"; + indicator-thickness = "10"; - indicator = true; - indicator-radius = "100"; - indicator-thickness = "10"; + color = lib.mkIf (!isSwayFx) "000000"; - effect-blur = "30x2"; - effect-vignette = "0.5:0.5"; + text-color = "cdd6f4"; + text-clear-color = "11111b"; + text-ver-color = "11111b"; + text-wrong-color = "11111b"; - text-color = "cdd6f4"; - text-clear-color = "11111b"; - text-ver-color = "11111b"; - text-wrong-color = "11111b"; + ring-color = "1e1e2e"; + key-hl-color = "f5c2e7"; + line-color = "f5c2e7"; + inside-color = "00000088"; + separator-color = "00000000"; - ring-color = "1e1e2e"; - key-hl-color = "f5c2e7"; - line-color = "f5c2e7"; - inside-color = "00000088"; - separator-color = "00000000"; + inside-clear-color = "f2cdcd88"; + line-clear-color = "f2cdcd"; + ring-clear-color = "f2cdcd"; - inside-clear-color = "f2cdcd88"; - line-clear-color = "f2cdcd"; - ring-clear-color = "f2cdcd"; + inside-ver-color = "89dceb88"; + line-ver-color = "89dceb"; + ring-ver-color = "89dceb"; - inside-ver-color = "89dceb88"; - line-ver-color = "89dceb"; - ring-ver-color = "89dceb"; + inside-wrong-color = "f38ba888"; + line-wrong-color = "f38ba8"; + ring-wrong-color = "f38ba8"; + } + // (lib.optionalAttrs isSwayFx) { + indicator = true; + screenshots = true; - inside-wrong-color = "f38ba888"; - line-wrong-color = "f38ba8"; - ring-wrong-color = "f38ba8"; - }; + clock = true; + timestr = "%H:%M"; + datestr = "%A, %d %B"; + + effect-blur = "30x2"; + effect-vignette = "0.5:0.5"; + + fade-in = "0.2"; + }; }; }; } diff --git a/home/apps/sway.nix b/home/apps/sway.nix index a02f6ce..5e8f585 100644 --- a/home/apps/sway.nix +++ b/home/apps/sway.nix @@ -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\"";