st

git clone git://mattcarlson.org/repos/st.git
Log | Files | Refs

commit 40fa26e3285c880518f3df0be58e75f0a9260f1f
parent 61c64c84fdcbf7a39a8623438dbf9bbe78ba3b45
Author: Matthew Carlson <matt@mcarlson.xyz>
Date:   Fri, 23 Jul 2021 20:31:58 -0400

added xresources vars for new xst-xresources patches

Diffstat:
Mconfig.h | 58----------------------------------------------------------
Mx.c | 60++++++++++++++++++++++++++++++------------------------------
2 files changed, 30 insertions(+), 88 deletions(-)

diff --git a/config.h b/config.h @@ -135,64 +135,6 @@ static unsigned int defaultattr = 11; // force mouse select/shortcuts while mask is active (when mode_mouse is set) static uint forcemousemod = ShiftMask; -// xresources -ResourcePref resources[] = { - { "font", STRING, &font }, - { "font2", STRING, &font2[0] }, - { "color0", STRING, &colorname[0] }, - { "color1", STRING, &colorname[1] }, - { "color2", STRING, &colorname[2] }, - { "color3", STRING, &colorname[3] }, - { "color4", STRING, &colorname[4] }, - { "color5", STRING, &colorname[5] }, - { "color6", STRING, &colorname[6] }, - { "color7", STRING, &colorname[7] }, - { "color8", STRING, &colorname[8] }, - { "color9", STRING, &colorname[9] }, - { "color10", STRING, &colorname[10] }, - { "color11", STRING, &colorname[11] }, - { "color12", STRING, &colorname[12] }, - { "color13", STRING, &colorname[13] }, - { "color14", STRING, &colorname[14] }, - { "color15", STRING, &colorname[15] }, - { "background", STRING, &colorname[258] }, - { "foreground", STRING, &colorname[257] }, - { "cursorColor", STRING, &colorname[256] }, - { "termname", STRING, &termname }, - { "shell", STRING, &shell }, - { "minlatency", INTEGER, &minlatency }, - { "maxlatency", INTEGER, &maxlatency }, - { "blinktimeout", INTEGER, &blinktimeout }, - { "bellvolume", INTEGER, &bellvolume }, - { "tabspaces", INTEGER, &tabspaces }, - { "borderpx", INTEGER, &borderpx }, - { "cwscale", FLOAT, &cwscale }, - { "chscale", FLOAT, &chscale }, - { "doubleclicktimeout", INTEGER, &doubleclicktimeout }, - { "tripleclicktimeout", INTEGER, &tripleclicktimeout }, - { "allowaltscreen", INTEGER, &allowaltscreen }, - { "allowwindowops", INTEGER, &allowwindowops }, - { "cursorthickness", INTEGER, &cursorthickness }, - { "boxdraw", INTEGER, &boxdraw }, - { "boxdraw_bold", INTEGER, &boxdraw_bold }, - { "boxdraw_braille", INTEGER, &boxdraw_braille }, - { "bellvolume", INTEGER, &bellvolume }, - { "alpha", FLOAT, &alpha }, - { "alphaUnfocused", FLOAT, &alphaUnfocused }, - { "defaultfg", INTEGER, &defaultfg }, - { "defaultbg", INTEGER, &defaultbg }, - { "defaultcs", INTEGER, &defaultcs }, - { "defaultrcs", INTEGER, &defaultrcs }, - { "bg", INTEGER, &bg }, - { "bgUnfocused", INTEGER, &bgUnfocused }, - { "cursorstyle", INTEGER, &cursorstyle }, - { "cols", INTEGER, &cols }, - { "rows", INTEGER, &rows }, - { "mousefg", INTEGER, &mousefg }, - { "mousebg", INTEGER, &mousebg }, - { "defaultattr", INTEGER, &defaultattr }, -}; - // internal mouse shortcuts const unsigned int mousescrollincrement = 1; static MouseShortcut mshortcuts[] = { diff --git a/x.c b/x.c @@ -2382,43 +2382,43 @@ xrdb_load(void) colorname[i] = ret.addr; } - XRESOURCE_LOAD_STRING("foreground", colorname[defaultfg]); - XRESOURCE_LOAD_STRING("background", colorname[defaultbg]); - XRESOURCE_LOAD_STRING("cursorfg", colorname[defaultcs]) - else { - // this looks confusing because we are chaining off of the if - // in the macro. probably we should be wrapping everything blocks - // so this isn't possible... - defaultcs = defaultfg; - } - XRESOURCE_LOAD_STRING("reverse-cursor", colorname[defaultrcs]) - else { - // see above. - defaultrcs = defaultbg; - } - XRESOURCE_LOAD_STRING("font", font); + XRESOURCE_LOAD_STRING("background", colorname[258]); + XRESOURCE_LOAD_STRING("foreground", colorname[257]); + XRESOURCE_LOAD_STRING("cursorColor", colorname[256]); XRESOURCE_LOAD_STRING("termname", termname); - - /* XRESOURCE_LOAD_INTEGER("xfps", xfps); */ - /* XRESOURCE_LOAD_INTEGER("actionfps", actionfps); */ + XRESOURCE_LOAD_STRING("shell", shell); + XRESOURCE_LOAD_INTEGER("minlatency", minlatency); + XRESOURCE_LOAD_INTEGER("maxlatency", maxlatency); XRESOURCE_LOAD_INTEGER("blinktimeout", blinktimeout); XRESOURCE_LOAD_INTEGER("bellvolume", bellvolume); + XRESOURCE_LOAD_INTEGER("tabspaces", tabspaces); XRESOURCE_LOAD_INTEGER("borderpx", borderpx); - /* XRESOURCE_LOAD_INTEGER("borderless", borderless); */ - - /* cursorblinkstate = 1; // in case if cursor shape was changed from a blinking one to a non-blinking */ - /* XRESOURCE_LOAD_INTEGER("cursorthickness", cursorthickness); */ - /* XRESOURCE_LOAD_INTEGER("cursorblinkstyle", cursorblinkstyle); */ - /* XRESOURCE_LOAD_INTEGER("cursorblinkontype", cursorblinkontype); */ - - /* todo: https://github.com/gnotclub/xst/commit/1e82647b0e04077e975679a4b4cf1eb02b04e6bc */ - /* XRESOURCE_LOAD_INTEGER("mouseScrollLines", mousescrolllines); */ - XRESOURCE_LOAD_FLOAT("cwscale", cwscale); XRESOURCE_LOAD_FLOAT("chscale", chscale); - - /* XRESOURCE_LOAD_CHAR("prompt_char", prompt_char); */ + XRESOURCE_LOAD_INTEGER("doubleclicktimeout", doubleclicktimeout); + XRESOURCE_LOAD_INTEGER("tripleclicktimeout", tripleclicktimeout); + XRESOURCE_LOAD_INTEGER("allowaltscreen", allowaltscreen); + XRESOURCE_LOAD_INTEGER("allowwindowops", allowwindowops); + XRESOURCE_LOAD_INTEGER("cursorthickness", cursorthickness); + XRESOURCE_LOAD_INTEGER("boxdraw", boxdraw); + XRESOURCE_LOAD_INTEGER("boxdraw_bold", boxdraw_bold); + XRESOURCE_LOAD_INTEGER("boxdraw_braille", boxdraw_braille); + XRESOURCE_LOAD_INTEGER("bellvolume", bellvolume); + XRESOURCE_LOAD_FLOAT("alpha", alpha); + XRESOURCE_LOAD_FLOAT("alphaUnfocused", alphaUnfocused); + XRESOURCE_LOAD_INTEGER("defaultfg", defaultfg); + XRESOURCE_LOAD_INTEGER("defaultbg", defaultbg); + XRESOURCE_LOAD_INTEGER("defaultcs", defaultcs); + XRESOURCE_LOAD_INTEGER("defaultrcs", defaultrcs); + XRESOURCE_LOAD_INTEGER("bg", bg); + XRESOURCE_LOAD_INTEGER("bgUnfocused", bgUnfocused); + XRESOURCE_LOAD_INTEGER("cursorstyle", cursorstyle); + XRESOURCE_LOAD_INTEGER("cols", cols); + XRESOURCE_LOAD_INTEGER("rows", rows); + XRESOURCE_LOAD_INTEGER("mousefg", mousefg); + XRESOURCE_LOAD_INTEGER("mousebg", mousebg); + XRESOURCE_LOAD_INTEGER("defaultattr", defaultattr); } XFlush(dpy); }