Skip to content

Commit

Permalink
move code to better place
Browse files Browse the repository at this point in the history
  • Loading branch information
jyp committed Jan 7, 2024
1 parent 6dc09dc commit ded55a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 13 additions & 0 deletions boon-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,19 @@ the buffer changes."
(boon-special-state "SPC")
(t "???")))

(defface boon-modeline-cmd '((((background light)) :background "dodger blue") (((background dark)) :background "blue")) "Face for modeline indicator of boon command state" :group 'boon)
(defface boon-modeline-ins '((((background light)) :background "indian red") (((background dark)) :background "red")) "Face for modeline indicator of boon insert state" :group 'boon)
(defface boon-modeline-off '((t (:background "orange"))) "Face for modeline indicator of boon off state" :group 'boon)
(defface boon-modeline-spc '((((background light)) :background "spring green") (((background dark)) :background "dark green")) "Face for modeline indicator of boon special state" :group 'boon)

(defun boon-state-face ()
"Return a face appropriate for a powerline-style entry in the modeline."
(cond
(boon-command-state 'boon-modeline-cmd)
(boon-insert-state 'boon-modeline-ins)
(boon-special-state 'boon-modeline-spc)
(t 'boon-modeline-off)))

(with-eval-after-load 'multiple-cursors
(defvar mc--default-cmds-to-run-for-all)
(defvar mc--default-cmds-to-run-once)
Expand Down
13 changes: 0 additions & 13 deletions boon-powerline.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
(require 'powerline nil t)
(require 'boon-core)

(defface boon-modeline-cmd '((((background light)) :background "dodger blue") (((background dark)) :background "blue")) "Face for modeline indicator of boon command state" :group 'boon)
(defface boon-modeline-ins '((((background light)) :background "indian red") (((background dark)) :background "red")) "Face for modeline indicator of boon insert state" :group 'boon)
(defface boon-modeline-off '((t (:background "orange"))) "Face for modeline indicator of boon off state" :group 'boon)
(defface boon-modeline-spc '((((background light)) :background "spring green") (((background dark)) :background "dark green")) "Face for modeline indicator of boon special state" :group 'boon)

(defun boon-state-face ()
"Return a face appropriate for a powerline-style entry in the modeline."
(cond
(boon-command-state 'boon-modeline-cmd)
(boon-insert-state 'boon-modeline-ins)
(boon-special-state 'boon-modeline-spc)
(t 'boon-modeline-off)))

(defun boon-powerline-theme ()
"Set up a powerline based on powerline-default-theme which also displays boon-state."
(interactive)
Expand Down

0 comments on commit ded55a2

Please sign in to comment.