Add multiple color schemes and key bindings to change them
This commits adds these color schemes: - the default (dark) st color scheme - the default (dark) alacritty color scheme - One Half (dark & light) - Solarized (dark & light) - Gruvbox (dark & light) Select one with Alt+1..8. Select the next one with Alt+0. Select the previous one with Ctrl+Alt+0.
This commit is contained in:
22
st.c
22
st.c
@ -2171,6 +2171,28 @@ tstrsequence(uchar c)
|
||||
term.esc |= ESC_STR;
|
||||
}
|
||||
|
||||
void
|
||||
tupdatebgcolor(int oldbg, int newbg)
|
||||
{
|
||||
for (int y = 0; y < term.row; y++) {
|
||||
for (int x = 0; x < term.col; x++) {
|
||||
if (term.line[y][x].bg == oldbg)
|
||||
term.line[y][x].bg = newbg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tupdatefgcolor(int oldfg, int newfg)
|
||||
{
|
||||
for (int y = 0; y < term.row; y++) {
|
||||
for (int x = 0; x < term.col; x++) {
|
||||
if (term.line[y][x].fg == oldfg)
|
||||
term.line[y][x].fg = newfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tcontrolcode(uchar ascii)
|
||||
{
|
||||
|
Reference in New Issue
Block a user