Emacs 시작 화면을 트윈 크로 만들기
dashboard.el 넣기
M-x package install dashbord.el
설정은 다음과 같습니다.
제 경우에는 MacOS와 Linux 모두에서 구성 파일을 공유하므로 Tile 설정은 두 가지를 작성합니다.
(use-package dashboard
:bind (("<f10>" . open-dashboard)
:map dashboard-mode-map
("c" . browse-calendar)
("w" . browse-tenki)
("m" . browse-gmail)
("t" . browse-tweetdeck)
("s" . browse-slack)
("h" . browse-homepage)
("l" . line-app-open)
("<f10>" . quit-dashboard))
:hook (after-init . dashboard-setup-startup-hook)
:config
;; Set the title
(when (eq system-type 'darwin)
(setq dashboard-banner-logo-title
(concat "GNU Emacs " emacs-version " kernel "
(car (split-string (shell-command-to-string "uname -r"))) " x86_64 Mac OS X "
(car(split-string (shell-command-to-string "sw_vers -productVersion") "-")))))
(when (eq system-type 'gnu/linux)
(setq dashboard-banner-logo-title
(concat "GNU Emacs " emacs-version " kernel "
(car (split-string (shell-command-to-string "uname -r"))) " x86_64 Debian GNU/Linux "
(car (split-string (shell-command-to-string "cat /etc/debian_version") "_")))))
;; Set the banner
(setq dashboard-startup-banner "~/Dropbox/emacs.d/emacs.png")
;; Use icons
(setq dashboard-set-heading-icons t)
(setq dashboard-set-file-icons t)
;; Set the footer
(setq dashboard-footer "Always be joyful. Never stop praying. Be thankful in all circumstances!")
(setq dashboard-footer-icon
(all-the-icons-octicon "dashboard" :height 1.1 :v-adjust -0.05 :face 'font-lock-keyword-face))
(when (eq system-type 'darwin)
(setq dashboard-items '((recents . 10))))
(when (eq system-type 'gnu/linux)
(setq dashboard-items '((recents . 8))))
;; Insert custom item
(defun dashboard-insert-custom (list-size)
(insert (if (display-graphic-p)
(all-the-icons-faicon "google" :height 1.2 :v-adjust -0.05 :face 'error) " "))
(insert " Calendar: (c) Weather: (w) Mail: (m) Twitter: (t) LINE: (l) Slack: (s) GH: (h)"))
(add-to-list 'dashboard-item-generators '(custom . dashboard-insert-custom))
(add-to-list 'dashboard-items '(custom) t)
(defun open-dashboard ()
"Open the *dashboard* buffer and jump to the first widget."
(interactive)
(delete-other-windows)
;; Refresh dashboard buffer
(if (get-buffer dashboard-buffer-name)
(kill-buffer dashboard-buffer-name))
(dashboard-insert-startupify-lists)
(switch-to-buffer dashboard-buffer-name)
;; Jump to the first section
(goto-char (point-min))
(dashboard-goto-recent-files))
(defun quit-dashboard ()
"Quit dashboard window."
(interactive)
(quit-window t)
(when (and dashboard-recover-layout-p
(bound-and-true-p winner-mode))
(winner-undo)
(setq dashboard-recover-layout-p nil)))
(defun dashboard-goto-recent-files ()
"Go to recent files."
(interactive)
(funcall (local-key-binding "r"))))
PS:
2019.09.11 Hydra에서 Quick Menu 기능을 붙였습니다.
2019.08.30 icon 대응으로 퀵 메뉴 기능을 추가했습니다.
Reference
이 문제에 관하여(Emacs 시작 화면을 트윈 크로 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/minoruGH/items/b47430af6537ee69c6ef텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)