diff --git a/flake.lock b/flake.lock index 5067914a..88422e5c 100644 --- a/flake.lock +++ b/flake.lock @@ -33,17 +33,17 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1755604323, - "narHash": "sha256-PKxVhfjd2AlzTopuVEx5DJMC4R7LnM5NIoMmirKMsKI=", + "lastModified": 1756708978, + "narHash": "sha256-01XBO8U2PyhhYXo3oZAu7dghqXkxdemeG82MqnNp4wE=", "owner": "anyrun-org", "repo": "anyrun", - "rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd", + "rev": "b6d08eea668feb8c183ee2a1822f909949792676", "type": "github" }, "original": { "owner": "anyrun-org", + "ref": "v25.9.0", "repo": "anyrun", - "rev": "af1ffe4f17921825ff2a773995604dce2b2df3cd", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 0a381563..17471b7d 100644 --- a/flake.nix +++ b/flake.nix @@ -80,7 +80,7 @@ # anyrun - a wayland launcher anyrun = { - url = "github:/anyrun-org/anyrun/af1ffe4f17921825ff2a773995604dce2b2df3cd"; + url = "github:/anyrun-org/anyrun/v25.9.0"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/home/linux/gui/base/desktop/anyrun.nix b/home/linux/gui/base/desktop/anyrun.nix index 08cc3dad..27e984a9 100644 --- a/home/linux/gui/base/desktop/anyrun.nix +++ b/home/linux/gui/base/desktop/anyrun.nix @@ -8,6 +8,19 @@ let anyrunPackages = anyrun.packages.${pkgs.system}; in { + + imports = [ + ( + { modulesPath, ... }: + { + # Important! We disable home-manager's module to avoid option + # definition collisions + disabledModules = [ "${modulesPath}/programs/anyrun.nix" ]; + } + ) + anyrun.homeManagerModules.default + ]; + programs.anyrun = { enable = true; # The package should come from the same flake as all the plugins to avoid breakage. @@ -42,118 +55,12 @@ in ]; }; - extraConfigFiles."applications.ron".text = '' - Config( - // Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf - desktop_actions: true, - - max_entries: 5, - - // The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used - // to determine what terminal to use. - terminal: Some(Terminal( - // The main terminal command - command: "alacritty", - // What arguments should be passed to the terminal process to run the command correctly - // {} is replaced with the command in the desktop entry - args: "-e {}", - )), - ) - ''; - - extraConfigFiles."symbols.ron".text = '' - Config( - // The prefix that the search needs to begin with to yield symbol results - prefix: "", - // Custom user defined symbols to be included along the unicode symbols - symbols: { - // "name": "text to be copied" - "shrug": "¯\\_(ツ)_/¯", - }, - max_entries: 3, - ) - ''; - - # https://github.com/anyrun-org/anyrun/discussions/179 - extraCss = '' - /* GTK Vars */ - @define-color bg-color #313244; - @define-color fg-color #cdd6f4; - @define-color primary-color #89b4fa; - @define-color secondary-color #cba6f7; - @define-color border-color @primary-color; - @define-color selected-bg-color @primary-color; - @define-color selected-fg-color @bg-color; - - * { - all: unset; - font-family: JetBrainsMono Nerd Font; - } - - #window { - background: transparent; - } - - box#main { - border-radius: 16px; - background-color: alpha(@bg-color, 0.8); - border: 0.5px solid alpha(@fg-color, 0.25); - } - - entry#entry { - font-size: 1.25rem; - background: transparent; - box-shadow: none; - border: none; - border-radius: 16px; - padding: 16px 24px; - min-height: 40px; - caret-color: @primary-color; - } - - list#main { - background-color: transparent; - } - - #plugin { - background-color: transparent; - padding-bottom: 4px; - } - - #match { - font-size: 1.1rem; - padding: 2px 4px; - } - - #match:selected, - #match:hover { - background-color: @selected-bg-color; - color: @selected-fg-color; - } - - #match:selected label#info, - #match:hover label#info { - color: @selected-fg-color; - } - - #match:selected label#match-desc, - #match:hover label#match-desc { - color: alpha(@selected-fg-color, 0.9); - } - - #match label#info { - color: transparent; - color: @fg-color; - } - - label#match-desc { - font-size: 1rem; - color: @fg-color; - } - - label#plugin { - font-size: 16px; - } - ''; + extraConfigFiles = { + "symbols.ron".source = ./conf/anyrun/symbols.ron; + "applications.ron".source = ./conf/anyrun/applications.ron; + }; }; + + # https://github.com/anyrun-org/anyrun/discussions/179 + xdg.configFile."anyrun/style.css".source = ./conf/anyrun/style.css; } diff --git a/home/linux/gui/base/desktop/conf/anyrun/applications.ron b/home/linux/gui/base/desktop/conf/anyrun/applications.ron new file mode 100644 index 00000000..86012931 --- /dev/null +++ b/home/linux/gui/base/desktop/conf/anyrun/applications.ron @@ -0,0 +1,16 @@ +Config( + // Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf + desktop_actions: true, + + max_entries: 5, + + // The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used + // to determine what terminal to use. + terminal: Some(Terminal( + // The main terminal command + command: "alacritty", + // What arguments should be passed to the terminal process to run the command correctly + // {} is replaced with the command in the desktop entry + args: "-e {}", + )), +) diff --git a/home/linux/gui/base/desktop/conf/anyrun/style.css b/home/linux/gui/base/desktop/conf/anyrun/style.css new file mode 100644 index 00000000..02188f01 --- /dev/null +++ b/home/linux/gui/base/desktop/conf/anyrun/style.css @@ -0,0 +1,101 @@ +/* ===== Color variables ===== */ +:root { + --bg-color: #313244; + --fg-color: #cdd6f4; + --primary-color: #89b4fa; + --secondary-color: #cba6f7; + --border-color: var(--primary-color); + --selected-bg-color: var(--primary-color); + --selected-fg-color: var(--bg-color); +} + +/* ===== Global reset ===== */ +* { + all: unset; + font-family: "JetBrainsMono Nerd Font", monospace; +} + +/* ===== Transparent window ===== */ +window { + background: transparent; +} + +/* ===== Main container ===== */ +box.main { + border-radius: 16px; + background-color: color-mix(in srgb, var(--bg-color) 80%, transparent); + border: 0.5px solid color-mix(in srgb, var(--fg-color) 25%, transparent); + padding: 12px; /* add uniform padding around the whole box */ +} + +/* ===== Input field ===== */ +text { + font-size: 1.3rem; + background: transparent; + border: 1px solid var(--border-color); + border-radius: 16px; + margin-bottom: 12px; + padding: 5px 10px; + min-height: 44px; + caret-color: var(--primary-color); +} + +/* ===== List container ===== */ +.matches { + background-color: transparent; +} + +/* ===== Single match row ===== */ +.match { + font-size: 1.1rem; + padding: 4px 10px; /* tight vertical spacing */ + border-radius: 6px; +} + +/* Remove default label margins */ +.match * { + margin: 0; + padding: 0; + line-height: 1; +} + +/* Selected / hover state */ +.match:selected, +.match:hover { + background-color: var(--selected-bg-color); + color: var(--selected-fg-color); +} + +.match:selected label.plugin.info, +.match:hover label.plugin.info { + color: var(--selected-fg-color); +} + +.match:selected label.match.description, +.match:hover label.match.description { + color: color-mix(in srgb, var(--selected-fg-color) 90%, transparent); +} + +/* ===== Plugin info label ===== */ +label.plugin.info { + color: var(--fg-color); + font-size: 1rem; + min-width: 160px; + text-align: left; +} + +/* ===== Description label ===== */ +label.match.description { + font-size: 0rem; + color: var(--fg-color); +} + +/* ===== Fade-in animation ===== */ +@keyframes fade { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/home/linux/gui/base/desktop/conf/anyrun/symbols.ron b/home/linux/gui/base/desktop/conf/anyrun/symbols.ron new file mode 100644 index 00000000..962bb8db --- /dev/null +++ b/home/linux/gui/base/desktop/conf/anyrun/symbols.ron @@ -0,0 +1,10 @@ +Config( + // The prefix that the search needs to begin with to yield symbol results + prefix: "", + // Custom user defined symbols to be included along the unicode symbols + symbols: { + // "name": "text to be copied" + "shrug": "¯\\_(ツ)_/¯", + }, + max_entries: 3, +) diff --git a/hosts/idols-ai/nvidia.nix b/hosts/idols-ai/nvidia.nix index 5aff5530..2fe5283b 100644 --- a/hosts/idols-ai/nvidia.nix +++ b/hosts/idols-ai/nvidia.nix @@ -17,7 +17,7 @@ open = true; # Optionally, you may need to select the appropriate driver version for your specific GPU. # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.production; # required by most wayland compositors! modesetting.enable = true;