#if defined(GRUVBOX)
int Palette[ClrCount] = {
- [Red] = 0xFFfb4934, // Red
- [Green] = 0xFFb8bb26, // Green
- [Yellow] = 0xFFfabd2f, // Yellow
- [Blue] = 0xFF83a598, // Blue
- [Purple] = 0xFF93869b, // Purple
- [Aqua] = 0xFF8ec07c, // Aqua
- [Orange] = 0xFFfe8019, // Orange
- [EditBg] = 0xFF1d2021, // Edit region background
- [EditFg] = 0xFFd5c4a1, // Edit region text
- [EditSel] = 0xFF504945, // Edit region selection
- [EditCsr] = 0xFFfbf1c7, // Edit region cursor
- [TagsBg] = 0xFF3c3836, // Tags region background
- [TagsFg] = 0xFFd5c4a1, // Tags region text
- [TagsSel] = 0xFF504945, // Tags region selection
- [TagsCsr] = 0xFFfbf1c7, // Tags region cursor
- [ScrollBg] = 0xFF665c54, // Scroll region background
- [ScrollFg] = 0xFF1d2021, // Scroll region foreground
- [VerBdr] = 0xFF665c54, // Vertical border
- [HorBdr] = 0xFF665c54, // Horizontal border
+ [Red] = 0xfb4934, // Red
+ [Green] = 0xb8bb26, // Green
+ [Yellow] = 0xfabd2f, // Yellow
+ [Blue] = 0x83a598, // Blue
+ [Purple] = 0x93869b, // Purple
+ [Aqua] = 0x8ec07c, // Aqua
+ [Orange] = 0xfe8019, // Orange
+ [EditBg] = 0x1d2021, // Edit region background
+ [EditFg] = 0xd5c4a1, // Edit region text
+ [EditSel] = 0x504945, // Edit region selection
+ [EditCsr] = 0xfbf1c7, // Edit region cursor
+ [TagsBg] = 0x3c3836, // Tags region background
+ [TagsFg] = 0xd5c4a1, // Tags region text
+ [TagsSel] = 0x504945, // Tags region selection
+ [TagsCsr] = 0xfbf1c7, // Tags region cursor
+ [ScrollBg] = 0x665c54, // Scroll region background
+ [ScrollFg] = 0x1d2021, // Scroll region foreground
+ [VerBdr] = 0x665c54, // Vertical border
+ [HorBdr] = 0x665c54, // Horizontal border
};
#elif defined(PARCHMENT)
int Palette[ClrCount] = {
- [Red] = 0xFF880000, // Red
- [Green] = 0xFF005500, // Green
- [Yellow] = 0xFFeeee9e, // Yellow
- [Blue] = 0xFF004488, // Blue
- [Purple] = 0xFF770077, // Purple
- [Aqua] = 0xFF007777, // Aqua
- [Orange] = 0xFF000000, // Orange ???
- [EditBg] = 0xFFffffea, // Edit region background
- [EditFg] = 0xFF000000, // Edit region text
- [EditSel] = 0xFFeeee9e, // Edit region selection
- [EditCsr] = 0xFF000000, // Edit region cursor
- [TagsBg] = 0xFFeaffff, // Tags region background
- [TagsFg] = 0xFF000000, // Tags region text
- [TagsSel] = 0xFF9eeeee, // Tags region selection
- [TagsCsr] = 0xFF000000, // Tags region cursor
- [ScrollBg] = 0xff99994c, // Scroll region background
- [ScrollFg] = 0xFFffffea, // Scroll region foreground
- [VerBdr] = 0xFF8888cc, // Vertical border
- [HorBdr] = 0xFF8888cc, // Horizontal border
+ [Red] = 0x772222, // Red
+ [Green] = 0x227722, // Green
+ [Blue] = 0x222277, // Blue
+ [Yellow] = 0x000000, // Yellow ???
+ [Purple] = 0x000000, // Purple ???
+ [Aqua] = 0x000000, // Aqua ???
+ [Orange] = 0x000000, // Orange ???
+ [EditBg] = 0xefefda, // Edit region background
+ [EditSel] = 0xdede8e, // Edit region selection
+ [EditFg] = 0x000000, // Edit region text
+ [EditCsr] = 0x000000, // Edit region cursor
+ [TagsBg] = 0xdaefef, // Tags region background
+ [TagsSel] = 0x8edede, // Tags region selection
+ [TagsFg] = 0x000000, // Tags region text
+ [TagsCsr] = 0x000000, // Tags region cursor
+ [ScrollBg] = 0x89893c, // Scroll region background
+ [ScrollFg] = 0xefefda, // Scroll region foreground
+ [VerBdr] = 0x89893c, // Vertical border
+ [HorBdr] = 0x000000, // Horizontal border
};
#endif
-
enum { FontCacheSize = 16 };
-static void oninput(int mods, Rune key);
static void draw_glyphs(size_t x, size_t y, UGlyph* glyphs, size_t rlen, size_t ncols);
static WinRegion getregion(size_t x, size_t y);
-
static struct XSel* selfetch(Atom atom);
static void xftcolor(XftColor* xc, int id);
static void xftcolor(XftColor* xc, int id) {
#define COLOR(c) ((c) | ((c) >> 8))
uint32_t c = Palette[id];
- xc->color.alpha = COLOR((c & 0xFF000000) >> 16);
+ xc->color.alpha = 0xFFFF;
xc->color.red = COLOR((c & 0x00FF0000) >> 8);
xc->color.green = COLOR((c & 0x0000FF00));
xc->color.blue = COLOR((c & 0x000000FF) << 8);
return;
struct XSel* sel = selfetch( e->xselection.selection );
Atom rtype;
- unsigned long format = 0, nitems = 0, nleft = 0, nread = 0;
+ unsigned long format = 0, nitems = 0, nleft = 0;
unsigned char* propdata = NULL;
XGetWindowProperty(X.display, X.self, sel->atom, 0, -1, False, AnyPropertyType, &rtype,
(int*)&format, &nitems, &nleft, &propdata);
View* view = win_view(i);
x11_draw_rect(bg, 0, Regions[i].y - 3, width, Regions[i].height + 8);
x11_draw_rect(HorBdr, 0, Regions[i].y - 3, width, 1);
- for (size_t line = 0, y = 0; y < view->nrows; y++) {
+ for (size_t y = 0; y < view->nrows; y++) {
Row* row = view_getrow(view, y);
draw_glyphs(Regions[i].x, Regions[i].y + ((y+1) * fheight), row->cols, row->rlen, row->len);
}