Move beacon config to use-package

This commit is contained in:
Tom Willemse 2016-07-03 01:34:50 +02:00
parent aedb8632ba
commit 3b55381ed6
4 changed files with 112 additions and 70 deletions

View file

@ -398,6 +398,34 @@ MODE1 is enabled and vice-versa."
(use-package apache-mode :ensure t :defer t)
;;; Show a “beacon” when cursor position changes
;; `beacon-mode' is a minor mode that shows a temporary gradient
;; whenever the cursor screen position changes in a (somewhat)
;; unpredictable way. For example, when you switch buffers, when the
;; window scrolls because youve reached the top of the window, etc.
(use-package beacon
:ensure t
:commands (beacon-mode)
:config
;;; Dont show a beacon everywhere
;; Beacon by default already doesnt show in certain buffers with
;; certain major modes, currently only =magit-status-mode= disables
;; the beacon. I have some more that Id like to add.
(setq beacon-dont-blink-major-modes
(append beacon-dont-blink-major-modes
'(circe-channel-mode
circe-server-mode
magit-diff-mode
gnus-summary-mode
gnus-group-mode)))
;;; Show a beacon when recentering
;; Somehow I always get confused when I recenter my screen, is it in
;; the center, top or bottom? Beacon disables itself for the
;; recentering command, and I want it enabled, even though this is
;; completely predictable.
(setq beacon-dont-blink-commands
(delq 'recenter-top-bottom beacon-dont-blink-commands)))
(use-package eap
:load-path "vendor-lisp/eap"
:commands (eap)
@ -740,6 +768,7 @@ MODE1 is enabled and vice-versa."
(savehist-mode)
(show-paren-mode)
(winner-mode)
(beacon-mode)
(help-at-pt-set-timer)
(windmove-default-keybindings)

View file

@ -1708,51 +1708,6 @@
<<flycheck-display>>)
#+END_SRC
** Show a “beacon” when cursor position changes
#+BEGIN_SRC emacs-lisp :tangle no
(depends-on "beacon")
#+END_SRC
=beacon-mode= is a new minor mode that shows a temporary gradient
whenever the cursor screen position changes in a (somewhat)
unpredictable way. For example, when you switch buffers, when the
window scrolls because youve reached the top of the window, etc.
#+BEGIN_SRC emacs-lisp
(beacon-mode)
#+END_SRC
*** Dont show a beacon everywhere
Beacon by default already doesnt show in certain buffers with
certain major modes, currently only =magit-status-mode= disables the
beacon. I have some more that Id like to add.
#+BEGIN_SRC emacs-lisp
(stante-after beacon
(setq beacon-dont-blink-major-modes
(append beacon-dont-blink-major-modes
'(circe-channel-mode
circe-server-mode
magit-diff-mode
gnus-summary-mode
gnus-group-mode))))
#+END_SRC
*** Show a beacon when recentering
Somehow I always get confused when I recenter my screen, is it in
the center, top or bottom? Beacon disables itself for the
recentering command, and I want it enabled, even though this is
completely predictable.
#+BEGIN_SRC emacs-lisp
(stante-after beacon
(setq beacon-dont-blink-commands
(delq 'recenter-top-bottom beacon-dont-blink-commands)))
#+END_SRC
** Hightlight numbers mode
I find this regular expression to work better at identifying

View file

@ -0,0 +1,35 @@
;;; avandu-init.el --- Initialization for avandu -*- lexical-binding: t; -*-
;; Copyright (C) 2014 Tom Willemse
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Initialization code for the `avandu' library, should get loaded
;; when `avandu' is.
;;; Code:
(require 'avandu)
(setq avandu-user "admin"
avandu-tt-rss-api-url "https://ryuslash.org/tt-rss/api/"
avandu-html2text-command #'shr-render-region)
(provide 'avandu-init)
;;; avandu-init.el ends here

View file

@ -43,28 +43,51 @@
(text-widget-color "#ededed")
(text-widget-format text-maybe-pad-both)
(window
'position 'bottom
'width 1843
'margin-bottom 15
'margin-left 46
'margin-right 15
'background 'transparent
(widget:text 'name "taglist" 'format tag-list-formatter)
(widget:active-window-title 'format text-maybe-pad-right)
(widget:spacer 'flex 1)
(widget:text 'name "mpd"
'format (add-fa-icon ""))
(widget:text 'name "irclist" 'format identity)
(widget:text 'name "email"
'format (compose text-maybe-pad-both (add-fa-icon "")))
(widget:flags 'name "cam-status"
'font "FontAwesome-10"
'flags '(("suspended" color "#a88654" "")
("active" color "#65a854" "")
("unplugged" color "#a85454" "")))
(widget:flags 'name "keychain"
'font "FontAwesome-10"
'flags '(("Unlocked" color "#65a854" "")
("Locked" color "#a85454" "")))
(widget:clock 'format text-maybe-pad-left))
(define tag-list-widget
(widget:text 'name "taglist" 'format tag-list-formatter))
(define window-title-widget
(widget:active-window-title 'format text-maybe-pad-right))
(define mpd-widget
(widget:text 'name "mpd" 'format (add-fa-icon "")))
(define irc-list-widget
(widget:text 'name "irclist" 'format identity))
(define email-widget
(widget:text 'name "email"
'format (compose text-maybe-pad-both (add-fa-icon ""))))
(define cam-status-widget
(widget:flags 'name "cam-status"
'font "FontAwesome-10"
'flags '(("suspended" color "#a88654" "")
("active" color "#65a854" "")
("unplugged" color "#a85454" ""))))
(define key-chain-widget
(widget:flags 'name "keychain"
'font "FontAwesome-10"
'flags '(("Unlocked" color "#65a854" "")
("Locked" color "#a85454" ""))))
(define clock-widget
(widget:clock 'format text-maybe-pad-left))
(window 'position 'bottom
'width 1843
'margin-bottom 15
'margin-left 46
'margin-right 15
'background 'transparent
tag-list-widget
window-title-widget
(widget:spacer 'flex 1)
mpd-widget
irc-list-widget
email-widget
cam-status-widget
key-chain-widget
clock-widget)