From c604816aa94fa5fedff4aa2da311712f3fc8285d Mon Sep 17 00:00:00 2001 From: kenji Date: Thu, 25 Dec 2025 00:41:44 -0600 Subject: [PATCH] fix: dynamic wallpaper --- apps/ghostty/home.nix | 51 +++++++++++++- apps/hyprland/hypr/exec.nix | 10 ++- apps/stylix/home.nix | 14 ++++ apps/walker/home.nix | 79 ++++++--------------- config.nix | 1 + flake.lock | 135 ++++++++++++++++++++++++++++++++---- flake.nix | 6 ++ 7 files changed, 221 insertions(+), 75 deletions(-) diff --git a/apps/ghostty/home.nix b/apps/ghostty/home.nix index dd613ff..2407c1c 100644 --- a/apps/ghostty/home.nix +++ b/apps/ghostty/home.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + config, + pkgs, + ... +}: { programs.ghostty = { enable = true; package = @@ -6,10 +10,55 @@ then pkgs.ghostty-bin else pkgs.ghostty; enableFishIntegration = true; + settings = { window-padding-x = 15; window-padding-y = 15; window-padding-balance = true; + + # --- The Dynamic Hook (Keep this for your script!) --- + # This allows your 'switch-theme' script to override the colors below on the fly. + # config-file = "theme.conf"; + + # --- Base16 Color Mapping (The "Starship Logic") --- + # We map the Stylix Base16 palette to Ghostty's specific keys. + + # Background (surface0 in your Starship config) + # background = "${config.lib.stylix.colors.withHashtag.base00}"; + # + # # Foreground (text in your Starship config) + # foreground = "${config.lib.stylix.colors.withHashtag.base05}"; + # + # # Cursor (Using text color or Rosewater/Base06) + # cursor-color = "${config.lib.stylix.colors.withHashtag.base05}"; + # cursor-text = "${config.lib.stylix.colors.withHashtag.base00}"; + # + # # Selection (Highlight) + # selection-background = "${config.lib.stylix.colors.withHashtag.base02}"; + # selection-foreground = "${config.lib.stylix.colors.withHashtag.base05}"; + # + # # --- The ANSI Palette (0-15) --- + # # Mapping Base16 -> ANSI + # # This ensures your 'ls', 'grep', and Starship colors align perfectly. + # palette = [ + # "0=${config.lib.stylix.colors.withHashtag.base00}" # Black + # "1=${config.lib.stylix.colors.withHashtag.base08}" # Red + # "2=${config.lib.stylix.colors.withHashtag.base0B}" # Green + # "3=${config.lib.stylix.colors.withHashtag.base0A}" # Yellow + # "4=${config.lib.stylix.colors.withHashtag.base0D}" # Blue + # "5=${config.lib.stylix.colors.withHashtag.base0E}" # Purple (Lavender) + # "6=${config.lib.stylix.colors.withHashtag.base0C}" # Cyan (Sapphire) + # "7=${config.lib.stylix.colors.withHashtag.base05}" # White + # + # "8=${config.lib.stylix.colors.withHashtag.base03}" # Bright Black + # "9=${config.lib.stylix.colors.withHashtag.base08}" # Bright Red + # "10=${config.lib.stylix.colors.withHashtag.base0B}" # Bright Green + # "11=${config.lib.stylix.colors.withHashtag.base0A}" # Bright Yellow + # "12=${config.lib.stylix.colors.withHashtag.base0D}" # Bright Blue + # "13=${config.lib.stylix.colors.withHashtag.base0E}" # Bright Purple + # "14=${config.lib.stylix.colors.withHashtag.base0C}" # Bright Cyan + # "15=${config.lib.stylix.colors.withHashtag.base07}" # Bright White + # ]; }; }; } diff --git a/apps/hyprland/hypr/exec.nix b/apps/hyprland/hypr/exec.nix index 92b13b2..779a71a 100644 --- a/apps/hyprland/hypr/exec.nix +++ b/apps/hyprland/hypr/exec.nix @@ -1,8 +1,16 @@ -{ +{pkgs, ...}: { + home.packages = with pkgs; [ + psmisc + ]; wayland.windowManager.hyprland.settings = { exec-once = [ "uwsm app -- waybar" "uwsm app -- hyprpaper" + "uwsm app -- elephant" + ]; + exec = [ + "pkill -x hyprpaper; uwsm app -- hyprpaper" + "killall -SIGUSR2 .ghostty-wrappe" ]; }; } diff --git a/apps/stylix/home.nix b/apps/stylix/home.nix index 9cb7280..15598c2 100644 --- a/apps/stylix/home.nix +++ b/apps/stylix/home.nix @@ -1,4 +1,5 @@ { + pkgs, inputs, myConfig, lib, @@ -8,6 +9,13 @@ inputs.stylix.homeModules.stylix ]; stylix = { + autoEnable = false; + targets = { + waybar.enable = true; + ghostty.enable = true; + hyprpaper.enable = true; + gtk.enable = true; + }; enable = true; # autoEnable = false; image = ../../assets/Wallpapers/${myConfig.hyprland.wallpaper}; @@ -15,5 +23,11 @@ # base16Scheme = lib.mkDefault { # generator = "vibrant"; # }; + iconTheme = { + enable = true; + package = pkgs.papirus-icon-theme; # The package to install + dark = "Papirus-Dark"; # The theme name for dark mode + light = "Papirus-Light"; # The theme name for light mode + }; }; } diff --git a/apps/walker/home.nix b/apps/walker/home.nix index 6abd4b7..90c8a37 100644 --- a/apps/walker/home.nix +++ b/apps/walker/home.nix @@ -1,74 +1,37 @@ { + inputs, config, pkgs, ... }: { - services.walker = { + imports = [inputs.walker.homeManagerModules.default]; + + programs.walker = { enable = true; - settings = { - force_keyboard_focus = true; - selection_wrap = true; - hide_action_hints = true; + runAsService = true; - theme = "default"; + package = inputs.walker.packages.${pkgs.system}.default; - placeholders = { - "default" = { - input = " Search..."; - list = "No Results"; - }; + config = { + icons.theme = config.gtk.iconTheme.name; + + placeholders.default = { + input = "Search"; + list = "No Results"; }; - keybinds = { - quick_activate = []; - }; - - columns = { - symbols = 1; - }; - - providers = { - max_results = 256; - default = [ - "desktopapplications" - "websearch" - ]; - - # Prefixes for specific searches - prefixes = [ - { - prefix = "/"; - provider = "providerlist"; - } - { - prefix = "."; - provider = "files"; - } - { - prefix = ":"; - provider = "symbols"; - } - { - prefix = "="; - provider = "calc"; - } - { - prefix = "@"; - provider = "websearch"; - } - { - prefix = "$"; - provider = "clipboard"; - } - ]; - }; - - emergencies = [ + providers.prefixes = [ { - text = "Restart Walker"; - command = "pkill walker && walker --daemon"; + provider = "websearch"; + prefix = "+"; + } + { + provider = "providerlist"; + prefix = "_"; } ]; + + keybinds.quick_activate = ["F1" "F2" "F3"]; }; }; } diff --git a/config.nix b/config.nix index f4da136..52b16e5 100644 --- a/config.nix +++ b/config.nix @@ -32,6 +32,7 @@ }; hyprland = { monitors = ["HDMI-A-1, 1920x1080@120, auto, 1"]; + # wallpaper = "nixos_rainbow.png"; wallpaper = "kanagawa.jpg"; }; firefox = { diff --git a/flake.lock b/flake.lock index a2b2887..4a1d63e 100644 --- a/flake.lock +++ b/flake.lock @@ -101,6 +101,25 @@ "type": "github" } }, + "elephant": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1766069388, + "narHash": "sha256-PSFrMcVBKV+TiEgLyt2EPxOTlzmIPers+HFgh+cxkJs=", + "owner": "abenz1267", + "repo": "elephant", + "rev": "8fa6fc252ebfa92c4175dd41827df9ab5c196003", + "type": "github" + }, + "original": { + "owner": "abenz1267", + "repo": "elephant", + "type": "github" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -344,7 +363,7 @@ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", + "systems": "systems_2", "xdph": "xdph" }, "locked": { @@ -619,16 +638,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "lastModified": 1764242076, + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -646,6 +665,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1766309749, "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", @@ -661,6 +696,22 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1757068644, + "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": "flake-parts_2", @@ -668,7 +719,7 @@ "nixovim", "nixpkgs" ], - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1766443759, @@ -734,17 +785,19 @@ }, "root": { "inputs": { + "elephant": "elephant", "home-manager": "home-manager", "hyprland": "hyprland", "nixovim": "nixovim", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "sops-nix": "sops-nix", - "stylix": "stylix" + "stylix": "stylix", + "walker": "walker" } }, "rust-overlay": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1766544144, @@ -793,7 +846,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_3", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -831,16 +884,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -859,6 +912,36 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -940,6 +1023,28 @@ "type": "github" } }, + "walker": { + "inputs": { + "elephant": [ + "elephant" + ], + "nixpkgs": "nixpkgs_4", + "systems": "systems_5" + }, + "locked": { + "lastModified": 1766324177, + "narHash": "sha256-7Y8Pqn12ovZ2nH1y+rxMbliUPhY4cu/iB0cwSNHTMZY=", + "owner": "abenz1267", + "repo": "walker", + "rev": "fb6152710c450a4b81342db42857de4aea049716", + "type": "github" + }, + "original": { + "owner": "abenz1267", + "repo": "walker", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index 14a8cf2..1942655 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "Hakase Configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + elephant.url = "github:abenz1267/elephant"; home-manager = { url = "github:nix-community/home-manager"; @@ -24,6 +25,11 @@ url = "github:nix-community/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + walker = { + url = "github:abenz1267/walker"; + inputs.elephant.follows = "elephant"; + }; }; outputs = {