diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-10 11:00:17 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-10 11:00:17 +0100 |
commit | fed2e42488194bfc45a55f687dd97b28a998a3f3 (patch) | |
tree | 8d1ffe023bb7228c43c35da6db45a72243c94739 /.local/share/mode/plug.d/50_accent | |
parent | f99aa9d2c9baa0ce6ca01f47bf69e4c3901b54a8 (diff) |
more refactoring
Diffstat (limited to '.local/share/mode/plug.d/50_accent')
-rw-r--r-- | .local/share/mode/plug.d/50_accent | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/share/mode/plug.d/50_accent b/.local/share/mode/plug.d/50_accent new file mode 100644 index 0000000..6e0aa73 --- /dev/null +++ b/.local/share/mode/plug.d/50_accent @@ -0,0 +1,16 @@ +#!/bin/sh +# create accent color differently for dark/light mode + +# do not generate accent color if already explicitly defined by theme +[ -n "$accent" ] && return + +[ "$mode" == "light" ] && { + accent="$color15" + accent_text="$color0" +} +[ "$mode" == "dark" ] && { + accent="$(mix_rgb $bg $color0 0.5)" + accent_text="$fg" +} + +export accent accent_text |