anotherglitchinthematrix / monochrome

Monochromatic theme collection, for those who seeks.
https://marketplace.visualstudio.com/items?itemName=anotherglitchinthematrix.monochrome
MIT License
160 stars 11 forks source link

can you add the terminal color scheme for gnome terminal. i am in love with this project, but i cant seem to find the terminal color schemes in the files. #9

Closed pjbryan closed 1 year ago

pjbryan commented 2 years ago

i am in love with this project, but i cant seem to find the terminal color schemes in the files.

anotherglitchinthematrix commented 2 years ago

@peejxyy, thank you for kind words, those color values are generated upon build and the real values can be extracted using a developer option on Visual Studio Code while using the theme, Developer: Generate Color Theme From Current Settings, for example, the extracted color values for the monochrome dark is below, after the extraction, you can use the website terminal.sexy to export these colors according to your likings.

"terminal.ansiBlack": "#101010",
"terminal.ansiBlue": "#3c3c3c",
"terminal.ansiBrightBlack": "#262626",
"terminal.ansiBrightBlue": "#3c3c3c",
"terminal.ansiBrightCyan": "#686868",
"terminal.ansiBrightGreen": "#525252",
"terminal.ansiBrightMagenta": "#939393",
"terminal.ansiBrightRed": "#7e7e7e",
"terminal.ansiBrightWhite": "#ebebeb",
"terminal.ansiBrightYellow": "#a9a9a9",
"terminal.ansiCyan": "#686868",
"terminal.ansiGreen": "#525252",
"terminal.ansiMagenta": "#939393",
"terminal.ansiRed": "#7e7e7e",
"terminal.ansiWhite": "#bfbfbf",
"terminal.ansiYellow": "#a9a9a9",
"terminal.background": "#101010",
"terminal.foreground": "#939393",

For some reason, I couldn't get a correct encoded url for the theme but you can use the Xresources format to import the colors to terminal.sexy.

! special
*.foreground:   #939393
*.background:   #101010
*.cursorColor:  #939393

! black
*.color0:       #101010
*.color8:       #262626

! red
*.color1:       #7e7e7e
*.color9:       #7e7e7e

! green
*.color2:       #525252
*.color10:      #525252

! yellow
*.color3:       #a9a9a9
*.color11:      #a9a9a9

! blue
*.color4:       #3c3c3c
*.color12:      #3c3c3c

! magenta
*.color5:       #939393
*.color13:      #939393

! cyan
*.color6:       #686868
*.color14:      #686868

! white
*.color7:       #bfbfbf
*.color15:      #ebebeb

And this is the result for Gnome Terminal that terminal.sexy generated.

#!/usr/bin/env bash
# Base16 - Gnome Terminal color scheme install script

[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="terminal.sexy"
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="terminal-dot-sexy"
[[ -z "$DCONF" ]] && DCONF=dconf
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen

dset() {
    local key="$1"; shift
    local val="$1"; shift

    if [[ "$type" == "string" ]]; then
        val="'$val'"
    fi

    "$DCONF" write "$PROFILE_KEY/$key" "$val"
}

# because dconf still doesn't have "append"
dlist_append() {
    local key="$1"; shift
    local val="$1"; shift

    local entries="$(
        {
            "$DCONF" read "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
            echo "'$val'"
        } | head -c-1 | tr "\n" ,
    )"

    "$DCONF" write "$key" "[$entries]"
}

# Newest versions of gnome-terminal use dconf
if which "$DCONF" > /dev/null 2>&1; then
    [[ -z "$BASE_KEY_NEW" ]] && BASE_KEY_NEW=/org/gnome/terminal/legacy/profiles:

    if [[ -n "`$DCONF list $BASE_KEY_NEW/`" ]]; then
        if which "$UUIDGEN" > /dev/null 2>&1; then
            PROFILE_SLUG=`uuidgen`
        fi

        if [[ -n "`$DCONF read $BASE_KEY_NEW/default`" ]]; then
            DEFAULT_SLUG=`$DCONF read $BASE_KEY_NEW/default | tr -d \'`
        else
            DEFAULT_SLUG=`$DCONF list $BASE_KEY_NEW/ | grep '^:' | head -n1 | tr -d :/`
        fi

        DEFAULT_KEY="$BASE_KEY_NEW/:$DEFAULT_SLUG"
        PROFILE_KEY="$BASE_KEY_NEW/:$PROFILE_SLUG"

        # copy existing settings from default profile
        $DCONF dump "$DEFAULT_KEY/" | $DCONF load "$PROFILE_KEY/"

        # add new copy to list of profiles
        dlist_append $BASE_KEY_NEW/list "$PROFILE_SLUG"

        # update profile values with theme options
        dset visible-name "'$PROFILE_NAME'"
        dset palette "['#101010', '#7e7e7e', '#525252', '#a9a9a9', '#3c3c3c', '#939393', '#686868', '#bfbfbf', '#262626', '#7e7e7e', '#525252', '#a9a9a9', '#3c3c3c', '#939393', '#686868', '#ebebeb']"
        dset background-color "'#101010'"
        dset foreground-color "'#939393'"
        dset bold-color "'#939393'"
        dset bold-color-same-as-fg "true"
        dset use-theme-colors "false"
        dset use-theme-background "false"

        unset PROFILE_NAME
        unset PROFILE_SLUG
        unset DCONF
        unset UUIDGEN
        exit 0
    fi
fi

# Fallback for Gnome 2 and early Gnome 3
[[ -z "$GCONFTOOL" ]] && GCONFTOOL=gconftool
[[ -z "$BASE_KEY" ]] && BASE_KEY=/apps/gnome-terminal/profiles

PROFILE_KEY="$BASE_KEY/$PROFILE_SLUG"

gset() {
    local type="$1"; shift
    local key="$1"; shift
    local val="$1"; shift

    "$GCONFTOOL" --set --type "$type" "$PROFILE_KEY/$key" -- "$val"
}

# Because gconftool doesn't have "append"
glist_append() {
    local type="$1"; shift
    local key="$1"; shift
    local val="$1"; shift

    local entries="$(
        {
            "$GCONFTOOL" --get "$key" | tr -d '[]' | tr , "\n" | fgrep -v "$val"
            echo "$val"
        } | head -c-1 | tr "\n" ,
    )"

    "$GCONFTOOL" --set --type list --list-type $type "$key" "[$entries]"
}

# Append the Base16 profile to the profile list
glist_append string /apps/gnome-terminal/global/profile_list "$PROFILE_SLUG"

gset string visible_name "$PROFILE_NAME"
gset string palette "#101010:#7e7e7e:#525252:#a9a9a9:#3c3c3c:#939393:#686868:#bfbfbf:#262626:#7e7e7e:#525252:#a9a9a9:#3c3c3c:#939393:#686868:#ebebeb"
gset string background_color "#101010"
gset string foreground_color "#939393"
gset string bold_color "#939393"
gset bool   bold_color_same_as_fg "true"
gset bool   use_theme_colors "false"
gset bool   use_theme_background "false"

unset PROFILE_NAME
unset PROFILE_SLUG
unset DCONF
unset UUIDGEN
devaayushraj commented 1 year ago

Can you please tell the background color of monochrome dark subtle?

anotherglitchinthematrix commented 1 year ago

@devaayushraj Oh dear, sorry for late response the color combinations were given in the README.md