emacs: Make sure frame is focused on launch on darwin
This commit is contained in:
parent
15586a8f7c
commit
1436dfae51
3 changed files with 15 additions and 1 deletions
10
modules/darwin/base/emacs/darwin-init.el
Normal file
10
modules/darwin/base/emacs/darwin-init.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
(use-package emacs-on-darwin
|
||||
:ensure nil ;; Not a real package, but a place to collect global settings for darwin
|
||||
:demand t
|
||||
:config
|
||||
(defun focus-frame ()
|
||||
(select-frame-set-input-focus (selected-frame)))
|
||||
(if (daemonp)
|
||||
(add-hook 'server-after-make-frame-hook #'focus-frame))
|
||||
)
|
||||
|
|
@ -4,7 +4,10 @@ let
|
|||
username = config.chvp.username;
|
||||
in
|
||||
{
|
||||
chvp.base.emacs.basePackage = pkgs.emacs;
|
||||
chvp.base.emacs = {
|
||||
basePackage = pkgs.emacs;
|
||||
extraConfig = [ (builtins.readFile ./darwin-init.el) ];
|
||||
};
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
package = config.chvp.base.emacs.package;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue