From 72a01e99e38b11898021dfba792c0f8ec8a8e9a4 Mon Sep 17 00:00:00 2001
From: Remy Moll <me@moll.re>
Date: Wed, 12 Mar 2025 15:43:38 +0100
Subject: [PATCH] quite the coherence coming up

---
 modules/home-manager/code.nix                 |  3 +-
 modules/home-manager/hypr/hypridle.nix        | 17 ++++----
 .../hypr/hyprland-customization.nix           |  4 +-
 modules/home-manager/hypr/hyprlock.nix        | 40 ++++---------------
 modules/home-manager/hypr/waybar.nix          |  6 ---
 modules/home-manager/stylix.nix               | 40 +++++++++++++++++++
 6 files changed, 59 insertions(+), 51 deletions(-)

diff --git a/modules/home-manager/code.nix b/modules/home-manager/code.nix
index 9157ef2..4c91fa1 100644
--- a/modules/home-manager/code.nix
+++ b/modules/home-manager/code.nix
@@ -32,6 +32,8 @@
 
     userSettings = {
       # visual
+      "window.menuBarVisibility" = "toggle";
+
       # "editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
       # "terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
       # "workbench.iconTheme" = "vs-seti";
@@ -65,7 +67,6 @@
       "terminal.integrated.enableMultiLinePasteWarning" = false;
       "update.showReleaseNotes" = false;
       "terminal.external.linuxExec" = "kitty";
-      "window.menuBarVisibility" = "compact";
       "workbench.startupEditor" = "newUntitledFile";
       # "workbench.colorTheme" = "Default Light+";
       "github.copilot.editor.enableAutoCompletions" = true;
diff --git a/modules/home-manager/hypr/hypridle.nix b/modules/home-manager/hypr/hypridle.nix
index 0d07912..921c06b 100644
--- a/modules/home-manager/hypr/hypridle.nix
+++ b/modules/home-manager/hypr/hypridle.nix
@@ -1,4 +1,4 @@
-{inputs, pkgs, ...}: 
+{inputs, pkgs, ...}:
 {
   services.hypridle = {
     enable = true;
@@ -21,16 +21,15 @@
         {
           # lock screen after 5 minutes
           timeout = 300;
-          on-timeout = "loginctl lock-session";
-        }
-        {
-          # turnoff screen after 10 minutes
-          timeout = 600;
-          on-timeout = "hyprctl dispatch dpms off";
+          on-timeout = "loginctl lock-session && hyprctl dispatch dpms off";
+          on-resume = "hyprctl dispatch dpms on";
+        }
+        {
+          # suspend after 10 minutes
+          timeout = 600;
+          on-timeout = "systemctl suspend";
           on-resume = "hyprctl dispatch dpms on";
         }
-
-        # TODO - suspend after some time
       ];
     };
 
diff --git a/modules/home-manager/hypr/hyprland-customization.nix b/modules/home-manager/hypr/hyprland-customization.nix
index 09701c6..2597f42 100644
--- a/modules/home-manager/hypr/hyprland-customization.nix
+++ b/modules/home-manager/hypr/hyprland-customization.nix
@@ -30,7 +30,7 @@
         "$mod, e, exec, nautilus"
 
         # Lock screen
-        "$mod+Shift, l, exec, hyprlock"
+        "$mod, l, exec, hyprlock"
 
         # Clipboard management
         "$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
@@ -98,7 +98,7 @@
         # hyprpaper is handled as its own service
         "${pkgs.waybar}/bin/waybar"
         # listen to clipboard events and send them to cliphist
-        "wl-paste --watch cliphist stores"
+        "wl-paste --watch cliphist store"
         "${pkgs.waybar}/bin/hypridle"
         "hyprpaper"
         # # Fixes cursor themes in gnome apps under hyprland
diff --git a/modules/home-manager/hypr/hyprlock.nix b/modules/home-manager/hypr/hyprlock.nix
index af9a6b6..63ae625 100644
--- a/modules/home-manager/hypr/hyprlock.nix
+++ b/modules/home-manager/hypr/hyprlock.nix
@@ -1,4 +1,4 @@
-{inputs, pkgs, ...}: 
+{inputs, pkgs, ...}:
 {
   programs.hyprlock = {
     enable = true;
@@ -8,39 +8,28 @@
         no_fade_in = false;
         disable_loading_bar = false;
       };
-      auth = {
-        "pam:enabled" = true;
-      };
+
       background =  {
         blur_passes = 3;
         blur_size = 10;
+        # image is set by stylix
       };
+
       input-field = {
         monitor = "";
         size = "300, 60";
-        outline_thickness = 3;
-        inner_color = "rgba(0, 0, 0, 0.0)";
-
-        outer_color = "rgba(33ccffee) rgba(00ff99ee) 45deg";
-        check_color = "rgba(00ff99ee) rgba(ff6633ee) 120deg";
-        fail_color = "rgba(ff6633ee) rgba(ff0066ee) 40deg";
-
-        font_color = "rgb(143, 143, 143)";
-        fade_on_empty = false;
-        rounding = 15;
-
+        # radius = 15;
         position = "0, -250";
         halign = "center";
         valign = "center";
       };
+
       label = [
         {
           # Day-Month-Date
           monitor = "";
           text = ''cmd[update:1000] echo -e "$(date +"%A, %B %d")"'';
-          # color = foreground;
           font_size = 28;
-          # font_family = font + " Bold";
           position = "0, 490";
           halign = "center";
           valign = "center";
@@ -49,28 +38,13 @@
         {
           monitor = "";
           text = ''cmd[update:1000] echo "<span>$(date +"%I:%M")</span>"'';
-          # color = foreground;
           font_size = 160;
+          font_weight = "bold";
           # font_family = "steelfish outline regular";
           position = "0, 370";
           halign = "center";
           valign = "center";
         }
-        # USER
-        {
-          monitor = "";
-          text = "    $USER";
-          # color = foreground;
-          outline_thickness = 2;
-          dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
-          dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
-          dots_center = true;
-          font_size = 18;
-          # font_family = font + " Bold";
-          position = "0, -180";
-          halign = "center";
-          valign = "center";
-        }
       ];
     };
   };
diff --git a/modules/home-manager/hypr/waybar.nix b/modules/home-manager/hypr/waybar.nix
index 105b1e2..dd1c3a3 100644
--- a/modules/home-manager/hypr/waybar.nix
+++ b/modules/home-manager/hypr/waybar.nix
@@ -6,12 +6,6 @@
     # waybar requires font-awesome
     home.packages = [
         pkgs.pavucontrol
-        # fira code now contains ligatures and font-awesome
-        # TODO - this only works after nixpkgs 25.05
-        # nerd-fonts.fira-code
-        (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
-        pkgs.fira-code
-
     ];
 
     # enable waybar
diff --git a/modules/home-manager/stylix.nix b/modules/home-manager/stylix.nix
index 0a4d6b5..4a12ee7 100644
--- a/modules/home-manager/stylix.nix
+++ b/modules/home-manager/stylix.nix
@@ -16,18 +16,58 @@
         # fonts = {};
 
         iconTheme = {
+            enable = true;
             package = pkgs.tela-icon-theme;
         };
 
         image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
 
+
+        fonts = {
+
+            serif = {
+                package = pkgs.dejavu_fonts;
+                name = "DejaVu Serif";
+            };
+
+            sansSerif = {
+                package = pkgs.dejavu_fonts;
+                name = "DejaVu Sans";
+            };
+
+            monospace = {
+                package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
+                name = "FiraCode Nerd Font Mono";
+            };
+
+            emoji = {
+                package = pkgs.noto-fonts-emoji;
+                name = "Noto Color Emoji";
+            };
+
+            sizes = {
+                applications = 15;
+                desktop = 12;
+                popups = 12;
+                terminal = 15;
+            };
+        };
+
+        opacity = {
+            applications = 1.0;
+            desktop = 1.0;
+            popups = 0.9;
+            terminal = 0.8;
+        };
     };
 
     stylix.targets = {
         vscode.enable = true;
         hyprpaper.enable = true;
+        hyprlock.enable = true;
         waybar.enable = true;
         wofi.enable = true;
         kitty.enable = true;
+
     };
 }