Adjust frame configuration to work in daemon mode
This commit is contained in:
parent
e69083b102
commit
4f555baf3c
39
init.el
39
init.el
@ -158,26 +158,35 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
;;====================
|
;;====================
|
||||||
;; Graphical Mode Config
|
;; New Frame Config
|
||||||
;;====================
|
;;====================
|
||||||
|
|
||||||
;; Define a function that will configure graphical Emacs frames.
|
;; Define a function that will configure new Emacs frames.
|
||||||
(defun configure-graphic-frame (frame)
|
(defun configure-new-frame (frame)
|
||||||
"Set up graphical Emacs frame FRAME."
|
"Configure new frame FRAME."
|
||||||
(when (display-graphic-p)
|
(when (display-graphic-p frame)
|
||||||
(select-frame frame)
|
(select-frame frame)
|
||||||
(setq winid (frame-parameter frame 'outer-window-id))
|
(let ((winid (frame-parameter frame 'outer-window-id)))
|
||||||
(call-process-shell-command
|
(call-process-shell-command
|
||||||
(concat "xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id " winid))
|
(concat "xprop -f _GTK_THEME_VARIANT 8u -set _GTK_THEME_VARIANT dark -id " winid)))
|
||||||
(tool-bar-mode 0)
|
(tool-bar-mode 0)
|
||||||
(scroll-bar-mode 0)))
|
(scroll-bar-mode 0))
|
||||||
|
(load-theme 'mood-one t))
|
||||||
|
|
||||||
;; Hook the frame configuration function into all newly-created graphical frames.
|
;; Define a function that will inhibit startup message for new Emacs frames.
|
||||||
(when (display-graphic-p)
|
(defun inhibit-new-frame-message ()
|
||||||
(progn
|
"Inhibit startup messages in new frames."
|
||||||
(add-hook 'window-setup-hook (lambda () (configure-graphic-frame (selected-frame))))
|
(setq inhibit-message t)
|
||||||
(add-hook 'after-make-frame-functions #'configure-graphic-frame)
|
(run-with-idle-timer 0 nil (lambda () (setq inhibit-message nil))))
|
||||||
(configure-graphic-frame (selected-frame))))
|
|
||||||
|
;; Hook the frame configuration function into all newly-created frames.
|
||||||
|
(add-hook 'after-make-frame-functions #'configure-new-frame)
|
||||||
|
|
||||||
|
;; Hook the startup message inhibition function into all newly-created frames.
|
||||||
|
(add-hook 'server-after-make-frame-hook #'inhibit-new-frame-message)
|
||||||
|
|
||||||
|
;; Run for any already-existing frames
|
||||||
|
(mapc 'configure-new-frame (frame-list))
|
||||||
|
|
||||||
;;====================
|
;;====================
|
||||||
;; Package Manager
|
;; Package Manager
|
||||||
|
Loading…
Reference in New Issue
Block a user