From aabffc2a7519712cccdfdc6172c4dcd547b8741a Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Wed, 16 Oct 2024 19:16:40 -0700 Subject: [PATCH 1/5] adjust waybar pulseaudio module --- modules/desktop/waybar.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/desktop/waybar.nix b/modules/desktop/waybar.nix index d3d3200..198d054 100644 --- a/modules/desktop/waybar.nix +++ b/modules/desktop/waybar.nix @@ -151,11 +151,6 @@ in { format-muted = "婢 {volume}%"; format-icons = { headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; default = ["" "" ""]; }; scroll-step = 1; From 8fb86f18f750e24b505a17df953d772c8ac81432 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Wed, 16 Oct 2024 22:27:00 -0700 Subject: [PATCH 2/5] 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}%"; From 5e2957d8a82b08ecc452980e36e505dd08a6291f Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Mon, 21 Oct 2024 15:51:30 -0700 Subject: [PATCH 3/5] add grim to software --- hosts/goopnet-interface/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index ca36ac8..9c4ee15 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -21,7 +21,7 @@ # compatibility wineWowPackages.waylandFull winetricks # misc - bat file which packwiz yt-dlp wl-screenrec wl-clipboard + bat file which packwiz yt-dlp wl-screenrec wl-clipboard grim # games prismlauncher ] ++ (with pkgs.my; [ From d2b1dbdb585fc0c6bc89d9e1b7f7d9766799eae4 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Mon, 21 Oct 2024 16:05:35 -0700 Subject: [PATCH 4/5] flatpak --- hosts/goopnet-interface/default.nix | 1 + modules/software/system/flatpak.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 modules/software/system/flatpak.nix diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index 9c4ee15..ff32451 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -73,6 +73,7 @@ system.wezterm.enable = true; system.fish.enable = true; system.syncthing.enable = true; + system.flatpak.enable = true; # editors editors.micro.enable = true; editors.vscode.enable = true; diff --git a/modules/software/system/flatpak.nix b/modules/software/system/flatpak.nix new file mode 100644 index 0000000..f6a915b --- /dev/null +++ b/modules/software/system/flatpak.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, ... }: + +with lib; +let + cfg = config.modules.software.system.flatpak; +in { + options.modules.software.system.flatpak = { + enable = mkEnableOption "Enable flatpak, an application sandboxing and distribution framework"; + }; + + config = mkIf cfg.enable { + services.flatpak.enable = true; + hm.home.packages = [ pkgs.flatpak ]; + fonts.fontDir.enable = true; + }; +} \ No newline at end of file From e2f99e576b7dcb337707a9bc44b897b778af9308 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Mon, 21 Oct 2024 23:15:37 -0700 Subject: [PATCH 5/5] slightly nixify dunst --- README.md | 2 +- config/dunst.conf | 67 -------------------------------- modules/desktop/dunst.nix | 75 +++++++++++++++++++++++++++++++++++- modules/desktop/hyprlock.nix | 4 +- 4 files changed, 77 insertions(+), 71 deletions(-) delete mode 100644 config/dunst.conf diff --git a/README.md b/README.md index 4224b68..8737fc9 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, rofi (specifically accent for catppuccin) + - better theming for hyprlock, nwg-drawer, dunst, rofi (specifically accent for catppuccin on dunst and rofi and catppuccin) - remove battery ui in hyprlock if user isnt on laptop - wallpaper cycling \ No newline at end of file diff --git a/config/dunst.conf b/config/dunst.conf deleted file mode 100644 index ffc6b82..0000000 --- a/config/dunst.conf +++ /dev/null @@ -1,67 +0,0 @@ -# https://github.com/catppuccin/dunst/blob/main/src/mocha.conf -[global] -frame_color = "#f5c2e7" -separator_color = frame - -follow = "mouse" -width = 300 -height = 145 -origin = top-right -alignment = "left" -vertical_alignment = "center" -ellipsize = "middle" -offset = "15x15" -padding = 15 -horizontal_padding = 15 -text_icon_padding = 15 -icon_position = "left" -min_icon_size = 48 -max_icon_size = 64 -progress_bar = true -progress_bar_height = 8 -progress_bar_frame_width = 1 -progress_bar_min_width = 150 -progress_bar_max_width = 300 -separator_height = 2 -frame_width = 1 -corner_radius = 8 -transparency = 1 -gap_size = 8 -line_height = 0 -markup = "full" -format = "%a\n%s\n%b" -font = "Atkinson Hyperlegible Pro 11" -word_wrap = "yes" -ignore_newline = "no" -ignore_dbusclose = false -mouse_left_click = "do_action, close_current" -mouse_middle_click = "close_all" -mouse_right_click = "close_current" - -sort = "update" -shrink = "no" - -notification_limit = 4 -indicate_hidden = "yes" -idle_threshold = 120 -history_length = 20 -show_age_threshold = 60 -sticky_history = "yes" -show_indicators = "yes" -stack_duplicates = true -hide_duplicate_count = false -always_run_script = true - -[urgency_low] -background = "#1E1E2E30" -foreground = "#CDD6F4" - -[urgency_normal] -background = "#1E1E2E30" -foreground = "#CDD6F4" - -[urgency_critical] -background = "#1E1E2E30" -foreground = "#CDD6F4" -frame_color = "#FAB387" - diff --git a/modules/desktop/dunst.nix b/modules/desktop/dunst.nix index d5d56c1..5059db4 100644 --- a/modules/desktop/dunst.nix +++ b/modules/desktop/dunst.nix @@ -11,7 +11,80 @@ in { config = mkIf cfg.enable { hm.services.dunst = { enable = true; - configFile = ../../config/dunst.conf; + settings = with config.colorScheme.palette; { + global = { + follow = "mouse"; + width = 300; + height = 145; + frame_color = "#f5c2e7"; # catppuccin pink + + origin = "top-right"; + vertical_alignment = "center"; + ellipsize = "middle"; + + # various non-color theming settings + offset = "15x15"; + padding = 15; + horizontal_padding = 15; + text_icon_padding = 15; + corner_radius = 8; + gap_size = 8; + frame_width = 1; + transparency = 1; + + icon_position = "left"; + min_icon_size = 48; + max_icon_size = 64; + + progress_bar = true; + progress_bar_height = 8; + progress_bar_frame_width = 1; + progress_bar_min_width = 150; + progress_bar_max_width = 300; + + alignment = "left"; + markup = "full"; + format = "%a\\n%s\\n%b"; + font = with config.modules.desktop.fonts.fonts; "${sansSerif.family} ${toString sansSerif.size}"; + word_wrap = "yes"; + + ignore_newline = "no"; + ignore_dbusclose = false; + + mouse_left_click = "do_action, close_current"; + mouse_middle_click = "close_all"; + mouse_right_click = "close_current"; + + # sorting and history settings + sort = "update"; + notification_limit = 4; + indicate_hidden = "yes"; + idle_threshold = 120; + history_length = 20; + show_age_threshold = 60; + show_indicators = "yes"; + sticky_history = "yes"; + stack_duplicates = true; + hide_duplicate_count = false; + always_run_script = true; + }; + + urgency_low = { + background = "#${base00}30"; + foreground = "#${base05}"; + }; + + urgency_normal = { + background = "#${base00}30"; + foreground = "#${base05}"; + }; + + urgency_critical = { + background = "#${base00}30"; + foreground = "#${base05}"; + frame_color = "#${base08}"; # base16 spec says red + }; + }; }; }; } diff --git a/modules/desktop/hyprlock.nix b/modules/desktop/hyprlock.nix index 861ccb7..cfdbb13 100644 --- a/modules/desktop/hyprlock.nix +++ b/modules/desktop/hyprlock.nix @@ -16,11 +16,11 @@ in { config = mkIf cfg.enable { security.pam.services.hyprlock.text = "auth include login"; hm.home.packages = [ cfg.package ]; - hm.programs.hyprlock = with config.colorScheme.palette; { + hm.programs.hyprlock = { enable = true; package = cfg.package; - settings = { + settings = with config.colorScheme.palette; { general = { hide_cursor = false; no_fade_in = true;