From 88840ffc2b69a9f2097e324f06a1b372c16087b3 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 25 Nov 2024 23:36:18 -0800 Subject: [PATCH] Abstract out colors and font into variables --- theme.jl | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/theme.jl b/theme.jl index d18d229..60f5415 100644 --- a/theme.jl +++ b/theme.jl @@ -4,26 +4,29 @@ (let* ((button-width 30) (title-height button-width) + (bg (list 'background "#111414")) + (fg (list 'foreground "#bfbfbf" "#ff9800")) + (font (list 'font (get-font-typed "Pango" "Dosis 14"))) (default-frame - `(((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . 0) (width . ,button-width) (height . ,title-height) (text . "×") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . close-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . ,button-width) (width . ,button-width) (height . ,title-height) (text . "☐") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . maximize-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . ,(* 2 button-width)) (width . ,button-width) (height . ,button-width) (text . "_") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . iconify-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (left-edge . 0) (width . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) (class . menu-button) (text . "⮟") (x-justify . center) (y-justify . center)) - ((background . ("#111414")) (right-edge . 5) (left-edge . 5) (height . 5) (bottom-edge . -5) (class . bottom-border)) - ((background . ("#111414")) (left-edge . 0) (width . 5) (height . 5) (bottom-edge . -5) (class . bottom-left-corner)) - ((background . ("#111414")) (right-edge . 0) (width . 5) (height . 5) (bottom-edge . -5) (class . bottom-right-corner)) + `((,bg ,fg (right-edge . 0) (width . ,button-width) (height . ,title-height) (text . "×") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . close-button)) + (,bg ,fg (right-edge . ,button-width) (width . ,button-width) (height . ,title-height) (text . "☐") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . maximize-button)) + (,bg ,fg (right-edge . ,(* 2 button-width)) (width . ,button-width) (height . ,button-width) (text . "_") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . iconify-button)) + (,bg ,fg (left-edge . 0) (width . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) (class . menu-button) (text . "⮟") (x-justify . center) (y-justify . center)) + (,bg (right-edge . 5) (left-edge . 5) (height . 5) (bottom-edge . -5) (class . bottom-border)) + (,bg (left-edge . 0) (width . 5) (height . 5) (bottom-edge . -5) (class . bottom-left-corner)) + (,bg (right-edge . 0) (width . 5) (height . 5) (bottom-edge . -5) (class . bottom-right-corner)) - ((background . ("#111414")) (right-edge . ,(* 3 button-width)) (left-edge . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) - (foreground . ("#bfbfbf" "#ff9800")) (font . ,(get-font-typed "Pango" "Dosis 14")) (text . ,window-name) (x-justify . center) (y-justify . center) (class . title)))) + (,bg ,fg ,font (right-edge . ,(* 3 button-width)) (left-edge . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) + (text . ,window-name) (x-justify . center) (y-justify . center) (class . title)))) (shaded-frame - `(((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . 0) (width . ,button-width) (height . ,title-height) (text . "×") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . close-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . ,button-width) (width . ,button-width) (height . ,title-height) (text . "☐") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . maximize-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (right-edge . ,(* 2 button-width)) (width . ,button-width) (height . ,title-height) (text . "_") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . iconify-button)) - ((background . ("#111414")) (foreground "#bfbfbf" "#ff9800") (left-edge . 0) (width . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) (class . menu-button) (text . "⮝") (x-justify . center) (y-justify . center)) + `((,bg ,fg (right-edge . 0) (width . ,button-width) (height . ,title-height) (text . "×") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . close-button)) + (,bg ,fg (right-edge . ,button-width) (width . ,button-width) (height . ,title-height) (text . "☐") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . maximize-button)) + (,bg ,fg (right-edge . ,(* 2 button-width)) (width . ,button-width) (height . ,title-height) (text . "_") (x-justify . center) (y-justify . center) (top-edge . ,(- title-height)) (class . iconify-button)) + (,bg ,fg (left-edge . 0) (width . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) (class . menu-button) (text . "⮝") (x-justify . center) (y-justify . center)) - ((background . ("#111414")) (right-edge . ,(* 3 button-width)) (left-edge . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) - (foreground . ("#bfbfbf" "#ff9800")) (font . ,(get-font-typed "Pango" "Dosis 14")) (text . ,window-name) (x-justify . center) (y-justify . center) (class . title))))) + (,bg ,fg ,font (right-edge . ,(* 3 button-width)) (left-edge . ,button-width) (height . ,title-height) (top-edge . ,(- title-height)) + (text . ,window-name) (x-justify . center) (y-justify . center) (class . title))))) (add-frame-style 'yoshi (lambda (w type) (case type