MAC SPACEMACS dashboard/startup PAGE

SPACEMACS的起始页,有个banner图标和TITLE,以及版本号。还有一些文件修改记录。没有找到设置选项。不让人修改也可以理解。虽然dashboard包从spacemacs中抽出来,估计spacemacs不屑于用dashboard。但是还是希望spacemacs可以把起始页做成包,提供修改设置选项。

图标修改(BANNER LOGO)

可以在.spacemacs中的修改其中的设置项, dotspacemacs-startup-banner

   dotspacemacs-startup-banner '"~/.emacs.d/tiger.png"

BANNER TITLE

这个进入.emacs.d/core/,修改core-spacemacs-buffer.el中的spacemacs-buffer-logo-title

ALL THE ICONS

在国外论坛上看到可以重新定义他的(core-spacemacs-buffer.el中)函数。安装all-the-icons以及它的相应字体。在dotspacemacs/user-config中重新定义他的函数。暂时,可以显示ICONS.

(defface dashboard-heading-file
   '((t (:inherit font-lock-keyword-face)))
    "Face used for widget headings."
    :group 'dashboard)
 (defun insert-icon-for-file-dir (file-name)
   (if (file-directory-p file-name)
    (progn
	  (insert (all-the-icons-icon-for-dir file-name :height 1.1 :face 'dashboard-heading-file))
		  (insert " "))
	   (progn
 	  (insert (all-the-icons-icon-for-file file-name))))
 (defun spacemacs-buffer//insert-file-list (list-display-name list) ;;这个函数是spacemacs中的。
  "Insert an interactive list of files in the home buffer.
  LIST-DISPLAY-NAME: the displayed title of the list.
 LIST: a list of string pathnames made interactive in this function."
  (when (car list)
    (insert list-display-name)
     (mapc (lambda (el)
             (insert "\n    ")
 			   (insert-icon-for-file-dir el) ;;添加的函数调用
             (widget-create 'push-button
                             :action `(lambda (&rest ignore)
                                       (find-file-existing ,el))
                           :mouse-face 'highlight
                            :follow-link "\C-m"
                           :button-prefix ""
                          :button-suffix ""
                            :format "%[%t%]"
                            (abbreviate-file-name el)))
           list)))
~

最后效果(all-the-icons和banner title和banner title):

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值