From 996bbead2e635df3b5f1e1cd14903a0a6d78e11c Mon Sep 17 00:00:00 2001 From: cnst Date: Sun, 5 Jan 2025 10:45:55 +0100 Subject: [PATCH] switching to fuzzel for uwsm integration and tuirun still WIP --- flake.lock | 30 +++++------ modules/default.nix | 1 + modules/home/programs/discord/default.nix | 2 + modules/home/programs/fuzzel/default.nix | 57 +++++++++++++++++++++ modules/home/programs/hyprland/keybinds.nix | 4 +- users/cnst/modules/home.nix | 3 ++ users/cnst/modules/options.nix | 8 +++ users/toothpick/modules/home.nix | 3 ++ 8 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 modules/home/programs/fuzzel/default.nix diff --git a/flake.lock b/flake.lock index 6ba41e6a..c3c3c2b9 100644 --- a/flake.lock +++ b/flake.lock @@ -429,11 +429,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1735943291, - "narHash": "sha256-igXLrO0AtN7+k7VaR5zaHaPhDcS3go5NZr4liVqW9g4=", + "lastModified": 1736005074, + "narHash": "sha256-6W7Cg4Lf0/gT4r/Bloj9lwxKw+Txti3Bw1ybrEpn0CA=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "1baf8928a0bd6ccc2f49e1e9478baab71d49a018", + "rev": "8f5f432ab61fa73b77cb61239c0cff34250f77bb", "type": "github" }, "original": { @@ -526,11 +526,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1735958984, - "narHash": "sha256-N9cA4lIJd8+rsdjf5DRyhGhH/ZYYrZlSzY1bx7cGE8o=", + "lastModified": 1736007070, + "narHash": "sha256-/sIqNrVaExdXrfvbbTO39CQ34e68Hq85zhF1x0yDEE4=", "owner": "helix-editor", "repo": "helix", - "rev": "b47b946c47c1f5963e20f45b658016c130e89784", + "rev": "353176082e05696b292ccf65955333bd18deef97", "type": "github" }, "original": { @@ -546,11 +546,11 @@ ] }, "locked": { - "lastModified": 1735979091, - "narHash": "sha256-WpFjt6+8UD81EP386c269ZTqpEmlGJgcPw+OB4b7EBs=", + "lastModified": 1736013363, + "narHash": "sha256-P4lsS2Y5GzBfC8OfXtD/xWEucX6oHGTjOzjEjEJbXfc=", "owner": "nix-community", "repo": "home-manager", - "rev": "11ab08541e61ac3bbf2ab27229f68622629401df", + "rev": "0d7908bd09165db6699908b7e3970f137327cbf0", "type": "github" }, "original": { @@ -766,11 +766,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1735946701, - "narHash": "sha256-jCIIiEjgIs02N36fJCd+aU7QiqqdMWokfpFWO+sTdn0=", + "lastModified": 1736008833, + "narHash": "sha256-1Fej194tgc7Cqb1A07d9HLQ++l/+nxO+FAb536mwOSk=", "owner": "hyprwm", "repo": "hyprland", - "rev": "60f069d54015fec66e63f1ff7e6ff26ddb349976", + "rev": "b0bae15499ad57bbfeae8be958df8c022201e583", "type": "github" }, "original": { @@ -905,11 +905,11 @@ ] }, "locked": { - "lastModified": 1735945036, - "narHash": "sha256-GHO0t06PgKyyZjGNwpsO+Mmwf22frDI8uGRJNXp9z50=", + "lastModified": 1736008364, + "narHash": "sha256-8gC5tgoJmvPsV2nuCpbt0p9m1+OqZ1aAd16R6y9PlYo=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "c3d95953c07f02810dfadf89fd8d3306e029b5dd", + "rev": "8f68fad50aa07f1220961d1d23942565e7562d8d", "type": "github" }, "original": { diff --git a/modules/default.nix b/modules/default.nix index c9a8cb10..4ad0df7f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,6 +13,7 @@ ./home/programs/firefox ./home/programs/fish ./home/programs/foot + ./home/programs/fuzzel ./home/programs/helix ./home/programs/hyprland ./home/programs/hyprlock diff --git a/modules/home/programs/discord/default.nix b/modules/home/programs/discord/default.nix index 9f4a7e41..9153a557 100644 --- a/modules/home/programs/discord/default.nix +++ b/modules/home/programs/discord/default.nix @@ -5,6 +5,8 @@ ... }: let inherit (lib) mkIf mkOption mkEnableOption types; + # Workaround for https://github.com/GooseMod/OpenAsar/issues/202 + # Needlessly complicated, but it's dynamic! :D variantMapping = { stable = { dir = "discord"; diff --git a/modules/home/programs/fuzzel/default.nix b/modules/home/programs/fuzzel/default.nix new file mode 100644 index 00000000..be438efe --- /dev/null +++ b/modules/home/programs/fuzzel/default.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + osConfig, + inputs, + ... +}: let + inherit (lib) mkIf mkEnableOption mkMerge; + cfg = config.home.programs.fuzzel; + host = osConfig.networking.hostName; +in { + options = { + home.programs.fuzzel.enable = mkEnableOption "Enables fuzzel"; + }; + config = mkIf cfg.enable (mkMerge [ + { + programs.fuzzel = { + enable = true; + settings = { + main = { + layer = "overlay"; + font = "Input Sans Narrow Light:size=12"; + launch-prefix = "uwsm app --"; + lines = "8"; + }; + colors = { + background = "282828ff"; + text = "928374ff"; + prompt = "ebdbb2ff"; + placeholder = "928374ff"; + input = "ebdbb2ff"; + match = "ebdbb2ff"; + selection = "32302fff"; + selection-text = "ebdbb2ff"; + selection-match = "ebdbb2ff"; + counter = "4c7a5dff"; + border = "4c7a5dff"; + }; + border = { + width = 3; + radius = 0; + }; + }; + }; + } + (mkIf (host == "cnix") { + programs.fuzzel.settings.main.terminal = "${inputs.ghostty.packages.x86_64-linux.default}/bin/ghostty"; + }) + (mkIf (host == "cnixpad") { + programs.fuzzel.settings.main.terminal = "${pkgs.foot}/bin/foot"; + }) + (mkIf (host == "toothpc") { + programs.fuzzel.settings.main.terminal = "${pkgs.alacritty}/bin/alacritty"; + }) + ]); +} diff --git a/modules/home/programs/hyprland/keybinds.nix b/modules/home/programs/hyprland/keybinds.nix index 4720f1dd..660a7acb 100644 --- a/modules/home/programs/hyprland/keybinds.nix +++ b/modules/home/programs/hyprland/keybinds.nix @@ -24,10 +24,10 @@ in { # Common Keybind Variables "$fileManager" = "thunar"; "$yazi" = "foot -e yazi"; - "$launcher" = "rofi -show drun"; + "$launcher" = "fuzzel"; bind = [ - "$mod, SPACE, exec, tuirun-toggle.sh" + "$mod, SPACE, exec, $launcher" "$mod, R, exec, $launcher" "$mod, L, exec, ${toggle "nwg-bar"}" "$mod SHIFT, B, exec, pkill -SIGUSR2 waybar" diff --git a/users/cnst/modules/home.nix b/users/cnst/modules/home.nix index 8cd0ec68..a0095bcf 100644 --- a/users/cnst/modules/home.nix +++ b/users/cnst/modules/home.nix @@ -35,6 +35,9 @@ foot = { enable = true; }; + fuzzel = { + enable = true; + }; helix = { enable = true; }; diff --git a/users/cnst/modules/options.nix b/users/cnst/modules/options.nix index 4e253c81..2cd639d8 100644 --- a/users/cnst/modules/options.nix +++ b/users/cnst/modules/options.nix @@ -9,6 +9,14 @@ workspace = "1"; primary = true; } + { + name = "DP-4"; + width = 1920; + height = 1080; + refreshRate = 60; + workspace = "2"; + primary = false; + } { name = "eDP-1"; width = 1920; diff --git a/users/toothpick/modules/home.nix b/users/toothpick/modules/home.nix index f1658701..5e3af1af 100644 --- a/users/toothpick/modules/home.nix +++ b/users/toothpick/modules/home.nix @@ -25,6 +25,9 @@ foot = { enable = true; }; + fuzzel = { + enable = true; + }; helix = { enable = true; };