mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +00:00
defaults: only restart Dock when user is logged in
This commit is contained in:
parent
2ae24bcafd
commit
a566238826
1 changed files with 5 additions and 2 deletions
|
@ -109,8 +109,11 @@ in
|
||||||
${concatStringsSep "\n" CustomUserPreferences}
|
${concatStringsSep "\n" CustomUserPreferences}
|
||||||
|
|
||||||
${optionalString (length dock > 0) ''
|
${optionalString (length dock > 0) ''
|
||||||
|
# Only restart Dock if current user is logged in
|
||||||
|
if pgrep -xu $UID Dock; then
|
||||||
echo >&2 "restarting Dock..."
|
echo >&2 "restarting Dock..."
|
||||||
killall Dock
|
killall Dock || true
|
||||||
|
fi
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue