From 7d446d026a165703a98c11509463092bc9ff2db2 Mon Sep 17 00:00:00 2001 From: kiana-S Date: Tue, 14 May 2024 01:39:50 -0400 Subject: [PATCH] Switch from swayidle to hypridle --- config/packages.nix | 1 + home-manager/wayland/hyprland.nix | 13 +++---- home-manager/wayland/idle.nix | 4 +- home-manager/wayland/wltools.nix | 64 ++++++++++++++++++------------- 4 files changed, 47 insertions(+), 35 deletions(-) diff --git a/config/packages.nix b/config/packages.nix index 5415814..89c0ebd 100644 --- a/config/packages.nix +++ b/config/packages.nix @@ -25,6 +25,7 @@ ]; programs.hyprland.enable = true; + security.pam.services.hyprlock = {}; programs.fish.enable = true; programs.sway.enable = true; diff --git a/home-manager/wayland/hyprland.nix b/home-manager/wayland/hyprland.nix index 5aaaaa5..7a06f9b 100644 --- a/home-manager/wayland/hyprland.nix +++ b/home-manager/wayland/hyprland.nix @@ -36,9 +36,7 @@ in { resize_on_border = true; "col.inactive_border" = "rgb(474f6f)"; - "col.active_border" = "rgb(7bc5e4)"; - "col.nogroup_border" = "rgb(d5556f)"; - "col.nogroup_border_active" = "rgb(d5556f)"; + "col.active_border" = "rgb(b4f9f8)"; }; plugin.hy3 = { @@ -47,6 +45,10 @@ in { tabs = { height = 6; render_text = false; + + "col.active" = "rgb(b4f9f8)"; + "col.inactive" = "rgb(474f6f)"; + "col.urgent" = "rgb(f7768e)"; }; }; @@ -61,9 +63,6 @@ in { font_size = 14; }; - windowrulev2 = [ - "bordercolor rgb(e0af68), fullscreen:1" - ]; layerrule = [ "noanim, ^(notifications)$" ]; @@ -87,7 +86,7 @@ in { "$mod, Return, exec, $terminal" "$mod, D, exec, $menu" "$mod Shift, E, exec, ${scripts}/exit" - "$mod, M, exec, swaylock" + "$mod, M, exec, hyprlock --immediate" # Emacs Everywhere # "$mod, Q, exec, $HOME/.config/emacs/bin/doom +everywhere" diff --git a/home-manager/wayland/idle.nix b/home-manager/wayland/idle.nix index 1de2a00..7014e21 100644 --- a/home-manager/wayland/idle.nix +++ b/home-manager/wayland/idle.nix @@ -21,13 +21,13 @@ in { services.hypridle.enable = true; services.hypridle.settings = { general = { - before_sleep_cmd = "swaylock -f"; + before_sleep_cmd = "hyprlock --immediate"; }; listener = [ { timeout = 120; - on-timeout = "swaylock -f --grace=180"; + on-timeout = "hyprlock"; } { timeout = 600; diff --git a/home-manager/wayland/wltools.nix b/home-manager/wayland/wltools.nix index eae3c08..c449328 100644 --- a/home-manager/wayland/wltools.nix +++ b/home-manager/wayland/wltools.nix @@ -1,7 +1,6 @@ { pkgs, config, ... }: { home.packages = with pkgs; [ - swaylock-effects wl-clipboard wtype wlroots @@ -11,31 +10,6 @@ ]; xdg.configFile = { - "swaylock/config".text = '' - ignore-empty-password - fade-in=0.3 - - indicator - screenshots - - font=JetBrainsMono - text-color=ffffff - color=00000000 - ring-color=7da6ff - key-hl-color=7bc5e4 - - line-uses-inside - indicator-radius=120 - indicator-thickness=7 - - clock - datestr=%a, %Y-%m-%d - - effect-scale=0.4 - effect-vignette=0.3:0.7 - effect-blur=2x2 - ''; - "swaynag/config".text = '' font=JetBrainsMono 10 layer=top @@ -50,6 +24,44 @@ ''; }; + # Hyprlock + + programs.hyprlock.enable = true; + programs.hyprlock.settings = { + general = { + hide_cursor = true; + disable_loading_bar = true; + grace = 180; + }; + + background = [ + { + monitor = ""; + path = "screenshot"; + blur_passes = 2; + blur_size = 6; + } + ]; + + input-field = [ + { + monitor = ""; + size = "500, 50"; + position = "0, -80"; + dots_center = true; + fade_on_empty = false; + + + font_color = "rgb(a9b1d6)"; + inner_color = "rgb(1a1b26)"; + outer_color = "rgb(b4f9f8)"; + outline_thickness = 3; + placeholder_text = ''Password''; + shadow_passes = 2; + } + ]; + }; + # Rofi programs.rofi.enable = true;