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 =
|
extraConfig =
|
||||||
let
|
let
|
||||||
powerMenu = pkgs.writeShellScript "power-menu" ''
|
powerMenu = pkgs.writeShellScript "power-menu" ''
|
||||||
# Standalone stdin mode conflicts with the daemon.
|
# Stop the daemon so standalone stdin mode can run cleanly.
|
||||||
${anyrun-pkgs.anyrun}/bin/anyrun quit 2>/dev/null || true
|
# systemd restarts it automatically afterwards (Restart=on-failure).
|
||||||
|
systemctl --user stop anyrun.service 2>/dev/null || true
|
||||||
choice=$(printf '%s\n' \
|
choice=$(printf '%s\n' \
|
||||||
$'\uf023 Lock' \
|
$'\uf023 Lock' \
|
||||||
$'\uf08b Logout' \
|
$'\uf08b Logout' \
|
||||||
|
|
@ -223,8 +224,8 @@ in
|
||||||
--show-results-immediately true \
|
--show-results-immediately true \
|
||||||
--hide-plugin-info true \
|
--hide-plugin-info true \
|
||||||
--close-on-click true)
|
--close-on-click true)
|
||||||
# Restart the daemon.
|
# Restart the daemon service.
|
||||||
${anyrun-pkgs.anyrun}/bin/anyrun daemon &
|
systemctl --user start anyrun.service 2>/dev/null || true
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
*Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
|
*Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
|
||||||
*Logout) hyprctl dispatch exit ;;
|
*Logout) hyprctl dispatch exit ;;
|
||||||
|
|
@ -275,7 +276,6 @@ in
|
||||||
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
||||||
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
|
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
|
||||||
hl.exec_cmd("swayosd-server")
|
hl.exec_cmd("swayosd-server")
|
||||||
hl.exec_cmd("anyrun daemon")
|
|
||||||
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
|
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
@ -387,12 +387,11 @@ in
|
||||||
programs.anyrun = {
|
programs.anyrun = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
plugins = [ "${anyrun-pkgs.applications}/lib/libapplications.so" ];
|
plugins = [ anyrun-pkgs.applications ];
|
||||||
x.fraction = 0.5;
|
x.fraction = 0.5;
|
||||||
y.fraction = 0.25;
|
y.fraction = 0.25;
|
||||||
width.absolute = 350;
|
width.absolute = 350;
|
||||||
height.absolute = 0;
|
height.absolute = 0;
|
||||||
margin = 16;
|
|
||||||
hideIcons = false;
|
hideIcons = false;
|
||||||
ignoreExclusiveZones = false;
|
ignoreExclusiveZones = false;
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue