From 61a7aee377edd2cb46fd3384abc9ca3c1ffe3a0b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 20 Jul 2025 21:21:28 -0500 Subject: [PATCH] Ensure this isnt run over and over also --- migrations/1752168292.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migrations/1752168292.sh b/migrations/1752168292.sh index 188d50f..0f52913 100755 --- a/migrations/1752168292.sh +++ b/migrations/1752168292.sh @@ -1,14 +1,10 @@ echo "Enable battery low notifications for laptops" -if ls /sys/class/power_supply/BAT* &>/dev/null; then +if ls /sys/class/power_supply/BAT* &>/dev/null && [[ ! -f ~/.local/share/omarchy/config/systemd/user/omarchy-battery-monitor.service ]]; then mkdir -p ~/.config/systemd/user cp ~/.local/share/omarchy/config/systemd/user/omarchy-battery-monitor.* ~/.config/systemd/user/ systemctl --user daemon-reload systemctl --user enable --now omarchy-battery-monitor.timer || true - - echo "Battery monitoring enabled - you'll receive notifications at 10% battery" -else - echo "No battery detected - skipping battery monitor setup" fi