Skip to content

Commit

Permalink
Implement uniform mode lines customization
Browse files Browse the repository at this point in the history
> Description

Added a theme customization to allow users to enable uniform activate-
and inactive mode lines using "nord3" as background.

The default is left to "nord1" as background color.

The customization is available through the "nord-uniform-mode-lines"
variable of type "boolean".

> Usage

  (setq nord-uniform-mode-lines t)

Related to #32

GH-47
  • Loading branch information
arcticicestudio committed Oct 1, 2017
1 parent 24deba8 commit 6b80171
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Nord Emacs is a 16 colorspace theme build to run in GUI- and terminal mode with
- [Package.el](#package-el)
- [Activation](#activation)
- [Features](#features)
- [Customization](#customization)
- [Uniform Mode Lines](#uniform-mode-lines)
- [Package Support](#package-support)
- [Syntax Packages](#syntax-packages)
- [UI Packages](#ui-packages)
Expand Down Expand Up @@ -71,6 +73,22 @@ or change it on-the-fly by running <kbd>M-x</kbd> `load-theme` <kbd>RET</kbd> `n

<p align="center"><strong>Colors of selected code can still be easily recognized.</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-emacs/develop/assets/scrcast-feature-selection.gif"/></p>

## Customization

All customizations need to be set before `load-theme` is invoked for Nord and require a restart of Emacs when changed!

### Uniform Mode Lines

Enables uniform activate- and inactive mode lines using `nord3` as background.

It can be activated by setting the `nord-uniform-mode-lines` variable to `t` in your `init.el`:

```lisp
(setq nord-uniform-mode-lines t)
```

<align="center"><strong>Default mode lines</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-emacs/develop/assets/scrot-customization-uniform-mode-lines-default.png"/><br><strong>Uniform mode lines</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-emacs/develop/assets/scrot-customization-uniform-mode-lines.png"/></p>

## Package Support
Nord Emacs provides support for many third-party syntax- and the UI packages.
Detailed descriptions for supported packages can be found in the [project wiki](https://github.com/arcticicestudio/nord-emacs/wiki).
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions nord-theme.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@

(deftheme nord "An arctic, north-bluish clean and elegant theme")

(defgroup nord nil
"Nord theme customizations.
The theme has to be reloaded after changing anything in this group."
:group 'faces)

(defcustom nord-uniform-mode-lines nil
"Enables uniform activate- and inactive mode lines using 'nord3' as background."
:type 'boolean
:group 'nord)

;;;; Color Constants
(let ((class '((class color) (min-colors 89)))
(nord0 (if (display-graphic-p) "#2E3440" nil))
Expand Down Expand Up @@ -74,7 +84,8 @@
(nord-regexp (if (display-graphic-p) "#EBCB8B" "yellow"))
(nord-string (if (display-graphic-p) "#A3BE8C" "green"))
(nord-tag (if (display-graphic-p) "#81A1C1" "blue"))
(nord-variable (if (display-graphic-p) "#D8DEE9" "#D8DEE9")))
(nord-variable (if (display-graphic-p) "#D8DEE9" "#D8DEE9"))
(nord-uniform-mode-lines-background (if nord-uniform-mode-lines "#4C566A" "#3B4252")))

;;;; +------------+
;;;; + Core Faces +
Expand Down Expand Up @@ -181,10 +192,10 @@
`(message-separator ((,class (:inherit shadow))))
`(minibuffer-prompt ((,class (:foreground ,nord8 :weight bold))))
`(mm-command-output ((,class (:foreground ,nord8))))
`(mode-line ((,class (:foreground ,nord4 :background ,nord2))))
`(mode-line ((,class (:foreground ,nord8 :background ,nord3))))
`(mode-line-buffer-id ((,class (:weight bold))))
`(mode-line-highlight ((,class (:inherit highlight))))
`(mode-line-inactive ((,class (:foreground ,nord4 :background ,nord1))))
`(mode-line-inactive ((,class (:foreground ,nord4 :background ,nord-uniform-mode-lines-background))))
`(next-error ((,class (:inherit error))))
`(nobreak-space ((,class (:foreground ,nord3))))
`(outline-1 ((,class (:foreground ,nord8 :weight bold))))
Expand Down

0 comments on commit 6b80171

Please sign in to comment.