powerline for emacs24

好久没写过博客了,今天来一炮 ...

Emacs 的UI实在太难看了,正巧碰到一款还不错的ui美化产品,很用心了,在这个高手看不上和不重视这等细节的时代,努力的工作就交给我们这些小白吧,哈哈 ...


1. 效果图如下




2. 具体实现

插件地址: https://github.com/milkypostman/powerline

图形界面和终端界面确实风格迥异,为了和谐只能自己定制一下了。

;; desc: powerline
;; mode:  emacs-powerline
;; link: https://github.com/jonathanchu/emacs-powerline
;; -----------------------
(require 'powerline)

(defun graphic-powerline-config ()
  "powerline setting for graphic"
  (interactive)
  (progn
   (setq powerline-arrow-shape 'arrow)
   (custom-set-faces
    '(mode-line ((t (:foreground "white" :background "#0044cc" :box nil))))
    '(mode-line-inactive ((t (:foreground "white" :background "#262626" :box nil))))
    )
   (setq powerline-color1 "#0088cc")
   (setq powerline-color2 "white")
   )
  )

(defun terminal-powerline-config()
   " powerline setting for terminal"
   (interactive)
   (setq powerline-arrow-shape 'arrow)
   (setq powerline-color1 "grey22")
   (setq powerline-color2 "grey22") 
   (custom-set-faces
    '(mode-line ((t (:foreground "grey44" :background "grey22" :box nil))))
    '(mode-line-inactive ((t (:foreground "grey22" :background "grey44" :box nil))))
    ))

;;  "根据是否图形界面加载配置"
;;(if (display-graphic-p)
;;    (graphic-powerline-config)
;;  (terminal-powerline-config))



我用的是 milkypostman/powerline 的插件,代码里面link 是补地址时后来搜索到的,貌似排名更靠前,但都兼容 ...

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值