emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/modus-vivendi-theme b874c79 058/110: NEW CUSTOM OPTION:


From: Stefan Monnier
Subject: [elpa] externals/modus-vivendi-theme b874c79 058/110: NEW CUSTOM OPTION: 3d modeline for active window
Date: Wed, 29 Apr 2020 21:40:07 -0400 (EDT)

branch: externals/modus-vivendi-theme
commit b874c79b0df88cb205320fa253c56d0d2f200cb8
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    NEW CUSTOM OPTION: 3d modeline for active window
    
    As with all customisation options, this is set to `nil' by default.
    
    The intent is to apply a three-dimensional button effect to the focused
    window's mode line.  Anyone who has ever used the standard Emacs theme
    (emacs -Q) will immediately recognise the aesthetics.
    
    The default is a flat rectangle with a border around it.  With this new
    option set to `t', the overall impression of the focused window's
    modeline is less pronounced.
    
    For the design of this option, I benefited immensely from the guidance I
    received from Omar AntolĂ­n Camarena <address@hidden> with regard to
    the possibility of using a defun.  Any errors in execution, any
    omissions or irregularities of any kind, are solely my own.
---
 README.org              | 10 ++++++++++
 modus-operandi-theme.el | 14 +++++++++++++-
 modus-vivendi-theme.el  | 14 +++++++++++++-
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index ab6eae7..05eb1f7 100644
--- a/README.org
+++ b/README.org
@@ -183,6 +183,14 @@ theme of your choice):
 (setq modus-operandi-theme-subtle-diffs nil)
 
 (setq modus-vivendi-theme-subtle-diffs nil)
+
+;; Use a three-dimensional button effect for the focused window's mode
+;; line.  In practice, this makes the mode line less intense overall.
+;; The default is a flat, two-dimensional rectangle with a pronounced
+;; border around it.
+(setq modus-operandi-theme-3d-modeline nil)
+
+(setq modus-vivendi-theme-3d-modeline nil)
 #+END_SRC
 
 Same as above, but easier to read (showing the default values):
@@ -193,6 +201,7 @@ Same as above, but easier to read (showing the default 
values):
       modus-operandi-theme-visible-fringes nil
       modus-operandi-theme-subtle-diffs nil
       modus-operandi-theme-distinct-org-blocks nil
+      modus-operandi-theme-3d-modeline nil
       modus-operandi-theme-proportional-fonts nil
       modus-operandi-theme-scale-headings nil
       modus-operandi-theme-scale-1 1.05
@@ -205,6 +214,7 @@ Same as above, but easier to read (showing the default 
values):
       modus-vivendi-theme-visible-fringes nil
       modus-vivendi-theme-subtle-diffs nil
       modus-vivendi-theme-distinct-org-blocks nil
+      modus-vivendi-theme-3d-modeline nil
       modus-vivendi-theme-proportional-fonts nil
       modus-vivendi-theme-scale-headings nil
       modus-vivendi-theme-scale-1 1.05
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 03ceb4c..bca466d 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -45,6 +45,7 @@
 ;;     modus-operandi-theme-scale-headings
 ;;     modus-operandi-theme-visible-fringes
 ;;     modus-operandi-theme-distinct-org-blocks
+;;     modus-operandi-theme-3d-modeline
 ;;     modus-operandi-theme-subtle-diffs
 ;;
 ;; The default scale is as follows (it can be customised as well):
@@ -397,6 +398,16 @@ between foreground and background is >= 7:1)."
   "Use a distinct background for `org-mode' source blocks."
   :type 'boolean)
 
+(defcustom modus-operandi-theme-3d-modeline nil
+  "Use a three-dimensional style for the active mode line."
+  :type 'boolean)
+
+(defun modus-operandi-theme-modeline (col3d col)
+  "Control the box colour of the mode line, either COL3D or COL."
+  (if modus-operandi-theme-3d-modeline
+      (list :line-width 1 :color col3d :style 'released-button)
+    (list :line-width 1 :color col :style nil)))
+
 (defcustom modus-operandi-theme-subtle-diffs nil
   "Use fewer/dim backgrounds in `diff-mode', `ediff',`magit'."
   :type 'boolean)
@@ -2167,7 +2178,8 @@ AMOUNT is a customisation option."
    `(message-mml ((,class (:foreground ,green-alt))))
    `(message-separator ((,class (:background ,bg-alt :foreground 
,fg-special-warm))))
    ;;;; modeline
-   `(mode-line ((,class (:box (:line-width 1 :color ,fg-inactive) :background 
,bg-active :foreground ,fg-active))))
+   `(mode-line ((,class (:box ,(modus-operandi-theme-modeline bg-inactive 
fg-inactive)
+                                 :background ,bg-active :foreground 
,fg-active))))
    `(mode-line-buffer-id ((,class (:weight bold))))
    `(mode-line-emphasis ((,class (:foreground ,blue-active :weight bold))))
    `(mode-line-highlight ((,class (:inherit modus-theme-active-blue :box 
(:line-width -1 :style pressed-button)))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 02239c3..6dd45c6 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -45,6 +45,7 @@
 ;;     modus-vivendi-theme-scale-headings
 ;;     modus-vivendi-theme-visible-fringes
 ;;     modus-vivendi-theme-distinct-org-blocks
+;;     modus-vivendi-theme-3d-modeline
 ;;     modus-vivendi-theme-subtle-diffs
 ;;
 ;; The default scale is as follows (it can be customised as well):
@@ -397,6 +398,16 @@ between foreground and background is >= 7:1)."
   "Use a distinct background for `org-mode' source blocks."
   :type 'boolean)
 
+(defcustom modus-vivendi-theme-3d-modeline nil
+  "Use a three-dimensional style for the active mode line."
+  :type 'boolean)
+
+(defun modus-vivendi-theme-modeline (col3d col)
+  "Control the box colour of the mode line, either COL3D or COL."
+  (if modus-vivendi-theme-3d-modeline
+      (list :line-width 1 :color col3d :style 'released-button)
+    (list :line-width 1 :color col :style nil)))
+
 (defcustom modus-vivendi-theme-subtle-diffs nil
   "Use fewer/dim backgrounds in `diff-mode', `ediff',`magit'."
   :type 'boolean)
@@ -2167,7 +2178,8 @@ AMOUNT is a customisation option."
    `(message-mml ((,class (:foreground ,green-alt))))
    `(message-separator ((,class (:background ,bg-alt :foreground 
,fg-special-warm))))
    ;;;; modeline
-   `(mode-line ((,class (:box (:line-width 1 :color ,fg-inactive) :background 
,bg-active :foreground ,fg-active))))
+   `(mode-line ((,class (:box ,(modus-vivendi-theme-modeline bg-inactive 
fg-inactive)
+                                 :background ,bg-active :foreground 
,fg-active))))
    `(mode-line-buffer-id ((,class (:weight bold))))
    `(mode-line-emphasis ((,class (:foreground ,blue-active :weight bold))))
    `(mode-line-highlight ((,class (:inherit modus-theme-active-blue :box 
(:line-width -1 :style pressed-button)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]