Add colorscheme support - st - personal variant of st
 (HTM) git clone https://git.drkhsh.at/st.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 8652507314bd4e7675b6c0ad5d7889b015450200
 (DIR) parent 23bc55144aaaa98cabd2c75bcc2310c5966a6a5b
 (HTM) Author: drkhsh <me@drkhsh.at>
       Date:   Wed, 10 Jan 2024 10:11:29 +0100
       
       Add colorscheme support
       
       Keeps it simple, includes headers from config.h.
       Fuck your dynamic colorscheme switching
       
       Diffstat:
         A colors/cyberpunk-neon.h             |      33 +++++++++++++++++++++++++++++++
         A colors/default.h                    |      31 +++++++++++++++++++++++++++++++
         A colors/dracula.h                    |      33 +++++++++++++++++++++++++++++++
         A colors/gruvbox-dark.h               |      33 +++++++++++++++++++++++++++++++
         A colors/onedark.h                    |      31 +++++++++++++++++++++++++++++++
         A colors/tokyo-night.h                |      31 +++++++++++++++++++++++++++++++
         M config.def.h                        |      35 ++++---------------------------
         M config.h                            |      70 ++++----------------------------
       
       8 files changed, 203 insertions(+), 94 deletions(-)
       ---
 (DIR) diff --git a/colors/cyberpunk-neon.h b/colors/cyberpunk-neon.h
       @@ -0,0 +1,33 @@
       +/* https://st.suckless.org/patches/cyberpunk-neon */
       +
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +        [0] = "#123e7c",
       +        [1] = "#ff0000",
       +        [2] = "#d300c4",
       +        [3] = "#f57800",
       +        [4] = "#123e7c",
       +        [5] = "#711c91",
       +        [6] = "#0abdc6",
       +        [7] = "#d7d7d5",
       +
       +        /* 8 bright colors */
       +        [8] = "#1c61c2",
       +        [9] = "#ff0000",
       +        [10] = "#d300c4",
       +        [11] = "#f57800",
       +        [12] = "#00ff00",
       +        [13] = "#711c91",
       +        [14] = "#0abdc6",
       +        [15] = "#d7d7d5",
       +
       +        [255] = 0,
       +
       +          /* more colors can be added after 255 to use with DefaultXX */
       +          "#ffffff", /* 256 -> cursor */
       +          "#555555", /* 257 -> rev cursor*/
       +          "#0abdc6", /* 258 -> fg */
       +          "#000b1e", /* 259 -> bg */
       +};
       +
 (DIR) diff --git a/colors/default.h b/colors/default.h
       @@ -0,0 +1,31 @@
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +        "black",
       +        "red3",
       +        "green3",
       +        "yellow3",
       +        "blue2",
       +        "magenta3",
       +        "cyan3",
       +        "gray90",
       +
       +        /* 8 bright colors */
       +        "gray50",
       +        "red",
       +        "green",
       +        "yellow",
       +        "#5c5cff",
       +        "magenta",
       +        "cyan",
       +        "white",
       +
       +        [255] = 0,
       +
       +        /* more colors can be added after 255 to use with DefaultXX */
       +        "#cccccc",
       +        "#555555",
       +        "gray90", /* default foreground colour */
       +        "black", /* default background colour */
       +};
       +
 (DIR) diff --git a/colors/dracula.h b/colors/dracula.h
       @@ -0,0 +1,33 @@
       +/* https://st.suckless.org/patches/dracula */
       +
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +        [0] = "#000000", /* black   */
       +        [1] = "#ff5555", /* red     */
       +        [2] = "#50fa7b", /* green   */
       +        [3] = "#f1fa8c", /* yellow  */
       +        [4] = "#bd93f9", /* blue    */
       +        [5] = "#ff79c6", /* magenta */
       +        [6] = "#8be9fd", /* cyan    */
       +        [7] = "#bbbbbb", /* white   */
       +
       +        /* 8 bright colors */
       +        [8]  = "#44475a", /* black   */
       +        [9]  = "#ff5555", /* red     */
       +        [10] = "#50fa7b", /* green   */
       +        [11] = "#f1fa8c", /* yellow  */
       +        [12] = "#bd93f9", /* blue    */
       +        [13] = "#ff79c6", /* magenta */
       +        [14] = "#8be9fd", /* cyan    */
       +        [15] = "#ffffff", /* white   */
       +
       +        [255] = 0,
       +
       +          /* more colors can be added after 255 to use with DefaultXX */
       +          "#f8f8f2", /* 256 -> cursor */
       +          "#f8f8f2", /* 257 -> rev cursor*/
       +          "#f8f8f2", /* 258 -> fg */
       +        "#282a36", /* 259 -> bg */
       +};
       +
 (DIR) diff --git a/colors/gruvbox-dark.h b/colors/gruvbox-dark.h
       @@ -0,0 +1,33 @@
       +/* https://st.suckless.org/patches/gruvbox */
       +
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +        [0] = "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
       +        [1] = "#cc241d", /* red     */
       +        [2] = "#98971a", /* green   */
       +        [3] = "#d79921", /* yellow  */
       +        [4] = "#458588", /* blue    */
       +        [5] = "#b16286", /* magenta */
       +        [6] = "#689d6a", /* cyan    */
       +        [7] = "#a89984", /* white   */
       +
       +        /* 8 bright colors */
       +        [8]  = "#928374", /* black   */
       +        [9]  = "#fb4934", /* red     */
       +        [10] = "#b8bb26", /* green   */
       +        [11] = "#fabd2f", /* yellow  */
       +        [12] = "#83a598", /* blue    */
       +        [13] = "#d3869b", /* magenta */
       +        [14] = "#8ec07c", /* cyan    */
       +        [15] = "#ebdbb2", /* white   */
       +
       +        [255] = 0,
       +
       +          /* more colors can be added after 255 to use with DefaultXX */
       +          "#ebdbb2", /* 256 -> cursor */
       +          "#282828", /* 257 -> rev cursor*/
       +          "#ebdbb2", /* 258 -> fg */
       +        "#282828", /* 259 -> bg */
       +};
       +
 (DIR) diff --git a/colors/onedark.h b/colors/onedark.h
       @@ -0,0 +1,31 @@
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +          "#1e2127",
       +          "#e06c75",
       +          "#98c379",
       +          "#d19a66",
       +          "#61afef",
       +          "#c678dd",
       +          "#56b6c2",
       +        "#828791",
       +
       +        /* 8 bright colors */
       +          "#5c6370",
       +          "#e06c75",
       +          "#98c379",
       +          "#d19a66",
       +          "#61afef",
       +          "#c678dd",
       +          "#56b6c2",
       +          "#e6efff",
       +
       +          [255] = 0,
       +
       +          /* more colors can be added after 255 to use with DefaultXX */
       +          "#add8e6", /* 256 -> cursor */
       +          "#555555", /* 257 -> rev cursor*/
       +        "#ffffff", /* 258 -> fg */
       +        "#1e2127", /* 259 -> bg */
       +};
       +
 (DIR) diff --git a/colors/tokyo-night.h b/colors/tokyo-night.h
       @@ -0,0 +1,31 @@
       +/* Terminal colors (16 first used in escape sequence) */
       +static const char *colorname[] = {
       +        /* 8 normal colors */
       +          "#15161E",
       +          "#f7768e",
       +          "#9ece6a",
       +          "#e0af68",
       +          "#7aa2f7",
       +          "#bb9af7",
       +          "#7dcfff",
       +        "#a9b1d6",
       +
       +        /* 8 bright colors */
       +
       +          "#414868",
       +          "#f7768e",
       +          "#9ece6a",
       +          "#e0af68",
       +          "#7aa2f7",
       +          "#bb9af7",
       +          "#7dcfff",
       +          "#c0caf5",
       +
       +          [255] = 0,
       +
       +          /* more colors can be added after 255 to use with DefaultXX */
       +          "#7dcfff", /* 256 -> cursor */
       +          "#a9b1d6", /* 257 -> rev cursor*/
       +        "#c0caf5", /* 258 -> fg */
       +        "#15161E", /* 259 -> bg */
       +};
 (DIR) diff --git a/config.def.h b/config.def.h
       @@ -93,37 +93,10 @@ char *termname = "st-256color";
         */
        unsigned int tabspaces = 8;
        
       -/* Terminal colors (16 first used in escape sequence) */
       -static const char *colorname[] = {
       -        /* 8 normal colors */
       -        "black",
       -        "red3",
       -        "green3",
       -        "yellow3",
       -        "blue2",
       -        "magenta3",
       -        "cyan3",
       -        "gray90",
       -
       -        /* 8 bright colors */
       -        "gray50",
       -        "red",
       -        "green",
       -        "yellow",
       -        "#5c5cff",
       -        "magenta",
       -        "cyan",
       -        "white",
       -
       -        [255] = 0,
       -
       -        /* more colors can be added after 255 to use with DefaultXX */
       -        "#cccccc",
       -        "#555555",
       -        "gray90", /* default foreground colour */
       -        "black", /* default background colour */
       -};
       -
       +/*
       + * Terminal color scheme
       + */
       +#include "colors/default.h"
        
        /*
         * Default colors (colorname index)
 (DIR) diff --git a/config.h b/config.h
       @@ -96,74 +96,18 @@ unsigned int tabspaces = 8;
        /* bg opacity */
        float alpha = 1.0; // reset using compositor (fix for qubes)
        
       -/* Terminal colors (16 first used in escape sequence) */
       -static const char *colorname[] = {
       -        /* https://st.suckless.org/patches/dracula */
       -
       -        /* 8 normal colors */
       -        [0] = "#000000", /* black   */
       -        [1] = "#ff5555", /* red     */
       -        [2] = "#50fa7b", /* green   */
       -        [3] = "#f1fa8c", /* yellow  */
       -        [4] = "#bd93f9", /* blue    */
       -        [5] = "#ff79c6", /* magenta */
       -        [6] = "#8be9fd", /* cyan    */
       -        [7] = "#bbbbbb", /* white   */
       -
       -        /* 8 bright colors */
       -        [8]  = "#44475a", /* black   */
       -        [9]  = "#ff5555", /* red     */
       -        [10] = "#50fa7b", /* green   */
       -        [11] = "#f1fa8c", /* yellow  */
       -        [12] = "#bd93f9", /* blue    */
       -        [13] = "#ff79c6", /* magenta */
       -        [14] = "#8be9fd", /* cyan    */
       -        [15] = "#ffffff", /* white   */
       -
       -        /* special colors */
       -        [256] = "#282a36", /* background */
       -        [257] = "#f8f8f2", /* foreground */
       -
       -
       -        /* https://st.suckless.org/patches/gruvbox */
       -
       -        /* 8 normal colors */
       -//        [0] = "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
       -//        [1] = "#cc241d", /* red     */
       -//        [2] = "#98971a", /* green   */
       -//        [3] = "#d79921", /* yellow  */
       -//        [4] = "#458588", /* blue    */
       -//        [5] = "#b16286", /* magenta */
       -//        [6] = "#689d6a", /* cyan    */
       -//        [7] = "#a89984", /* white   */
       -
       -        /* 8 bright colors */
       -//        [8]  = "#928374", /* black   */
       -//        [9]  = "#fb4934", /* red     */
       -//        [10] = "#b8bb26", /* green   */
       -//        [11] = "#fabd2f", /* yellow  */
       -//        [12] = "#83a598", /* blue    */
       -//        [13] = "#d3869b", /* magenta */
       -//        [14] = "#8ec07c", /* cyan    */
       -//        [15] = "#ebdbb2", /* white   */
       -};
       -
       +/*
       + * Terminal color scheme
       + */
       +#include "colors/tokyo-night.h"
        
        /*
         * Default colors (colorname index)
         * foreground, background, cursor, reverse cursor
         */
       -
       -/* dracula */
       -unsigned int defaultfg = 257;
       -unsigned int defaultbg = 256;
       -unsigned int defaultcs = 257;
       -
       -/* gruvbox */
       -//unsigned int defaultfg = 15;
       -//unsigned int defaultbg = 0;
       -//unsigned int defaultcs = 15;
       -
       +unsigned int defaultfg = 258;
       +unsigned int defaultbg = 259;
       +unsigned int defaultcs = 256;
        static unsigned int defaultrcs = 257;
        
         /*