-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Make it work on Windows Terminal /WSL2 #413
Comments
I've a semi-automated migration process to convert a scheme from this repo and added it into Windows terminal. Let me describe what I did. Windows terminal has its full configuration including color schemes defined in json format. "schemes":
[
{
"background": "#1A1B26",
"black": "#414868",
"blue": "#7AA2F7",
"brightBlack": "#414868",
"brightBlue": "#7AA2F7",
"brightCyan": "#7DCFFF",
"brightGreen": "#9ECE6A",
"brightPurple": "#7DCFFF",
"brightRed": "#F7768E",
"brightWhite": "#C0CAF5",
"brightYellow": "#E0AF68",
"cursorColor": "#FFFFFF",
"cyan": "#7DCFFF",
"foreground": "#C0CAF5",
"green": "#9ECE6A",
"name": "TokyoNight",
"purple": "#7DCFFF",
"red": "#F7768E",
"selectionBackground": "#FFFFFF",
"white": "#A9B1D6",
"yellow": "#E0AF68"
},
<we-want-to-add-new-scheme-here>
], I've used alacritty's so created a windows terminal compatible json structure ... win_term_json_str="\
{\
\"schemes\": [\
{\
\"black\": \"$COLOR_01\",\
\"red\": \"$COLOR_02\",\
\"green\": \"$COLOR_03\",\
\"yellow\":\"$COLOR_04\",\
\"blue\":\"$COLOR_05\",\
\"magenta\": \"$COLOR_06\",\
\"cyan\":\"$COLOR_07\",\
\"white\": \"$COLOR_08\",\
\"brightblack\":\"$COLOR_09\",\
\"brightred\":\"$COLOR_10\",\
\"brightgreen\":\"$COLOR_11\",\
\"brightyellow\": \"$COLOR_12\",\
\"brightblue\": \"$COLOR_13\",\
\"brightmagenta\":\"$COLOR_14\",\
\"brightcyan\": \"$COLOR_15\",\
\"brightwhite\":\"$COLOR_16\",\
\"background\": \"$BACKGROUND_COLOR\",\
\"foreground\": \"$FOREGROUND_COLOR\",\
\"cursorColor\": \"$CURSOR_COLOR\",\
\"selectionBackground\": \"$COLOR_16\",\
\"name\": \"$PROFILE_NAME\"\
}\
]\
}" I was not sure which color to use for "selectionBackground" - as this looks to be missing - so I've just repeated COLOR_16 there. As a final step we would need to merge above json into the main config... Main config path in WSL could be mounted as We can use So the overall process using zenburn scheme cd install
source zenburn.sh
export win_term_json_str="\
{\
\"schemes\": [\
{\
\"black\": \"$COLOR_01\",\
\"red\": \"$COLOR_02\",\
\"green\": \"$COLOR_03\",\
\"yellow\":\"$COLOR_04\",\
\"blue\":\"$COLOR_05\",\
\"magenta\": \"$COLOR_06\",\
\"cyan\":\"$COLOR_07\",\
\"white\": \"$COLOR_08\",\
\"brightblack\":\"$COLOR_09\",\
\"brightred\":\"$COLOR_10\",\
\"brightgreen\":\"$COLOR_11\",\
\"brightyellow\": \"$COLOR_12\",\
\"brightblue\": \"$COLOR_13\",\
\"brightmagenta\":\"$COLOR_14\",\
\"brightcyan\": \"$COLOR_15\",\
\"brightwhite\":\"$COLOR_16\",\
\"background\": \"$BACKGROUND_COLOR\",\
\"foreground\": \"$FOREGROUND_COLOR\",\
\"cursorColor\": \"$CURSOR_COLOR\",\
\"selectionBackground\": \"$COLOR_16\",\
\"name\": \"$PROFILE_NAME\"\
}\
]\
}"
echo $win_term_json_str | jq . > /tmp/win-term-scheme.json
cp /mnt/c/Users/$USER/AppData/Local/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json /tmp
jq -s '.[0] * .[1]' /tmp/win-term-scheme.json /tmp/settings.json > /tmp/new-settings.json This is not foolproof, so make a backup of your config before overwriting it. |
Hello,
I love Gogh and use it on my Kali VM. Lately, I've became a fan of WSL2 and Gogh doesn't seem to be working on WSL. I'm aware of #183 (comment) and that there is no way that WSL changes the colors of Windows (maybe now there is, since a couple of years have passed?), but what about making Gogh work in Windows Terminal?
I'm not talking abount running Gogh inside WSL and it changing the Windows Terminal configuration, but rather running Gogh directly on Windows Terminal. I'm also aware that other tool exists, such as colortool, but I quite like Gogh
The text was updated successfully, but these errors were encountered: