From 8fb86f18f750e24b505a17df953d772c8ac81432 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Wed, 16 Oct 2024 22:27:00 -0700 Subject: [PATCH] hyprlock fix --- README.md | 4 ++-- flake.lock | 45 ++++++++++++------------------------ flake.nix | 3 ++- modules/desktop/hyprland.nix | 2 +- modules/desktop/hyprlock.nix | 4 ++-- modules/desktop/waybar.nix | 2 +- 6 files changed, 23 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index f535b47..4224b68 100755 --- a/README.md +++ b/README.md @@ -18,6 +18,6 @@ each host should have these files: - multi architecture configuration ([nix-systems](https://github.com/nix-systems/nix-systems)?) - divide steam and gamemode? - hidpi and cursor size option - - better theming for hyprlock, nwg-drawer, dunst - - why is hyprlock broken??? + - better theming for hyprlock, nwg-drawer, dunst, rofi (specifically accent for catppuccin) + - remove battery ui in hyprlock if user isnt on laptop - wallpaper cycling \ No newline at end of file diff --git a/flake.lock b/flake.lock index 2ea8f91..dc7104f 100644 --- a/flake.lock +++ b/flake.lock @@ -350,11 +350,11 @@ ] }, "locked": { - "lastModified": 1717881852, - "narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=", + "lastModified": 1728168612, + "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "ec6938c66253429192274d612912649a0cfe4d28", + "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", "type": "github" }, "original": { @@ -367,21 +367,22 @@ "inputs": { "hyprlang": "hyprlang_3", "hyprutils": "hyprutils_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": [ + "nixpkgs" + ], "systems": "systems_3" }, "locked": { - "lastModified": 1720707332, - "narHash": "sha256-OpUjVqJIxuouqUMmOAQI63XEOVk5EYyHwFVWdyrUdC8=", + "lastModified": 1728821111, + "narHash": "sha256-3dDOBfFkmusoF+6LWXkvQaSfzXb0DEqMEQQvEBbjN9Q=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "b407128caeb551ae808cf8d0fb653a252a271709", + "rev": "11694528b4e0af597f25a5308d6872afd0b06807", "type": "github" }, "original": { "owner": "hyprwm", "repo": "hyprlock", - "rev": "b407128caeb551ae808cf8d0fb653a252a271709", "type": "github" } }, @@ -447,11 +448,11 @@ ] }, "locked": { - "lastModified": 1717881334, - "narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=", + "lastModified": 1727300645, + "narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e", + "rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c", "type": "github" }, "original": { @@ -584,22 +585,6 @@ } }, "nixpkgs_4": { - "locked": { - "lastModified": 1717602782, - "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { "locked": { "lastModified": 1728241625, "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=", @@ -615,7 +600,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1720957393, "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=", @@ -665,7 +650,7 @@ "hyprland-catppuccin": "hyprland-catppuccin", "hyprlock": "hyprlock", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "waybar": "waybar", "waybar-catppuccin": "waybar-catppuccin" } @@ -718,7 +703,7 @@ "waybar": { "inputs": { "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1721250245, diff --git a/flake.nix b/flake.nix index 8c6503f..568d5e5 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,8 @@ # hypr suite hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - hyprlock.url = "github:hyprwm/hyprlock?rev=b407128caeb551ae808cf8d0fb653a252a271709"; + hyprlock.url = "github:hyprwm/hyprlock"; + hyprlock.inputs.nixpkgs.follows = "nixpkgs"; hypridle.url = "github:hyprwm/hypridle"; waybar-catppuccin.url = "github:catppuccin/waybar"; diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 7613c31..bd7c806 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -269,7 +269,7 @@ in { blur = { enabled = true; - size = 10; + size = 6; passes = 3; # popups and special workspace have blur disabled by default popups = true; diff --git a/modules/desktop/hyprlock.nix b/modules/desktop/hyprlock.nix index e5dc572..861ccb7 100644 --- a/modules/desktop/hyprlock.nix +++ b/modules/desktop/hyprlock.nix @@ -25,7 +25,7 @@ in { hide_cursor = false; no_fade_in = true; no_fade_out = true; - text_trim = false; + text_trim = true; }; background = [ { @@ -90,7 +90,7 @@ in { color = "rgb(${base05})"; font_size = 14; font_family = config.modules.desktop.fonts.fonts.sansSerif.family; - text = "cmd[update:4000] echo \"$(cat /sys/class/power_supply/BAT0/capacity)%\""; + text = "cmd[update:4000] echo \"$(${lib.getExe pkgs.acpi} -b | grep -oP \"\\d+%\" | head -n 1)\""; shadow_passes = 3; shadow_size = 8; diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix index 198d054..b4ebce0 100644 --- a/modules/desktop/waybar.nix +++ b/modules/desktop/waybar.nix @@ -188,7 +188,7 @@ in { warning = 20; critical = 10; }; - full-at = 98; + design-capacity = false; format = "{icon} {capacity}%"; format-icons = ["" "" "" "" ""]; format-critical = " {capacity}%";