From 474961355d7bd3fed6c31ca8182f8f10ae123b17 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 26 Jul 2015 22:11:23 +0200 Subject: Add overlay and background These were heavily inspired by ocodo-svg-modelines --- emacs/.emacs.d/site-lisp/oni-smt.el | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'emacs/.emacs.d/site-lisp/oni-smt.el') 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 -- cgit v1.2.3-54-g00ecf