diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2025-06-28 09:30:42 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2025-06-28 09:30:42 +0100 |
| commit | 44968e474c3e0ec470f6b142a685ac03ab062c7d (patch) | |
| tree | b077930c95b98f6518b94c831a62ae8db176a6cf | |
| parent | 502478ab5902e561530d47e1d09884291a5e8963 (diff) | |
darwin/emacs: Do not use a shell to run ‘defaults’
| -rw-r--r-- | dotfiles-darwin/emacs/functions.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dotfiles-darwin/emacs/functions.el b/dotfiles-darwin/emacs/functions.el index 6ccc8f3..a97cef1 100644 --- a/dotfiles-darwin/emacs/functions.el +++ b/dotfiles-darwin/emacs/functions.el @@ -3,8 +3,9 @@ (defun my/macos-dark-p () "Returns non-nil if macOS is currently in dark mode, nil otherwise." (interactive) - (string= (shell-command-to-string "defaults read -g AppleInterfaceStyle") - "Dark\n")) + (equal (process-lines-ignore-status "defaults" "read" "-g" + "AppleInterfaceStyle") + '("Dark"))) (defun my/modify-frame-parameters (parameters &optional frame) (when (frame-parameter frame 'fullscreen) |
