@manateelazycat awesome-tray 很好用,但是在daemon 模式下awesome-tray只有不到一半长度。
安装
brew install emacs-plus@28 --with-xwidgets
版本 :
GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.3.0, NS appkit-2022.30 Version 11.2.2 (Build 20D80)) of 2021-02-28
最小配置: init-mini.el
;;; init-mini.el --- mini config for test -*- lexical-binding: t no-byte-compile: t -*-
;;; Commentary:
;;; Code:
;; appearence
(column-number-mode)
(line-number-mode)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(tooltip-mode -1)
;; ---------------------- Load const, env and path ------------------------------
;; add init-*.el to load-path
(add-to-list 'load-path (expand-file-name "core/" user-emacs-directory))
;; const viriable
(require 'init-const)
;; add submodules to load-path
(defun add-subdirs-to-load-path (dir)
"Recursive add `DIR` to `load-path'."
(let ((default-directory (file-name-as-directory dir)))
(add-to-list 'load-path dir)
(normal-top-level-add-subdirs-to-load-path)))
(add-subdirs-to-load-path (expand-file-name "module/" user-emacs-directory))
;; ---------------------- Test module -----------------------------
(require 'awesome-tray)
(awesome-tray-mode 1)
(provide 'init-mini)
;;; init-mini.el ends here
复现:
不使用daemon,一切正常,并且 make-frame 新建的frame 也可以自动调整
emacs -Q --load init-mini.el`
# 使用daemon,则通过`emacsclient --create-frame`创建的frame,
# tray的长度只到屏幕的一半,无法自动调整。
emacs -Q --daemon --load init-mini.el
emacsclient -n -q -a '' -c init-mini.el