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 <noreply@anthropic.com>
This commit is contained in:
parent
9f2a5a2868
commit
e77f4791be
1 changed files with 6 additions and 7 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue