summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/site-lisp/oni-smt.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2015-07-26 22:11:23 +0200
committerGravatar Tom Willemse2015-07-26 22:11:23 +0200
commit474961355d7bd3fed6c31ca8182f8f10ae123b17 (patch)
treec114d7ec6b389e67ec55339633fb3c919885c482 /emacs/.emacs.d/site-lisp/oni-smt.el
parent4884fe70e6154eb87790a41531315a441fccc3f5 (diff)
downloaddotfiles-474961355d7bd3fed6c31ca8182f8f10ae123b17.tar.gz
dotfiles-474961355d7bd3fed6c31ca8182f8f10ae123b17.zip
Add overlay and background
These were heavily inspired by ocodo-svg-modelines
Diffstat (limited to 'emacs/.emacs.d/site-lisp/oni-smt.el')
-rw-r--r--emacs/.emacs.d/site-lisp/oni-smt.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/emacs/.emacs.d/site-lisp/oni-smt.el b/emacs/.emacs.d/site-lisp/oni-smt.el
index 48f15fb..13e4365 100644
--- a/emacs/.emacs.d/site-lisp/oni-smt.el
+++ b/emacs/.emacs.d/site-lisp/oni-smt.el
@@ -177,8 +177,40 @@
'(:fill "#ccc" :font-family "Fantasque Sans" :filter nil
:font-weight "bold" :font-style "italic"))
+(defun oni-smt-background (theme)
+ ""
+ (let ((stops '(("0%" "#484848" 0.3)
+ ("25%" "#484848" 0.3)
+ ("75%" "#484848" 0.3)
+ ("100%" "#111111" 0.3))))
+ `((\defs
+ (linearGradient
+ :id "twisted" :x1 "0%" :y1 "0%" :x2 "100%" :y2 "25%"
+ (stop :offset ,(first (nth 1 stops)) :stop-color ,(second (nth 1 stops)) :stop-opacity ,(third (nth 1 stops)))
+ (stop :offset ,(first (nth 2 stops)) :stop-color ,(second (nth 2 stops)) :stop-opacity ,(third (nth 2 stops)))
+ (stop :offset ,(first (nth 3 stops)) :stop-color ,(second (nth 3 stops)) :stop-opacity ,(third (nth 3 stops)))
+ (stop :offset ,(first (nth 4 stops)) :stop-color ,(second (nth 4 stops)) :stop-opacity ,(third (nth 4 stops)))))
+ (rect :width "100%" :height "100%" :x 0 :y 0 :fill "url(#twisted)"))))
+
+(defun oni-smt-overlay (_)
+ ""
+ (let ((stops '(("0%" "#FFFFFF" 0.1)
+ ("20%" "#111111" 0.0)
+ ("90%" "#111111" 0.5)
+ ("100%" "#111111" 0.8))))
+ `((\defs
+ (linearGradient
+ :id "over-gradient" :x1 "0%" :y1 "0%" :x2 "0%" :y2 "100%"
+ (stop :offset ,(first (nth 1 stops)) :stop-color ,(second (nth 1 stops)) :stop-opacity ,(third (nth 1 stops)))
+ (stop :offset ,(first (nth 2 stops)) :stop-color ,(second (nth 2 stops)) :stop-opacity ,(third (nth 2 stops)))
+ (stop :offset ,(first (nth 3 stops)) :stop-color ,(second (nth 3 stops)) :stop-opacity ,(third (nth 3 stops)))
+ (stop :offset ,(first (nth 4 stops)) :stop-color ,(second (nth 4 stops)) :stop-opacity ,(third (nth 4 stops)))))
+ (rect :width "100%" :height "100%" :x 0 :y 0 :fill "url(#over-gradient)"))))
+
(smt/deftheme oni-smt
:prototype 'black-crystal
+ :overlay 'oni-smt-overlay
+ :background 'oni-smt-background
:local-widgets (list (cons 'major-mode
(smt/make-widget
:prototype 'major-mode