From e77f4791be30d831fb0f5f423d12c51eb9880e6c Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 18 May 2026 12:51:41 +0100 Subject: [PATCH] anyrun: fix upstream flake integration and use systemd daemon Fix config for upstream anyrun HM module (no margin option, use package refs for plugins). The upstream module provides a systemd user service for the daemon with Restart=on-failure, so remove manual daemon management from Hyprland startup. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index f32bd2c..0f06d17 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -211,8 +211,9 @@ in extraConfig = let powerMenu = pkgs.writeShellScript "power-menu" '' - # Standalone stdin mode conflicts with the daemon. - ${anyrun-pkgs.anyrun}/bin/anyrun quit 2>/dev/null || true + # Stop the daemon so standalone stdin mode can run cleanly. + # systemd restarts it automatically afterwards (Restart=on-failure). + systemctl --user stop anyrun.service 2>/dev/null || true choice=$(printf '%s\n' \ $'\uf023 Lock' \ $'\uf08b Logout' \ @@ -223,8 +224,8 @@ in --show-results-immediately true \ --hide-plugin-info true \ --close-on-click true) - # Restart the daemon. - ${anyrun-pkgs.anyrun}/bin/anyrun daemon & + # Restart the daemon service. + systemctl --user start anyrun.service 2>/dev/null || true case "$choice" in *Lock) ${pkgs.hyprlock}/bin/hyprlock ;; *Logout) hyprctl dispatch exit ;; @@ -275,7 +276,6 @@ in hl.exec_cmd("wl-paste --type image --watch cliphist store") hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24") hl.exec_cmd("swayosd-server") - hl.exec_cmd("anyrun daemon") ${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''} end) @@ -387,12 +387,11 @@ in programs.anyrun = { enable = true; config = { - plugins = [ "${anyrun-pkgs.applications}/lib/libapplications.so" ]; + plugins = [ anyrun-pkgs.applications ]; x.fraction = 0.5; y.fraction = 0.25; width.absolute = 350; height.absolute = 0; - margin = 16; hideIcons = false; ignoreExclusiveZones = false; layer = "overlay";