diff --git a/config.h b/config.h index d881d7c..c699cdd 100644 --- a/config.h +++ b/config.h @@ -86,6 +86,8 @@ static unsigned int tabspaces = 8; /* bg opacity */ static const int alpha = 0xdd; +static int whichcolortable = 0; + static char *colornames[3][260] = { // cobalt neon { @@ -110,7 +112,7 @@ static char *colornames[3][260] = { /* more colors can be added after 255 to use with DefaultXX */ "#142838", /* bg color */ - "#8ff586", // 6 + "#8ff586", // 6 "#c4206f" /* cs color */ }, // Highway @@ -157,10 +159,10 @@ static char *colornames[3][260] = { [255] = 0, "#171423", /* bg color */ "#9f9fa1", /* fg color */ - "#a288f7", // 15 + "#a288f7", // 15 } }; - + /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { // cobalt neon @@ -186,7 +188,7 @@ static const char *colorname[] = { /* more colors can be added after 255 to use with DefaultXX */ "#142838", /* bg color */ -"#8ff586", // 6 +"#8ff586", // 6 "#c4206f" /* cs color */ }; @@ -215,7 +217,7 @@ static const char *altcolorname[] = { /* more colors can be added after 255 to use with DefaultXX */ "#3a3d3f", /* bg color */ -"#d9efd3", /* fg color */ +"#d9efd3", /* fg color */ "#42ff58" /* cs color */ }; diff --git a/st.c b/st.c index faf1994..92c35d4 100644 --- a/st.c +++ b/st.c @@ -337,9 +337,9 @@ static void selpaste(const Arg *); static void xzoom(const Arg *); static void xzoomabs(const Arg *); static void xzoomreset(const Arg *); -static void printsel(const Arg *); -static void printscreen(const Arg *) ; -static void toggleprinter(const Arg *); +// static void printsel(const Arg *); +// static void printscreen(const Arg *) ; +// static void toggleprinter(const Arg *); static void sendbreak(const Arg *); /* Config.h for applying patches and the configuration. */ @@ -1537,7 +1537,7 @@ ttywrite(const char *s, size_t n) if (r < n) { /* * We weren't able to write out everything. - * This means the buffer is getting full + * This means the buffer is getting full * again. Empty it. */ if (n < lim) @@ -2611,23 +2611,23 @@ tprinter(char *s, size_t len) } } -void -toggleprinter(const Arg *arg) -{ - term.mode ^= MODE_PRINT; -} +// void +// toggleprinter(const Arg *arg) +// { +// term.mode ^= MODE_PRINT; +// } -void -printscreen(const Arg *arg) -{ - tdump(); -} +// void +// printscreen(const Arg *arg) +// { +// tdump(); +// } -void -printsel(const Arg *arg) -{ - tdumpsel(); -} +// void +// printsel(const Arg *arg) +// { +// tdumpsel(); +// } void tdumpsel(void) @@ -3167,7 +3167,8 @@ sixd_to_16bit(int x) const char* getcolorname(int i) { - return (usealtcolors) ? altcolorname[i] : colorname[i]; + return colornames[whichcolortable][i]; +// return (usealtcolors) ? altcolorname[i] : colorname[i]; } int @@ -3955,21 +3956,21 @@ xdrawcursor(void) case 8: utf8decode("䷀", &g.u, UTF_SIZ); case 9: - utf8decode("䷬", &g.u, UTF_SIZ); + utf8decode("䷬", &g.u, UTF_SIZ); case 10: utf8decode("䷑", &g.u, UTF_SIZ); case 11: - utf8decode("䷼", &g.u, UTF_SIZ); + utf8decode("䷼", &g.u, UTF_SIZ); case 12: utf8decode("░", &g.u, UTF_SIZ); case 13: - utf8decode("▒", &g.u, UTF_SIZ); + utf8decode("▒", &g.u, UTF_SIZ); case 14: utf8decode("▓", &g.u, UTF_SIZ); case 15: - utf8decode("▣", &g.u, UTF_SIZ); */ + utf8decode("▣", &g.u, UTF_SIZ); */ case 7: /* st extension: snowman */ - utf8decode("▒", &g.u, UTF_SIZ); + utf8decode("▒", &g.u, UTF_SIZ); // utf8decode("☃", &g.u, UTF_SIZ); case 0: /* Blinking Block */ case 1: /* Blinking Block (Default) */ @@ -4170,7 +4171,13 @@ numlock(const Arg *dummy) void swapcolors(const Arg *dummy) { - usealtcolors = !usealtcolors; +// usealtcolors = !usealtcolors; + whichcolortable = whichcolortable +1; + printf("%d, %d\n",whichcolortable, + sizeof(colornames)/sizeof(colornames[0]) ); + if ( whichcolortable >= sizeof(colornames)/sizeof(colornames[0]) ) { + whichcolortable = 0; + } xloadcols(); redraw(); } diff --git a/xrdb b/xrdb new file mode 120000 index 0000000..8bd5218 --- /dev/null +++ b/xrdb @@ -0,0 +1 @@ +iterm2colors/xrdb \ No newline at end of file