From 3aff0017a166ba7f3446448a95c2838a266eef3d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 8 Mar 2026 11:09:56 +0100 Subject: [PATCH] Only update plocate db on power to prevent hangs after sleep --- install/config/all.sh | 1 + install/config/plocate-ac-only.sh | 3 +++ migrations/1772964511.sh | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 install/config/plocate-ac-only.sh create mode 100644 migrations/1772964511.sh diff --git a/install/config/all.sh b/install/config/all.sh index d71e5c43..14480206 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -25,6 +25,7 @@ run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh run_logged $OMARCHY_INSTALL/config/kernel-modules-hook.sh run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh +run_logged $OMARCHY_INSTALL/config/plocate-ac-only.sh run_logged $OMARCHY_INSTALL/config/hardware/network.sh run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh diff --git a/install/config/plocate-ac-only.sh b/install/config/plocate-ac-only.sh new file mode 100644 index 00000000..31cd088f --- /dev/null +++ b/install/config/plocate-ac-only.sh @@ -0,0 +1,3 @@ +sudo install -d /etc/systemd/system/plocate-updatedb.service.d +printf '%s\n' '[Unit]' 'ConditionACPower=true' | sudo tee /etc/systemd/system/plocate-updatedb.service.d/ac-only.conf >/dev/null +sudo systemctl daemon-reload diff --git a/migrations/1772964511.sh b/migrations/1772964511.sh new file mode 100644 index 00000000..0de1dedb --- /dev/null +++ b/migrations/1772964511.sh @@ -0,0 +1,3 @@ +echo "Only run plocate indexing on AC power to prevent hangs after sleep" + +source $OMARCHY_PATH/install/config/plocate-ac-only.sh