From: Thomas Teixeira Date: Fri, 3 Nov 2023 11:18:29 +0000 (+0100) Subject: feat: revert nobold policy, dims are calculated on the fly X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=1d6ea8c60d348c7cbb3edd3bdd314e52d86fa575;p=dabruin.kak feat: revert nobold policy, dims are calculated on the fly --- diff --git a/dabruin.kak b/dabruin.kak index 1dd54b2..767c6b3 100644 --- a/dabruin.kak +++ b/dabruin.kak @@ -4,43 +4,55 @@ ## evaluate-commands %sh{ + calculate_dim() { + printf "$1" | cut -d: -f2 | fold -b2 | + while read -r hex; do + base10="$(printf '%d' "0x${hex}")" + printf '%x' "$((base10 * 1 / 2))" + done | xargs printf 'rgb:%s' + } + # base accent="${kak_opt_dabruin_accent:-rgb:FFB852}" background='rgb:242124' foreground='rgb:F5F5F5' grey='rgb:B2BECA' deep='rgb:3D4C59' + # dim + accent_dim="$(calculate_dim "${accent}")" + foreground_dim="$(calculate_dim "${foreground}")" + grey_dim="$(calculate_dim "${grey}")" ## code cat <<-COLORSCHEME - face global value ${foreground}+di - face global type ${foreground}+u + face global value ${foreground_dim}+i + face global type ${foreground}+bu face global variable ${foreground}+i face global module string - face global function ${accent}+di + face global function ${accent_dim}+i face global string ${grey}+i - face global keyword ${accent} + face global keyword ${accent_dim} face global operator ${foreground} face global attribute ${foreground}+i face global comment ${deep} face global documentation comment - face global meta ${accent}+d + face global meta ${accent_dim}+b face global builtin ${foreground}+i - face global title ${accent}+i + face global title ${accent}+bi face global header title face global mono string face global block mono - face global link ${accent}+ud - face global bullet ${foreground}+d + face global link ${accent_dim}+u + face global bullet ${foreground_dim} face global list bullet face global Default ${foreground},${background} face global PrimarySelection ${background},${accent}+fg - face global SecondarySelection ${accent},${background}+rdfg + face global SecondarySelection ${background},${accent_dim}+fg face global PrimaryCursor ${background},${foreground}+fg - face global SecondaryCursor ${foreground},${background}+rdfg + face global SecondaryCursor ${background},${foreground_dim}+fg face global PrimaryCursorEol ${grey}+r - face global SecondaryCursorEol ${grey}+dr - face global LineNumbers ${grey},${background}+d + face global SecondaryCursorEol ${grey_dim}+r + face global LineNumbers ${grey_dim},${background} face global LineNumbersWrapped ${background},${background} face global LineNumberCursor ${foreground},${background} face global MenuForeground ${accent},${background}+rb