Add styling to anyrun app launcher

This adds some styling for anyrun and allows it to be disabled via
chimera.runner.anyrun.enable. We now also set the menu dynamically
for hyprland

Change-Id: I7d3858650d884d2c951f98f6311ff136e3b261e7
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/518
Reviewed-by: Skyler Grey <minion@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/home/anyrun/default.nix b/modules/home/anyrun/default.nix
deleted file mode 100644
index 837324c..0000000
--- a/modules/home/anyrun/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  inputs,
-  pkgs,
-  system,
-  ...
-}:
-{
-  programs.anyrun = {
-    enable = true;
-    config = {
-      plugins = [
-        inputs.anyrun.packages.${system}.applications
-        inputs.anyrun.packages.${system}.rink
-        inputs.anyrun.packages.${system}.shell
-        inputs.anyrun.packages.${system}.translate
-        inputs.anyrun.packages.${system}.kidex
-        inputs.anyrun.packages.${system}.symbols
-      ];
-    };
-  };
-}
diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix
index 539523b..fce3e84 100644
--- a/modules/home/hyprland/default.nix
+++ b/modules/home/hyprland/default.nix
@@ -82,7 +82,7 @@
         let
           mod = "SUPER";
           terminal = "${pkgs.kitty}/bin/kitty";
-          menu = "${inputs.anyrun.packages.${system}.anyrun}/bin/anyrun";
+          menu = (if config.chimera.runner.anyrun.enable then "${inputs.anyrun.packages.${system}.anyrun}/bin/anyrun" else "");
         in
         {
           misc = {
@@ -148,8 +148,8 @@
               "${mod}, right, movefocus, r"
               "${mod}, left, movefocus, l"
               "${mod}, L, exec, ${lock}"
-              "${mod}, D, exec, ${menu}"
             ]
+            ++ (if config.chimera.runner.enable then [ "${mod}, D, exec, ${menu}" ] else [])
             ++ (builtins.concatLists (
               builtins.genList
                 (
diff --git a/modules/home/runner/anyrun/default.nix b/modules/home/runner/anyrun/default.nix
new file mode 100644
index 0000000..8561b93
--- /dev/null
+++ b/modules/home/runner/anyrun/default.nix
@@ -0,0 +1,81 @@
+{
+  inputs,
+  pkgs,
+  system,
+  lib,
+  config,
+  ...
+}:
+{
+  options.chimera.runner.anyrun = {
+    enable = lib.mkOption {
+      type = lib.types.bool;
+      default = true;
+      description = "Whether or not to enable the anyrun runner";
+    };
+  };
+
+  config = {
+    chimera.runner.enable = lib.mkIf config.chimera.runner.anyrun.enable true;
+
+    programs.anyrun = {
+      enable = true;
+      config = {
+        plugins = [
+          inputs.anyrun.packages.${system}.applications
+          inputs.anyrun.packages.${system}.rink
+          inputs.anyrun.packages.${system}.shell
+          inputs.anyrun.packages.${system}.translate
+          inputs.anyrun.packages.${system}.kidex
+          inputs.anyrun.packages.${system}.symbols
+        ];
+
+        # Styling as it's top level for some reason
+        x = { fraction = 0.5; };
+        y = { fraction = 0.3; };
+        width = { fraction = 0.3; };
+        closeOnClick = true;
+
+      };
+      extraCss = ''
+      #window {
+        background-color: transparent;
+      }
+      #main * {
+        background-color: #${config.chimera.theme.colors.Surface0.hex};
+        color: #${config.chimera.theme.colors.Text.hex};
+        caret-color: alpha(#${config.chimera.theme.colors.Accent.hex},0.6);
+        font-family: ${config.chimera.theme.font.variableWidth.sansSerif.name};
+      }
+      #main {
+        border-width: 1px;
+        border-style: solid;
+        border-color: #${config.chimera.theme.colors.Accent.hex};
+        border-radius: 5px;
+      }
+      #main #main {
+        border-style: none;
+        border-bottom-left-radius: 5px;
+        border-bottom-right-radius: 5px;
+      }
+      #match-title, #match-desc {
+        font-family: ${config.chimera.theme.font.variableWidth.sansSerif.name};
+      }
+      #entry {
+        min-height: 36px;
+        padding: 10px;
+        font-size: 24px;
+        box-shadow: none;
+        border-style: none;
+      }
+      #entry:focus {
+        box-shadow: none;
+      }
+      #entry selection {
+        background-color: alpha(#${config.chimera.theme.colors.Yellow.hex},0.3);
+        color: transparent;
+      }
+      '';
+    };
+  };
+}
diff --git a/modules/home/runner/default.nix b/modules/home/runner/default.nix
new file mode 100644
index 0000000..04c10b1
--- /dev/null
+++ b/modules/home/runner/default.nix
@@ -0,0 +1,5 @@
+{ lib, config, ... }: {
+  options = {
+    chimera.runner.enable = lib.mkEnableOption "Enable an app runner on the system";
+  };
+}
\ No newline at end of file