Emacs 대시보드 버퍼 재생
11240 단어 emacs-lispEmacs
다음 설정에서는 [HOME] 키로 이전에 열려 있던 버퍼와 Dashboard 버퍼를 Toggle 표시합니다. 또한 자주 사용하는 작업을 dashboard 화면에서 원키로 선택할 수 있도록하고 있습니다.
Emacs27이 되고 나서 emacs-init-time이 소수점 이하까지 표시되게 되어 조금 괴롭기 때문에 소수점 이하 3자리까지의 표시에 커스터마이즈 하고 있습니다.
Screenshot
즐겨찾기 외부 링크를 Hydra로 팝시킨 화면
대시보드의 Emacs 설정
(leaf dashboard
:ensure t
:config
(with-eval-after-load 'dashboard
(bind-key "<home>" 'dashboard-refresh-buffer)
(bind-key "b" 'chromium-bible dashboard-mode-map)
(bind-key "c" 'chromium-calendar dashboard-mode-map)
(bind-key "g" 'chromium-google-search dashboard-mode-map)
(bind-key "m" 'chromium-gmail dashboard-mode-map)
(bind-key "h" 'chromium-homepage dashboard-mode-map)
(bind-key "w" 'chromium-weather dashboard-mode-map)
(bind-key "s" 'open-sylpheed dashboard-mode-map)
(bind-key "@" 'howm-list-all dashboard-mode-map)
(bind-key "," 'org-capture dashboard-mode-map)
(bind-key "." 'hydra-browse/body dashboard-mode-map)
(bind-key "<home>" 'quit-window dashboard-mode-map))
(dashboard-setup-startup-hook)
(setq dashboard-page-separator "\n\f\n")
;; Set the title
(setq dashboard-banner-logo-title
(concat "GNU Emacs " emacs-version " kernel "
(car (split-string (shell-command-to-string "uname -r"))) " Debian "
(car (split-string (shell-command-to-string "cat /etc/debian_version"))) " 86_64 GNU/Linux"))
;; Set the banner
(setq dashboard-startup-banner (expand-file-name "emacs.png" user-emacs-directory))
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
(setq show-week-agenda-p t)
(setq dashboard-items '((recents . 5)
(agenda . 5)))
;; Set the footer
(setq dashboard-footer-icon
(all-the-icons-octicon "dashboard" :height 1.1 :v-adjust -0.05 :face 'font-lock-keyword-face))
;; Insert custom item
(add-to-list 'dashboard-item-generators '(custom . dashboard-insert-custom))
(add-to-list 'dashboard-items '(custom) t)
:init
(leaf page-break-lines :ensure t)
(global-page-break-lines-mode)
(defun dashboard-goto-recent-files ()
"Go to recent files."
(interactive)
(funcall (local-key-binding "r")))
(defun dashboard-insert-custom (list-size)
"Insert custom and set LIST-SIZE."
(interactive)
(insert (if (display-graphic-p)
(all-the-icons-faicon "leaf" :height 1.2 :v-adjust -0.05 :face 'dashboard-heading) " "))
(insert " GH: (h) Calendar: (c) Weather: (w) oogle: (g) Mail: (m.s) Howm: (@) Task: (,) 🙌 (.)"))
(defun open-sylpheed ()
"Open keepassxc withe auto passwd input."
(interactive)
(compile "sylpheed")
(delete-other-windows))
;; Hack emacs-init-time
(defun ad:emacs-init-time ()
"Return a string giving the duration of the Emacs initialization."
(interactive)
(let ((str
(format "%.3f seconds"
(float-time
(time-subtract after-init-time before-init-time)))))
(if (called-interactively-p 'interactive)
(message "%s" str)
str)))
(advice-add 'emacs-init-time :override #'ad:emacs-init-time))
Reference
이 문제에 관하여(Emacs 대시보드 버퍼 재생), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/minoruGH/items/d5f2975a76b6ca4ceb1c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)