1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

Merge pull request #1012 from Enzime/fix/dock-not-running

defaults: only restart Dock when user is logged in
This commit is contained in:
Emily 2024-07-27 13:17:26 +01:00 committed by GitHub
commit 0413754b3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -109,8 +109,11 @@ in
${concatStringsSep "\n" CustomUserPreferences}
${optionalString (length dock > 0) ''
echo >&2 "restarting Dock..."
killall Dock
# Only restart Dock if current user is logged in
if pgrep -xu $UID Dock; then
echo >&2 "restarting Dock..."
killall Dock || true
fi
''}
'';