diff --git a/FAQ b/FAQ index 3502c60..0f9609d 100644 --- a/FAQ +++ b/FAQ @@ -1,12 +1,14 @@ ## Why does st not handle utmp entries? -Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task. +Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task. + ## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever! It means that st doesn’t have any terminfo entry on your system. Chances are you did not `make install`. If you just want to test it without installing it, -you can manualy run `tic -s st.info`. +you can manually run `tic -sx st.info`. + ## Nothing works, and nothing is said about an unknown terminal! @@ -15,19 +17,21 @@ you can manualy run `tic -s st.info`. * Some programs don’t complain about the lacking st description and default to another terminal. In that case see the question about terminfo. -## I get some weird glitches/visual bug on _random program_! - -Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give -you a list of available terminals, but you’ll most likely switch between xterm, -st or st-256color. The default value for TERM can be changed in config.h -(TNAME). ## How do I scroll back up? -Using a terminal multiplexer. +* Using a terminal multiplexer. + * `st -e tmux` using C-b [ + * `st -e screen` using C-a ESC +* Using the excellent tool of [scroll](https://git.suckless.org/scroll/). +* Using the scrollback [patch](https://st.suckless.org/patches/scrollback/). + + +## I would like to have utmp and/or scroll functionality by default + +You can add the absolute patch of both programs in your config.h +file. You only have to modify the value of utmp and scroll variables. -* `st -e tmux` using C-b [ -* `st -e screen` using C-a ESC ## Why doesn't the Del key work in some programs? @@ -84,12 +88,14 @@ If you are using zsh, then read the zsh FAQ Putting these lines into your .zshrc will fix the problems. + ## How can I use meta in 8bit mode? St supports meta in 8bit mode, but the default terminfo entry doesn't use this capability. If you want it, you have to use the 'st-meta' value in TERM. + ## I cannot compile st in OpenBSD OpenBSD lacks librt, despite it being mandatory in POSIX @@ -98,13 +104,14 @@ If you want to compile st for OpenBSD you have to remove -lrt from config.mk, an st will compile without any loss of functionality, because all the functions are included in libc on this platform. + ## The Backspace Case St is emulating the Linux way of handling backspace being delete and delete being backspace. This is an issue that was discussed in suckless mailing list -. Here is why some old grumpy +. Here is why some old grumpy terminal users wants its backspace to be how he feels it: Well, I am going to comment why I want to change the behaviour @@ -159,9 +166,85 @@ terminal users wants its backspace to be how he feels it: [1] http://www.ibb.net/~anne/keyboard.html [2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html + ## But I really want the old grumpy behaviour of my terminal Apply [1]. -[1] http://st.suckless.org/patches/delkey +[1] https://st.suckless.org/patches/delkey + +## Why do images not work in st using the w3m image hack? + +w3mimg uses a hack that draws an image on top of the terminal emulator Drawable +window. The hack relies on the terminal to use a single buffer to draw its +contents directly. + +st uses double-buffered drawing so the image is quickly replaced and may show a +short flicker effect. + +Below is a patch example to change st double-buffering to a single Drawable +buffer. + +diff --git a/x.c b/x.c +--- a/x.c ++++ b/x.c +@@ -732,10 +732,6 @@ xresize(int col, int row) + win.tw = col * win.cw; + win.th = row * win.ch; + +- XFreePixmap(xw.dpy, xw.buf); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); +- XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, win.w, win.h); + + /* resize to new width */ +@@ -1148,8 +1144,7 @@ xinit(int cols, int rows) + gcvalues.graphics_exposures = False; + dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, + &gcvalues); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.buf = xw.win; + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); + +@@ -1632,8 +1627,6 @@ xdrawline(Line line, int x1, int y1, int x2) + void + xfinishdraw(void) + { +- XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, +- win.h, 0, 0); + XSetForeground(xw.dpy, dc.gc, + dc.col[IS_SET(MODE_REVERSE)? + defaultfg : defaultbg].pixel); + + +## BadLength X error in Xft when trying to render emoji + +Xft makes st crash when rendering color emojis with the following error: + +"X Error of failed request: BadLength (poly request too large or internal Xlib length error)" + Major opcode of failed request: 139 (RENDER) + Minor opcode of failed request: 20 (RenderAddGlyphs) + Serial number of failed request: 1595 + Current serial number in output stream: 1818" + +This is a known bug in Xft (not st) which happens on some platforms and +combination of particular fonts and fontconfig settings. + +See also: +https://gitlab.freedesktop.org/xorg/lib/libxft/issues/6 +https://bugs.freedesktop.org/show_bug.cgi?id=107534 +https://bugzilla.redhat.com/show_bug.cgi?id=1498269 + +The solution is to remove color emoji fonts or disable this in the fontconfig +XML configuration. As an ugly workaround (which may work only on newer +fontconfig versions (FC_COLOR)), the following code can be used to mask color +fonts: + + FcPatternAddBool(fcpattern, FC_COLOR, FcFalse); + +Please don't bother reporting this bug to st, but notify the upstream Xft +developers about fixing this bug. diff --git a/LICENSE b/LICENSE index e61610a..d80eb47 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,16 @@ MIT/X Consortium License +© 2014-2020 Hiltjo Posthuma +© 2018 Devin J. Pohly +© 2014-2017 Quentin Rameau © 2009-2012 Aurélien APTEL -© 2009 Anselm R Garbe -© 2012-2015 Roberto E. Vargas Caballero -© 2012-2015 Christoph Lohmann <20h at r-36 dot net> +© 2008-2017 Anselm R Garbe +© 2012-2017 Roberto E. Vargas Caballero +© 2012-2016 Christoph Lohmann <20h at r-36 dot net> © 2013 Eon S. Jeon © 2013 Alexander Sedov © 2013 Mark Edgar -© 2013 Eric Pruitt +© 2013-2014 Eric Pruitt © 2013 Michael Forney © 2013-2014 Markus Teich © 2014-2015 Laslo Hunhold diff --git a/Makefile b/Makefile index 9e52d13..6dfa212 100644 --- a/Makefile +++ b/Makefile @@ -1,60 +1,58 @@ # st - simple terminal # See LICENSE file for copyright and license details. +.POSIX: include config.mk -SRC = st.c -OBJ = ${SRC:.c=.o} +SRC = st.c x.c boxdraw.c +OBJ = $(SRC:.c=.o) all: options st options: @echo st build options: - @echo "CFLAGS = ${CFLAGS}" - @echo "LDFLAGS = ${LDFLAGS}" - @echo "CC = ${CC}" + @echo "CFLAGS = $(STCFLAGS)" + @echo "LDFLAGS = $(STLDFLAGS)" + @echo "CC = $(CC)" config.h: cp config.def.h config.h .c.o: - @echo CC $< - @${CC} -c ${CFLAGS} $< + $(CC) $(STCFLAGS) -c $< -${OBJ}: config.h config.mk +st.o: config.h st.h win.h +x.o: arg.h config.h st.h win.h +boxdraw.o: config.h st.h boxdraw_data.h -st: ${OBJ} - @echo CC -o $@ - @${CC} -o $@ ${OBJ} ${LDFLAGS} +$(OBJ): config.h config.mk + +st: $(OBJ) + $(CC) -o $@ $(OBJ) $(STLDFLAGS) clean: - @echo cleaning - @rm -f st ${OBJ} st-${VERSION}.tar.gz + rm -f st $(OBJ) st-$(VERSION).tar.gz dist: clean - @echo creating dist tarball - @mkdir -p st-${VERSION} - @cp -R LICENSE Makefile README.st config.mk config.def.h st.info st.1 arg.h ${SRC} st-${VERSION} - @tar -cf st-${VERSION}.tar st-${VERSION} - @xz -9 st-${VERSION}.tar - @rm -rf st-${VERSION} + mkdir -p st-$(VERSION) + cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\ + config.def.h st.info st.1 arg.h st.h win.h $(SRC)\ + st-$(VERSION) + tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz + rm -rf st-$(VERSION) -install: all - @echo installing executable file to ${DESTDIR}${PREFIX}/bin - @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f st ${DESTDIR}${PREFIX}/bin - @chmod 755 ${DESTDIR}${PREFIX}/bin/st - @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 - @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1 - @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1 +install: st + mkdir -p $(DESTDIR)$(PREFIX)/bin + cp -f st $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/st + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 + chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 + tic -sx st.info @echo Please see the README file regarding the terminfo entry of st. - @tic -s st.info uninstall: - @echo removing executable file from ${DESTDIR}${PREFIX}/bin - @rm -f ${DESTDIR}${PREFIX}/bin/st - @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 - @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1 + rm -f $(DESTDIR)$(PREFIX)/bin/st + rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 .PHONY: all options clean dist install uninstall diff --git a/8/st-0.8.1/README b/README similarity index 100% rename from 8/st-0.8.1/README rename to README diff --git a/arg.h b/arg.h index ba3fb3f..a22e019 100644 --- a/arg.h +++ b/arg.h @@ -21,28 +21,30 @@ extern char *argv0; argc--;\ break;\ }\ - for (brk_ = 0, argv[0]++, argv_ = argv;\ - argv[0][0] && !brk_;\ - argv[0]++) {\ + int i_;\ + for (i_ = 1, brk_ = 0, argv_ = argv;\ + argv[0][i_] && !brk_;\ + i_++) {\ if (argv_ != argv)\ break;\ - argc_ = argv[0][0];\ + argc_ = argv[0][i_];\ switch (argc_) + #define ARGEND }\ } #define ARGC() argc_ -#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ +#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ ((x), abort(), (char *)0) :\ - (brk_ = 1, (argv[0][1] != '\0')?\ - (&argv[0][1]) :\ + (brk_ = 1, (argv[0][i_+1] != '\0')?\ + (&argv[0][i_+1]) :\ (argc--, argv++, argv[0]))) -#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ +#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ (char *)0 :\ - (brk_ = 1, (argv[0][1] != '\0')?\ - (&argv[0][1]) :\ + (brk_ = 1, (argv[0][i_+1] != '\0')?\ + (&argv[0][i_+1]) :\ (argc--, argv++, argv[0]))) #endif diff --git a/boxdraw.c b/boxdraw.c new file mode 100644 index 0000000..28a92d0 --- /dev/null +++ b/boxdraw.c @@ -0,0 +1,194 @@ +/* + * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih + * MIT/X Consortium License + */ + +#include +#include "st.h" +#include "boxdraw_data.h" + +/* Rounded non-negative integers division of n / d */ +#define DIV(n, d) (((n) + (d) / 2) / (d)) + +static Display *xdpy; +static Colormap xcmap; +static XftDraw *xd; +static Visual *xvis; + +static void drawbox(int, int, int, int, XftColor *, XftColor *, ushort); +static void drawboxlines(int, int, int, int, XftColor *, ushort); + +/* public API */ + +void +boxdraw_xinit(Display *dpy, Colormap cmap, XftDraw *draw, Visual *vis) +{ + xdpy = dpy; xcmap = cmap; xd = draw, xvis = vis; +} + +int +isboxdraw(Rune u) +{ + Rune block = u & ~0xff; + return (boxdraw && block == 0x2500 && boxdata[(uint8_t)u]) || + (boxdraw_braille && block == 0x2800); +} + +/* the "index" is actually the entire shape data encoded as ushort */ +ushort +boxdrawindex(const Glyph *g) +{ + if (boxdraw_braille && (g->u & ~0xff) == 0x2800) + return BRL | (uint8_t)g->u; + if (boxdraw_bold && (g->mode & ATTR_BOLD)) + return BDB | boxdata[(uint8_t)g->u]; + return boxdata[(uint8_t)g->u]; +} + +void +drawboxes(int x, int y, int cw, int ch, XftColor *fg, XftColor *bg, + const XftGlyphFontSpec *specs, int len) +{ + for ( ; len-- > 0; x += cw, specs++) + drawbox(x, y, cw, ch, fg, bg, (ushort)specs->glyph); +} + +/* implementation */ + +void +drawbox(int x, int y, int w, int h, XftColor *fg, XftColor *bg, ushort bd) +{ + ushort cat = bd & ~(BDB | 0xff); /* mask out bold and data */ + if (bd & (BDL | BDA)) { + /* lines (light/double/heavy/arcs) */ + drawboxlines(x, y, w, h, fg, bd); + + } else if (cat == BBD) { + /* lower (8-X)/8 block */ + int d = DIV((uint8_t)bd * h, 8); + XftDrawRect(xd, fg, x, y + d, w, h - d); + + } else if (cat == BBU) { + /* upper X/8 block */ + XftDrawRect(xd, fg, x, y, w, DIV((uint8_t)bd * h, 8)); + + } else if (cat == BBL) { + /* left X/8 block */ + XftDrawRect(xd, fg, x, y, DIV((uint8_t)bd * w, 8), h); + + } else if (cat == BBR) { + /* right (8-X)/8 block */ + int d = DIV((uint8_t)bd * w, 8); + XftDrawRect(xd, fg, x + d, y, w - d, h); + + } else if (cat == BBQ) { + /* Quadrants */ + int w2 = DIV(w, 2), h2 = DIV(h, 2); + if (bd & TL) + XftDrawRect(xd, fg, x, y, w2, h2); + if (bd & TR) + XftDrawRect(xd, fg, x + w2, y, w - w2, h2); + if (bd & BL) + XftDrawRect(xd, fg, x, y + h2, w2, h - h2); + if (bd & BR) + XftDrawRect(xd, fg, x + w2, y + h2, w - w2, h - h2); + + } else if (bd & BBS) { + /* Shades - data is 1/2/3 for 25%/50%/75% alpha, respectively */ + int d = (uint8_t)bd; + XftColor xfc; + XRenderColor xrc = { .alpha = 0xffff }; + + xrc.red = DIV(fg->color.red * d + bg->color.red * (4 - d), 4); + xrc.green = DIV(fg->color.green * d + bg->color.green * (4 - d), 4); + xrc.blue = DIV(fg->color.blue * d + bg->color.blue * (4 - d), 4); + + XftColorAllocValue(xdpy, xvis, xcmap, &xrc, &xfc); + XftDrawRect(xd, &xfc, x, y, w, h); + XftColorFree(xdpy, xvis, xcmap, &xfc); + + } else if (cat == BRL) { + /* braille, each data bit corresponds to one dot at 2x4 grid */ + int w1 = DIV(w, 2); + int h1 = DIV(h, 4), h2 = DIV(h, 2), h3 = DIV(3 * h, 4); + + if (bd & 1) XftDrawRect(xd, fg, x, y, w1, h1); + if (bd & 2) XftDrawRect(xd, fg, x, y + h1, w1, h2 - h1); + if (bd & 4) XftDrawRect(xd, fg, x, y + h2, w1, h3 - h2); + if (bd & 8) XftDrawRect(xd, fg, x + w1, y, w - w1, h1); + if (bd & 16) XftDrawRect(xd, fg, x + w1, y + h1, w - w1, h2 - h1); + if (bd & 32) XftDrawRect(xd, fg, x + w1, y + h2, w - w1, h3 - h2); + if (bd & 64) XftDrawRect(xd, fg, x, y + h3, w1, h - h3); + if (bd & 128) XftDrawRect(xd, fg, x + w1, y + h3, w - w1, h - h3); + + } +} + +void +drawboxlines(int x, int y, int w, int h, XftColor *fg, ushort bd) +{ + /* s: stem thickness. width/8 roughly matches underscore thickness. */ + /* We draw bold as 1.5 * normal-stem and at least 1px thicker. */ + /* doubles draw at least 3px, even when w or h < 3. bold needs 6px. */ + int mwh = MIN(w, h); + int base_s = MAX(1, DIV(mwh, 8)); + int bold = (bd & BDB) && mwh >= 6; /* possibly ignore boldness */ + int s = bold ? MAX(base_s + 1, DIV(3 * base_s, 2)) : base_s; + int w2 = DIV(w - s, 2), h2 = DIV(h - s, 2); + /* the s-by-s square (x + w2, y + h2, s, s) is the center texel. */ + /* The base length (per direction till edge) includes this square. */ + + int light = bd & (LL | LU | LR | LD); + int double_ = bd & (DL | DU | DR | DD); + + if (light) { + /* d: additional (negative) length to not-draw the center */ + /* texel - at arcs and avoid drawing inside (some) doubles */ + int arc = bd & BDA; + int multi_light = light & (light - 1); + int multi_double = double_ & (double_ - 1); + /* light crosses double only at DH+LV, DV+LH (ref. shapes) */ + int d = arc || (multi_double && !multi_light) ? -s : 0; + + if (bd & LL) + XftDrawRect(xd, fg, x, y + h2, w2 + s + d, s); + if (bd & LU) + XftDrawRect(xd, fg, x + w2, y, s, h2 + s + d); + if (bd & LR) + XftDrawRect(xd, fg, x + w2 - d, y + h2, w - w2 + d, s); + if (bd & LD) + XftDrawRect(xd, fg, x + w2, y + h2 - d, s, h - h2 + d); + } + + /* double lines - also align with light to form heavy when combined */ + if (double_) { + /* + * going clockwise, for each double-ray: p is additional length + * to the single-ray nearer to the previous direction, and n to + * the next. p and n adjust from the base length to lengths + * which consider other doubles - shorter to avoid intersections + * (p, n), or longer to draw the far-corner texel (n). + */ + int dl = bd & DL, du = bd & DU, dr = bd & DR, dd = bd & DD; + if (dl) { + int p = dd ? -s : 0, n = du ? -s : dd ? s : 0; + XftDrawRect(xd, fg, x, y + h2 + s, w2 + s + p, s); + XftDrawRect(xd, fg, x, y + h2 - s, w2 + s + n, s); + } + if (du) { + int p = dl ? -s : 0, n = dr ? -s : dl ? s : 0; + XftDrawRect(xd, fg, x + w2 - s, y, s, h2 + s + p); + XftDrawRect(xd, fg, x + w2 + s, y, s, h2 + s + n); + } + if (dr) { + int p = du ? -s : 0, n = dd ? -s : du ? s : 0; + XftDrawRect(xd, fg, x + w2 - p, y + h2 - s, w - w2 + p, s); + XftDrawRect(xd, fg, x + w2 - n, y + h2 + s, w - w2 + n, s); + } + if (dd) { + int p = dr ? -s : 0, n = dl ? -s : dr ? s : 0; + XftDrawRect(xd, fg, x + w2 + s, y + h2 - p, s, h - h2 + p); + XftDrawRect(xd, fg, x + w2 - s, y + h2 - n, s, h - h2 + n); + } + } +} diff --git a/boxdraw_data.h b/boxdraw_data.h new file mode 100644 index 0000000..7890500 --- /dev/null +++ b/boxdraw_data.h @@ -0,0 +1,214 @@ +/* + * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih + * MIT/X Consortium License + */ + +/* + * U+25XX codepoints data + * + * References: + * http://www.unicode.org/charts/PDF/U2500.pdf + * http://www.unicode.org/charts/PDF/U2580.pdf + * + * Test page: + * https://github.com/GNOME/vte/blob/master/doc/boxes.txt + */ + +/* Each shape is encoded as 16-bits. Higher bits are category, lower are data */ +/* Categories (mutually exclusive except BDB): */ +/* For convenience, BDL/BDA/BBS/BDB are 1 bit each, the rest are enums */ +#define BDL (1<<8) /* Box Draw Lines (light/double/heavy) */ +#define BDA (1<<9) /* Box Draw Arc (light) */ + +#define BBD (1<<10) /* Box Block Down (lower) X/8 */ +#define BBL (2<<10) /* Box Block Left X/8 */ +#define BBU (3<<10) /* Box Block Upper X/8 */ +#define BBR (4<<10) /* Box Block Right X/8 */ +#define BBQ (5<<10) /* Box Block Quadrants */ +#define BRL (6<<10) /* Box Braille (data is lower byte of U28XX) */ + +#define BBS (1<<14) /* Box Block Shades */ +#define BDB (1<<15) /* Box Draw is Bold */ + +/* (BDL/BDA) Light/Double/Heavy x Left/Up/Right/Down/Horizontal/Vertical */ +/* Heavy is light+double (literally drawing light+double align to form heavy) */ +#define LL (1<<0) +#define LU (1<<1) +#define LR (1<<2) +#define LD (1<<3) +#define LH (LL+LR) +#define LV (LU+LD) + +#define DL (1<<4) +#define DU (1<<5) +#define DR (1<<6) +#define DD (1<<7) +#define DH (DL+DR) +#define DV (DU+DD) + +#define HL (LL+DL) +#define HU (LU+DU) +#define HR (LR+DR) +#define HD (LD+DD) +#define HH (HL+HR) +#define HV (HU+HD) + +/* (BBQ) Quadrants Top/Bottom x Left/Right */ +#define TL (1<<0) +#define TR (1<<1) +#define BL (1<<2) +#define BR (1<<3) + +/* Data for U+2500 - U+259F except dashes/diagonals */ +static const unsigned short boxdata[256] = { + /* light lines */ + [0x00] = BDL + LH, /* light horizontal */ + [0x02] = BDL + LV, /* light vertical */ + [0x0c] = BDL + LD + LR, /* light down and right */ + [0x10] = BDL + LD + LL, /* light down and left */ + [0x14] = BDL + LU + LR, /* light up and right */ + [0x18] = BDL + LU + LL, /* light up and left */ + [0x1c] = BDL + LV + LR, /* light vertical and right */ + [0x24] = BDL + LV + LL, /* light vertical and left */ + [0x2c] = BDL + LH + LD, /* light horizontal and down */ + [0x34] = BDL + LH + LU, /* light horizontal and up */ + [0x3c] = BDL + LV + LH, /* light vertical and horizontal */ + [0x74] = BDL + LL, /* light left */ + [0x75] = BDL + LU, /* light up */ + [0x76] = BDL + LR, /* light right */ + [0x77] = BDL + LD, /* light down */ + + /* heavy [+light] lines */ + [0x01] = BDL + HH, + [0x03] = BDL + HV, + [0x0d] = BDL + HR + LD, + [0x0e] = BDL + HD + LR, + [0x0f] = BDL + HD + HR, + [0x11] = BDL + HL + LD, + [0x12] = BDL + HD + LL, + [0x13] = BDL + HD + HL, + [0x15] = BDL + HR + LU, + [0x16] = BDL + HU + LR, + [0x17] = BDL + HU + HR, + [0x19] = BDL + HL + LU, + [0x1a] = BDL + HU + LL, + [0x1b] = BDL + HU + HL, + [0x1d] = BDL + HR + LV, + [0x1e] = BDL + HU + LD + LR, + [0x1f] = BDL + HD + LR + LU, + [0x20] = BDL + HV + LR, + [0x21] = BDL + HU + HR + LD, + [0x22] = BDL + HD + HR + LU, + [0x23] = BDL + HV + HR, + [0x25] = BDL + HL + LV, + [0x26] = BDL + HU + LD + LL, + [0x27] = BDL + HD + LU + LL, + [0x28] = BDL + HV + LL, + [0x29] = BDL + HU + HL + LD, + [0x2a] = BDL + HD + HL + LU, + [0x2b] = BDL + HV + HL, + [0x2d] = BDL + HL + LD + LR, + [0x2e] = BDL + HR + LL + LD, + [0x2f] = BDL + HH + LD, + [0x30] = BDL + HD + LH, + [0x31] = BDL + HD + HL + LR, + [0x32] = BDL + HR + HD + LL, + [0x33] = BDL + HH + HD, + [0x35] = BDL + HL + LU + LR, + [0x36] = BDL + HR + LU + LL, + [0x37] = BDL + HH + LU, + [0x38] = BDL + HU + LH, + [0x39] = BDL + HU + HL + LR, + [0x3a] = BDL + HU + HR + LL, + [0x3b] = BDL + HH + HU, + [0x3d] = BDL + HL + LV + LR, + [0x3e] = BDL + HR + LV + LL, + [0x3f] = BDL + HH + LV, + [0x40] = BDL + HU + LH + LD, + [0x41] = BDL + HD + LH + LU, + [0x42] = BDL + HV + LH, + [0x43] = BDL + HU + HL + LD + LR, + [0x44] = BDL + HU + HR + LD + LL, + [0x45] = BDL + HD + HL + LU + LR, + [0x46] = BDL + HD + HR + LU + LL, + [0x47] = BDL + HH + HU + LD, + [0x48] = BDL + HH + HD + LU, + [0x49] = BDL + HV + HL + LR, + [0x4a] = BDL + HV + HR + LL, + [0x4b] = BDL + HV + HH, + [0x78] = BDL + HL, + [0x79] = BDL + HU, + [0x7a] = BDL + HR, + [0x7b] = BDL + HD, + [0x7c] = BDL + HR + LL, + [0x7d] = BDL + HD + LU, + [0x7e] = BDL + HL + LR, + [0x7f] = BDL + HU + LD, + + /* double [+light] lines */ + [0x50] = BDL + DH, + [0x51] = BDL + DV, + [0x52] = BDL + DR + LD, + [0x53] = BDL + DD + LR, + [0x54] = BDL + DR + DD, + [0x55] = BDL + DL + LD, + [0x56] = BDL + DD + LL, + [0x57] = BDL + DL + DD, + [0x58] = BDL + DR + LU, + [0x59] = BDL + DU + LR, + [0x5a] = BDL + DU + DR, + [0x5b] = BDL + DL + LU, + [0x5c] = BDL + DU + LL, + [0x5d] = BDL + DL + DU, + [0x5e] = BDL + DR + LV, + [0x5f] = BDL + DV + LR, + [0x60] = BDL + DV + DR, + [0x61] = BDL + DL + LV, + [0x62] = BDL + DV + LL, + [0x63] = BDL + DV + DL, + [0x64] = BDL + DH + LD, + [0x65] = BDL + DD + LH, + [0x66] = BDL + DD + DH, + [0x67] = BDL + DH + LU, + [0x68] = BDL + DU + LH, + [0x69] = BDL + DH + DU, + [0x6a] = BDL + DH + LV, + [0x6b] = BDL + DV + LH, + [0x6c] = BDL + DH + DV, + + /* (light) arcs */ + [0x6d] = BDA + LD + LR, + [0x6e] = BDA + LD + LL, + [0x6f] = BDA + LU + LL, + [0x70] = BDA + LU + LR, + + /* Lower (Down) X/8 block (data is 8 - X) */ + [0x81] = BBD + 7, [0x82] = BBD + 6, [0x83] = BBD + 5, [0x84] = BBD + 4, + [0x85] = BBD + 3, [0x86] = BBD + 2, [0x87] = BBD + 1, [0x88] = BBD + 0, + + /* Left X/8 block (data is X) */ + [0x89] = BBL + 7, [0x8a] = BBL + 6, [0x8b] = BBL + 5, [0x8c] = BBL + 4, + [0x8d] = BBL + 3, [0x8e] = BBL + 2, [0x8f] = BBL + 1, + + /* upper 1/2 (4/8), 1/8 block (X), right 1/2, 1/8 block (8-X) */ + [0x80] = BBU + 4, [0x94] = BBU + 1, + [0x90] = BBR + 4, [0x95] = BBR + 7, + + /* Quadrants */ + [0x96] = BBQ + BL, + [0x97] = BBQ + BR, + [0x98] = BBQ + TL, + [0x99] = BBQ + TL + BL + BR, + [0x9a] = BBQ + TL + BR, + [0x9b] = BBQ + TL + TR + BL, + [0x9c] = BBQ + TL + TR + BR, + [0x9d] = BBQ + TR, + [0x9e] = BBQ + BL + TR, + [0x9f] = BBQ + BL + TR + BR, + + /* Shades, data is an alpha value in 25% units (1/4, 1/2, 3/4) */ + [0x91] = BBS + 1, [0x92] = BBS + 2, [0x93] = BBS + 3, + + /* U+2504 - U+250B, U+254C - U+254F: unsupported (dashes) */ + /* U+2571 - U+2573: unsupported (diagonals) */ +}; diff --git a/config.def.h b/config.def.h index 846e23c..82df958 100644 --- a/config.def.h +++ b/config.def.h @@ -5,23 +5,25 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char font[] = "CMU Typewriter Text:pixelsize=18:antialias=true:autohint=true"; +static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; static int borderpx = 2; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: utmp option + * 2: scroll and/or utmp * 3: SHELL environment variable * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ -static char shell[] = "/bin/zsh"; -static char *utmp = NULL; -static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; +static char *shell = "/bin/zsh"; +char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; +char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ -static char vtiden[] = "\033[?6c"; +char *vtiden = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; @@ -30,20 +32,36 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: " `'\"()[]{}" + * More advanced example: L" `'\"()[]{}" */ -static char worddelimiters[] = " `'\"()[]{}"; +//wchar_t *worddelimiters = L" "; +wchar_t *worddelimiters = L" `'\"()[]{}"; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600; /* alt screens */ -static int allowaltscreen = 1; +int allowaltscreen = 1; -/* frames per second st should at maximum draw to the screen */ -static unsigned int xfps = 120; -static unsigned int actionfps = 30; +/* allow certain non-interactive (insecure) window operations such as: + setting the clipboard text */ +int allowwindowops = 0; + +/* + * draw latency range in ms - from new content/keypress/etc until drawing. + * within this range, st draws when content stops arriving (idle). mostly it's + * near minlatency, but it waits longer for slow updates to avoid partial draw. + * low minlatency will tear/flicker more, as it can "detect" idle too early. + */ +static double minlatency = 8; +static double maxlatency = 33; + +/* + * Synchronized-Update timeout in ms + * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec + */ +static uint su_timeout = 200; /* * blinking timeout (set to 0 to disable blinking) for the terminal blinking @@ -56,6 +74,18 @@ static unsigned int blinktimeout = 800; */ static unsigned int cursorthickness = 2; +/* + * 1: render most of the lines/blocks characters without using the font for + * perfect alignment between cells (U2500 - U259F except dashes/diagonals). + * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored. + * 0: disable (render all U25XX glyphs normally from the font). + */ +const int boxdraw = 0; +const int boxdraw_bold = 0; + +/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ +const int boxdraw_braille = 0; + /* * bell volume. It must be a value between -100 and 100. Use 0 for disabling * it @@ -63,7 +93,7 @@ static unsigned int cursorthickness = 2; static int bellvolume = 0; /* default TERM value */ -static char termname[] = "st-256color"; +char *termname = "st-256color"; /* * spaces per tab @@ -80,51 +110,39 @@ static char termname[] = "st-256color"; * * stty tabs */ -static unsigned int tabspaces = 8; +unsigned int tabspaces = 8; /* bg opacity */ -static const int alpha = 0xdd; +float alpha = 0.8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { - /* solarized dark */ - "#073642", /* 0: black */ - "#dc322f", /* 1: red */ - "#859900", /* 2: green */ - "#b58900", /* 3: yellow */ - "#268bd2", /* 4: blue */ - "#d33682", /* 5: magenta */ - "#2aa198", /* 6: cyan */ - "#eee8d5", /* 7: white */ - "#002b36", /* 8: brblack */ - "#cb4b16", /* 9: brred */ - "#586e75", /* 10: brgreen */ - "#657b83", /* 11: bryellow */ - "#839496", /* 12: brblue */ - "#6c71c4", /* 13: brmagenta*/ - "#93a1a1", /* 14: brcyan */ - "#fdf6e3", /* 15: brwhite */ - }; + /* 8 normal colors */ + "black", + "red3", + "green3", + "yellow3", + "blue2", + "magenta3", + "cyan3", + "gray90", -/* Terminal colors for alternate (light) palette */ -static const char *altcolorname[] = { - /* solarized light */ - "#eee8d5", /* 0: black */ - "#dc322f", /* 1: red */ - "#859900", /* 2: green */ - "#b58900", /* 3: yellow */ - "#268bd2", /* 4: blue */ - "#d33682", /* 5: magenta */ - "#2aa198", /* 6: cyan */ - "#073642", /* 7: white */ - "#fdf6e3", /* 8: brblack */ - "#cb4b16", /* 9: brred */ - "#93a1a1", /* 10: brgreen */ - "#839496", /* 11: bryellow */ - "#657b83", /* 12: brblue */ - "#6c71c4", /* 13: brmagenta*/ - "#586e75", /* 14: brcyan */ - "#002b36", /* 15: brwhite */ + /* 8 bright colors */ + "gray50", + "red", + "green", + "yellow", + "#5c5cff", + "magenta", + "cyan", + "white", + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ + "#cccccc", + "#555555", + "black", }; @@ -132,47 +150,69 @@ static const char *altcolorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -static unsigned int defaultfg = 12; -static unsigned int defaultbg = 8; -static unsigned int defaultcs = 14; -static unsigned int defaultrcs = 15; +unsigned int defaultfg = 7; +unsigned int defaultbg = 258; +static unsigned int defaultcs = 256; +static unsigned int defaultrcs = 257; /* - * Default shape of cursor - * 2: Block ("█") - * 4: Underline ("_") - * 6: Bar ("|") - * 7: Snowman ("☃") + * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 + * Default style of cursor + * 0: Blinking block + * 1: Blinking block (default) + * 2: Steady block ("█") + * 3: Blinking underline + * 4: Steady underline ("_") + * 5: Blinking bar + * 6: Steady bar ("|") + * 7: Blinking st cursor + * 8: Steady st cursor */ -static unsigned int cursorshape = 2; +static unsigned int cursorstyle = 1; +static Rune stcursor = 0x2603; /* snowman (U+2603) */ /* - * Default colour and shape of the mouse cursor + * Default columns and rows numbers */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 7; -static unsigned int mousebg = 0; + +static unsigned int cols = 80; +static unsigned int rows = 24; /* - * Colors used, when the specific fg == defaultfg. So in reverse mode this - * will reverse too. Another logic would only make the simple feature too - * complex. + * Default shape of the mouse cursor */ -static unsigned int defaultitalic = 11; -static unsigned int defaultunderline = 7; + +static char* mouseshape = "xterm"; + +/* + * Color used to display font attributes when fontconfig selected a font which + * doesn't match the ones requested. + */ +static unsigned int defaultattr = 11; + +/* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_ANY_MOD, "\031" }, - { Button5, XK_ANY_MOD, "\005" }, + /* mask button function argument release */ + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask +#define TERMMOD (ControlMask|ShiftMask) static Shortcut shortcuts[] = { /* mask keysym function argument */ @@ -180,15 +220,14 @@ static Shortcut shortcuts[] = { { ControlMask, XK_Print, toggleprinter, {.i = 0} }, { ShiftMask, XK_Print, printscreen, {.i = 0} }, { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, - { MODKEY|ShiftMask, XK_Prior, xzoom, {.f = +1} }, - { MODKEY|ShiftMask, XK_Next, xzoom, {.f = -1} }, - { MODKEY|ShiftMask, XK_Home, xzoomreset, {.f = 0} }, + { TERMMOD, XK_Prior, zoom, {.f = +1} }, + { TERMMOD, XK_Next, zoom, {.f = -1} }, + { TERMMOD, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_C, clipcopy, {.i = 0} }, + { TERMMOD, XK_V, clippaste, {.i = 0} }, + { TERMMOD, XK_Y, selpaste, {.i = 0} }, { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, - { MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} }, - { MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} }, - { MODKEY, XK_Num_Lock, numlock, {.i = 0} }, - { XK_ANY_MOD, XK_F6, swapcolors, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, }; /* @@ -206,10 +245,6 @@ static Shortcut shortcuts[] = { * * 0: no value * * > 0: cursor application mode enabled * * < 0: cursor application mode disabled - * crlf value - * * 0: no value - * * > 0: crlf mode is enabled - * * < 0: crlf mode is disabled * * Be careful with the order of the definitions because st searches in * this table sequentially, so any XK_ANY_MOD must be in the last @@ -228,214 +263,221 @@ static KeySym mappedkeys[] = { -1 }; */ static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; -/* - * Override mouse-select while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forceselmod = ShiftMask; - /* * This is the huge key array which defines all compatibility to the Linux * world. Please decide about changes wisely. */ static Key key[] = { - /* keysym mask string appkey appcursor crlf */ - { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, - { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, - { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, - { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, - { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, - { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, - { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, - { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, - { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, - { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, - { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, - { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, - { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, - { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, - { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, - { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, - { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, - { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, - { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, - { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, - { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, - { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\177", +1, 0, 0}, - { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, - { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, - { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, - { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, - { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, - { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, - { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, - { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, - { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, - { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, - { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, - { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, - { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, - { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, - { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, - { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, - { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, - { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, - { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, - { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, - { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, - { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, - { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, - { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, - { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, - { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, - { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, - { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, - { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, - { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, - { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, - { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, - { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, - { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, - { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, - { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, - { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, - { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, - { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, - { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, - { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, - { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, - { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, - { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, - { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, - { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, - { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, - { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, - { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, - { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, - { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, - { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, - { XK_Delete, XK_ANY_MOD, "\177", +1, 0, 0}, - { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, - { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, - { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, - { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, - { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, - { XK_End, ControlMask, "\033[J", -1, 0, 0}, - { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, - { XK_End, ShiftMask, "\033[K", -1, 0, 0}, - { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, - { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, - { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, - { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, - { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, - { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, - { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, - { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, - { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, - { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, - { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, - { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, - { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, - { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, - { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, - { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, - { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, - { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, - { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, - { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, - { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, - { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, - { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, - { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, - { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, - { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, - { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, - { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, - { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, - { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, - { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, - { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, - { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, - { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, - { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, - { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, - { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, - { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, - { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, - { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, - { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, - { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, - { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, - { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, - { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, - { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, - { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, - { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, - { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, - { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, - { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, - { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, - { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, - { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, - { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, - { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, - { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, - { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, - { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, - { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, - { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, - { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, - { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, - { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, - { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, - { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, - { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, - { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, - { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, - { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, - { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, - { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, - { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, - { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, - { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, - { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, - { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, - { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, - { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, - { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, - { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, - { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, - { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, - { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, - { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, - { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, - { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, - { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, - { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, - { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, - { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, - { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, - { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, - { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, + /* keysym mask string appkey appcursor */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0}, + { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0}, + { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0}, + { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0}, + { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0}, + { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0}, + { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0}, + { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0}, + { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0}, + { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0}, + { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0}, + { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0}, + { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0}, + { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0}, + { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0}, + { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0}, + { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_End, ControlMask, "\033[J", -1, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, }; /* @@ -457,4 +499,3 @@ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~"; - diff --git a/config.h b/config.h index a3680f5..68aaf22 100644 --- a/config.h +++ b/config.h @@ -5,24 +5,25 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char font[] = "Px437_ATI_SmallW_6x8 NF:style=Book:pixelsize=16:antialias=true:autohint=true"; -//"CMU Typewriter Text:pixelsize=18:antialias=true:autohint=true"; +static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; static int borderpx = 2; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: utmp option + * 2: scroll and/or utmp * 3: SHELL environment variable * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ -static char shell[] = "/bin/zsh"; -static char *utmp = NULL; -static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; +static char *shell = "/bin/zsh"; +char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; +char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ -static char vtiden[] = "\033[?6c"; +char *vtiden = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; @@ -31,20 +32,36 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: " `'\"()[]{}" + * More advanced example: L" `'\"()[]{}" */ -static char worddelimiters[] = " `'\"()[]{}"; +//wchar_t *worddelimiters = L" "; +wchar_t *worddelimiters = L" `'\"()[]{}"; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600; /* alt screens */ -static int allowaltscreen = 1; +int allowaltscreen = 1; -/* frames per second st should at maximum draw to the screen */ -static unsigned int xfps = 120; -static unsigned int actionfps = 30; +/* allow certain non-interactive (insecure) window operations such as: + setting the clipboard text */ +int allowwindowops = 0; + +/* + * draw latency range in ms - from new content/keypress/etc until drawing. + * within this range, st draws when content stops arriving (idle). mostly it's + * near minlatency, but it waits longer for slow updates to avoid partial draw. + * low minlatency will tear/flicker more, as it can "detect" idle too early. + */ +static double minlatency = 8; +static double maxlatency = 33; + +/* + * Synchronized-Update timeout in ms + * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec + */ +static uint su_timeout = 200; /* * blinking timeout (set to 0 to disable blinking) for the terminal blinking @@ -57,6 +74,18 @@ static unsigned int blinktimeout = 800; */ static unsigned int cursorthickness = 2; +/* + * 1: render most of the lines/blocks characters without using the font for + * perfect alignment between cells (U2500 - U259F except dashes/diagonals). + * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored. + * 0: disable (render all U25XX glyphs normally from the font). + */ +const int boxdraw = 0; +const int boxdraw_bold = 0; + +/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ +const int boxdraw_braille = 0; + /* * bell volume. It must be a value between -100 and 100. Use 0 for disabling * it @@ -64,7 +93,7 @@ static unsigned int cursorthickness = 2; static int bellvolume = 0; /* default TERM value */ -static char termname[] = "st-256color"; +char *termname = "st-256color"; /* * spaces per tab @@ -81,438 +110,40 @@ static char termname[] = "st-256color"; * * stty tabs */ -static unsigned int tabspaces = 8; +unsigned int tabspaces = 8; /* bg opacity */ -static const int alpha = 0xdd; - -static int whichcolortable = 0; - -static const char *schemenames[] = { - "Cobalt Neon", - "Highway", - "Grape", -// "MonokaiVivid", - "Pandora", - "Shaman", - "Symfonic", - "Lavandula", - "ENCOM", - "Alien Blood", - "Borland", - "IC Orange", - "IC Green", - "Red Alert" - -}; - -static char *colorchart[13][260] = { - // cobalt neon - { - "#142631", // 0 - "#ff2320", // 1 - "#3ba5ff", // 2 - "#e9e75c", // 3 - "#8ff586", // 4 - "#781aa0", // 5 - "#8ff586", // 6 - "#ba46b2", // 7 - "#fff688", // 8 - "#d4312e", // 9 - "#8ff586", // 10 - "#e9f06d", // 11 - "#3c7dd2", // 12 - "#8230a7", // 13 - "#6cbc67", // 14 - "#8ff586", // 15 - - [255] = 0, - - /* more colors can be added after 255 to use with DefaultXX */ - "#142838", /* bg color */ - "#8ff586", // 6 - "#c4206f" /* cs color */ - }, - // Highway - { - "#000000", // 0 - "#d00e18", // 1 - "#138034", // 2 - "#ffcb3e", // 3 - "#006bb3", // 4 - "#6b2775", // 5 - "#384564", // 6 - "#ededed", // 7 - "#5d504a", // 8 - "#f07e18", // 9 - "#b1d130", // 10 - "#fff120", // 11 - "#4fc2fd", // 12 - "#de0071", // 13 - "#5d504a", // 14 - "#ffffff", // 15 - [255] = 0, - "#222225", /* bg color */ - "#ededed", // 7 - "#e0d9b9" /* cs color */ - }, - // Grape - { - "#2d283f", // 0 - "#ed2261", // 1 - "#1fa91b", // 2 - "#8ddc20", // 3 - "#487df4", // 4 - "#8d35c9", // 5 - "#3bdeed", // 6 - "#9e9ea0", // 7 - "#59516a", // 8 - "#f0729a", // 9 - "#53aa5e", // 10 - "#b2dc87", // 11 - "#a9bcec", // 12 - "#ad81c2", // 13 - "#9de3eb", // 14 - "#a288f7", // 15 - [255] = 0, - "#171423", /* bg color */ - "#9f9fa1", /* fg color */ - "#a288f7", // 15 - }, -// {// monokai vivid -// "#121212", // 0 -// "#fa2934", // 1 -// "#98e123", // 2 -// "#fff30a", // 3 -// "#0443ff", // 4 -// "#f800f8", // 5 -// "#01b6ed", // 6 -// "#ffffff", // 7 -// "#838383", // 8 -// "#f6669d", // 9 -// "#b1e05f", // 10 -// "#fff26d", // 11 -// "#0443ff", // 12 -// "#f200f6", // 13 -// "#51ceff", // 14 -// "#ffffff", // 15 -// [255] = 0, -// //static unsigned int defaultbg = 0; -// "#121212", // 0 -// "#f9f9f9", /* fg color */ -// //static unsigned int defaultfg = 256; -// "#fb0007" /* cs color */ -// //static unsigned int defaultcs = 257; -// }, -{ - "#000000", // 0 - "#ff4242", // 1 - "#74af68", // 2 - "#ffad29", // 3 - "#338f86", // 4 - "#9414e6", // 5 - "#23d7d7", // 6 - "#e2e2e2", // 7 - "#3f5648", // 8 - "#ff3242", // 9 - "#74cd68", // 10 - "#ffb929", // 11 - "#23d7d7", // 12 - "#ff37ff", // 13 - "#00ede1", // 14 - "#ffffff", // 15 - [255] = 0, - "#141e43", /* bg color */ -//static unsigned int defaultbg = 256; - "#e1e1e1", /* fg color */ -//static unsigned int defaultfg = 257; - "#43d58e" /* cs color */ -//static unsigned int defaultcs = 258; -}, -{ - "#012026", // 0 - "#b2302d", // 1 - "#00a941", // 2 - "#5e8baa", // 3 - "#449a86", // 4 - "#00599d", // 5 - "#5d7e19", // 6 - "#405555", // 7 - "#384451", // 8 - "#ff4242", // 9 - "#2aea5e", // 10 - "#8ed4fd", // 11 - "#61d5ba", // 12 - "#1298ff", // 13 - "#98d028", // 14 - "#58fbd6", // 15 - [255] = 0, - "#001015", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#405555", // 7 - "#4afcd6" /* cs color */ -//static unsigned int defaultcs = 257; -}, -{ - "#000000", // 0 - "#dc322f", // 1 - "#56db3a", // 2 - "#ff8400", // 3 - "#0084d4", // 4 - "#b729d9", // 5 - "#ccccff", // 6 - "#ffffff", // 7 - "#1b1d21", // 8 - "#dc322f", // 9 - "#56db3a", // 10 - "#ff8400", // 11 - "#0084d4", // 12 - "#b729d9", // 13 - "#ccccff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#000000", // 0 -//static unsigned int defaultfg = 7; - "#ffffff", // 7 -//static unsigned int defaultcs = 9; - "#dc322f", // 9 -}, -{ - "#230046", // 0 - "#7d1625", // 1 - "#337e6f", // 2 - "#7f6f49", // 3 - "#4f4a7f", // 4 - "#5a3f7f", // 5 - "#58777f", // 6 - "#736e7d", // 7 - "#372d46", // 8 - "#e05167", // 9 - "#52e0c4", // 10 - "#e0c386", // 11 - "#8e87e0", // 12 - "#a776e0", // 13 - "#9ad4e0", // 14 - "#8c91fa", // 15 - [255] = 0, - "#050014", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#736e7d", // 7 -//static unsigned int defaultcs = 15; - "#8c91fa", // 15 -}, -{ - "#000000", // 0 - "#9f0000", // 1 - "#008b00", // 2 - "#ffd000", // 3 - "#0081ff", // 4 - "#bc00ca", // 5 - "#008b8b", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff0000", // 9 - "#00ee00", // 10 - "#ffff00", // 11 - "#0000ff", // 12 - "#ff00ff", // 13 - "#00cdcd", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#000000", // 0 - "#00a595", /* fg color */ -//static unsigned int defaultfg = 256; - "#bbbbbb", // 7 -//static unsigned int defaultcs = 7; -}, -{ - "#112616", // 0 - "#7f2b27", // 1 - "#2f7e25", // 2 - "#717f24", // 3 - "#2f6a7f", // 4 - "#47587f", // 5 - "#327f77", // 6 - "#647d75", // 7 - "#3c4812", // 8 - "#e08009", // 9 - "#18e000", // 10 - "#bde000", // 11 - "#00aae0", // 12 - "#0058e0", // 13 - "#00e0c4", // 14 - "#73fa91", // 15 - [255] = 0, - "#0f1610", /* bg color */ -//static unsigned int defaultbg = 256; - "#637d75", /* fg color */ -//static unsigned int defaultfg = 257; - "#73fa91", // 15 -//static unsigned int defaultcs = 15; -}, -{ - "#4f4f4f", // 0 - "#ff6c60", // 1 - "#a8ff60", // 2 - "#ffffb6", // 3 - "#96cbfe", // 4 - "#ff73fd", // 5 - "#c6c5fe", // 6 - "#eeeeee", // 7 - "#7c7c7c", // 8 - "#ffb6b0", // 9 - "#ceffac", // 10 - "#ffffcc", // 11 - "#b5dcff", // 12 - "#ff9cfe", // 13 - "#dfdffe", // 14 - "#ffffff", // 15 - [255] = 0, - "#0000a4", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffff4e", /* fg color */ -//static unsigned int defaultfg = 257; - "#ffa560" /* cs color */ -//static unsigned int defaultcs = 258; -}, -{ - "#000000", // 0 - "#c13900", // 1 - "#a4a900", // 2 - "#caaf00", // 3 - "#bd6d00", // 4 - "#fc5e00", // 5 - "#f79500", // 6 - "#ffc88a", // 7 - "#6a4f2a", // 8 - "#ff8c68", // 9 - "#f6ff40", // 10 - "#ffe36e", // 11 - "#ffbe55", // 12 - "#fc874f", // 13 - "#c69752", // 14 - "#fafaff", // 15 - [255] = 0, - "#262626", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffcb83", /* fg color */ -//static unsigned int defaultfg = 257; - "#fc531d" /* cs color */ -//static unsigned int defaultcs = 258; -}, -{ - "#1f1f1f", // 0 - "#fb002a", // 1 - "#339c24", // 2 - "#659b25", // 3 - "#149b45", // 4 - "#53b82c", // 5 - "#2cb868", // 6 - "#e0ffef", // 7 - "#032710", // 8 - "#a7ff3f", // 9 - "#9fff6d", // 10 - "#d2ff6d", // 11 - "#72ffb5", // 12 - "#50ff3e", // 13 - "#22ff71", // 14 - "#daefd0", // 15 - [255] = 0, - "#3a3d3f", /* bg color */ -//static unsigned int defaultbg = 256; - "#d9efd3", /* fg color */ -//static unsigned int defaultfg = 257; - "#42ff58" /* cs color */ -//static unsigned int defaultcs = 258; -}, -{ - "#000000", // 0 - "#d62e4e", // 1 - "#71be6b", // 2 - "#beb86b", // 3 - "#489bee", // 4 - "#e979d7", // 5 - "#6bbeb8", // 6 - "#d6d6d6", // 7 - "#262626", // 8 - "#e02553", // 9 - "#aff08c", // 10 - "#dfddb7", // 11 - "#65aaf1", // 12 - "#ddb7df", // 13 - "#b7dfdd", // 14 - "#ffffff", // 15 - [255] = 0, - "#762423", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#ffffff", // 15 -//static unsigned int defaultcs = 15; - "#ffffff", // 15 -}, - -}; +float alpha = 0.8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { -// cobalt neon + /* 8 normal colors */ + "black", + "red3", + "green3", + "yellow3", + "blue2", + "magenta3", + "cyan3", + "gray90", -"#142631", // 0 -"#ff2320", // 1 -"#3ba5ff", // 2 -"#e9e75c", // 3 -"#8ff586", // 4 -"#781aa0", // 5 -"#8ff586", // 6 -"#ba46b2", // 7 -"#fff688", // 8 -"#d4312e", // 9 -"#8ff586", // 10 -"#e9f06d", // 11 -"#3c7dd2", // 12 -"#8230a7", // 13 -"#6cbc67", // 14 -"#8ff586", // 15 + /* 8 bright colors */ + "gray50", + "red", + "green", + "yellow", + "#5c5cff", + "magenta", + "cyan", + "white", [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ -"#142838", /* bg color */ -"#8ff586", // 6 -"#c4206f" /* cs color */ - - }; - -/* Terminal colors for alternate (light) palette */ -static const char *altcolorname[] = { -// IC_Green - -"#1f1f1f", // 0 -"#fb002a", // 1 -"#339c24", // 2 -"#659b25", // 3 -"#149b45", // 4 -"#53b82c", // 5 -"#2cb868", // 6 -"#e0ffef", // 7 -"#032710", // 8 -"#a7ff3f", // 9 -"#9fff6d", // 10 -"#d2ff6d", // 11 -"#72ffb5", // 12 -"#50ff3e", // 13 -"#22ff71", // 14 -"#daefd0", // 15 - [255] = 0, - - /* more colors can be added after 255 to use with DefaultXX */ -"#3a3d3f", /* bg color */ -"#d9efd3", /* fg color */ -"#42ff58" /* cs color */ + "#cccccc", + "#555555", + "#F0F0A0", + "black", }; @@ -520,84 +151,84 @@ static const char *altcolorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -static unsigned int defaultbg = 256; -static unsigned int defaultfg = 257; -static unsigned int defaultcs = 258; -static unsigned int defaultrcs = 15; +unsigned int defaultfg = 258; +unsigned int defaultbg = 259; +static unsigned int defaultcs = 256; +static unsigned int defaultrcs = 257; /* - * Default shape of cursor (1/3/5 are supposed to blink?) - * 2: Block ("█") - * 4: Underline ("_") - * 6: Bar ("|") - * 7: Snowman ("☃") - -my hexagrams: -* 8: Creative Heaven ("䷀") -* 9: Gathering (Order) ("䷬") -*10: Work on the Decayed ("䷑") -*11: Inner Truth ("䷼") - -ansi blocks: -*12: Light Shade ("░") -*13: Medium Shade ("▒") -*14: Dark Shade ("▓") - -other: -*15: This thing: ("▣") + * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 + * Default style of cursor + * 0: Blinking block + * 1: Blinking block (default) + * 2: Steady block ("█") + * 3: Blinking underline + * 4: Steady underline ("_") + * 5: Blinking bar + * 6: Steady bar ("|") + * 7: Blinking st cursor + * 8: Steady st cursor */ -static unsigned int cursorshape = 1; +static unsigned int cursorstyle = 1; +static Rune stcursor = 0x2603; /* snowman (U+2603) */ /* - * Default colour and shape of the mouse cursor + * Default columns and rows numbers */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 7; -static unsigned int mousebg = 0; + +static unsigned int cols = 80; +static unsigned int rows = 24; /* - * Colors used, when the specific fg == defaultfg. So in reverse mode this - * will reverse too. Another logic would only make the simple feature too - * complex. + * Default shape of the mouse cursor */ -static unsigned int defaultitalic = 11; -static unsigned int defaultunderline = 7; + +static char* mouseshape = "xterm"; + +/* + * Color used to display font attributes when fontconfig selected a font which + * doesn't match the ones requested. + */ +static unsigned int defaultattr = 11; + +/* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_ANY_MOD, "\031" }, - { Button5, XK_ANY_MOD, "\005" }, + /* mask button function argument release */ + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask - -/* I don't use the printer, but I _do_ use f6. -So I'm going to remove the print bits and replace with toggle. -*/ +#define TERMMOD (ControlMask|ShiftMask) static Shortcut shortcuts[] = { /* mask keysym function argument */ { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, - // { ControlMask, XK_Print, toggleprinter, {.i = 0} }, - // { ShiftMask, XK_Print, printscreen, {.i = 0} }, - // { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, - { MODKEY|ShiftMask, XK_Prior, xzoom, {.f = +1} }, - { MODKEY|ShiftMask, XK_Next, xzoom, {.f = -1} }, - { MODKEY|ShiftMask, XK_Home, xzoomreset, {.f = 0} }, + { ControlMask, XK_Print, toggleprinter, {.i = 0} }, + { ShiftMask, XK_Print, printscreen, {.i = 0} }, + { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, + { TERMMOD, XK_Prior, zoom, {.f = +1} }, + { TERMMOD, XK_Next, zoom, {.f = -1} }, + { TERMMOD, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_C, clipcopy, {.i = 0} }, + { TERMMOD, XK_V, clippaste, {.i = 0} }, + { TERMMOD, XK_Y, selpaste, {.i = 0} }, { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, - { MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} }, - { MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} }, - { MODKEY, XK_Num_Lock, numlock, {.i = 0} }, - { XK_ANY_MOD, XK_Print, swapcolors, {.i = 0} }, -// eject - { XK_ANY_MOD, 0x1008ff2c, swapcolors, {.i = 0} }, - + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, }; /* @@ -615,10 +246,6 @@ static Shortcut shortcuts[] = { * * 0: no value * * > 0: cursor application mode enabled * * < 0: cursor application mode disabled - * crlf value - * * 0: no value - * * > 0: crlf mode is enabled - * * < 0: crlf mode is disabled * * Be careful with the order of the definitions because st searches in * this table sequentially, so any XK_ANY_MOD must be in the last @@ -637,215 +264,221 @@ static KeySym mappedkeys[] = { -1 }; */ static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; -/* - * Override mouse-select while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forceselmod = ShiftMask; - /* * This is the huge key array which defines all compatibility to the Linux * world. Please decide about changes wisely. */ static Key key[] = { - /* keysym mask string appkey appcursor crlf */ - { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, - { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, - { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, - { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, - { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, - { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, - { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, - { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, - { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, - { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, - { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, - { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, - { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, - { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, - { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, - { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, - { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, - { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, - { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, - { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, - { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, - { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, - { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, - { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, - { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, - { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, - { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, - { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, - { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, - { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, - { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, - { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, - { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, - { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, - { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, - { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, - { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, - { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, - { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, - { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, - { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, - { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, - { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, - { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, - { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, - { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, - { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, - { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, - { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, - { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, - { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, - { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, - { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, - { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, - { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, - { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, - { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, - { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, - { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, - { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, - { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, - { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, - { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, - { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, - { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, - { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, - { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, - { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, - { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, - { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, - { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, - { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, - { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, - { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, - { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, - { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, - { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, - { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, - { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, - { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, - { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, - { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, - { XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0}, - { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, - { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, - { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, - { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, - { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, - { XK_End, ControlMask, "\033[J", -1, 0, 0}, - { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, - { XK_End, ShiftMask, "\033[K", -1, 0, 0}, - { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, - { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, - { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, - { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, - { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, - { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, - { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, - { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, - { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, - { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, - { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, - { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, - { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, - { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, - { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, - { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, - { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, - { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, - { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, - { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, - { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, - { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, - { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, - { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, - { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, - { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, - { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, - { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, - { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, - { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, - { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, - { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, - { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, - { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, - { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, - { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, - { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, - { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, - { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, - { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, - { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, - { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, - { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, - { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, - { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, - { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, - { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, - { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, - { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, - { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, - { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, - { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, - { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, - { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, - { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, - { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, - { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, - { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, - { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, - { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, - { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, - { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, - { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, - { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, - { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, - { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, - { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, - { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, - { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, - { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, - { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, - { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, - { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, - { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, - { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, - { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, - { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, - { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, - { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, - { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, - { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, - { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, - { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, - { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, - { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, - { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, - { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, - { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, - { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, - { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, - { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, - { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, - { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, - { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, + /* keysym mask string appkey appcursor */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0}, + { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0}, + { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0}, + { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0}, + { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0}, + { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0}, + { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0}, + { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0}, + { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0}, + { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0}, + { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0}, + { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0}, + { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0}, + { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0}, + { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0}, + { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0}, + { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_End, ControlMask, "\033[J", -1, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, }; /* @@ -867,4 +500,3 @@ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~"; - diff --git a/config.mk b/config.mk index 5806157..8e87e12 100644 --- a/config.mk +++ b/config.mk @@ -1,28 +1,35 @@ # st version -VERSION = 0.7.truck +VERSION = 0.8.4 # Customize below to fit your system # paths PREFIX = /usr/local -MANPREFIX = ${PREFIX}/share/man +MANPREFIX = $(PREFIX)/share/man X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib +PKG_CONFIG = pkg-config + # includes and libs -INCS = -I. -I/usr/include -I${X11INC} \ - `pkg-config --cflags fontconfig` \ - `pkg-config --cflags freetype2` -LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender\ - `pkg-config --libs fontconfig` \ - `pkg-config --libs freetype2` +INCS = -I$(X11INC) \ + `$(PKG_CONFIG) --cflags fontconfig` \ + `$(PKG_CONFIG) --cflags freetype2` +LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender -lXcursor \ + `$(PKG_CONFIG) --libs fontconfig` \ + `$(PKG_CONFIG) --libs freetype2` # flags -CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600 -CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS} -LDFLAGS += -g ${LIBS} +STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 +STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) +STLDFLAGS = $(LIBS) $(LDFLAGS) + +# OpenBSD: +#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE +#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \ +# `$(PKG_CONFIG) --libs fontconfig` \ +# `$(PKG_CONFIG) --libs freetype2` # compiler and linker -# CC = cc - +# CC = c99 diff --git a/8/delkey.patch b/old_work/8/delkey.patch similarity index 100% rename from 8/delkey.patch rename to old_work/8/delkey.patch diff --git a/8/st-0.8.1.tar.gz b/old_work/8/st-0.8.1.tar.gz similarity index 100% rename from 8/st-0.8.1.tar.gz rename to old_work/8/st-0.8.1.tar.gz diff --git a/8/st-0.8.1/FAQ b/old_work/8/st-0.8.1/FAQ similarity index 100% rename from 8/st-0.8.1/FAQ rename to old_work/8/st-0.8.1/FAQ diff --git a/8/st-0.8.1/LEGACY b/old_work/8/st-0.8.1/LEGACY similarity index 100% rename from 8/st-0.8.1/LEGACY rename to old_work/8/st-0.8.1/LEGACY diff --git a/8/st-0.8.1/LICENSE b/old_work/8/st-0.8.1/LICENSE similarity index 100% rename from 8/st-0.8.1/LICENSE rename to old_work/8/st-0.8.1/LICENSE diff --git a/8/st-0.8.1/Makefile b/old_work/8/st-0.8.1/Makefile similarity index 100% rename from 8/st-0.8.1/Makefile rename to old_work/8/st-0.8.1/Makefile diff --git a/old_work/8/st-0.8.1/README b/old_work/8/st-0.8.1/README new file mode 100644 index 0000000..6a846ed --- /dev/null +++ b/old_work/8/st-0.8.1/README @@ -0,0 +1,34 @@ +st - simple terminal +-------------------- +st is a simple terminal emulator for X which sucks less. + + +Requirements +------------ +In order to build st you need the Xlib header files. + + +Installation +------------ +Edit config.mk to match your local setup (st is installed into +the /usr/local namespace by default). + +Afterwards enter the following command to build and install st (if +necessary as root): + + make clean install + + +Running st +---------- +If you did not install st with make clean install, you must compile +the st terminfo entry with the following command: + + tic -sx st.info + +See the man page for additional details. + +Credits +------- +Based on Aurélien APTEL bt source code. + diff --git a/8/st-0.8.1/TODO b/old_work/8/st-0.8.1/TODO similarity index 100% rename from 8/st-0.8.1/TODO rename to old_work/8/st-0.8.1/TODO diff --git a/8/st-0.8.1/arg.h b/old_work/8/st-0.8.1/arg.h similarity index 100% rename from 8/st-0.8.1/arg.h rename to old_work/8/st-0.8.1/arg.h diff --git a/8/st-0.8.1/config.def.h b/old_work/8/st-0.8.1/config.def.h similarity index 100% rename from 8/st-0.8.1/config.def.h rename to old_work/8/st-0.8.1/config.def.h diff --git a/8/st-0.8.1/config.def.h.rej b/old_work/8/st-0.8.1/config.def.h.rej similarity index 100% rename from 8/st-0.8.1/config.def.h.rej rename to old_work/8/st-0.8.1/config.def.h.rej diff --git a/8/st-0.8.1/config.h b/old_work/8/st-0.8.1/config.h similarity index 100% rename from 8/st-0.8.1/config.h rename to old_work/8/st-0.8.1/config.h diff --git a/8/st-0.8.1/config.mk b/old_work/8/st-0.8.1/config.mk similarity index 100% rename from 8/st-0.8.1/config.mk rename to old_work/8/st-0.8.1/config.mk diff --git a/8/st-0.8.1/st b/old_work/8/st-0.8.1/st similarity index 100% rename from 8/st-0.8.1/st rename to old_work/8/st-0.8.1/st diff --git a/8/st-0.8.1/st.1 b/old_work/8/st-0.8.1/st.1 similarity index 100% rename from 8/st-0.8.1/st.1 rename to old_work/8/st-0.8.1/st.1 diff --git a/8/st-0.8.1/st.c b/old_work/8/st-0.8.1/st.c similarity index 100% rename from 8/st-0.8.1/st.c rename to old_work/8/st-0.8.1/st.c diff --git a/8/st-0.8.1/st.h b/old_work/8/st-0.8.1/st.h similarity index 100% rename from 8/st-0.8.1/st.h rename to old_work/8/st-0.8.1/st.h diff --git a/8/st-0.8.1/st.info b/old_work/8/st-0.8.1/st.info similarity index 100% rename from 8/st-0.8.1/st.info rename to old_work/8/st-0.8.1/st.info diff --git a/8/st-0.8.1/win.h b/old_work/8/st-0.8.1/win.h similarity index 100% rename from 8/st-0.8.1/win.h rename to old_work/8/st-0.8.1/win.h diff --git a/8/st-0.8.1/x.c b/old_work/8/st-0.8.1/x.c similarity index 100% rename from 8/st-0.8.1/x.c rename to old_work/8/st-0.8.1/x.c diff --git a/8/st-0.8.1/x.c.rej b/old_work/8/st-0.8.1/x.c.rej similarity index 100% rename from 8/st-0.8.1/x.c.rej rename to old_work/8/st-0.8.1/x.c.rej diff --git a/8/st-alpha-0.8.1.diff b/old_work/8/st-alpha-0.8.1.diff similarity index 100% rename from 8/st-alpha-0.8.1.diff rename to old_work/8/st-alpha-0.8.1.diff diff --git a/8/st-clipboard-0.8.1.diff b/old_work/8/st-clipboard-0.8.1.diff similarity index 100% rename from 8/st-clipboard-0.8.1.diff rename to old_work/8/st-clipboard-0.8.1.diff diff --git a/8/st-visualbell-0.8.1.diff b/old_work/8/st-visualbell-0.8.1.diff similarity index 100% rename from 8/st-visualbell-0.8.1.diff rename to old_work/8/st-visualbell-0.8.1.diff diff --git a/8/st-xresources-20180309-c5ba9c0.diff b/old_work/8/st-xresources-20180309-c5ba9c0.diff similarity index 100% rename from 8/st-xresources-20180309-c5ba9c0.diff rename to old_work/8/st-xresources-20180309-c5ba9c0.diff diff --git a/old_work/FAQ b/old_work/FAQ new file mode 100644 index 0000000..3502c60 --- /dev/null +++ b/old_work/FAQ @@ -0,0 +1,167 @@ +## Why does st not handle utmp entries? + +Use the excellent tool of [utmp](http://git.suckless.org/utmp/) for this task. + +## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever! + +It means that st doesn’t have any terminfo entry on your system. Chances are +you did not `make install`. If you just want to test it without installing it, +you can manualy run `tic -s st.info`. + +## Nothing works, and nothing is said about an unknown terminal! + +* Some programs just assume they’re running in xterm i.e. they don’t rely on + terminfo. What you see is the current state of the “xterm compliance”. +* Some programs don’t complain about the lacking st description and default to + another terminal. In that case see the question about terminfo. + +## I get some weird glitches/visual bug on _random program_! + +Try launching it with a different TERM: $ TERM=xterm myapp. toe(1) will give +you a list of available terminals, but you’ll most likely switch between xterm, +st or st-256color. The default value for TERM can be changed in config.h +(TNAME). + +## How do I scroll back up? + +Using a terminal multiplexer. + +* `st -e tmux` using C-b [ +* `st -e screen` using C-a ESC + +## Why doesn't the Del key work in some programs? + +Taken from the terminfo manpage: + + If the terminal has a keypad that transmits codes when the keys + are pressed, this information can be given. Note that it is not + possible to handle terminals where the keypad only works in + local (this applies, for example, to the unshifted HP 2621 keys). + If the keypad can be set to transmit or not transmit, give these + codes as smkx and rmkx. Otherwise the keypad is assumed to + always transmit. + +In the st case smkx=E[?1hE= and rmkx=E[?1lE>, so it is mandatory that +applications which want to test against keypad keys send these +sequences. + +But buggy applications (like bash and irssi, for example) don't do this. A fast +solution for them is to use the following command: + + $ printf '\033[?1h\033=' >/dev/tty + +or + $ tput smkx + +In the case of bash, readline is used. Readline has a different note in its +manpage about this issue: + + enable-keypad (Off) + When set to On, readline will try to enable the + application keypad when it is called. Some systems + need this to enable arrow keys. + +Adding this option to your .inputrc will fix the keypad problem for all +applications using readline. + +If you are using zsh, then read the zsh FAQ +: + + It should be noted that the O / [ confusion can occur with other keys + such as Home and End. Some systems let you query the key sequences + sent by these keys from the system's terminal database, terminfo. + Unfortunately, the key sequences given there typically apply to the + mode that is not the one zsh uses by default (it's the "application" + mode rather than the "raw" mode). Explaining the use of terminfo is + outside of the scope of this FAQ, but if you wish to use the key + sequences given there you can tell the line editor to turn on + "application" mode when it starts and turn it off when it stops: + + function zle-line-init () { echoti smkx } + function zle-line-finish () { echoti rmkx } + zle -N zle-line-init + zle -N zle-line-finish + +Putting these lines into your .zshrc will fix the problems. + +## How can I use meta in 8bit mode? + +St supports meta in 8bit mode, but the default terminfo entry doesn't +use this capability. If you want it, you have to use the 'st-meta' value +in TERM. + +## I cannot compile st in OpenBSD + +OpenBSD lacks librt, despite it being mandatory in POSIX +. +If you want to compile st for OpenBSD you have to remove -lrt from config.mk, and +st will compile without any loss of functionality, because all the functions are +included in libc on this platform. + +## The Backspace Case + +St is emulating the Linux way of handling backspace being delete and delete being +backspace. + +This is an issue that was discussed in suckless mailing list +. Here is why some old grumpy +terminal users wants its backspace to be how he feels it: + + Well, I am going to comment why I want to change the behaviour + of this key. When ASCII was defined in 1968, communication + with computers was done using punched cards, or hardcopy + terminals (basically a typewriter machine connected with the + computer using a serial port). ASCII defines DELETE as 7F, + because, in punched-card terms, it means all the holes of the + card punched; it is thus a kind of 'physical delete'. In the + same way, the BACKSPACE key was a non-destructive backspace, + as on a typewriter. So, if you wanted to delete a character, + you had to BACKSPACE and then DELETE. Another use of BACKSPACE + was to type accented characters, for example 'a BACKSPACE `'. + The VT100 had no BACKSPACE key; it was generated using the + CONTROL key as another control character (CONTROL key sets to + 0 b7 b6 b5, so it converts H (code 0x48) into BACKSPACE (code + 0x08)), but it had a DELETE key in a similar position where + the BACKSPACE key is located today on common PC keyboards. + All the terminal emulators emulated the difference between + these keys correctly: the backspace key generated a BACKSPACE + (^H) and delete key generated a DELETE (^?). + + But a problem arose when Linus Torvalds wrote Linux. Unlike + earlier terminals, the Linux virtual terminal (the terminal + emulator integrated in the kernel) returned a DELETE when + backspace was pressed, due to the VT100 having a DELETE key in + the same position. This created a lot of problems (see [1] + and [2]). Since Linux has become the king, a lot of terminal + emulators today generate a DELETE when the backspace key is + pressed in order to avoid problems with Linux. The result is + that the only way of generating a BACKSPACE on these systems + is by using CONTROL + H. (I also think that emacs had an + important point here because the CONTROL + H prefix is used + in emacs in some commands (help commands).) + + From point of view of the kernel, you can change the key + for deleting a previous character with stty erase. When you + connect a real terminal into a machine you describe the type + of terminal, so getty configures the correct value of stty + erase for this terminal. In the case of terminal emulators, + however, you don't have any getty that can set the correct + value of stty erase, so you always get the default value. + For this reason, it is necessary to add 'stty erase ^H' to your + profile if you have changed the value of the backspace key. + Of course, another solution is for st itself to modify the + value of stty erase. I usually have the inverse problem: + when I connect to non-Unix machines, I have to press CONTROL + + h to get a BACKSPACE. The inverse problem occurs when a user + connects to my Unix machines from a different system with a + correct backspace key. + + [1] http://www.ibb.net/~anne/keyboard.html + [2] http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html + +## But I really want the old grumpy behaviour of my terminal + +Apply [1]. + +[1] http://st.suckless.org/patches/delkey + diff --git a/old_work/LEGACY b/old_work/LEGACY new file mode 100644 index 0000000..bf28b1e --- /dev/null +++ b/old_work/LEGACY @@ -0,0 +1,17 @@ +A STATEMENT ON LEGACY SUPPORT + +In the terminal world there is much cruft that comes from old and unsup‐ +ported terminals that inherit incompatible modes and escape sequences +which noone is able to know, except when he/she comes from that time and +developed a graphical vt100 emulator at that time. + +One goal of st is to only support what is really needed. When you en‐ +counter a sequence which you really need, implement it. But while you +are at it, do not add the other cruft you might encounter while sneek‐ +ing at other terminal emulators. History has bloated them and there is +no real evidence that most of the sequences are used today. + + +Christoph Lohmann <20h@r-36.net> +2012-09-13T07:00:36.081271045+02:00 + diff --git a/old_work/LICENSE b/old_work/LICENSE new file mode 100644 index 0000000..e61610a --- /dev/null +++ b/old_work/LICENSE @@ -0,0 +1,31 @@ +MIT/X Consortium License + +© 2009-2012 Aurélien APTEL +© 2009 Anselm R Garbe +© 2012-2015 Roberto E. Vargas Caballero +© 2012-2015 Christoph Lohmann <20h at r-36 dot net> +© 2013 Eon S. Jeon +© 2013 Alexander Sedov +© 2013 Mark Edgar +© 2013 Eric Pruitt +© 2013 Michael Forney +© 2013-2014 Markus Teich +© 2014-2015 Laslo Hunhold + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/old_work/Makefile b/old_work/Makefile new file mode 100644 index 0000000..9e52d13 --- /dev/null +++ b/old_work/Makefile @@ -0,0 +1,60 @@ +# st - simple terminal +# See LICENSE file for copyright and license details. + +include config.mk + +SRC = st.c +OBJ = ${SRC:.c=.o} + +all: options st + +options: + @echo st build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + +config.h: + cp config.def.h config.h + +.c.o: + @echo CC $< + @${CC} -c ${CFLAGS} $< + +${OBJ}: config.h config.mk + +st: ${OBJ} + @echo CC -o $@ + @${CC} -o $@ ${OBJ} ${LDFLAGS} + +clean: + @echo cleaning + @rm -f st ${OBJ} st-${VERSION}.tar.gz + +dist: clean + @echo creating dist tarball + @mkdir -p st-${VERSION} + @cp -R LICENSE Makefile README.st config.mk config.def.h st.info st.1 arg.h ${SRC} st-${VERSION} + @tar -cf st-${VERSION}.tar st-${VERSION} + @xz -9 st-${VERSION}.tar + @rm -rf st-${VERSION} + +install: all + @echo installing executable file to ${DESTDIR}${PREFIX}/bin + @mkdir -p ${DESTDIR}${PREFIX}/bin + @cp -f st ${DESTDIR}${PREFIX}/bin + @chmod 755 ${DESTDIR}${PREFIX}/bin/st + @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 + @mkdir -p ${DESTDIR}${MANPREFIX}/man1 + @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1 + @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1 + @echo Please see the README file regarding the terminfo entry of st. + @tic -s st.info + +uninstall: + @echo removing executable file from ${DESTDIR}${PREFIX}/bin + @rm -f ${DESTDIR}${PREFIX}/bin/st + @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 + @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1 + +.PHONY: all options clean dist install uninstall diff --git a/README.MD b/old_work/README.MD similarity index 100% rename from README.MD rename to old_work/README.MD diff --git a/README.st b/old_work/README.st similarity index 100% rename from README.st rename to old_work/README.st diff --git a/old_work/TODO b/old_work/TODO new file mode 100644 index 0000000..5f74cd5 --- /dev/null +++ b/old_work/TODO @@ -0,0 +1,28 @@ +vt emulation +------------ + +* double-height support + +code & interface +---------------- + +* add a simple way to do multiplexing + +drawing +------- +* add diacritics support to xdraws() + * switch to a suckless font drawing library +* make the font cache simpler +* add better support for brightening of the upper colors + +bugs +---- + +* fix shift up/down (shift selection in emacs) +* remove DEC test sequence when appropriate + +misc +---- + + $ grep -nE 'XXX|TODO' st.c + diff --git a/old_work/arg.h b/old_work/arg.h new file mode 100644 index 0000000..ba3fb3f --- /dev/null +++ b/old_work/arg.h @@ -0,0 +1,48 @@ +/* + * Copy me if you can. + * by 20h + */ + +#ifndef ARG_H__ +#define ARG_H__ + +extern char *argv0; + +/* use main(int argc, char *argv[]) */ +#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ + argv[0] && argv[0][0] == '-'\ + && argv[0][1];\ + argc--, argv++) {\ + char argc_;\ + char **argv_;\ + int brk_;\ + if (argv[0][1] == '-' && argv[0][2] == '\0') {\ + argv++;\ + argc--;\ + break;\ + }\ + for (brk_ = 0, argv[0]++, argv_ = argv;\ + argv[0][0] && !brk_;\ + argv[0]++) {\ + if (argv_ != argv)\ + break;\ + argc_ = argv[0][0];\ + switch (argc_) +#define ARGEND }\ + } + +#define ARGC() argc_ + +#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ + ((x), abort(), (char *)0) :\ + (brk_ = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ + (argc--, argv++, argv[0]))) + +#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ + (char *)0 :\ + (brk_ = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ + (argc--, argv++, argv[0]))) + +#endif diff --git a/old_work/config.def.h b/old_work/config.def.h new file mode 100644 index 0000000..846e23c --- /dev/null +++ b/old_work/config.def.h @@ -0,0 +1,460 @@ +/* See LICENSE file for copyright and license details. */ + +/* + * appearance + * + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +static char font[] = "CMU Typewriter Text:pixelsize=18:antialias=true:autohint=true"; +static int borderpx = 2; + +/* + * What program is execed by st depends of these precedence rules: + * 1: program passed with -e + * 2: utmp option + * 3: SHELL environment variable + * 4: value of shell in /etc/passwd + * 5: value of shell in config.h + */ +static char shell[] = "/bin/zsh"; +static char *utmp = NULL; +static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; + +/* identification sequence returned in DA and DECID */ +static char vtiden[] = "\033[?6c"; + +/* Kerning / character bounding-box multipliers */ +static float cwscale = 1.0; +static float chscale = 1.0; + +/* + * word delimiter string + * + * More advanced example: " `'\"()[]{}" + */ +static char worddelimiters[] = " `'\"()[]{}"; + +/* selection timeouts (in milliseconds) */ +static unsigned int doubleclicktimeout = 300; +static unsigned int tripleclicktimeout = 600; + +/* alt screens */ +static int allowaltscreen = 1; + +/* frames per second st should at maximum draw to the screen */ +static unsigned int xfps = 120; +static unsigned int actionfps = 30; + +/* + * blinking timeout (set to 0 to disable blinking) for the terminal blinking + * attribute. + */ +static unsigned int blinktimeout = 800; + +/* + * thickness of underline and bar cursors + */ +static unsigned int cursorthickness = 2; + +/* + * bell volume. It must be a value between -100 and 100. Use 0 for disabling + * it + */ +static int bellvolume = 0; + +/* default TERM value */ +static char termname[] = "st-256color"; + +/* + * spaces per tab + * + * When you are changing this value, don't forget to adapt the »it« value in + * the st.info and appropriately install the st.info in the environment where + * you use this st version. + * + * it#$tabspaces, + * + * Secondly make sure your kernel is not expanding tabs. When running `stty + * -a` »tab0« should appear. You can tell the terminal to not expand tabs by + * running following command: + * + * stty tabs + */ +static unsigned int tabspaces = 8; + +/* bg opacity */ +static const int alpha = 0xdd; + +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { + /* solarized dark */ + "#073642", /* 0: black */ + "#dc322f", /* 1: red */ + "#859900", /* 2: green */ + "#b58900", /* 3: yellow */ + "#268bd2", /* 4: blue */ + "#d33682", /* 5: magenta */ + "#2aa198", /* 6: cyan */ + "#eee8d5", /* 7: white */ + "#002b36", /* 8: brblack */ + "#cb4b16", /* 9: brred */ + "#586e75", /* 10: brgreen */ + "#657b83", /* 11: bryellow */ + "#839496", /* 12: brblue */ + "#6c71c4", /* 13: brmagenta*/ + "#93a1a1", /* 14: brcyan */ + "#fdf6e3", /* 15: brwhite */ + }; + +/* Terminal colors for alternate (light) palette */ +static const char *altcolorname[] = { + /* solarized light */ + "#eee8d5", /* 0: black */ + "#dc322f", /* 1: red */ + "#859900", /* 2: green */ + "#b58900", /* 3: yellow */ + "#268bd2", /* 4: blue */ + "#d33682", /* 5: magenta */ + "#2aa198", /* 6: cyan */ + "#073642", /* 7: white */ + "#fdf6e3", /* 8: brblack */ + "#cb4b16", /* 9: brred */ + "#93a1a1", /* 10: brgreen */ + "#839496", /* 11: bryellow */ + "#657b83", /* 12: brblue */ + "#6c71c4", /* 13: brmagenta*/ + "#586e75", /* 14: brcyan */ + "#002b36", /* 15: brwhite */ +}; + + +/* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +static unsigned int defaultfg = 12; +static unsigned int defaultbg = 8; +static unsigned int defaultcs = 14; +static unsigned int defaultrcs = 15; + +/* + * Default shape of cursor + * 2: Block ("█") + * 4: Underline ("_") + * 6: Bar ("|") + * 7: Snowman ("☃") + */ +static unsigned int cursorshape = 2; + +/* + * Default colour and shape of the mouse cursor + */ +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; + +/* + * Colors used, when the specific fg == defaultfg. So in reverse mode this + * will reverse too. Another logic would only make the simple feature too + * complex. + */ +static unsigned int defaultitalic = 11; +static unsigned int defaultunderline = 7; + +/* + * Internal mouse shortcuts. + * Beware that overloading Button1 will disable the selection. + */ +static MouseShortcut mshortcuts[] = { + /* button mask string */ + { Button4, XK_ANY_MOD, "\031" }, + { Button5, XK_ANY_MOD, "\005" }, +}; + +/* Internal keyboard shortcuts. */ +#define MODKEY Mod1Mask + +static Shortcut shortcuts[] = { + /* mask keysym function argument */ + { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, + { ControlMask, XK_Print, toggleprinter, {.i = 0} }, + { ShiftMask, XK_Print, printscreen, {.i = 0} }, + { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, + { MODKEY|ShiftMask, XK_Prior, xzoom, {.f = +1} }, + { MODKEY|ShiftMask, XK_Next, xzoom, {.f = -1} }, + { MODKEY|ShiftMask, XK_Home, xzoomreset, {.f = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, + { MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} }, + { MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} }, + { MODKEY, XK_Num_Lock, numlock, {.i = 0} }, + { XK_ANY_MOD, XK_F6, swapcolors, {.i = 0} }, +}; + +/* + * Special keys (change & recompile st.info accordingly) + * + * Mask value: + * * Use XK_ANY_MOD to match the key no matter modifiers state + * * Use XK_NO_MOD to match the key alone (no modifiers) + * appkey value: + * * 0: no value + * * > 0: keypad application mode enabled + * * = 2: term.numlock = 1 + * * < 0: keypad application mode disabled + * appcursor value: + * * 0: no value + * * > 0: cursor application mode enabled + * * < 0: cursor application mode disabled + * crlf value + * * 0: no value + * * > 0: crlf mode is enabled + * * < 0: crlf mode is disabled + * + * Be careful with the order of the definitions because st searches in + * this table sequentially, so any XK_ANY_MOD must be in the last + * position for a key. + */ + +/* + * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) + * to be mapped below, add them to this array. + */ +static KeySym mappedkeys[] = { -1 }; + +/* + * State bits to ignore when matching key or button events. By default, + * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. + */ +static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; + +/* + * Override mouse-select while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forceselmod = ShiftMask; + +/* + * This is the huge key array which defines all compatibility to the Linux + * world. Please decide about changes wisely. + */ +static Key key[] = { + /* keysym mask string appkey appcursor crlf */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\177", +1, 0, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, + { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, + { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, + { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, + { XK_Delete, XK_ANY_MOD, "\177", +1, 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, + { XK_End, ControlMask, "\033[J", -1, 0, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, +}; + +/* + * Selection types' masks. + * Use the same masks as usual. + * Button1Mask is always unset, to make masks match between ButtonPress. + * ButtonRelease and MotionNotify. + * If no match is found, regular selection is used. + */ +static uint selmasks[] = { + [SEL_RECTANGULAR] = Mod1Mask, +}; + +/* + * Printable characters in ASCII, used to estimate the advance width + * of single wide characters. + */ +static char ascii_printable[] = + " !\"#$%&'()*+,-./0123456789:;<=>?" + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; + diff --git a/config.def.h~ b/old_work/config.def.h~ similarity index 100% rename from config.def.h~ rename to old_work/config.def.h~ diff --git a/old_work/config.h b/old_work/config.h new file mode 100644 index 0000000..a3680f5 --- /dev/null +++ b/old_work/config.h @@ -0,0 +1,870 @@ +/* See LICENSE file for copyright and license details. */ + +/* + * appearance + * + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +static char font[] = "Px437_ATI_SmallW_6x8 NF:style=Book:pixelsize=16:antialias=true:autohint=true"; +//"CMU Typewriter Text:pixelsize=18:antialias=true:autohint=true"; +static int borderpx = 2; + +/* + * What program is execed by st depends of these precedence rules: + * 1: program passed with -e + * 2: utmp option + * 3: SHELL environment variable + * 4: value of shell in /etc/passwd + * 5: value of shell in config.h + */ +static char shell[] = "/bin/zsh"; +static char *utmp = NULL; +static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400"; + +/* identification sequence returned in DA and DECID */ +static char vtiden[] = "\033[?6c"; + +/* Kerning / character bounding-box multipliers */ +static float cwscale = 1.0; +static float chscale = 1.0; + +/* + * word delimiter string + * + * More advanced example: " `'\"()[]{}" + */ +static char worddelimiters[] = " `'\"()[]{}"; + +/* selection timeouts (in milliseconds) */ +static unsigned int doubleclicktimeout = 300; +static unsigned int tripleclicktimeout = 600; + +/* alt screens */ +static int allowaltscreen = 1; + +/* frames per second st should at maximum draw to the screen */ +static unsigned int xfps = 120; +static unsigned int actionfps = 30; + +/* + * blinking timeout (set to 0 to disable blinking) for the terminal blinking + * attribute. + */ +static unsigned int blinktimeout = 800; + +/* + * thickness of underline and bar cursors + */ +static unsigned int cursorthickness = 2; + +/* + * bell volume. It must be a value between -100 and 100. Use 0 for disabling + * it + */ +static int bellvolume = 0; + +/* default TERM value */ +static char termname[] = "st-256color"; + +/* + * spaces per tab + * + * When you are changing this value, don't forget to adapt the »it« value in + * the st.info and appropriately install the st.info in the environment where + * you use this st version. + * + * it#$tabspaces, + * + * Secondly make sure your kernel is not expanding tabs. When running `stty + * -a` »tab0« should appear. You can tell the terminal to not expand tabs by + * running following command: + * + * stty tabs + */ +static unsigned int tabspaces = 8; + +/* bg opacity */ +static const int alpha = 0xdd; + +static int whichcolortable = 0; + +static const char *schemenames[] = { + "Cobalt Neon", + "Highway", + "Grape", +// "MonokaiVivid", + "Pandora", + "Shaman", + "Symfonic", + "Lavandula", + "ENCOM", + "Alien Blood", + "Borland", + "IC Orange", + "IC Green", + "Red Alert" + +}; + +static char *colorchart[13][260] = { + // cobalt neon + { + "#142631", // 0 + "#ff2320", // 1 + "#3ba5ff", // 2 + "#e9e75c", // 3 + "#8ff586", // 4 + "#781aa0", // 5 + "#8ff586", // 6 + "#ba46b2", // 7 + "#fff688", // 8 + "#d4312e", // 9 + "#8ff586", // 10 + "#e9f06d", // 11 + "#3c7dd2", // 12 + "#8230a7", // 13 + "#6cbc67", // 14 + "#8ff586", // 15 + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ + "#142838", /* bg color */ + "#8ff586", // 6 + "#c4206f" /* cs color */ + }, + // Highway + { + "#000000", // 0 + "#d00e18", // 1 + "#138034", // 2 + "#ffcb3e", // 3 + "#006bb3", // 4 + "#6b2775", // 5 + "#384564", // 6 + "#ededed", // 7 + "#5d504a", // 8 + "#f07e18", // 9 + "#b1d130", // 10 + "#fff120", // 11 + "#4fc2fd", // 12 + "#de0071", // 13 + "#5d504a", // 14 + "#ffffff", // 15 + [255] = 0, + "#222225", /* bg color */ + "#ededed", // 7 + "#e0d9b9" /* cs color */ + }, + // Grape + { + "#2d283f", // 0 + "#ed2261", // 1 + "#1fa91b", // 2 + "#8ddc20", // 3 + "#487df4", // 4 + "#8d35c9", // 5 + "#3bdeed", // 6 + "#9e9ea0", // 7 + "#59516a", // 8 + "#f0729a", // 9 + "#53aa5e", // 10 + "#b2dc87", // 11 + "#a9bcec", // 12 + "#ad81c2", // 13 + "#9de3eb", // 14 + "#a288f7", // 15 + [255] = 0, + "#171423", /* bg color */ + "#9f9fa1", /* fg color */ + "#a288f7", // 15 + }, +// {// monokai vivid +// "#121212", // 0 +// "#fa2934", // 1 +// "#98e123", // 2 +// "#fff30a", // 3 +// "#0443ff", // 4 +// "#f800f8", // 5 +// "#01b6ed", // 6 +// "#ffffff", // 7 +// "#838383", // 8 +// "#f6669d", // 9 +// "#b1e05f", // 10 +// "#fff26d", // 11 +// "#0443ff", // 12 +// "#f200f6", // 13 +// "#51ceff", // 14 +// "#ffffff", // 15 +// [255] = 0, +// //static unsigned int defaultbg = 0; +// "#121212", // 0 +// "#f9f9f9", /* fg color */ +// //static unsigned int defaultfg = 256; +// "#fb0007" /* cs color */ +// //static unsigned int defaultcs = 257; +// }, +{ + "#000000", // 0 + "#ff4242", // 1 + "#74af68", // 2 + "#ffad29", // 3 + "#338f86", // 4 + "#9414e6", // 5 + "#23d7d7", // 6 + "#e2e2e2", // 7 + "#3f5648", // 8 + "#ff3242", // 9 + "#74cd68", // 10 + "#ffb929", // 11 + "#23d7d7", // 12 + "#ff37ff", // 13 + "#00ede1", // 14 + "#ffffff", // 15 + [255] = 0, + "#141e43", /* bg color */ +//static unsigned int defaultbg = 256; + "#e1e1e1", /* fg color */ +//static unsigned int defaultfg = 257; + "#43d58e" /* cs color */ +//static unsigned int defaultcs = 258; +}, +{ + "#012026", // 0 + "#b2302d", // 1 + "#00a941", // 2 + "#5e8baa", // 3 + "#449a86", // 4 + "#00599d", // 5 + "#5d7e19", // 6 + "#405555", // 7 + "#384451", // 8 + "#ff4242", // 9 + "#2aea5e", // 10 + "#8ed4fd", // 11 + "#61d5ba", // 12 + "#1298ff", // 13 + "#98d028", // 14 + "#58fbd6", // 15 + [255] = 0, + "#001015", /* bg color */ +//static unsigned int defaultbg = 256; +//static unsigned int defaultfg = 7; + "#405555", // 7 + "#4afcd6" /* cs color */ +//static unsigned int defaultcs = 257; +}, +{ + "#000000", // 0 + "#dc322f", // 1 + "#56db3a", // 2 + "#ff8400", // 3 + "#0084d4", // 4 + "#b729d9", // 5 + "#ccccff", // 6 + "#ffffff", // 7 + "#1b1d21", // 8 + "#dc322f", // 9 + "#56db3a", // 10 + "#ff8400", // 11 + "#0084d4", // 12 + "#b729d9", // 13 + "#ccccff", // 14 + "#ffffff", // 15 + [255] = 0, +//static unsigned int defaultbg = 0; + "#000000", // 0 +//static unsigned int defaultfg = 7; + "#ffffff", // 7 +//static unsigned int defaultcs = 9; + "#dc322f", // 9 +}, +{ + "#230046", // 0 + "#7d1625", // 1 + "#337e6f", // 2 + "#7f6f49", // 3 + "#4f4a7f", // 4 + "#5a3f7f", // 5 + "#58777f", // 6 + "#736e7d", // 7 + "#372d46", // 8 + "#e05167", // 9 + "#52e0c4", // 10 + "#e0c386", // 11 + "#8e87e0", // 12 + "#a776e0", // 13 + "#9ad4e0", // 14 + "#8c91fa", // 15 + [255] = 0, + "#050014", /* bg color */ +//static unsigned int defaultbg = 256; +//static unsigned int defaultfg = 7; + "#736e7d", // 7 +//static unsigned int defaultcs = 15; + "#8c91fa", // 15 +}, +{ + "#000000", // 0 + "#9f0000", // 1 + "#008b00", // 2 + "#ffd000", // 3 + "#0081ff", // 4 + "#bc00ca", // 5 + "#008b8b", // 6 + "#bbbbbb", // 7 + "#555555", // 8 + "#ff0000", // 9 + "#00ee00", // 10 + "#ffff00", // 11 + "#0000ff", // 12 + "#ff00ff", // 13 + "#00cdcd", // 14 + "#ffffff", // 15 + [255] = 0, +//static unsigned int defaultbg = 0; + "#000000", // 0 + "#00a595", /* fg color */ +//static unsigned int defaultfg = 256; + "#bbbbbb", // 7 +//static unsigned int defaultcs = 7; +}, +{ + "#112616", // 0 + "#7f2b27", // 1 + "#2f7e25", // 2 + "#717f24", // 3 + "#2f6a7f", // 4 + "#47587f", // 5 + "#327f77", // 6 + "#647d75", // 7 + "#3c4812", // 8 + "#e08009", // 9 + "#18e000", // 10 + "#bde000", // 11 + "#00aae0", // 12 + "#0058e0", // 13 + "#00e0c4", // 14 + "#73fa91", // 15 + [255] = 0, + "#0f1610", /* bg color */ +//static unsigned int defaultbg = 256; + "#637d75", /* fg color */ +//static unsigned int defaultfg = 257; + "#73fa91", // 15 +//static unsigned int defaultcs = 15; +}, +{ + "#4f4f4f", // 0 + "#ff6c60", // 1 + "#a8ff60", // 2 + "#ffffb6", // 3 + "#96cbfe", // 4 + "#ff73fd", // 5 + "#c6c5fe", // 6 + "#eeeeee", // 7 + "#7c7c7c", // 8 + "#ffb6b0", // 9 + "#ceffac", // 10 + "#ffffcc", // 11 + "#b5dcff", // 12 + "#ff9cfe", // 13 + "#dfdffe", // 14 + "#ffffff", // 15 + [255] = 0, + "#0000a4", /* bg color */ +//static unsigned int defaultbg = 256; + "#ffff4e", /* fg color */ +//static unsigned int defaultfg = 257; + "#ffa560" /* cs color */ +//static unsigned int defaultcs = 258; +}, +{ + "#000000", // 0 + "#c13900", // 1 + "#a4a900", // 2 + "#caaf00", // 3 + "#bd6d00", // 4 + "#fc5e00", // 5 + "#f79500", // 6 + "#ffc88a", // 7 + "#6a4f2a", // 8 + "#ff8c68", // 9 + "#f6ff40", // 10 + "#ffe36e", // 11 + "#ffbe55", // 12 + "#fc874f", // 13 + "#c69752", // 14 + "#fafaff", // 15 + [255] = 0, + "#262626", /* bg color */ +//static unsigned int defaultbg = 256; + "#ffcb83", /* fg color */ +//static unsigned int defaultfg = 257; + "#fc531d" /* cs color */ +//static unsigned int defaultcs = 258; +}, +{ + "#1f1f1f", // 0 + "#fb002a", // 1 + "#339c24", // 2 + "#659b25", // 3 + "#149b45", // 4 + "#53b82c", // 5 + "#2cb868", // 6 + "#e0ffef", // 7 + "#032710", // 8 + "#a7ff3f", // 9 + "#9fff6d", // 10 + "#d2ff6d", // 11 + "#72ffb5", // 12 + "#50ff3e", // 13 + "#22ff71", // 14 + "#daefd0", // 15 + [255] = 0, + "#3a3d3f", /* bg color */ +//static unsigned int defaultbg = 256; + "#d9efd3", /* fg color */ +//static unsigned int defaultfg = 257; + "#42ff58" /* cs color */ +//static unsigned int defaultcs = 258; +}, +{ + "#000000", // 0 + "#d62e4e", // 1 + "#71be6b", // 2 + "#beb86b", // 3 + "#489bee", // 4 + "#e979d7", // 5 + "#6bbeb8", // 6 + "#d6d6d6", // 7 + "#262626", // 8 + "#e02553", // 9 + "#aff08c", // 10 + "#dfddb7", // 11 + "#65aaf1", // 12 + "#ddb7df", // 13 + "#b7dfdd", // 14 + "#ffffff", // 15 + [255] = 0, + "#762423", /* bg color */ +//static unsigned int defaultbg = 256; +//static unsigned int defaultfg = 15; + "#ffffff", // 15 +//static unsigned int defaultcs = 15; + "#ffffff", // 15 +}, + +}; + +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { +// cobalt neon + +"#142631", // 0 +"#ff2320", // 1 +"#3ba5ff", // 2 +"#e9e75c", // 3 +"#8ff586", // 4 +"#781aa0", // 5 +"#8ff586", // 6 +"#ba46b2", // 7 +"#fff688", // 8 +"#d4312e", // 9 +"#8ff586", // 10 +"#e9f06d", // 11 +"#3c7dd2", // 12 +"#8230a7", // 13 +"#6cbc67", // 14 +"#8ff586", // 15 + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ +"#142838", /* bg color */ +"#8ff586", // 6 +"#c4206f" /* cs color */ + + }; + +/* Terminal colors for alternate (light) palette */ +static const char *altcolorname[] = { +// IC_Green + +"#1f1f1f", // 0 +"#fb002a", // 1 +"#339c24", // 2 +"#659b25", // 3 +"#149b45", // 4 +"#53b82c", // 5 +"#2cb868", // 6 +"#e0ffef", // 7 +"#032710", // 8 +"#a7ff3f", // 9 +"#9fff6d", // 10 +"#d2ff6d", // 11 +"#72ffb5", // 12 +"#50ff3e", // 13 +"#22ff71", // 14 +"#daefd0", // 15 + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ +"#3a3d3f", /* bg color */ +"#d9efd3", /* fg color */ +"#42ff58" /* cs color */ +}; + + +/* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +static unsigned int defaultbg = 256; +static unsigned int defaultfg = 257; +static unsigned int defaultcs = 258; +static unsigned int defaultrcs = 15; + +/* + * Default shape of cursor (1/3/5 are supposed to blink?) + * 2: Block ("█") + * 4: Underline ("_") + * 6: Bar ("|") + * 7: Snowman ("☃") + +my hexagrams: +* 8: Creative Heaven ("䷀") +* 9: Gathering (Order) ("䷬") +*10: Work on the Decayed ("䷑") +*11: Inner Truth ("䷼") + +ansi blocks: +*12: Light Shade ("░") +*13: Medium Shade ("▒") +*14: Dark Shade ("▓") + +other: +*15: This thing: ("▣") + */ +static unsigned int cursorshape = 1; + +/* + * Default colour and shape of the mouse cursor + */ +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; + +/* + * Colors used, when the specific fg == defaultfg. So in reverse mode this + * will reverse too. Another logic would only make the simple feature too + * complex. + */ +static unsigned int defaultitalic = 11; +static unsigned int defaultunderline = 7; + +/* + * Internal mouse shortcuts. + * Beware that overloading Button1 will disable the selection. + */ +static MouseShortcut mshortcuts[] = { + /* button mask string */ + { Button4, XK_ANY_MOD, "\031" }, + { Button5, XK_ANY_MOD, "\005" }, +}; + +/* Internal keyboard shortcuts. */ +#define MODKEY Mod1Mask + +/* I don't use the printer, but I _do_ use f6. +So I'm going to remove the print bits and replace with toggle. +*/ + +static Shortcut shortcuts[] = { + /* mask keysym function argument */ + { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, + // { ControlMask, XK_Print, toggleprinter, {.i = 0} }, + // { ShiftMask, XK_Print, printscreen, {.i = 0} }, + // { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, + { MODKEY|ShiftMask, XK_Prior, xzoom, {.f = +1} }, + { MODKEY|ShiftMask, XK_Next, xzoom, {.f = -1} }, + { MODKEY|ShiftMask, XK_Home, xzoomreset, {.f = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, + { MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} }, + { MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} }, + { MODKEY, XK_Num_Lock, numlock, {.i = 0} }, + { XK_ANY_MOD, XK_Print, swapcolors, {.i = 0} }, +// eject + { XK_ANY_MOD, 0x1008ff2c, swapcolors, {.i = 0} }, + +}; + +/* + * Special keys (change & recompile st.info accordingly) + * + * Mask value: + * * Use XK_ANY_MOD to match the key no matter modifiers state + * * Use XK_NO_MOD to match the key alone (no modifiers) + * appkey value: + * * 0: no value + * * > 0: keypad application mode enabled + * * = 2: term.numlock = 1 + * * < 0: keypad application mode disabled + * appcursor value: + * * 0: no value + * * > 0: cursor application mode enabled + * * < 0: cursor application mode disabled + * crlf value + * * 0: no value + * * > 0: crlf mode is enabled + * * < 0: crlf mode is disabled + * + * Be careful with the order of the definitions because st searches in + * this table sequentially, so any XK_ANY_MOD must be in the last + * position for a key. + */ + +/* + * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) + * to be mapped below, add them to this array. + */ +static KeySym mappedkeys[] = { -1 }; + +/* + * State bits to ignore when matching key or button events. By default, + * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. + */ +static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; + +/* + * Override mouse-select while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forceselmod = ShiftMask; + +/* + * This is the huge key array which defines all compatibility to the Linux + * world. Please decide about changes wisely. + */ +static Key key[] = { + /* keysym mask string appkey appcursor crlf */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1}, + { XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0, -1}, + { XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0, -1}, + { XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1, 0}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0}, + { XK_End, ControlMask, "\033[J", -1, 0, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0}, +}; + +/* + * Selection types' masks. + * Use the same masks as usual. + * Button1Mask is always unset, to make masks match between ButtonPress. + * ButtonRelease and MotionNotify. + * If no match is found, regular selection is used. + */ +static uint selmasks[] = { + [SEL_RECTANGULAR] = Mod1Mask, +}; + +/* + * Printable characters in ASCII, used to estimate the advance width + * of single wide characters. + */ +static char ascii_printable[] = + " !\"#$%&'()*+,-./0123456789:;<=>?" + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; + diff --git a/old_work/config.mk b/old_work/config.mk new file mode 100644 index 0000000..5806157 --- /dev/null +++ b/old_work/config.mk @@ -0,0 +1,28 @@ +# st version +VERSION = 0.7.truck + +# Customize below to fit your system + +# paths +PREFIX = /usr/local +MANPREFIX = ${PREFIX}/share/man + +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib + +# includes and libs +INCS = -I. -I/usr/include -I${X11INC} \ + `pkg-config --cflags fontconfig` \ + `pkg-config --cflags freetype2` +LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender\ + `pkg-config --libs fontconfig` \ + `pkg-config --libs freetype2` + +# flags +CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600 +CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} ${CPPFLAGS} +LDFLAGS += -g ${LIBS} + +# compiler and linker +# CC = cc + diff --git a/conv/3024 Day.xrdb b/old_work/conv/3024 Day.xrdb similarity index 100% rename from conv/3024 Day.xrdb rename to old_work/conv/3024 Day.xrdb diff --git a/conv/3024 Night.xrdb b/old_work/conv/3024 Night.xrdb similarity index 100% rename from conv/3024 Night.xrdb rename to old_work/conv/3024 Night.xrdb diff --git a/conv/AdventureTime.xrdb b/old_work/conv/AdventureTime.xrdb similarity index 100% rename from conv/AdventureTime.xrdb rename to old_work/conv/AdventureTime.xrdb diff --git a/conv/Afterglow.xrdb b/old_work/conv/Afterglow.xrdb similarity index 100% rename from conv/Afterglow.xrdb rename to old_work/conv/Afterglow.xrdb diff --git a/conv/AlienBlood.xrdb b/old_work/conv/AlienBlood.xrdb similarity index 100% rename from conv/AlienBlood.xrdb rename to old_work/conv/AlienBlood.xrdb diff --git a/conv/Argonaut.xrdb b/old_work/conv/Argonaut.xrdb similarity index 100% rename from conv/Argonaut.xrdb rename to old_work/conv/Argonaut.xrdb diff --git a/conv/Arthur.xrdb b/old_work/conv/Arthur.xrdb similarity index 100% rename from conv/Arthur.xrdb rename to old_work/conv/Arthur.xrdb diff --git a/conv/AtelierSulphurpool.xrdb b/old_work/conv/AtelierSulphurpool.xrdb similarity index 100% rename from conv/AtelierSulphurpool.xrdb rename to old_work/conv/AtelierSulphurpool.xrdb diff --git a/conv/Atom.xrdb b/old_work/conv/Atom.xrdb similarity index 100% rename from conv/Atom.xrdb rename to old_work/conv/Atom.xrdb diff --git a/conv/AtomOneLight.xrdb b/old_work/conv/AtomOneLight.xrdb similarity index 100% rename from conv/AtomOneLight.xrdb rename to old_work/conv/AtomOneLight.xrdb diff --git a/conv/Batman.xrdb b/old_work/conv/Batman.xrdb similarity index 100% rename from conv/Batman.xrdb rename to old_work/conv/Batman.xrdb diff --git a/conv/Belafonte Day.xrdb b/old_work/conv/Belafonte Day.xrdb similarity index 100% rename from conv/Belafonte Day.xrdb rename to old_work/conv/Belafonte Day.xrdb diff --git a/conv/Belafonte Night.xrdb b/old_work/conv/Belafonte Night.xrdb similarity index 100% rename from conv/Belafonte Night.xrdb rename to old_work/conv/Belafonte Night.xrdb diff --git a/conv/BirdsOfParadise.xrdb b/old_work/conv/BirdsOfParadise.xrdb similarity index 100% rename from conv/BirdsOfParadise.xrdb rename to old_work/conv/BirdsOfParadise.xrdb diff --git a/conv/Blazer.xrdb b/old_work/conv/Blazer.xrdb similarity index 100% rename from conv/Blazer.xrdb rename to old_work/conv/Blazer.xrdb diff --git a/conv/Borland.xrdb b/old_work/conv/Borland.xrdb similarity index 100% rename from conv/Borland.xrdb rename to old_work/conv/Borland.xrdb diff --git a/conv/Bright Lights.xrdb b/old_work/conv/Bright Lights.xrdb similarity index 100% rename from conv/Bright Lights.xrdb rename to old_work/conv/Bright Lights.xrdb diff --git a/conv/Broadcast.xrdb b/old_work/conv/Broadcast.xrdb similarity index 100% rename from conv/Broadcast.xrdb rename to old_work/conv/Broadcast.xrdb diff --git a/conv/Brogrammer.xrdb b/old_work/conv/Brogrammer.xrdb similarity index 100% rename from conv/Brogrammer.xrdb rename to old_work/conv/Brogrammer.xrdb diff --git a/conv/C64.xrdb b/old_work/conv/C64.xrdb similarity index 100% rename from conv/C64.xrdb rename to old_work/conv/C64.xrdb diff --git a/conv/CLRS.xrdb b/old_work/conv/CLRS.xrdb similarity index 100% rename from conv/CLRS.xrdb rename to old_work/conv/CLRS.xrdb diff --git a/conv/Chalk.xrdb b/old_work/conv/Chalk.xrdb similarity index 100% rename from conv/Chalk.xrdb rename to old_work/conv/Chalk.xrdb diff --git a/conv/Chalkboard.xrdb b/old_work/conv/Chalkboard.xrdb similarity index 100% rename from conv/Chalkboard.xrdb rename to old_work/conv/Chalkboard.xrdb diff --git a/conv/Ciapre.xrdb b/old_work/conv/Ciapre.xrdb similarity index 100% rename from conv/Ciapre.xrdb rename to old_work/conv/Ciapre.xrdb diff --git a/conv/Cobalt Neon.xrdb b/old_work/conv/Cobalt Neon.xrdb similarity index 100% rename from conv/Cobalt Neon.xrdb rename to old_work/conv/Cobalt Neon.xrdb diff --git a/conv/Cobalt2.xrdb b/old_work/conv/Cobalt2.xrdb similarity index 100% rename from conv/Cobalt2.xrdb rename to old_work/conv/Cobalt2.xrdb diff --git a/conv/CrayonPonyFish.xrdb b/old_work/conv/CrayonPonyFish.xrdb similarity index 100% rename from conv/CrayonPonyFish.xrdb rename to old_work/conv/CrayonPonyFish.xrdb diff --git a/conv/Dark Pastel.xrdb b/old_work/conv/Dark Pastel.xrdb similarity index 100% rename from conv/Dark Pastel.xrdb rename to old_work/conv/Dark Pastel.xrdb diff --git a/conv/Darkside.xrdb b/old_work/conv/Darkside.xrdb similarity index 100% rename from conv/Darkside.xrdb rename to old_work/conv/Darkside.xrdb diff --git a/conv/Desert.xrdb b/old_work/conv/Desert.xrdb similarity index 100% rename from conv/Desert.xrdb rename to old_work/conv/Desert.xrdb diff --git a/conv/DimmedMonokai.xrdb b/old_work/conv/DimmedMonokai.xrdb similarity index 100% rename from conv/DimmedMonokai.xrdb rename to old_work/conv/DimmedMonokai.xrdb diff --git a/conv/DotGov.xrdb b/old_work/conv/DotGov.xrdb similarity index 100% rename from conv/DotGov.xrdb rename to old_work/conv/DotGov.xrdb diff --git a/conv/Dracula.xrdb b/old_work/conv/Dracula.xrdb similarity index 100% rename from conv/Dracula.xrdb rename to old_work/conv/Dracula.xrdb diff --git a/conv/Duotone Dark.xrdb b/old_work/conv/Duotone Dark.xrdb similarity index 100% rename from conv/Duotone Dark.xrdb rename to old_work/conv/Duotone Dark.xrdb diff --git a/conv/ENCOM.xrdb b/old_work/conv/ENCOM.xrdb similarity index 100% rename from conv/ENCOM.xrdb rename to old_work/conv/ENCOM.xrdb diff --git a/conv/Earthsong.xrdb b/old_work/conv/Earthsong.xrdb similarity index 100% rename from conv/Earthsong.xrdb rename to old_work/conv/Earthsong.xrdb diff --git a/conv/Elemental.xrdb b/old_work/conv/Elemental.xrdb similarity index 100% rename from conv/Elemental.xrdb rename to old_work/conv/Elemental.xrdb diff --git a/conv/Elementary.xrdb b/old_work/conv/Elementary.xrdb similarity index 100% rename from conv/Elementary.xrdb rename to old_work/conv/Elementary.xrdb diff --git a/conv/Espresso Libre.xrdb b/old_work/conv/Espresso Libre.xrdb similarity index 100% rename from conv/Espresso Libre.xrdb rename to old_work/conv/Espresso Libre.xrdb diff --git a/conv/Espresso.xrdb b/old_work/conv/Espresso.xrdb similarity index 100% rename from conv/Espresso.xrdb rename to old_work/conv/Espresso.xrdb diff --git a/conv/Fideloper.xrdb b/old_work/conv/Fideloper.xrdb similarity index 100% rename from conv/Fideloper.xrdb rename to old_work/conv/Fideloper.xrdb diff --git a/conv/FirefoxDev.xrdb b/old_work/conv/FirefoxDev.xrdb similarity index 100% rename from conv/FirefoxDev.xrdb rename to old_work/conv/FirefoxDev.xrdb diff --git a/conv/Firewatch.xrdb b/old_work/conv/Firewatch.xrdb similarity index 100% rename from conv/Firewatch.xrdb rename to old_work/conv/Firewatch.xrdb diff --git a/conv/FishTank.xrdb b/old_work/conv/FishTank.xrdb similarity index 100% rename from conv/FishTank.xrdb rename to old_work/conv/FishTank.xrdb diff --git a/conv/Flat.xrdb b/old_work/conv/Flat.xrdb similarity index 100% rename from conv/Flat.xrdb rename to old_work/conv/Flat.xrdb diff --git a/conv/Flatland.xrdb b/old_work/conv/Flatland.xrdb similarity index 100% rename from conv/Flatland.xrdb rename to old_work/conv/Flatland.xrdb diff --git a/conv/Floraverse.xrdb b/old_work/conv/Floraverse.xrdb similarity index 100% rename from conv/Floraverse.xrdb rename to old_work/conv/Floraverse.xrdb diff --git a/conv/ForestBlue.xrdb b/old_work/conv/ForestBlue.xrdb similarity index 100% rename from conv/ForestBlue.xrdb rename to old_work/conv/ForestBlue.xrdb diff --git a/conv/FrontEndDelight.xrdb b/old_work/conv/FrontEndDelight.xrdb similarity index 100% rename from conv/FrontEndDelight.xrdb rename to old_work/conv/FrontEndDelight.xrdb diff --git a/conv/FunForrest.xrdb b/old_work/conv/FunForrest.xrdb similarity index 100% rename from conv/FunForrest.xrdb rename to old_work/conv/FunForrest.xrdb diff --git a/conv/Galaxy.xrdb b/old_work/conv/Galaxy.xrdb similarity index 100% rename from conv/Galaxy.xrdb rename to old_work/conv/Galaxy.xrdb diff --git a/conv/Github.xrdb b/old_work/conv/Github.xrdb similarity index 100% rename from conv/Github.xrdb rename to old_work/conv/Github.xrdb diff --git a/conv/Glacier.xrdb b/old_work/conv/Glacier.xrdb similarity index 100% rename from conv/Glacier.xrdb rename to old_work/conv/Glacier.xrdb diff --git a/conv/Grape.xrdb b/old_work/conv/Grape.xrdb similarity index 100% rename from conv/Grape.xrdb rename to old_work/conv/Grape.xrdb diff --git a/conv/Grass.xrdb b/old_work/conv/Grass.xrdb similarity index 100% rename from conv/Grass.xrdb rename to old_work/conv/Grass.xrdb diff --git a/conv/Gruvbox Dark.xrdb b/old_work/conv/Gruvbox Dark.xrdb similarity index 100% rename from conv/Gruvbox Dark.xrdb rename to old_work/conv/Gruvbox Dark.xrdb diff --git a/conv/Hardcore.xrdb b/old_work/conv/Hardcore.xrdb similarity index 100% rename from conv/Hardcore.xrdb rename to old_work/conv/Hardcore.xrdb diff --git a/conv/Harper.xrdb b/old_work/conv/Harper.xrdb similarity index 100% rename from conv/Harper.xrdb rename to old_work/conv/Harper.xrdb diff --git a/conv/Highway.xrdb b/old_work/conv/Highway.xrdb similarity index 100% rename from conv/Highway.xrdb rename to old_work/conv/Highway.xrdb diff --git a/conv/Hipster Green.xrdb b/old_work/conv/Hipster Green.xrdb similarity index 100% rename from conv/Hipster Green.xrdb rename to old_work/conv/Hipster Green.xrdb diff --git a/conv/Homebrew.xrdb b/old_work/conv/Homebrew.xrdb similarity index 100% rename from conv/Homebrew.xrdb rename to old_work/conv/Homebrew.xrdb diff --git a/conv/Hurtado.xrdb b/old_work/conv/Hurtado.xrdb similarity index 100% rename from conv/Hurtado.xrdb rename to old_work/conv/Hurtado.xrdb diff --git a/conv/Hybrid.xrdb b/old_work/conv/Hybrid.xrdb similarity index 100% rename from conv/Hybrid.xrdb rename to old_work/conv/Hybrid.xrdb diff --git a/conv/IC_Green_PPL.xrdb b/old_work/conv/IC_Green_PPL.xrdb similarity index 100% rename from conv/IC_Green_PPL.xrdb rename to old_work/conv/IC_Green_PPL.xrdb diff --git a/conv/IC_Orange_PPL.xrdb b/old_work/conv/IC_Orange_PPL.xrdb similarity index 100% rename from conv/IC_Orange_PPL.xrdb rename to old_work/conv/IC_Orange_PPL.xrdb diff --git a/conv/IR_Black.xrdb b/old_work/conv/IR_Black.xrdb similarity index 100% rename from conv/IR_Black.xrdb rename to old_work/conv/IR_Black.xrdb diff --git a/conv/Jackie Brown.xrdb b/old_work/conv/Jackie Brown.xrdb similarity index 100% rename from conv/Jackie Brown.xrdb rename to old_work/conv/Jackie Brown.xrdb diff --git a/conv/Japanesque.xrdb b/old_work/conv/Japanesque.xrdb similarity index 100% rename from conv/Japanesque.xrdb rename to old_work/conv/Japanesque.xrdb diff --git a/conv/Jellybeans.xrdb b/old_work/conv/Jellybeans.xrdb similarity index 100% rename from conv/Jellybeans.xrdb rename to old_work/conv/Jellybeans.xrdb diff --git a/conv/JetBrains Darcula.xrdb b/old_work/conv/JetBrains Darcula.xrdb similarity index 100% rename from conv/JetBrains Darcula.xrdb rename to old_work/conv/JetBrains Darcula.xrdb diff --git a/conv/Kibble.xrdb b/old_work/conv/Kibble.xrdb similarity index 100% rename from conv/Kibble.xrdb rename to old_work/conv/Kibble.xrdb diff --git a/conv/Later This Evening.xrdb b/old_work/conv/Later This Evening.xrdb similarity index 100% rename from conv/Later This Evening.xrdb rename to old_work/conv/Later This Evening.xrdb diff --git a/conv/Lavandula.xrdb b/old_work/conv/Lavandula.xrdb similarity index 100% rename from conv/Lavandula.xrdb rename to old_work/conv/Lavandula.xrdb diff --git a/conv/LiquidCarbon.xrdb b/old_work/conv/LiquidCarbon.xrdb similarity index 100% rename from conv/LiquidCarbon.xrdb rename to old_work/conv/LiquidCarbon.xrdb diff --git a/conv/LiquidCarbonTransparent.xrdb b/old_work/conv/LiquidCarbonTransparent.xrdb similarity index 100% rename from conv/LiquidCarbonTransparent.xrdb rename to old_work/conv/LiquidCarbonTransparent.xrdb diff --git a/conv/LiquidCarbonTransparentInverse.xrdb b/old_work/conv/LiquidCarbonTransparentInverse.xrdb similarity index 100% rename from conv/LiquidCarbonTransparentInverse.xrdb rename to old_work/conv/LiquidCarbonTransparentInverse.xrdb diff --git a/conv/Man Page.xrdb b/old_work/conv/Man Page.xrdb similarity index 100% rename from conv/Man Page.xrdb rename to old_work/conv/Man Page.xrdb diff --git a/conv/Material.xrdb b/old_work/conv/Material.xrdb similarity index 100% rename from conv/Material.xrdb rename to old_work/conv/Material.xrdb diff --git a/conv/MaterialDark.xrdb b/old_work/conv/MaterialDark.xrdb similarity index 100% rename from conv/MaterialDark.xrdb rename to old_work/conv/MaterialDark.xrdb diff --git a/conv/Mathias.xrdb b/old_work/conv/Mathias.xrdb similarity index 100% rename from conv/Mathias.xrdb rename to old_work/conv/Mathias.xrdb diff --git a/conv/Medallion.xrdb b/old_work/conv/Medallion.xrdb similarity index 100% rename from conv/Medallion.xrdb rename to old_work/conv/Medallion.xrdb diff --git a/conv/Misterioso.xrdb b/old_work/conv/Misterioso.xrdb similarity index 100% rename from conv/Misterioso.xrdb rename to old_work/conv/Misterioso.xrdb diff --git a/conv/Molokai.xrdb b/old_work/conv/Molokai.xrdb similarity index 100% rename from conv/Molokai.xrdb rename to old_work/conv/Molokai.xrdb diff --git a/conv/MonaLisa.xrdb b/old_work/conv/MonaLisa.xrdb similarity index 100% rename from conv/MonaLisa.xrdb rename to old_work/conv/MonaLisa.xrdb diff --git a/conv/Monokai Soda.xrdb b/old_work/conv/Monokai Soda.xrdb similarity index 100% rename from conv/Monokai Soda.xrdb rename to old_work/conv/Monokai Soda.xrdb diff --git a/conv/Monokai Vivid.xrdb b/old_work/conv/Monokai Vivid.xrdb similarity index 100% rename from conv/Monokai Vivid.xrdb rename to old_work/conv/Monokai Vivid.xrdb diff --git a/conv/N0tch2k.xrdb b/old_work/conv/N0tch2k.xrdb similarity index 100% rename from conv/N0tch2k.xrdb rename to old_work/conv/N0tch2k.xrdb diff --git a/conv/Neopolitan.xrdb b/old_work/conv/Neopolitan.xrdb similarity index 100% rename from conv/Neopolitan.xrdb rename to old_work/conv/Neopolitan.xrdb diff --git a/conv/Neutron.xrdb b/old_work/conv/Neutron.xrdb similarity index 100% rename from conv/Neutron.xrdb rename to old_work/conv/Neutron.xrdb diff --git a/conv/NightLion v1.xrdb b/old_work/conv/NightLion v1.xrdb similarity index 100% rename from conv/NightLion v1.xrdb rename to old_work/conv/NightLion v1.xrdb diff --git a/conv/NightLion v2.xrdb b/old_work/conv/NightLion v2.xrdb similarity index 100% rename from conv/NightLion v2.xrdb rename to old_work/conv/NightLion v2.xrdb diff --git a/conv/Novel.xrdb b/old_work/conv/Novel.xrdb similarity index 100% rename from conv/Novel.xrdb rename to old_work/conv/Novel.xrdb diff --git a/conv/Obsidian.xrdb b/old_work/conv/Obsidian.xrdb similarity index 100% rename from conv/Obsidian.xrdb rename to old_work/conv/Obsidian.xrdb diff --git a/conv/Ocean.xrdb b/old_work/conv/Ocean.xrdb similarity index 100% rename from conv/Ocean.xrdb rename to old_work/conv/Ocean.xrdb diff --git a/conv/OceanicMaterial.xrdb b/old_work/conv/OceanicMaterial.xrdb similarity index 100% rename from conv/OceanicMaterial.xrdb rename to old_work/conv/OceanicMaterial.xrdb diff --git a/conv/Ollie.xrdb b/old_work/conv/Ollie.xrdb similarity index 100% rename from conv/Ollie.xrdb rename to old_work/conv/Ollie.xrdb diff --git a/conv/OneHalfDark.xrdb b/old_work/conv/OneHalfDark.xrdb similarity index 100% rename from conv/OneHalfDark.xrdb rename to old_work/conv/OneHalfDark.xrdb diff --git a/conv/OneHalfLight.xrdb b/old_work/conv/OneHalfLight.xrdb similarity index 100% rename from conv/OneHalfLight.xrdb rename to old_work/conv/OneHalfLight.xrdb diff --git a/conv/Pandora.xrdb b/old_work/conv/Pandora.xrdb similarity index 100% rename from conv/Pandora.xrdb rename to old_work/conv/Pandora.xrdb diff --git a/conv/Paraiso Dark.xrdb b/old_work/conv/Paraiso Dark.xrdb similarity index 100% rename from conv/Paraiso Dark.xrdb rename to old_work/conv/Paraiso Dark.xrdb diff --git a/conv/Parasio Dark.xrdb b/old_work/conv/Parasio Dark.xrdb similarity index 100% rename from conv/Parasio Dark.xrdb rename to old_work/conv/Parasio Dark.xrdb diff --git a/conv/PaulMillr.xrdb b/old_work/conv/PaulMillr.xrdb similarity index 100% rename from conv/PaulMillr.xrdb rename to old_work/conv/PaulMillr.xrdb diff --git a/conv/PencilDark.xrdb b/old_work/conv/PencilDark.xrdb similarity index 100% rename from conv/PencilDark.xrdb rename to old_work/conv/PencilDark.xrdb diff --git a/conv/PencilLight.xrdb b/old_work/conv/PencilLight.xrdb similarity index 100% rename from conv/PencilLight.xrdb rename to old_work/conv/PencilLight.xrdb diff --git a/conv/Piatto Light.xrdb b/old_work/conv/Piatto Light.xrdb similarity index 100% rename from conv/Piatto Light.xrdb rename to old_work/conv/Piatto Light.xrdb diff --git a/conv/Pnevma.xrdb b/old_work/conv/Pnevma.xrdb similarity index 100% rename from conv/Pnevma.xrdb rename to old_work/conv/Pnevma.xrdb diff --git a/conv/Pro.xrdb b/old_work/conv/Pro.xrdb similarity index 100% rename from conv/Pro.xrdb rename to old_work/conv/Pro.xrdb diff --git a/conv/Red Alert.xrdb b/old_work/conv/Red Alert.xrdb similarity index 100% rename from conv/Red Alert.xrdb rename to old_work/conv/Red Alert.xrdb diff --git a/conv/Red Sands.xrdb b/old_work/conv/Red Sands.xrdb similarity index 100% rename from conv/Red Sands.xrdb rename to old_work/conv/Red Sands.xrdb diff --git a/conv/Rippedcasts.xrdb b/old_work/conv/Rippedcasts.xrdb similarity index 100% rename from conv/Rippedcasts.xrdb rename to old_work/conv/Rippedcasts.xrdb diff --git a/conv/Royal.xrdb b/old_work/conv/Royal.xrdb similarity index 100% rename from conv/Royal.xrdb rename to old_work/conv/Royal.xrdb diff --git a/conv/Ryuuko.xrdb b/old_work/conv/Ryuuko.xrdb similarity index 100% rename from conv/Ryuuko.xrdb rename to old_work/conv/Ryuuko.xrdb diff --git a/conv/SeaShells.xrdb b/old_work/conv/SeaShells.xrdb similarity index 100% rename from conv/SeaShells.xrdb rename to old_work/conv/SeaShells.xrdb diff --git a/conv/Seafoam Pastel.xrdb b/old_work/conv/Seafoam Pastel.xrdb similarity index 100% rename from conv/Seafoam Pastel.xrdb rename to old_work/conv/Seafoam Pastel.xrdb diff --git a/conv/Seti.xrdb b/old_work/conv/Seti.xrdb similarity index 100% rename from conv/Seti.xrdb rename to old_work/conv/Seti.xrdb diff --git a/conv/Shaman.xrdb b/old_work/conv/Shaman.xrdb similarity index 100% rename from conv/Shaman.xrdb rename to old_work/conv/Shaman.xrdb diff --git a/conv/Slate.xrdb b/old_work/conv/Slate.xrdb similarity index 100% rename from conv/Slate.xrdb rename to old_work/conv/Slate.xrdb diff --git a/conv/Smyck.xrdb b/old_work/conv/Smyck.xrdb similarity index 100% rename from conv/Smyck.xrdb rename to old_work/conv/Smyck.xrdb diff --git a/conv/SoftServer.xrdb b/old_work/conv/SoftServer.xrdb similarity index 100% rename from conv/SoftServer.xrdb rename to old_work/conv/SoftServer.xrdb diff --git a/conv/Solarized Darcula.xrdb b/old_work/conv/Solarized Darcula.xrdb similarity index 100% rename from conv/Solarized Darcula.xrdb rename to old_work/conv/Solarized Darcula.xrdb diff --git a/conv/Solarized Dark - Patched.xrdb b/old_work/conv/Solarized Dark - Patched.xrdb similarity index 100% rename from conv/Solarized Dark - Patched.xrdb rename to old_work/conv/Solarized Dark - Patched.xrdb diff --git a/conv/Solarized Dark Higher Contrast.xrdb b/old_work/conv/Solarized Dark Higher Contrast.xrdb similarity index 100% rename from conv/Solarized Dark Higher Contrast.xrdb rename to old_work/conv/Solarized Dark Higher Contrast.xrdb diff --git a/conv/Solarized Dark.xrdb b/old_work/conv/Solarized Dark.xrdb similarity index 100% rename from conv/Solarized Dark.xrdb rename to old_work/conv/Solarized Dark.xrdb diff --git a/conv/Solarized Light.xrdb b/old_work/conv/Solarized Light.xrdb similarity index 100% rename from conv/Solarized Light.xrdb rename to old_work/conv/Solarized Light.xrdb diff --git a/conv/SpaceGray Eighties Dull.xrdb b/old_work/conv/SpaceGray Eighties Dull.xrdb similarity index 100% rename from conv/SpaceGray Eighties Dull.xrdb rename to old_work/conv/SpaceGray Eighties Dull.xrdb diff --git a/conv/SpaceGray Eighties.xrdb b/old_work/conv/SpaceGray Eighties.xrdb similarity index 100% rename from conv/SpaceGray Eighties.xrdb rename to old_work/conv/SpaceGray Eighties.xrdb diff --git a/conv/SpaceGray.xrdb b/old_work/conv/SpaceGray.xrdb similarity index 100% rename from conv/SpaceGray.xrdb rename to old_work/conv/SpaceGray.xrdb diff --git a/conv/Spacedust.xrdb b/old_work/conv/Spacedust.xrdb similarity index 100% rename from conv/Spacedust.xrdb rename to old_work/conv/Spacedust.xrdb diff --git a/conv/Spiderman.xrdb b/old_work/conv/Spiderman.xrdb similarity index 100% rename from conv/Spiderman.xrdb rename to old_work/conv/Spiderman.xrdb diff --git a/conv/Spring.xrdb b/old_work/conv/Spring.xrdb similarity index 100% rename from conv/Spring.xrdb rename to old_work/conv/Spring.xrdb diff --git a/conv/Square.xrdb b/old_work/conv/Square.xrdb similarity index 100% rename from conv/Square.xrdb rename to old_work/conv/Square.xrdb diff --git a/conv/Sundried.xrdb b/old_work/conv/Sundried.xrdb similarity index 100% rename from conv/Sundried.xrdb rename to old_work/conv/Sundried.xrdb diff --git a/conv/Symfonic.xrdb b/old_work/conv/Symfonic.xrdb similarity index 100% rename from conv/Symfonic.xrdb rename to old_work/conv/Symfonic.xrdb diff --git a/conv/Teerb.xrdb b/old_work/conv/Teerb.xrdb similarity index 100% rename from conv/Teerb.xrdb rename to old_work/conv/Teerb.xrdb diff --git a/conv/Terminal Basic.xrdb b/old_work/conv/Terminal Basic.xrdb similarity index 100% rename from conv/Terminal Basic.xrdb rename to old_work/conv/Terminal Basic.xrdb diff --git a/conv/Thayer Bright.xrdb b/old_work/conv/Thayer Bright.xrdb similarity index 100% rename from conv/Thayer Bright.xrdb rename to old_work/conv/Thayer Bright.xrdb diff --git a/conv/The Hulk.xrdb b/old_work/conv/The Hulk.xrdb similarity index 100% rename from conv/The Hulk.xrdb rename to old_work/conv/The Hulk.xrdb diff --git a/conv/Tomorrow Night Blue.xrdb b/old_work/conv/Tomorrow Night Blue.xrdb similarity index 100% rename from conv/Tomorrow Night Blue.xrdb rename to old_work/conv/Tomorrow Night Blue.xrdb diff --git a/conv/Tomorrow Night Bright.xrdb b/old_work/conv/Tomorrow Night Bright.xrdb similarity index 100% rename from conv/Tomorrow Night Bright.xrdb rename to old_work/conv/Tomorrow Night Bright.xrdb diff --git a/conv/Tomorrow Night Eighties.xrdb b/old_work/conv/Tomorrow Night Eighties.xrdb similarity index 100% rename from conv/Tomorrow Night Eighties.xrdb rename to old_work/conv/Tomorrow Night Eighties.xrdb diff --git a/conv/Tomorrow Night.xrdb b/old_work/conv/Tomorrow Night.xrdb similarity index 100% rename from conv/Tomorrow Night.xrdb rename to old_work/conv/Tomorrow Night.xrdb diff --git a/conv/Tomorrow.xrdb b/old_work/conv/Tomorrow.xrdb similarity index 100% rename from conv/Tomorrow.xrdb rename to old_work/conv/Tomorrow.xrdb diff --git a/conv/ToyChest.xrdb b/old_work/conv/ToyChest.xrdb similarity index 100% rename from conv/ToyChest.xrdb rename to old_work/conv/ToyChest.xrdb diff --git a/conv/Treehouse.xrdb b/old_work/conv/Treehouse.xrdb similarity index 100% rename from conv/Treehouse.xrdb rename to old_work/conv/Treehouse.xrdb diff --git a/conv/Twilight.xrdb b/old_work/conv/Twilight.xrdb similarity index 100% rename from conv/Twilight.xrdb rename to old_work/conv/Twilight.xrdb diff --git a/conv/Ubuntu.xrdb b/old_work/conv/Ubuntu.xrdb similarity index 100% rename from conv/Ubuntu.xrdb rename to old_work/conv/Ubuntu.xrdb diff --git a/conv/UnderTheSea.xrdb b/old_work/conv/UnderTheSea.xrdb similarity index 100% rename from conv/UnderTheSea.xrdb rename to old_work/conv/UnderTheSea.xrdb diff --git a/conv/Urple.xrdb b/old_work/conv/Urple.xrdb similarity index 100% rename from conv/Urple.xrdb rename to old_work/conv/Urple.xrdb diff --git a/conv/Vaughn.xrdb b/old_work/conv/Vaughn.xrdb similarity index 100% rename from conv/Vaughn.xrdb rename to old_work/conv/Vaughn.xrdb diff --git a/conv/VibrantInk.xrdb b/old_work/conv/VibrantInk.xrdb similarity index 100% rename from conv/VibrantInk.xrdb rename to old_work/conv/VibrantInk.xrdb diff --git a/conv/Violet Dark.xrdb b/old_work/conv/Violet Dark.xrdb similarity index 100% rename from conv/Violet Dark.xrdb rename to old_work/conv/Violet Dark.xrdb diff --git a/conv/Violet Light.xrdb b/old_work/conv/Violet Light.xrdb similarity index 100% rename from conv/Violet Light.xrdb rename to old_work/conv/Violet Light.xrdb diff --git a/conv/WarmNeon.xrdb b/old_work/conv/WarmNeon.xrdb similarity index 100% rename from conv/WarmNeon.xrdb rename to old_work/conv/WarmNeon.xrdb diff --git a/conv/Wez.xrdb b/old_work/conv/Wez.xrdb similarity index 100% rename from conv/Wez.xrdb rename to old_work/conv/Wez.xrdb diff --git a/conv/WildCherry.xrdb b/old_work/conv/WildCherry.xrdb similarity index 100% rename from conv/WildCherry.xrdb rename to old_work/conv/WildCherry.xrdb diff --git a/conv/Wombat.xrdb b/old_work/conv/Wombat.xrdb similarity index 100% rename from conv/Wombat.xrdb rename to old_work/conv/Wombat.xrdb diff --git a/conv/Wryan.xrdb b/old_work/conv/Wryan.xrdb similarity index 100% rename from conv/Wryan.xrdb rename to old_work/conv/Wryan.xrdb diff --git a/conv/Zenburn.xrdb b/old_work/conv/Zenburn.xrdb similarity index 100% rename from conv/Zenburn.xrdb rename to old_work/conv/Zenburn.xrdb diff --git a/conv/ayu.xrdb b/old_work/conv/ayu.xrdb similarity index 100% rename from conv/ayu.xrdb rename to old_work/conv/ayu.xrdb diff --git a/conv/ayu_light.xrdb b/old_work/conv/ayu_light.xrdb similarity index 100% rename from conv/ayu_light.xrdb rename to old_work/conv/ayu_light.xrdb diff --git a/conv/deep.xrdb b/old_work/conv/deep.xrdb similarity index 100% rename from conv/deep.xrdb rename to old_work/conv/deep.xrdb diff --git a/conv/idleToes.xrdb b/old_work/conv/idleToes.xrdb similarity index 100% rename from conv/idleToes.xrdb rename to old_work/conv/idleToes.xrdb diff --git a/iterm2colors/.gitignore b/old_work/iterm2colors/.gitignore similarity index 100% rename from iterm2colors/.gitignore rename to old_work/iterm2colors/.gitignore diff --git a/iterm2colors/README.md b/old_work/iterm2colors/README.md similarity index 100% rename from iterm2colors/README.md rename to old_work/iterm2colors/README.md diff --git a/iterm2colors/Xresources/3024 Day b/old_work/iterm2colors/Xresources/3024 Day similarity index 100% rename from iterm2colors/Xresources/3024 Day rename to old_work/iterm2colors/Xresources/3024 Day diff --git a/iterm2colors/Xresources/3024 Night b/old_work/iterm2colors/Xresources/3024 Night similarity index 100% rename from iterm2colors/Xresources/3024 Night rename to old_work/iterm2colors/Xresources/3024 Night diff --git a/iterm2colors/Xresources/AdventureTime b/old_work/iterm2colors/Xresources/AdventureTime similarity index 100% rename from iterm2colors/Xresources/AdventureTime rename to old_work/iterm2colors/Xresources/AdventureTime diff --git a/iterm2colors/Xresources/Afterglow b/old_work/iterm2colors/Xresources/Afterglow similarity index 100% rename from iterm2colors/Xresources/Afterglow rename to old_work/iterm2colors/Xresources/Afterglow diff --git a/iterm2colors/Xresources/AlienBlood b/old_work/iterm2colors/Xresources/AlienBlood similarity index 100% rename from iterm2colors/Xresources/AlienBlood rename to old_work/iterm2colors/Xresources/AlienBlood diff --git a/iterm2colors/Xresources/Argonaut b/old_work/iterm2colors/Xresources/Argonaut similarity index 100% rename from iterm2colors/Xresources/Argonaut rename to old_work/iterm2colors/Xresources/Argonaut diff --git a/iterm2colors/Xresources/Arthur b/old_work/iterm2colors/Xresources/Arthur similarity index 100% rename from iterm2colors/Xresources/Arthur rename to old_work/iterm2colors/Xresources/Arthur diff --git a/iterm2colors/Xresources/AtelierSulphurpool b/old_work/iterm2colors/Xresources/AtelierSulphurpool similarity index 100% rename from iterm2colors/Xresources/AtelierSulphurpool rename to old_work/iterm2colors/Xresources/AtelierSulphurpool diff --git a/iterm2colors/Xresources/Atom b/old_work/iterm2colors/Xresources/Atom similarity index 100% rename from iterm2colors/Xresources/Atom rename to old_work/iterm2colors/Xresources/Atom diff --git a/iterm2colors/Xresources/AtomOneLight b/old_work/iterm2colors/Xresources/AtomOneLight similarity index 100% rename from iterm2colors/Xresources/AtomOneLight rename to old_work/iterm2colors/Xresources/AtomOneLight diff --git a/iterm2colors/Xresources/Batman b/old_work/iterm2colors/Xresources/Batman similarity index 100% rename from iterm2colors/Xresources/Batman rename to old_work/iterm2colors/Xresources/Batman diff --git a/iterm2colors/Xresources/Belafonte Day b/old_work/iterm2colors/Xresources/Belafonte Day similarity index 100% rename from iterm2colors/Xresources/Belafonte Day rename to old_work/iterm2colors/Xresources/Belafonte Day diff --git a/iterm2colors/Xresources/Belafonte Night b/old_work/iterm2colors/Xresources/Belafonte Night similarity index 100% rename from iterm2colors/Xresources/Belafonte Night rename to old_work/iterm2colors/Xresources/Belafonte Night diff --git a/iterm2colors/Xresources/BirdsOfParadise b/old_work/iterm2colors/Xresources/BirdsOfParadise similarity index 100% rename from iterm2colors/Xresources/BirdsOfParadise rename to old_work/iterm2colors/Xresources/BirdsOfParadise diff --git a/iterm2colors/Xresources/Blazer b/old_work/iterm2colors/Xresources/Blazer similarity index 100% rename from iterm2colors/Xresources/Blazer rename to old_work/iterm2colors/Xresources/Blazer diff --git a/iterm2colors/Xresources/Borland b/old_work/iterm2colors/Xresources/Borland similarity index 100% rename from iterm2colors/Xresources/Borland rename to old_work/iterm2colors/Xresources/Borland diff --git a/iterm2colors/Xresources/Bright Lights b/old_work/iterm2colors/Xresources/Bright Lights similarity index 100% rename from iterm2colors/Xresources/Bright Lights rename to old_work/iterm2colors/Xresources/Bright Lights diff --git a/iterm2colors/Xresources/Broadcast b/old_work/iterm2colors/Xresources/Broadcast similarity index 100% rename from iterm2colors/Xresources/Broadcast rename to old_work/iterm2colors/Xresources/Broadcast diff --git a/iterm2colors/Xresources/Brogrammer b/old_work/iterm2colors/Xresources/Brogrammer similarity index 100% rename from iterm2colors/Xresources/Brogrammer rename to old_work/iterm2colors/Xresources/Brogrammer diff --git a/iterm2colors/Xresources/C64 b/old_work/iterm2colors/Xresources/C64 similarity index 100% rename from iterm2colors/Xresources/C64 rename to old_work/iterm2colors/Xresources/C64 diff --git a/iterm2colors/Xresources/CLRS b/old_work/iterm2colors/Xresources/CLRS similarity index 100% rename from iterm2colors/Xresources/CLRS rename to old_work/iterm2colors/Xresources/CLRS diff --git a/iterm2colors/Xresources/Chalk b/old_work/iterm2colors/Xresources/Chalk similarity index 100% rename from iterm2colors/Xresources/Chalk rename to old_work/iterm2colors/Xresources/Chalk diff --git a/iterm2colors/Xresources/Chalkboard b/old_work/iterm2colors/Xresources/Chalkboard similarity index 100% rename from iterm2colors/Xresources/Chalkboard rename to old_work/iterm2colors/Xresources/Chalkboard diff --git a/iterm2colors/Xresources/Ciapre b/old_work/iterm2colors/Xresources/Ciapre similarity index 100% rename from iterm2colors/Xresources/Ciapre rename to old_work/iterm2colors/Xresources/Ciapre diff --git a/iterm2colors/Xresources/Cobalt Neon b/old_work/iterm2colors/Xresources/Cobalt Neon similarity index 100% rename from iterm2colors/Xresources/Cobalt Neon rename to old_work/iterm2colors/Xresources/Cobalt Neon diff --git a/iterm2colors/Xresources/Cobalt2 b/old_work/iterm2colors/Xresources/Cobalt2 similarity index 100% rename from iterm2colors/Xresources/Cobalt2 rename to old_work/iterm2colors/Xresources/Cobalt2 diff --git a/iterm2colors/Xresources/CrayonPonyFish b/old_work/iterm2colors/Xresources/CrayonPonyFish similarity index 100% rename from iterm2colors/Xresources/CrayonPonyFish rename to old_work/iterm2colors/Xresources/CrayonPonyFish diff --git a/iterm2colors/Xresources/Dark Pastel b/old_work/iterm2colors/Xresources/Dark Pastel similarity index 100% rename from iterm2colors/Xresources/Dark Pastel rename to old_work/iterm2colors/Xresources/Dark Pastel diff --git a/iterm2colors/Xresources/Darkside b/old_work/iterm2colors/Xresources/Darkside similarity index 100% rename from iterm2colors/Xresources/Darkside rename to old_work/iterm2colors/Xresources/Darkside diff --git a/iterm2colors/Xresources/Desert b/old_work/iterm2colors/Xresources/Desert similarity index 100% rename from iterm2colors/Xresources/Desert rename to old_work/iterm2colors/Xresources/Desert diff --git a/iterm2colors/Xresources/DimmedMonokai b/old_work/iterm2colors/Xresources/DimmedMonokai similarity index 100% rename from iterm2colors/Xresources/DimmedMonokai rename to old_work/iterm2colors/Xresources/DimmedMonokai diff --git a/iterm2colors/Xresources/DotGov b/old_work/iterm2colors/Xresources/DotGov similarity index 100% rename from iterm2colors/Xresources/DotGov rename to old_work/iterm2colors/Xresources/DotGov diff --git a/iterm2colors/Xresources/Dracula b/old_work/iterm2colors/Xresources/Dracula similarity index 100% rename from iterm2colors/Xresources/Dracula rename to old_work/iterm2colors/Xresources/Dracula diff --git a/iterm2colors/Xresources/Duotone Dark b/old_work/iterm2colors/Xresources/Duotone Dark similarity index 100% rename from iterm2colors/Xresources/Duotone Dark rename to old_work/iterm2colors/Xresources/Duotone Dark diff --git a/iterm2colors/Xresources/ENCOM b/old_work/iterm2colors/Xresources/ENCOM similarity index 100% rename from iterm2colors/Xresources/ENCOM rename to old_work/iterm2colors/Xresources/ENCOM diff --git a/iterm2colors/Xresources/Earthsong b/old_work/iterm2colors/Xresources/Earthsong similarity index 100% rename from iterm2colors/Xresources/Earthsong rename to old_work/iterm2colors/Xresources/Earthsong diff --git a/iterm2colors/Xresources/Elemental b/old_work/iterm2colors/Xresources/Elemental similarity index 100% rename from iterm2colors/Xresources/Elemental rename to old_work/iterm2colors/Xresources/Elemental diff --git a/iterm2colors/Xresources/Elementary b/old_work/iterm2colors/Xresources/Elementary similarity index 100% rename from iterm2colors/Xresources/Elementary rename to old_work/iterm2colors/Xresources/Elementary diff --git a/iterm2colors/Xresources/Espresso b/old_work/iterm2colors/Xresources/Espresso similarity index 100% rename from iterm2colors/Xresources/Espresso rename to old_work/iterm2colors/Xresources/Espresso diff --git a/iterm2colors/Xresources/Espresso Libre b/old_work/iterm2colors/Xresources/Espresso Libre similarity index 100% rename from iterm2colors/Xresources/Espresso Libre rename to old_work/iterm2colors/Xresources/Espresso Libre diff --git a/iterm2colors/Xresources/Fideloper b/old_work/iterm2colors/Xresources/Fideloper similarity index 100% rename from iterm2colors/Xresources/Fideloper rename to old_work/iterm2colors/Xresources/Fideloper diff --git a/iterm2colors/Xresources/FirefoxDev b/old_work/iterm2colors/Xresources/FirefoxDev similarity index 100% rename from iterm2colors/Xresources/FirefoxDev rename to old_work/iterm2colors/Xresources/FirefoxDev diff --git a/iterm2colors/Xresources/Firewatch b/old_work/iterm2colors/Xresources/Firewatch similarity index 100% rename from iterm2colors/Xresources/Firewatch rename to old_work/iterm2colors/Xresources/Firewatch diff --git a/iterm2colors/Xresources/FishTank b/old_work/iterm2colors/Xresources/FishTank similarity index 100% rename from iterm2colors/Xresources/FishTank rename to old_work/iterm2colors/Xresources/FishTank diff --git a/iterm2colors/Xresources/Flat b/old_work/iterm2colors/Xresources/Flat similarity index 100% rename from iterm2colors/Xresources/Flat rename to old_work/iterm2colors/Xresources/Flat diff --git a/iterm2colors/Xresources/Flatland b/old_work/iterm2colors/Xresources/Flatland similarity index 100% rename from iterm2colors/Xresources/Flatland rename to old_work/iterm2colors/Xresources/Flatland diff --git a/iterm2colors/Xresources/Floraverse b/old_work/iterm2colors/Xresources/Floraverse similarity index 100% rename from iterm2colors/Xresources/Floraverse rename to old_work/iterm2colors/Xresources/Floraverse diff --git a/iterm2colors/Xresources/ForestBlue b/old_work/iterm2colors/Xresources/ForestBlue similarity index 100% rename from iterm2colors/Xresources/ForestBlue rename to old_work/iterm2colors/Xresources/ForestBlue diff --git a/iterm2colors/Xresources/FrontEndDelight b/old_work/iterm2colors/Xresources/FrontEndDelight similarity index 100% rename from iterm2colors/Xresources/FrontEndDelight rename to old_work/iterm2colors/Xresources/FrontEndDelight diff --git a/iterm2colors/Xresources/FunForrest b/old_work/iterm2colors/Xresources/FunForrest similarity index 100% rename from iterm2colors/Xresources/FunForrest rename to old_work/iterm2colors/Xresources/FunForrest diff --git a/iterm2colors/Xresources/Galaxy b/old_work/iterm2colors/Xresources/Galaxy similarity index 100% rename from iterm2colors/Xresources/Galaxy rename to old_work/iterm2colors/Xresources/Galaxy diff --git a/iterm2colors/Xresources/Github b/old_work/iterm2colors/Xresources/Github similarity index 100% rename from iterm2colors/Xresources/Github rename to old_work/iterm2colors/Xresources/Github diff --git a/iterm2colors/Xresources/Glacier b/old_work/iterm2colors/Xresources/Glacier similarity index 100% rename from iterm2colors/Xresources/Glacier rename to old_work/iterm2colors/Xresources/Glacier diff --git a/iterm2colors/Xresources/Grape b/old_work/iterm2colors/Xresources/Grape similarity index 100% rename from iterm2colors/Xresources/Grape rename to old_work/iterm2colors/Xresources/Grape diff --git a/iterm2colors/Xresources/Grass b/old_work/iterm2colors/Xresources/Grass similarity index 100% rename from iterm2colors/Xresources/Grass rename to old_work/iterm2colors/Xresources/Grass diff --git a/iterm2colors/Xresources/Gruvbox Dark b/old_work/iterm2colors/Xresources/Gruvbox Dark similarity index 100% rename from iterm2colors/Xresources/Gruvbox Dark rename to old_work/iterm2colors/Xresources/Gruvbox Dark diff --git a/iterm2colors/Xresources/Hardcore b/old_work/iterm2colors/Xresources/Hardcore similarity index 100% rename from iterm2colors/Xresources/Hardcore rename to old_work/iterm2colors/Xresources/Hardcore diff --git a/iterm2colors/Xresources/Harper b/old_work/iterm2colors/Xresources/Harper similarity index 100% rename from iterm2colors/Xresources/Harper rename to old_work/iterm2colors/Xresources/Harper diff --git a/iterm2colors/Xresources/Highway b/old_work/iterm2colors/Xresources/Highway similarity index 100% rename from iterm2colors/Xresources/Highway rename to old_work/iterm2colors/Xresources/Highway diff --git a/iterm2colors/Xresources/Hipster Green b/old_work/iterm2colors/Xresources/Hipster Green similarity index 100% rename from iterm2colors/Xresources/Hipster Green rename to old_work/iterm2colors/Xresources/Hipster Green diff --git a/iterm2colors/Xresources/Homebrew b/old_work/iterm2colors/Xresources/Homebrew similarity index 100% rename from iterm2colors/Xresources/Homebrew rename to old_work/iterm2colors/Xresources/Homebrew diff --git a/iterm2colors/Xresources/Hurtado b/old_work/iterm2colors/Xresources/Hurtado similarity index 100% rename from iterm2colors/Xresources/Hurtado rename to old_work/iterm2colors/Xresources/Hurtado diff --git a/iterm2colors/Xresources/Hybrid b/old_work/iterm2colors/Xresources/Hybrid similarity index 100% rename from iterm2colors/Xresources/Hybrid rename to old_work/iterm2colors/Xresources/Hybrid diff --git a/iterm2colors/Xresources/IC_Green_PPL b/old_work/iterm2colors/Xresources/IC_Green_PPL similarity index 100% rename from iterm2colors/Xresources/IC_Green_PPL rename to old_work/iterm2colors/Xresources/IC_Green_PPL diff --git a/iterm2colors/Xresources/IC_Orange_PPL b/old_work/iterm2colors/Xresources/IC_Orange_PPL similarity index 100% rename from iterm2colors/Xresources/IC_Orange_PPL rename to old_work/iterm2colors/Xresources/IC_Orange_PPL diff --git a/iterm2colors/Xresources/IR_Black b/old_work/iterm2colors/Xresources/IR_Black similarity index 100% rename from iterm2colors/Xresources/IR_Black rename to old_work/iterm2colors/Xresources/IR_Black diff --git a/iterm2colors/Xresources/Jackie Brown b/old_work/iterm2colors/Xresources/Jackie Brown similarity index 100% rename from iterm2colors/Xresources/Jackie Brown rename to old_work/iterm2colors/Xresources/Jackie Brown diff --git a/iterm2colors/Xresources/Japanesque b/old_work/iterm2colors/Xresources/Japanesque similarity index 100% rename from iterm2colors/Xresources/Japanesque rename to old_work/iterm2colors/Xresources/Japanesque diff --git a/iterm2colors/Xresources/Jellybeans b/old_work/iterm2colors/Xresources/Jellybeans similarity index 100% rename from iterm2colors/Xresources/Jellybeans rename to old_work/iterm2colors/Xresources/Jellybeans diff --git a/iterm2colors/Xresources/JetBrains Darcula b/old_work/iterm2colors/Xresources/JetBrains Darcula similarity index 100% rename from iterm2colors/Xresources/JetBrains Darcula rename to old_work/iterm2colors/Xresources/JetBrains Darcula diff --git a/iterm2colors/Xresources/Kibble b/old_work/iterm2colors/Xresources/Kibble similarity index 100% rename from iterm2colors/Xresources/Kibble rename to old_work/iterm2colors/Xresources/Kibble diff --git a/iterm2colors/Xresources/Later This Evening b/old_work/iterm2colors/Xresources/Later This Evening similarity index 100% rename from iterm2colors/Xresources/Later This Evening rename to old_work/iterm2colors/Xresources/Later This Evening diff --git a/iterm2colors/Xresources/Lavandula b/old_work/iterm2colors/Xresources/Lavandula similarity index 100% rename from iterm2colors/Xresources/Lavandula rename to old_work/iterm2colors/Xresources/Lavandula diff --git a/iterm2colors/Xresources/LiquidCarbon b/old_work/iterm2colors/Xresources/LiquidCarbon similarity index 100% rename from iterm2colors/Xresources/LiquidCarbon rename to old_work/iterm2colors/Xresources/LiquidCarbon diff --git a/iterm2colors/Xresources/LiquidCarbonTransparent b/old_work/iterm2colors/Xresources/LiquidCarbonTransparent similarity index 100% rename from iterm2colors/Xresources/LiquidCarbonTransparent rename to old_work/iterm2colors/Xresources/LiquidCarbonTransparent diff --git a/iterm2colors/Xresources/LiquidCarbonTransparentInverse b/old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse similarity index 100% rename from iterm2colors/Xresources/LiquidCarbonTransparentInverse rename to old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse diff --git a/iterm2colors/Xresources/Man Page b/old_work/iterm2colors/Xresources/Man Page similarity index 100% rename from iterm2colors/Xresources/Man Page rename to old_work/iterm2colors/Xresources/Man Page diff --git a/iterm2colors/Xresources/Material b/old_work/iterm2colors/Xresources/Material similarity index 100% rename from iterm2colors/Xresources/Material rename to old_work/iterm2colors/Xresources/Material diff --git a/iterm2colors/Xresources/MaterialDark b/old_work/iterm2colors/Xresources/MaterialDark similarity index 100% rename from iterm2colors/Xresources/MaterialDark rename to old_work/iterm2colors/Xresources/MaterialDark diff --git a/iterm2colors/Xresources/Mathias b/old_work/iterm2colors/Xresources/Mathias similarity index 100% rename from iterm2colors/Xresources/Mathias rename to old_work/iterm2colors/Xresources/Mathias diff --git a/iterm2colors/Xresources/Medallion b/old_work/iterm2colors/Xresources/Medallion similarity index 100% rename from iterm2colors/Xresources/Medallion rename to old_work/iterm2colors/Xresources/Medallion diff --git a/iterm2colors/Xresources/Misterioso b/old_work/iterm2colors/Xresources/Misterioso similarity index 100% rename from iterm2colors/Xresources/Misterioso rename to old_work/iterm2colors/Xresources/Misterioso diff --git a/iterm2colors/Xresources/Molokai b/old_work/iterm2colors/Xresources/Molokai similarity index 100% rename from iterm2colors/Xresources/Molokai rename to old_work/iterm2colors/Xresources/Molokai diff --git a/iterm2colors/Xresources/MonaLisa b/old_work/iterm2colors/Xresources/MonaLisa similarity index 100% rename from iterm2colors/Xresources/MonaLisa rename to old_work/iterm2colors/Xresources/MonaLisa diff --git a/iterm2colors/Xresources/Monokai Soda b/old_work/iterm2colors/Xresources/Monokai Soda similarity index 100% rename from iterm2colors/Xresources/Monokai Soda rename to old_work/iterm2colors/Xresources/Monokai Soda diff --git a/iterm2colors/Xresources/Monokai Vivid b/old_work/iterm2colors/Xresources/Monokai Vivid similarity index 100% rename from iterm2colors/Xresources/Monokai Vivid rename to old_work/iterm2colors/Xresources/Monokai Vivid diff --git a/iterm2colors/Xresources/N0tch2k b/old_work/iterm2colors/Xresources/N0tch2k similarity index 100% rename from iterm2colors/Xresources/N0tch2k rename to old_work/iterm2colors/Xresources/N0tch2k diff --git a/iterm2colors/Xresources/Neopolitan b/old_work/iterm2colors/Xresources/Neopolitan similarity index 100% rename from iterm2colors/Xresources/Neopolitan rename to old_work/iterm2colors/Xresources/Neopolitan diff --git a/iterm2colors/Xresources/Neutron b/old_work/iterm2colors/Xresources/Neutron similarity index 100% rename from iterm2colors/Xresources/Neutron rename to old_work/iterm2colors/Xresources/Neutron diff --git a/iterm2colors/Xresources/NightLion v1 b/old_work/iterm2colors/Xresources/NightLion v1 similarity index 100% rename from iterm2colors/Xresources/NightLion v1 rename to old_work/iterm2colors/Xresources/NightLion v1 diff --git a/iterm2colors/Xresources/NightLion v2 b/old_work/iterm2colors/Xresources/NightLion v2 similarity index 100% rename from iterm2colors/Xresources/NightLion v2 rename to old_work/iterm2colors/Xresources/NightLion v2 diff --git a/iterm2colors/Xresources/Novel b/old_work/iterm2colors/Xresources/Novel similarity index 100% rename from iterm2colors/Xresources/Novel rename to old_work/iterm2colors/Xresources/Novel diff --git a/iterm2colors/Xresources/Obsidian b/old_work/iterm2colors/Xresources/Obsidian similarity index 100% rename from iterm2colors/Xresources/Obsidian rename to old_work/iterm2colors/Xresources/Obsidian diff --git a/iterm2colors/Xresources/Ocean b/old_work/iterm2colors/Xresources/Ocean similarity index 100% rename from iterm2colors/Xresources/Ocean rename to old_work/iterm2colors/Xresources/Ocean diff --git a/iterm2colors/Xresources/OceanicMaterial b/old_work/iterm2colors/Xresources/OceanicMaterial similarity index 100% rename from iterm2colors/Xresources/OceanicMaterial rename to old_work/iterm2colors/Xresources/OceanicMaterial diff --git a/iterm2colors/Xresources/Ollie b/old_work/iterm2colors/Xresources/Ollie similarity index 100% rename from iterm2colors/Xresources/Ollie rename to old_work/iterm2colors/Xresources/Ollie diff --git a/iterm2colors/Xresources/OneHalfDark b/old_work/iterm2colors/Xresources/OneHalfDark similarity index 100% rename from iterm2colors/Xresources/OneHalfDark rename to old_work/iterm2colors/Xresources/OneHalfDark diff --git a/iterm2colors/Xresources/OneHalfLight b/old_work/iterm2colors/Xresources/OneHalfLight similarity index 100% rename from iterm2colors/Xresources/OneHalfLight rename to old_work/iterm2colors/Xresources/OneHalfLight diff --git a/iterm2colors/Xresources/Pandora b/old_work/iterm2colors/Xresources/Pandora similarity index 100% rename from iterm2colors/Xresources/Pandora rename to old_work/iterm2colors/Xresources/Pandora diff --git a/iterm2colors/Xresources/Paraiso Dark b/old_work/iterm2colors/Xresources/Paraiso Dark similarity index 100% rename from iterm2colors/Xresources/Paraiso Dark rename to old_work/iterm2colors/Xresources/Paraiso Dark diff --git a/iterm2colors/Xresources/Parasio Dark b/old_work/iterm2colors/Xresources/Parasio Dark similarity index 100% rename from iterm2colors/Xresources/Parasio Dark rename to old_work/iterm2colors/Xresources/Parasio Dark diff --git a/iterm2colors/Xresources/PaulMillr b/old_work/iterm2colors/Xresources/PaulMillr similarity index 100% rename from iterm2colors/Xresources/PaulMillr rename to old_work/iterm2colors/Xresources/PaulMillr diff --git a/iterm2colors/Xresources/PencilDark b/old_work/iterm2colors/Xresources/PencilDark similarity index 100% rename from iterm2colors/Xresources/PencilDark rename to old_work/iterm2colors/Xresources/PencilDark diff --git a/iterm2colors/Xresources/PencilLight b/old_work/iterm2colors/Xresources/PencilLight similarity index 100% rename from iterm2colors/Xresources/PencilLight rename to old_work/iterm2colors/Xresources/PencilLight diff --git a/iterm2colors/Xresources/Piatto Light b/old_work/iterm2colors/Xresources/Piatto Light similarity index 100% rename from iterm2colors/Xresources/Piatto Light rename to old_work/iterm2colors/Xresources/Piatto Light diff --git a/iterm2colors/Xresources/Pnevma b/old_work/iterm2colors/Xresources/Pnevma similarity index 100% rename from iterm2colors/Xresources/Pnevma rename to old_work/iterm2colors/Xresources/Pnevma diff --git a/iterm2colors/Xresources/Pro b/old_work/iterm2colors/Xresources/Pro similarity index 100% rename from iterm2colors/Xresources/Pro rename to old_work/iterm2colors/Xresources/Pro diff --git a/iterm2colors/Xresources/Red Alert b/old_work/iterm2colors/Xresources/Red Alert similarity index 100% rename from iterm2colors/Xresources/Red Alert rename to old_work/iterm2colors/Xresources/Red Alert diff --git a/iterm2colors/Xresources/Red Sands b/old_work/iterm2colors/Xresources/Red Sands similarity index 100% rename from iterm2colors/Xresources/Red Sands rename to old_work/iterm2colors/Xresources/Red Sands diff --git a/iterm2colors/Xresources/Rippedcasts b/old_work/iterm2colors/Xresources/Rippedcasts similarity index 100% rename from iterm2colors/Xresources/Rippedcasts rename to old_work/iterm2colors/Xresources/Rippedcasts diff --git a/iterm2colors/Xresources/Royal b/old_work/iterm2colors/Xresources/Royal similarity index 100% rename from iterm2colors/Xresources/Royal rename to old_work/iterm2colors/Xresources/Royal diff --git a/iterm2colors/Xresources/Ryuuko b/old_work/iterm2colors/Xresources/Ryuuko similarity index 100% rename from iterm2colors/Xresources/Ryuuko rename to old_work/iterm2colors/Xresources/Ryuuko diff --git a/iterm2colors/Xresources/SeaShells b/old_work/iterm2colors/Xresources/SeaShells similarity index 100% rename from iterm2colors/Xresources/SeaShells rename to old_work/iterm2colors/Xresources/SeaShells diff --git a/iterm2colors/Xresources/Seafoam Pastel b/old_work/iterm2colors/Xresources/Seafoam Pastel similarity index 100% rename from iterm2colors/Xresources/Seafoam Pastel rename to old_work/iterm2colors/Xresources/Seafoam Pastel diff --git a/iterm2colors/Xresources/Seti b/old_work/iterm2colors/Xresources/Seti similarity index 100% rename from iterm2colors/Xresources/Seti rename to old_work/iterm2colors/Xresources/Seti diff --git a/iterm2colors/Xresources/Shaman b/old_work/iterm2colors/Xresources/Shaman similarity index 100% rename from iterm2colors/Xresources/Shaman rename to old_work/iterm2colors/Xresources/Shaman diff --git a/iterm2colors/Xresources/Slate b/old_work/iterm2colors/Xresources/Slate similarity index 100% rename from iterm2colors/Xresources/Slate rename to old_work/iterm2colors/Xresources/Slate diff --git a/iterm2colors/Xresources/Smyck b/old_work/iterm2colors/Xresources/Smyck similarity index 100% rename from iterm2colors/Xresources/Smyck rename to old_work/iterm2colors/Xresources/Smyck diff --git a/iterm2colors/Xresources/SoftServer b/old_work/iterm2colors/Xresources/SoftServer similarity index 100% rename from iterm2colors/Xresources/SoftServer rename to old_work/iterm2colors/Xresources/SoftServer diff --git a/iterm2colors/Xresources/Solarized Darcula b/old_work/iterm2colors/Xresources/Solarized Darcula similarity index 100% rename from iterm2colors/Xresources/Solarized Darcula rename to old_work/iterm2colors/Xresources/Solarized Darcula diff --git a/iterm2colors/Xresources/Solarized Dark b/old_work/iterm2colors/Xresources/Solarized Dark similarity index 100% rename from iterm2colors/Xresources/Solarized Dark rename to old_work/iterm2colors/Xresources/Solarized Dark diff --git a/iterm2colors/Xresources/Solarized Dark - Patched b/old_work/iterm2colors/Xresources/Solarized Dark - Patched similarity index 100% rename from iterm2colors/Xresources/Solarized Dark - Patched rename to old_work/iterm2colors/Xresources/Solarized Dark - Patched diff --git a/iterm2colors/Xresources/Solarized Dark Higher Contrast b/old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast similarity index 100% rename from iterm2colors/Xresources/Solarized Dark Higher Contrast rename to old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast diff --git a/iterm2colors/Xresources/Solarized Light b/old_work/iterm2colors/Xresources/Solarized Light similarity index 100% rename from iterm2colors/Xresources/Solarized Light rename to old_work/iterm2colors/Xresources/Solarized Light diff --git a/iterm2colors/Xresources/SpaceGray b/old_work/iterm2colors/Xresources/SpaceGray similarity index 100% rename from iterm2colors/Xresources/SpaceGray rename to old_work/iterm2colors/Xresources/SpaceGray diff --git a/iterm2colors/Xresources/SpaceGray Eighties b/old_work/iterm2colors/Xresources/SpaceGray Eighties similarity index 100% rename from iterm2colors/Xresources/SpaceGray Eighties rename to old_work/iterm2colors/Xresources/SpaceGray Eighties diff --git a/iterm2colors/Xresources/SpaceGray Eighties Dull b/old_work/iterm2colors/Xresources/SpaceGray Eighties Dull similarity index 100% rename from iterm2colors/Xresources/SpaceGray Eighties Dull rename to old_work/iterm2colors/Xresources/SpaceGray Eighties Dull diff --git a/iterm2colors/Xresources/Spacedust b/old_work/iterm2colors/Xresources/Spacedust similarity index 100% rename from iterm2colors/Xresources/Spacedust rename to old_work/iterm2colors/Xresources/Spacedust diff --git a/iterm2colors/Xresources/Spiderman b/old_work/iterm2colors/Xresources/Spiderman similarity index 100% rename from iterm2colors/Xresources/Spiderman rename to old_work/iterm2colors/Xresources/Spiderman diff --git a/iterm2colors/Xresources/Spring b/old_work/iterm2colors/Xresources/Spring similarity index 100% rename from iterm2colors/Xresources/Spring rename to old_work/iterm2colors/Xresources/Spring diff --git a/iterm2colors/Xresources/Square b/old_work/iterm2colors/Xresources/Square similarity index 100% rename from iterm2colors/Xresources/Square rename to old_work/iterm2colors/Xresources/Square diff --git a/iterm2colors/Xresources/Sundried b/old_work/iterm2colors/Xresources/Sundried similarity index 100% rename from iterm2colors/Xresources/Sundried rename to old_work/iterm2colors/Xresources/Sundried diff --git a/iterm2colors/Xresources/Symfonic b/old_work/iterm2colors/Xresources/Symfonic similarity index 100% rename from iterm2colors/Xresources/Symfonic rename to old_work/iterm2colors/Xresources/Symfonic diff --git a/iterm2colors/Xresources/Teerb b/old_work/iterm2colors/Xresources/Teerb similarity index 100% rename from iterm2colors/Xresources/Teerb rename to old_work/iterm2colors/Xresources/Teerb diff --git a/iterm2colors/Xresources/Terminal Basic b/old_work/iterm2colors/Xresources/Terminal Basic similarity index 100% rename from iterm2colors/Xresources/Terminal Basic rename to old_work/iterm2colors/Xresources/Terminal Basic diff --git a/iterm2colors/Xresources/Thayer Bright b/old_work/iterm2colors/Xresources/Thayer Bright similarity index 100% rename from iterm2colors/Xresources/Thayer Bright rename to old_work/iterm2colors/Xresources/Thayer Bright diff --git a/iterm2colors/Xresources/The Hulk b/old_work/iterm2colors/Xresources/The Hulk similarity index 100% rename from iterm2colors/Xresources/The Hulk rename to old_work/iterm2colors/Xresources/The Hulk diff --git a/iterm2colors/Xresources/Tomorrow b/old_work/iterm2colors/Xresources/Tomorrow similarity index 100% rename from iterm2colors/Xresources/Tomorrow rename to old_work/iterm2colors/Xresources/Tomorrow diff --git a/iterm2colors/Xresources/Tomorrow Night b/old_work/iterm2colors/Xresources/Tomorrow Night similarity index 100% rename from iterm2colors/Xresources/Tomorrow Night rename to old_work/iterm2colors/Xresources/Tomorrow Night diff --git a/iterm2colors/Xresources/Tomorrow Night Blue b/old_work/iterm2colors/Xresources/Tomorrow Night Blue similarity index 100% rename from iterm2colors/Xresources/Tomorrow Night Blue rename to old_work/iterm2colors/Xresources/Tomorrow Night Blue diff --git a/iterm2colors/Xresources/Tomorrow Night Bright b/old_work/iterm2colors/Xresources/Tomorrow Night Bright similarity index 100% rename from iterm2colors/Xresources/Tomorrow Night Bright rename to old_work/iterm2colors/Xresources/Tomorrow Night Bright diff --git a/iterm2colors/Xresources/Tomorrow Night Eighties b/old_work/iterm2colors/Xresources/Tomorrow Night Eighties similarity index 100% rename from iterm2colors/Xresources/Tomorrow Night Eighties rename to old_work/iterm2colors/Xresources/Tomorrow Night Eighties diff --git a/iterm2colors/Xresources/ToyChest b/old_work/iterm2colors/Xresources/ToyChest similarity index 100% rename from iterm2colors/Xresources/ToyChest rename to old_work/iterm2colors/Xresources/ToyChest diff --git a/iterm2colors/Xresources/Treehouse b/old_work/iterm2colors/Xresources/Treehouse similarity index 100% rename from iterm2colors/Xresources/Treehouse rename to old_work/iterm2colors/Xresources/Treehouse diff --git a/iterm2colors/Xresources/Twilight b/old_work/iterm2colors/Xresources/Twilight similarity index 100% rename from iterm2colors/Xresources/Twilight rename to old_work/iterm2colors/Xresources/Twilight diff --git a/iterm2colors/Xresources/Ubuntu b/old_work/iterm2colors/Xresources/Ubuntu similarity index 100% rename from iterm2colors/Xresources/Ubuntu rename to old_work/iterm2colors/Xresources/Ubuntu diff --git a/iterm2colors/Xresources/UnderTheSea b/old_work/iterm2colors/Xresources/UnderTheSea similarity index 100% rename from iterm2colors/Xresources/UnderTheSea rename to old_work/iterm2colors/Xresources/UnderTheSea diff --git a/iterm2colors/Xresources/Urple b/old_work/iterm2colors/Xresources/Urple similarity index 100% rename from iterm2colors/Xresources/Urple rename to old_work/iterm2colors/Xresources/Urple diff --git a/iterm2colors/Xresources/Vaughn b/old_work/iterm2colors/Xresources/Vaughn similarity index 100% rename from iterm2colors/Xresources/Vaughn rename to old_work/iterm2colors/Xresources/Vaughn diff --git a/iterm2colors/Xresources/VibrantInk b/old_work/iterm2colors/Xresources/VibrantInk similarity index 100% rename from iterm2colors/Xresources/VibrantInk rename to old_work/iterm2colors/Xresources/VibrantInk diff --git a/iterm2colors/Xresources/Violet Dark b/old_work/iterm2colors/Xresources/Violet Dark similarity index 100% rename from iterm2colors/Xresources/Violet Dark rename to old_work/iterm2colors/Xresources/Violet Dark diff --git a/iterm2colors/Xresources/Violet Light b/old_work/iterm2colors/Xresources/Violet Light similarity index 100% rename from iterm2colors/Xresources/Violet Light rename to old_work/iterm2colors/Xresources/Violet Light diff --git a/iterm2colors/Xresources/WarmNeon b/old_work/iterm2colors/Xresources/WarmNeon similarity index 100% rename from iterm2colors/Xresources/WarmNeon rename to old_work/iterm2colors/Xresources/WarmNeon diff --git a/iterm2colors/Xresources/Wez b/old_work/iterm2colors/Xresources/Wez similarity index 100% rename from iterm2colors/Xresources/Wez rename to old_work/iterm2colors/Xresources/Wez diff --git a/iterm2colors/Xresources/WildCherry b/old_work/iterm2colors/Xresources/WildCherry similarity index 100% rename from iterm2colors/Xresources/WildCherry rename to old_work/iterm2colors/Xresources/WildCherry diff --git a/iterm2colors/Xresources/Wombat b/old_work/iterm2colors/Xresources/Wombat similarity index 100% rename from iterm2colors/Xresources/Wombat rename to old_work/iterm2colors/Xresources/Wombat diff --git a/iterm2colors/Xresources/Wryan b/old_work/iterm2colors/Xresources/Wryan similarity index 100% rename from iterm2colors/Xresources/Wryan rename to old_work/iterm2colors/Xresources/Wryan diff --git a/iterm2colors/Xresources/Zenburn b/old_work/iterm2colors/Xresources/Zenburn similarity index 100% rename from iterm2colors/Xresources/Zenburn rename to old_work/iterm2colors/Xresources/Zenburn diff --git a/iterm2colors/Xresources/ayu b/old_work/iterm2colors/Xresources/ayu similarity index 100% rename from iterm2colors/Xresources/ayu rename to old_work/iterm2colors/Xresources/ayu diff --git a/iterm2colors/Xresources/ayu_light b/old_work/iterm2colors/Xresources/ayu_light similarity index 100% rename from iterm2colors/Xresources/ayu_light rename to old_work/iterm2colors/Xresources/ayu_light diff --git a/iterm2colors/Xresources/deep b/old_work/iterm2colors/Xresources/deep similarity index 100% rename from iterm2colors/Xresources/deep rename to old_work/iterm2colors/Xresources/deep diff --git a/iterm2colors/Xresources/idleToes b/old_work/iterm2colors/Xresources/idleToes similarity index 100% rename from iterm2colors/Xresources/idleToes rename to old_work/iterm2colors/Xresources/idleToes diff --git a/iterm2colors/backgrounds/solarized_darcula.jpg b/old_work/iterm2colors/backgrounds/solarized_darcula.jpg similarity index 100% rename from iterm2colors/backgrounds/solarized_darcula.jpg rename to old_work/iterm2colors/backgrounds/solarized_darcula.jpg diff --git a/iterm2colors/konsole/3024 Day.colorscheme b/old_work/iterm2colors/konsole/3024 Day.colorscheme similarity index 100% rename from iterm2colors/konsole/3024 Day.colorscheme rename to old_work/iterm2colors/konsole/3024 Day.colorscheme diff --git a/iterm2colors/konsole/3024 Night.colorscheme b/old_work/iterm2colors/konsole/3024 Night.colorscheme similarity index 100% rename from iterm2colors/konsole/3024 Night.colorscheme rename to old_work/iterm2colors/konsole/3024 Night.colorscheme diff --git a/iterm2colors/konsole/AdventureTime.colorscheme b/old_work/iterm2colors/konsole/AdventureTime.colorscheme similarity index 100% rename from iterm2colors/konsole/AdventureTime.colorscheme rename to old_work/iterm2colors/konsole/AdventureTime.colorscheme diff --git a/iterm2colors/konsole/Afterglow.colorscheme b/old_work/iterm2colors/konsole/Afterglow.colorscheme similarity index 100% rename from iterm2colors/konsole/Afterglow.colorscheme rename to old_work/iterm2colors/konsole/Afterglow.colorscheme diff --git a/iterm2colors/konsole/AlienBlood.colorscheme b/old_work/iterm2colors/konsole/AlienBlood.colorscheme similarity index 100% rename from iterm2colors/konsole/AlienBlood.colorscheme rename to old_work/iterm2colors/konsole/AlienBlood.colorscheme diff --git a/iterm2colors/konsole/Argonaut.colorscheme b/old_work/iterm2colors/konsole/Argonaut.colorscheme similarity index 100% rename from iterm2colors/konsole/Argonaut.colorscheme rename to old_work/iterm2colors/konsole/Argonaut.colorscheme diff --git a/iterm2colors/konsole/Arthur.colorscheme b/old_work/iterm2colors/konsole/Arthur.colorscheme similarity index 100% rename from iterm2colors/konsole/Arthur.colorscheme rename to old_work/iterm2colors/konsole/Arthur.colorscheme diff --git a/iterm2colors/konsole/AtelierSulphurpool.colorscheme b/old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme similarity index 100% rename from iterm2colors/konsole/AtelierSulphurpool.colorscheme rename to old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme diff --git a/iterm2colors/konsole/Atom.colorscheme b/old_work/iterm2colors/konsole/Atom.colorscheme similarity index 100% rename from iterm2colors/konsole/Atom.colorscheme rename to old_work/iterm2colors/konsole/Atom.colorscheme diff --git a/iterm2colors/konsole/AtomOneLight.colorscheme b/old_work/iterm2colors/konsole/AtomOneLight.colorscheme similarity index 100% rename from iterm2colors/konsole/AtomOneLight.colorscheme rename to old_work/iterm2colors/konsole/AtomOneLight.colorscheme diff --git a/iterm2colors/konsole/Batman.colorscheme b/old_work/iterm2colors/konsole/Batman.colorscheme similarity index 100% rename from iterm2colors/konsole/Batman.colorscheme rename to old_work/iterm2colors/konsole/Batman.colorscheme diff --git a/iterm2colors/konsole/Belafonte Day.colorscheme b/old_work/iterm2colors/konsole/Belafonte Day.colorscheme similarity index 100% rename from iterm2colors/konsole/Belafonte Day.colorscheme rename to old_work/iterm2colors/konsole/Belafonte Day.colorscheme diff --git a/iterm2colors/konsole/Belafonte Night.colorscheme b/old_work/iterm2colors/konsole/Belafonte Night.colorscheme similarity index 100% rename from iterm2colors/konsole/Belafonte Night.colorscheme rename to old_work/iterm2colors/konsole/Belafonte Night.colorscheme diff --git a/iterm2colors/konsole/BirdsOfParadise.colorscheme b/old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme similarity index 100% rename from iterm2colors/konsole/BirdsOfParadise.colorscheme rename to old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme diff --git a/iterm2colors/konsole/Blazer.colorscheme b/old_work/iterm2colors/konsole/Blazer.colorscheme similarity index 100% rename from iterm2colors/konsole/Blazer.colorscheme rename to old_work/iterm2colors/konsole/Blazer.colorscheme diff --git a/iterm2colors/konsole/Borland.colorscheme b/old_work/iterm2colors/konsole/Borland.colorscheme similarity index 100% rename from iterm2colors/konsole/Borland.colorscheme rename to old_work/iterm2colors/konsole/Borland.colorscheme diff --git a/iterm2colors/konsole/Bright Lights.colorscheme b/old_work/iterm2colors/konsole/Bright Lights.colorscheme similarity index 100% rename from iterm2colors/konsole/Bright Lights.colorscheme rename to old_work/iterm2colors/konsole/Bright Lights.colorscheme diff --git a/iterm2colors/konsole/Broadcast.colorscheme b/old_work/iterm2colors/konsole/Broadcast.colorscheme similarity index 100% rename from iterm2colors/konsole/Broadcast.colorscheme rename to old_work/iterm2colors/konsole/Broadcast.colorscheme diff --git a/iterm2colors/konsole/Brogrammer.colorscheme b/old_work/iterm2colors/konsole/Brogrammer.colorscheme similarity index 100% rename from iterm2colors/konsole/Brogrammer.colorscheme rename to old_work/iterm2colors/konsole/Brogrammer.colorscheme diff --git a/iterm2colors/konsole/C64.colorscheme b/old_work/iterm2colors/konsole/C64.colorscheme similarity index 100% rename from iterm2colors/konsole/C64.colorscheme rename to old_work/iterm2colors/konsole/C64.colorscheme diff --git a/iterm2colors/konsole/CLRS.colorscheme b/old_work/iterm2colors/konsole/CLRS.colorscheme similarity index 100% rename from iterm2colors/konsole/CLRS.colorscheme rename to old_work/iterm2colors/konsole/CLRS.colorscheme diff --git a/iterm2colors/konsole/Chalk.colorscheme b/old_work/iterm2colors/konsole/Chalk.colorscheme similarity index 100% rename from iterm2colors/konsole/Chalk.colorscheme rename to old_work/iterm2colors/konsole/Chalk.colorscheme diff --git a/iterm2colors/konsole/Chalkboard.colorscheme b/old_work/iterm2colors/konsole/Chalkboard.colorscheme similarity index 100% rename from iterm2colors/konsole/Chalkboard.colorscheme rename to old_work/iterm2colors/konsole/Chalkboard.colorscheme diff --git a/iterm2colors/konsole/Ciapre.colorscheme b/old_work/iterm2colors/konsole/Ciapre.colorscheme similarity index 100% rename from iterm2colors/konsole/Ciapre.colorscheme rename to old_work/iterm2colors/konsole/Ciapre.colorscheme diff --git a/iterm2colors/konsole/Cobalt Neon.colorscheme b/old_work/iterm2colors/konsole/Cobalt Neon.colorscheme similarity index 100% rename from iterm2colors/konsole/Cobalt Neon.colorscheme rename to old_work/iterm2colors/konsole/Cobalt Neon.colorscheme diff --git a/iterm2colors/konsole/Cobalt2.colorscheme b/old_work/iterm2colors/konsole/Cobalt2.colorscheme similarity index 100% rename from iterm2colors/konsole/Cobalt2.colorscheme rename to old_work/iterm2colors/konsole/Cobalt2.colorscheme diff --git a/iterm2colors/konsole/CrayonPonyFish.colorscheme b/old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme similarity index 100% rename from iterm2colors/konsole/CrayonPonyFish.colorscheme rename to old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme diff --git a/iterm2colors/konsole/Dark Pastel.colorscheme b/old_work/iterm2colors/konsole/Dark Pastel.colorscheme similarity index 100% rename from iterm2colors/konsole/Dark Pastel.colorscheme rename to old_work/iterm2colors/konsole/Dark Pastel.colorscheme diff --git a/iterm2colors/konsole/Darkside.colorscheme b/old_work/iterm2colors/konsole/Darkside.colorscheme similarity index 100% rename from iterm2colors/konsole/Darkside.colorscheme rename to old_work/iterm2colors/konsole/Darkside.colorscheme diff --git a/iterm2colors/konsole/Desert.colorscheme b/old_work/iterm2colors/konsole/Desert.colorscheme similarity index 100% rename from iterm2colors/konsole/Desert.colorscheme rename to old_work/iterm2colors/konsole/Desert.colorscheme diff --git a/iterm2colors/konsole/DimmedMonokai.colorscheme b/old_work/iterm2colors/konsole/DimmedMonokai.colorscheme similarity index 100% rename from iterm2colors/konsole/DimmedMonokai.colorscheme rename to old_work/iterm2colors/konsole/DimmedMonokai.colorscheme diff --git a/iterm2colors/konsole/DotGov.colorscheme b/old_work/iterm2colors/konsole/DotGov.colorscheme similarity index 100% rename from iterm2colors/konsole/DotGov.colorscheme rename to old_work/iterm2colors/konsole/DotGov.colorscheme diff --git a/iterm2colors/konsole/Dracula.colorscheme b/old_work/iterm2colors/konsole/Dracula.colorscheme similarity index 100% rename from iterm2colors/konsole/Dracula.colorscheme rename to old_work/iterm2colors/konsole/Dracula.colorscheme diff --git a/iterm2colors/konsole/Duotone Dark.colorscheme b/old_work/iterm2colors/konsole/Duotone Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Duotone Dark.colorscheme rename to old_work/iterm2colors/konsole/Duotone Dark.colorscheme diff --git a/iterm2colors/konsole/ENCOM.colorscheme b/old_work/iterm2colors/konsole/ENCOM.colorscheme similarity index 100% rename from iterm2colors/konsole/ENCOM.colorscheme rename to old_work/iterm2colors/konsole/ENCOM.colorscheme diff --git a/iterm2colors/konsole/Earthsong.colorscheme b/old_work/iterm2colors/konsole/Earthsong.colorscheme similarity index 100% rename from iterm2colors/konsole/Earthsong.colorscheme rename to old_work/iterm2colors/konsole/Earthsong.colorscheme diff --git a/iterm2colors/konsole/Elemental.colorscheme b/old_work/iterm2colors/konsole/Elemental.colorscheme similarity index 100% rename from iterm2colors/konsole/Elemental.colorscheme rename to old_work/iterm2colors/konsole/Elemental.colorscheme diff --git a/iterm2colors/konsole/Elementary.colorscheme b/old_work/iterm2colors/konsole/Elementary.colorscheme similarity index 100% rename from iterm2colors/konsole/Elementary.colorscheme rename to old_work/iterm2colors/konsole/Elementary.colorscheme diff --git a/iterm2colors/konsole/Espresso Libre.colorscheme b/old_work/iterm2colors/konsole/Espresso Libre.colorscheme similarity index 100% rename from iterm2colors/konsole/Espresso Libre.colorscheme rename to old_work/iterm2colors/konsole/Espresso Libre.colorscheme diff --git a/iterm2colors/konsole/Espresso.colorscheme b/old_work/iterm2colors/konsole/Espresso.colorscheme similarity index 100% rename from iterm2colors/konsole/Espresso.colorscheme rename to old_work/iterm2colors/konsole/Espresso.colorscheme diff --git a/iterm2colors/konsole/Fideloper.colorscheme b/old_work/iterm2colors/konsole/Fideloper.colorscheme similarity index 100% rename from iterm2colors/konsole/Fideloper.colorscheme rename to old_work/iterm2colors/konsole/Fideloper.colorscheme diff --git a/iterm2colors/konsole/FirefoxDev.colorscheme b/old_work/iterm2colors/konsole/FirefoxDev.colorscheme similarity index 100% rename from iterm2colors/konsole/FirefoxDev.colorscheme rename to old_work/iterm2colors/konsole/FirefoxDev.colorscheme diff --git a/iterm2colors/konsole/Firewatch.colorscheme b/old_work/iterm2colors/konsole/Firewatch.colorscheme similarity index 100% rename from iterm2colors/konsole/Firewatch.colorscheme rename to old_work/iterm2colors/konsole/Firewatch.colorscheme diff --git a/iterm2colors/konsole/FishTank.colorscheme b/old_work/iterm2colors/konsole/FishTank.colorscheme similarity index 100% rename from iterm2colors/konsole/FishTank.colorscheme rename to old_work/iterm2colors/konsole/FishTank.colorscheme diff --git a/iterm2colors/konsole/Flat.colorscheme b/old_work/iterm2colors/konsole/Flat.colorscheme similarity index 100% rename from iterm2colors/konsole/Flat.colorscheme rename to old_work/iterm2colors/konsole/Flat.colorscheme diff --git a/iterm2colors/konsole/Flatland.colorscheme b/old_work/iterm2colors/konsole/Flatland.colorscheme similarity index 100% rename from iterm2colors/konsole/Flatland.colorscheme rename to old_work/iterm2colors/konsole/Flatland.colorscheme diff --git a/iterm2colors/konsole/Floraverse.colorscheme b/old_work/iterm2colors/konsole/Floraverse.colorscheme similarity index 100% rename from iterm2colors/konsole/Floraverse.colorscheme rename to old_work/iterm2colors/konsole/Floraverse.colorscheme diff --git a/iterm2colors/konsole/ForestBlue.colorscheme b/old_work/iterm2colors/konsole/ForestBlue.colorscheme similarity index 100% rename from iterm2colors/konsole/ForestBlue.colorscheme rename to old_work/iterm2colors/konsole/ForestBlue.colorscheme diff --git a/iterm2colors/konsole/FrontEndDelight.colorscheme b/old_work/iterm2colors/konsole/FrontEndDelight.colorscheme similarity index 100% rename from iterm2colors/konsole/FrontEndDelight.colorscheme rename to old_work/iterm2colors/konsole/FrontEndDelight.colorscheme diff --git a/iterm2colors/konsole/FunForrest.colorscheme b/old_work/iterm2colors/konsole/FunForrest.colorscheme similarity index 100% rename from iterm2colors/konsole/FunForrest.colorscheme rename to old_work/iterm2colors/konsole/FunForrest.colorscheme diff --git a/iterm2colors/konsole/Galaxy.colorscheme b/old_work/iterm2colors/konsole/Galaxy.colorscheme similarity index 100% rename from iterm2colors/konsole/Galaxy.colorscheme rename to old_work/iterm2colors/konsole/Galaxy.colorscheme diff --git a/iterm2colors/konsole/Github.colorscheme b/old_work/iterm2colors/konsole/Github.colorscheme similarity index 100% rename from iterm2colors/konsole/Github.colorscheme rename to old_work/iterm2colors/konsole/Github.colorscheme diff --git a/iterm2colors/konsole/Glacier.colorscheme b/old_work/iterm2colors/konsole/Glacier.colorscheme similarity index 100% rename from iterm2colors/konsole/Glacier.colorscheme rename to old_work/iterm2colors/konsole/Glacier.colorscheme diff --git a/iterm2colors/konsole/Grape.colorscheme b/old_work/iterm2colors/konsole/Grape.colorscheme similarity index 100% rename from iterm2colors/konsole/Grape.colorscheme rename to old_work/iterm2colors/konsole/Grape.colorscheme diff --git a/iterm2colors/konsole/Grass.colorscheme b/old_work/iterm2colors/konsole/Grass.colorscheme similarity index 100% rename from iterm2colors/konsole/Grass.colorscheme rename to old_work/iterm2colors/konsole/Grass.colorscheme diff --git a/iterm2colors/konsole/Gruvbox Dark.colorscheme b/old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Gruvbox Dark.colorscheme rename to old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme diff --git a/iterm2colors/konsole/Hardcore.colorscheme b/old_work/iterm2colors/konsole/Hardcore.colorscheme similarity index 100% rename from iterm2colors/konsole/Hardcore.colorscheme rename to old_work/iterm2colors/konsole/Hardcore.colorscheme diff --git a/iterm2colors/konsole/Harper.colorscheme b/old_work/iterm2colors/konsole/Harper.colorscheme similarity index 100% rename from iterm2colors/konsole/Harper.colorscheme rename to old_work/iterm2colors/konsole/Harper.colorscheme diff --git a/iterm2colors/konsole/Highway.colorscheme b/old_work/iterm2colors/konsole/Highway.colorscheme similarity index 100% rename from iterm2colors/konsole/Highway.colorscheme rename to old_work/iterm2colors/konsole/Highway.colorscheme diff --git a/iterm2colors/konsole/Hipster Green.colorscheme b/old_work/iterm2colors/konsole/Hipster Green.colorscheme similarity index 100% rename from iterm2colors/konsole/Hipster Green.colorscheme rename to old_work/iterm2colors/konsole/Hipster Green.colorscheme diff --git a/iterm2colors/konsole/Homebrew.colorscheme b/old_work/iterm2colors/konsole/Homebrew.colorscheme similarity index 100% rename from iterm2colors/konsole/Homebrew.colorscheme rename to old_work/iterm2colors/konsole/Homebrew.colorscheme diff --git a/iterm2colors/konsole/Hurtado.colorscheme b/old_work/iterm2colors/konsole/Hurtado.colorscheme similarity index 100% rename from iterm2colors/konsole/Hurtado.colorscheme rename to old_work/iterm2colors/konsole/Hurtado.colorscheme diff --git a/iterm2colors/konsole/Hybrid.colorscheme b/old_work/iterm2colors/konsole/Hybrid.colorscheme similarity index 100% rename from iterm2colors/konsole/Hybrid.colorscheme rename to old_work/iterm2colors/konsole/Hybrid.colorscheme diff --git a/iterm2colors/konsole/IC_Green_PPL.colorscheme b/old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme similarity index 100% rename from iterm2colors/konsole/IC_Green_PPL.colorscheme rename to old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme diff --git a/iterm2colors/konsole/IC_Orange_PPL.colorscheme b/old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme similarity index 100% rename from iterm2colors/konsole/IC_Orange_PPL.colorscheme rename to old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme diff --git a/iterm2colors/konsole/IR_Black.colorscheme b/old_work/iterm2colors/konsole/IR_Black.colorscheme similarity index 100% rename from iterm2colors/konsole/IR_Black.colorscheme rename to old_work/iterm2colors/konsole/IR_Black.colorscheme diff --git a/iterm2colors/konsole/Jackie Brown.colorscheme b/old_work/iterm2colors/konsole/Jackie Brown.colorscheme similarity index 100% rename from iterm2colors/konsole/Jackie Brown.colorscheme rename to old_work/iterm2colors/konsole/Jackie Brown.colorscheme diff --git a/iterm2colors/konsole/Japanesque.colorscheme b/old_work/iterm2colors/konsole/Japanesque.colorscheme similarity index 100% rename from iterm2colors/konsole/Japanesque.colorscheme rename to old_work/iterm2colors/konsole/Japanesque.colorscheme diff --git a/iterm2colors/konsole/Jellybeans.colorscheme b/old_work/iterm2colors/konsole/Jellybeans.colorscheme similarity index 100% rename from iterm2colors/konsole/Jellybeans.colorscheme rename to old_work/iterm2colors/konsole/Jellybeans.colorscheme diff --git a/iterm2colors/konsole/JetBrains Darcula.colorscheme b/old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme similarity index 100% rename from iterm2colors/konsole/JetBrains Darcula.colorscheme rename to old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme diff --git a/iterm2colors/konsole/Kibble.colorscheme b/old_work/iterm2colors/konsole/Kibble.colorscheme similarity index 100% rename from iterm2colors/konsole/Kibble.colorscheme rename to old_work/iterm2colors/konsole/Kibble.colorscheme diff --git a/iterm2colors/konsole/Later This Evening.colorscheme b/old_work/iterm2colors/konsole/Later This Evening.colorscheme similarity index 100% rename from iterm2colors/konsole/Later This Evening.colorscheme rename to old_work/iterm2colors/konsole/Later This Evening.colorscheme diff --git a/iterm2colors/konsole/Lavandula.colorscheme b/old_work/iterm2colors/konsole/Lavandula.colorscheme similarity index 100% rename from iterm2colors/konsole/Lavandula.colorscheme rename to old_work/iterm2colors/konsole/Lavandula.colorscheme diff --git a/iterm2colors/konsole/LiquidCarbon.colorscheme b/old_work/iterm2colors/konsole/LiquidCarbon.colorscheme similarity index 100% rename from iterm2colors/konsole/LiquidCarbon.colorscheme rename to old_work/iterm2colors/konsole/LiquidCarbon.colorscheme diff --git a/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme b/old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme similarity index 100% rename from iterm2colors/konsole/LiquidCarbonTransparent.colorscheme rename to old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme diff --git a/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme b/old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme similarity index 100% rename from iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme rename to old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme diff --git a/iterm2colors/konsole/Man Page.colorscheme b/old_work/iterm2colors/konsole/Man Page.colorscheme similarity index 100% rename from iterm2colors/konsole/Man Page.colorscheme rename to old_work/iterm2colors/konsole/Man Page.colorscheme diff --git a/iterm2colors/konsole/Material.colorscheme b/old_work/iterm2colors/konsole/Material.colorscheme similarity index 100% rename from iterm2colors/konsole/Material.colorscheme rename to old_work/iterm2colors/konsole/Material.colorscheme diff --git a/iterm2colors/konsole/MaterialDark.colorscheme b/old_work/iterm2colors/konsole/MaterialDark.colorscheme similarity index 100% rename from iterm2colors/konsole/MaterialDark.colorscheme rename to old_work/iterm2colors/konsole/MaterialDark.colorscheme diff --git a/iterm2colors/konsole/Mathias.colorscheme b/old_work/iterm2colors/konsole/Mathias.colorscheme similarity index 100% rename from iterm2colors/konsole/Mathias.colorscheme rename to old_work/iterm2colors/konsole/Mathias.colorscheme diff --git a/iterm2colors/konsole/Medallion.colorscheme b/old_work/iterm2colors/konsole/Medallion.colorscheme similarity index 100% rename from iterm2colors/konsole/Medallion.colorscheme rename to old_work/iterm2colors/konsole/Medallion.colorscheme diff --git a/iterm2colors/konsole/Misterioso.colorscheme b/old_work/iterm2colors/konsole/Misterioso.colorscheme similarity index 100% rename from iterm2colors/konsole/Misterioso.colorscheme rename to old_work/iterm2colors/konsole/Misterioso.colorscheme diff --git a/iterm2colors/konsole/Molokai.colorscheme b/old_work/iterm2colors/konsole/Molokai.colorscheme similarity index 100% rename from iterm2colors/konsole/Molokai.colorscheme rename to old_work/iterm2colors/konsole/Molokai.colorscheme diff --git a/iterm2colors/konsole/MonaLisa.colorscheme b/old_work/iterm2colors/konsole/MonaLisa.colorscheme similarity index 100% rename from iterm2colors/konsole/MonaLisa.colorscheme rename to old_work/iterm2colors/konsole/MonaLisa.colorscheme diff --git a/iterm2colors/konsole/Monokai Soda.colorscheme b/old_work/iterm2colors/konsole/Monokai Soda.colorscheme similarity index 100% rename from iterm2colors/konsole/Monokai Soda.colorscheme rename to old_work/iterm2colors/konsole/Monokai Soda.colorscheme diff --git a/iterm2colors/konsole/Monokai Vivid.colorscheme b/old_work/iterm2colors/konsole/Monokai Vivid.colorscheme similarity index 100% rename from iterm2colors/konsole/Monokai Vivid.colorscheme rename to old_work/iterm2colors/konsole/Monokai Vivid.colorscheme diff --git a/iterm2colors/konsole/N0tch2k.colorscheme b/old_work/iterm2colors/konsole/N0tch2k.colorscheme similarity index 100% rename from iterm2colors/konsole/N0tch2k.colorscheme rename to old_work/iterm2colors/konsole/N0tch2k.colorscheme diff --git a/iterm2colors/konsole/Neopolitan.colorscheme b/old_work/iterm2colors/konsole/Neopolitan.colorscheme similarity index 100% rename from iterm2colors/konsole/Neopolitan.colorscheme rename to old_work/iterm2colors/konsole/Neopolitan.colorscheme diff --git a/iterm2colors/konsole/Neutron.colorscheme b/old_work/iterm2colors/konsole/Neutron.colorscheme similarity index 100% rename from iterm2colors/konsole/Neutron.colorscheme rename to old_work/iterm2colors/konsole/Neutron.colorscheme diff --git a/iterm2colors/konsole/NightLion v1.colorscheme b/old_work/iterm2colors/konsole/NightLion v1.colorscheme similarity index 100% rename from iterm2colors/konsole/NightLion v1.colorscheme rename to old_work/iterm2colors/konsole/NightLion v1.colorscheme diff --git a/iterm2colors/konsole/NightLion v2.colorscheme b/old_work/iterm2colors/konsole/NightLion v2.colorscheme similarity index 100% rename from iterm2colors/konsole/NightLion v2.colorscheme rename to old_work/iterm2colors/konsole/NightLion v2.colorscheme diff --git a/iterm2colors/konsole/Novel.colorscheme b/old_work/iterm2colors/konsole/Novel.colorscheme similarity index 100% rename from iterm2colors/konsole/Novel.colorscheme rename to old_work/iterm2colors/konsole/Novel.colorscheme diff --git a/iterm2colors/konsole/Obsidian.colorscheme b/old_work/iterm2colors/konsole/Obsidian.colorscheme similarity index 100% rename from iterm2colors/konsole/Obsidian.colorscheme rename to old_work/iterm2colors/konsole/Obsidian.colorscheme diff --git a/iterm2colors/konsole/Ocean.colorscheme b/old_work/iterm2colors/konsole/Ocean.colorscheme similarity index 100% rename from iterm2colors/konsole/Ocean.colorscheme rename to old_work/iterm2colors/konsole/Ocean.colorscheme diff --git a/iterm2colors/konsole/OceanicMaterial.colorscheme b/old_work/iterm2colors/konsole/OceanicMaterial.colorscheme similarity index 100% rename from iterm2colors/konsole/OceanicMaterial.colorscheme rename to old_work/iterm2colors/konsole/OceanicMaterial.colorscheme diff --git a/iterm2colors/konsole/Ollie.colorscheme b/old_work/iterm2colors/konsole/Ollie.colorscheme similarity index 100% rename from iterm2colors/konsole/Ollie.colorscheme rename to old_work/iterm2colors/konsole/Ollie.colorscheme diff --git a/iterm2colors/konsole/OneHalfDark.colorscheme b/old_work/iterm2colors/konsole/OneHalfDark.colorscheme similarity index 100% rename from iterm2colors/konsole/OneHalfDark.colorscheme rename to old_work/iterm2colors/konsole/OneHalfDark.colorscheme diff --git a/iterm2colors/konsole/OneHalfLight.colorscheme b/old_work/iterm2colors/konsole/OneHalfLight.colorscheme similarity index 100% rename from iterm2colors/konsole/OneHalfLight.colorscheme rename to old_work/iterm2colors/konsole/OneHalfLight.colorscheme diff --git a/iterm2colors/konsole/Pandora.colorscheme b/old_work/iterm2colors/konsole/Pandora.colorscheme similarity index 100% rename from iterm2colors/konsole/Pandora.colorscheme rename to old_work/iterm2colors/konsole/Pandora.colorscheme diff --git a/iterm2colors/konsole/Paraiso Dark.colorscheme b/old_work/iterm2colors/konsole/Paraiso Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Paraiso Dark.colorscheme rename to old_work/iterm2colors/konsole/Paraiso Dark.colorscheme diff --git a/iterm2colors/konsole/Parasio Dark.colorscheme b/old_work/iterm2colors/konsole/Parasio Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Parasio Dark.colorscheme rename to old_work/iterm2colors/konsole/Parasio Dark.colorscheme diff --git a/iterm2colors/konsole/PaulMillr.colorscheme b/old_work/iterm2colors/konsole/PaulMillr.colorscheme similarity index 100% rename from iterm2colors/konsole/PaulMillr.colorscheme rename to old_work/iterm2colors/konsole/PaulMillr.colorscheme diff --git a/iterm2colors/konsole/PencilDark.colorscheme b/old_work/iterm2colors/konsole/PencilDark.colorscheme similarity index 100% rename from iterm2colors/konsole/PencilDark.colorscheme rename to old_work/iterm2colors/konsole/PencilDark.colorscheme diff --git a/iterm2colors/konsole/PencilLight.colorscheme b/old_work/iterm2colors/konsole/PencilLight.colorscheme similarity index 100% rename from iterm2colors/konsole/PencilLight.colorscheme rename to old_work/iterm2colors/konsole/PencilLight.colorscheme diff --git a/iterm2colors/konsole/Piatto Light.colorscheme b/old_work/iterm2colors/konsole/Piatto Light.colorscheme similarity index 100% rename from iterm2colors/konsole/Piatto Light.colorscheme rename to old_work/iterm2colors/konsole/Piatto Light.colorscheme diff --git a/iterm2colors/konsole/Pnevma.colorscheme b/old_work/iterm2colors/konsole/Pnevma.colorscheme similarity index 100% rename from iterm2colors/konsole/Pnevma.colorscheme rename to old_work/iterm2colors/konsole/Pnevma.colorscheme diff --git a/iterm2colors/konsole/Pro.colorscheme b/old_work/iterm2colors/konsole/Pro.colorscheme similarity index 100% rename from iterm2colors/konsole/Pro.colorscheme rename to old_work/iterm2colors/konsole/Pro.colorscheme diff --git a/iterm2colors/konsole/Red Alert.colorscheme b/old_work/iterm2colors/konsole/Red Alert.colorscheme similarity index 100% rename from iterm2colors/konsole/Red Alert.colorscheme rename to old_work/iterm2colors/konsole/Red Alert.colorscheme diff --git a/iterm2colors/konsole/Red Sands.colorscheme b/old_work/iterm2colors/konsole/Red Sands.colorscheme similarity index 100% rename from iterm2colors/konsole/Red Sands.colorscheme rename to old_work/iterm2colors/konsole/Red Sands.colorscheme diff --git a/iterm2colors/konsole/Rippedcasts.colorscheme b/old_work/iterm2colors/konsole/Rippedcasts.colorscheme similarity index 100% rename from iterm2colors/konsole/Rippedcasts.colorscheme rename to old_work/iterm2colors/konsole/Rippedcasts.colorscheme diff --git a/iterm2colors/konsole/Royal.colorscheme b/old_work/iterm2colors/konsole/Royal.colorscheme similarity index 100% rename from iterm2colors/konsole/Royal.colorscheme rename to old_work/iterm2colors/konsole/Royal.colorscheme diff --git a/iterm2colors/konsole/Ryuuko.colorscheme b/old_work/iterm2colors/konsole/Ryuuko.colorscheme similarity index 100% rename from iterm2colors/konsole/Ryuuko.colorscheme rename to old_work/iterm2colors/konsole/Ryuuko.colorscheme diff --git a/iterm2colors/konsole/SeaShells.colorscheme b/old_work/iterm2colors/konsole/SeaShells.colorscheme similarity index 100% rename from iterm2colors/konsole/SeaShells.colorscheme rename to old_work/iterm2colors/konsole/SeaShells.colorscheme diff --git a/iterm2colors/konsole/Seafoam Pastel.colorscheme b/old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme similarity index 100% rename from iterm2colors/konsole/Seafoam Pastel.colorscheme rename to old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme diff --git a/iterm2colors/konsole/Seti.colorscheme b/old_work/iterm2colors/konsole/Seti.colorscheme similarity index 100% rename from iterm2colors/konsole/Seti.colorscheme rename to old_work/iterm2colors/konsole/Seti.colorscheme diff --git a/iterm2colors/konsole/Shaman.colorscheme b/old_work/iterm2colors/konsole/Shaman.colorscheme similarity index 100% rename from iterm2colors/konsole/Shaman.colorscheme rename to old_work/iterm2colors/konsole/Shaman.colorscheme diff --git a/iterm2colors/konsole/Slate.colorscheme b/old_work/iterm2colors/konsole/Slate.colorscheme similarity index 100% rename from iterm2colors/konsole/Slate.colorscheme rename to old_work/iterm2colors/konsole/Slate.colorscheme diff --git a/iterm2colors/konsole/Smyck.colorscheme b/old_work/iterm2colors/konsole/Smyck.colorscheme similarity index 100% rename from iterm2colors/konsole/Smyck.colorscheme rename to old_work/iterm2colors/konsole/Smyck.colorscheme diff --git a/iterm2colors/konsole/SoftServer.colorscheme b/old_work/iterm2colors/konsole/SoftServer.colorscheme similarity index 100% rename from iterm2colors/konsole/SoftServer.colorscheme rename to old_work/iterm2colors/konsole/SoftServer.colorscheme diff --git a/iterm2colors/konsole/Solarized Darcula.colorscheme b/old_work/iterm2colors/konsole/Solarized Darcula.colorscheme similarity index 100% rename from iterm2colors/konsole/Solarized Darcula.colorscheme rename to old_work/iterm2colors/konsole/Solarized Darcula.colorscheme diff --git a/iterm2colors/konsole/Solarized Dark - Patched.colorscheme b/old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme similarity index 100% rename from iterm2colors/konsole/Solarized Dark - Patched.colorscheme rename to old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme diff --git a/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme b/old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme similarity index 100% rename from iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme rename to old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme diff --git a/iterm2colors/konsole/Solarized Dark.colorscheme b/old_work/iterm2colors/konsole/Solarized Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Solarized Dark.colorscheme rename to old_work/iterm2colors/konsole/Solarized Dark.colorscheme diff --git a/iterm2colors/konsole/Solarized Light.colorscheme b/old_work/iterm2colors/konsole/Solarized Light.colorscheme similarity index 100% rename from iterm2colors/konsole/Solarized Light.colorscheme rename to old_work/iterm2colors/konsole/Solarized Light.colorscheme diff --git a/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme b/old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme similarity index 100% rename from iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme rename to old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme diff --git a/iterm2colors/konsole/SpaceGray Eighties.colorscheme b/old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme similarity index 100% rename from iterm2colors/konsole/SpaceGray Eighties.colorscheme rename to old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme diff --git a/iterm2colors/konsole/SpaceGray.colorscheme b/old_work/iterm2colors/konsole/SpaceGray.colorscheme similarity index 100% rename from iterm2colors/konsole/SpaceGray.colorscheme rename to old_work/iterm2colors/konsole/SpaceGray.colorscheme diff --git a/iterm2colors/konsole/Spacedust.colorscheme b/old_work/iterm2colors/konsole/Spacedust.colorscheme similarity index 100% rename from iterm2colors/konsole/Spacedust.colorscheme rename to old_work/iterm2colors/konsole/Spacedust.colorscheme diff --git a/iterm2colors/konsole/Spiderman.colorscheme b/old_work/iterm2colors/konsole/Spiderman.colorscheme similarity index 100% rename from iterm2colors/konsole/Spiderman.colorscheme rename to old_work/iterm2colors/konsole/Spiderman.colorscheme diff --git a/iterm2colors/konsole/Spring.colorscheme b/old_work/iterm2colors/konsole/Spring.colorscheme similarity index 100% rename from iterm2colors/konsole/Spring.colorscheme rename to old_work/iterm2colors/konsole/Spring.colorscheme diff --git a/iterm2colors/konsole/Square.colorscheme b/old_work/iterm2colors/konsole/Square.colorscheme similarity index 100% rename from iterm2colors/konsole/Square.colorscheme rename to old_work/iterm2colors/konsole/Square.colorscheme diff --git a/iterm2colors/konsole/Sundried.colorscheme b/old_work/iterm2colors/konsole/Sundried.colorscheme similarity index 100% rename from iterm2colors/konsole/Sundried.colorscheme rename to old_work/iterm2colors/konsole/Sundried.colorscheme diff --git a/iterm2colors/konsole/Symfonic.colorscheme b/old_work/iterm2colors/konsole/Symfonic.colorscheme similarity index 100% rename from iterm2colors/konsole/Symfonic.colorscheme rename to old_work/iterm2colors/konsole/Symfonic.colorscheme diff --git a/iterm2colors/konsole/Teerb.colorscheme b/old_work/iterm2colors/konsole/Teerb.colorscheme similarity index 100% rename from iterm2colors/konsole/Teerb.colorscheme rename to old_work/iterm2colors/konsole/Teerb.colorscheme diff --git a/iterm2colors/konsole/Terminal Basic.colorscheme b/old_work/iterm2colors/konsole/Terminal Basic.colorscheme similarity index 100% rename from iterm2colors/konsole/Terminal Basic.colorscheme rename to old_work/iterm2colors/konsole/Terminal Basic.colorscheme diff --git a/iterm2colors/konsole/Thayer Bright.colorscheme b/old_work/iterm2colors/konsole/Thayer Bright.colorscheme similarity index 100% rename from iterm2colors/konsole/Thayer Bright.colorscheme rename to old_work/iterm2colors/konsole/Thayer Bright.colorscheme diff --git a/iterm2colors/konsole/The Hulk.colorscheme b/old_work/iterm2colors/konsole/The Hulk.colorscheme similarity index 100% rename from iterm2colors/konsole/The Hulk.colorscheme rename to old_work/iterm2colors/konsole/The Hulk.colorscheme diff --git a/iterm2colors/konsole/Tomorrow Night Blue.colorscheme b/old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme similarity index 100% rename from iterm2colors/konsole/Tomorrow Night Blue.colorscheme rename to old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme diff --git a/iterm2colors/konsole/Tomorrow Night Bright.colorscheme b/old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme similarity index 100% rename from iterm2colors/konsole/Tomorrow Night Bright.colorscheme rename to old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme diff --git a/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme b/old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme similarity index 100% rename from iterm2colors/konsole/Tomorrow Night Eighties.colorscheme rename to old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme diff --git a/iterm2colors/konsole/Tomorrow Night.colorscheme b/old_work/iterm2colors/konsole/Tomorrow Night.colorscheme similarity index 100% rename from iterm2colors/konsole/Tomorrow Night.colorscheme rename to old_work/iterm2colors/konsole/Tomorrow Night.colorscheme diff --git a/iterm2colors/konsole/Tomorrow.colorscheme b/old_work/iterm2colors/konsole/Tomorrow.colorscheme similarity index 100% rename from iterm2colors/konsole/Tomorrow.colorscheme rename to old_work/iterm2colors/konsole/Tomorrow.colorscheme diff --git a/iterm2colors/konsole/ToyChest.colorscheme b/old_work/iterm2colors/konsole/ToyChest.colorscheme similarity index 100% rename from iterm2colors/konsole/ToyChest.colorscheme rename to old_work/iterm2colors/konsole/ToyChest.colorscheme diff --git a/iterm2colors/konsole/Treehouse.colorscheme b/old_work/iterm2colors/konsole/Treehouse.colorscheme similarity index 100% rename from iterm2colors/konsole/Treehouse.colorscheme rename to old_work/iterm2colors/konsole/Treehouse.colorscheme diff --git a/iterm2colors/konsole/Twilight.colorscheme b/old_work/iterm2colors/konsole/Twilight.colorscheme similarity index 100% rename from iterm2colors/konsole/Twilight.colorscheme rename to old_work/iterm2colors/konsole/Twilight.colorscheme diff --git a/iterm2colors/konsole/Ubuntu.colorscheme b/old_work/iterm2colors/konsole/Ubuntu.colorscheme similarity index 100% rename from iterm2colors/konsole/Ubuntu.colorscheme rename to old_work/iterm2colors/konsole/Ubuntu.colorscheme diff --git a/iterm2colors/konsole/UnderTheSea.colorscheme b/old_work/iterm2colors/konsole/UnderTheSea.colorscheme similarity index 100% rename from iterm2colors/konsole/UnderTheSea.colorscheme rename to old_work/iterm2colors/konsole/UnderTheSea.colorscheme diff --git a/iterm2colors/konsole/Urple.colorscheme b/old_work/iterm2colors/konsole/Urple.colorscheme similarity index 100% rename from iterm2colors/konsole/Urple.colorscheme rename to old_work/iterm2colors/konsole/Urple.colorscheme diff --git a/iterm2colors/konsole/Vaughn.colorscheme b/old_work/iterm2colors/konsole/Vaughn.colorscheme similarity index 100% rename from iterm2colors/konsole/Vaughn.colorscheme rename to old_work/iterm2colors/konsole/Vaughn.colorscheme diff --git a/iterm2colors/konsole/VibrantInk.colorscheme b/old_work/iterm2colors/konsole/VibrantInk.colorscheme similarity index 100% rename from iterm2colors/konsole/VibrantInk.colorscheme rename to old_work/iterm2colors/konsole/VibrantInk.colorscheme diff --git a/iterm2colors/konsole/Violet Dark.colorscheme b/old_work/iterm2colors/konsole/Violet Dark.colorscheme similarity index 100% rename from iterm2colors/konsole/Violet Dark.colorscheme rename to old_work/iterm2colors/konsole/Violet Dark.colorscheme diff --git a/iterm2colors/konsole/Violet Light.colorscheme b/old_work/iterm2colors/konsole/Violet Light.colorscheme similarity index 100% rename from iterm2colors/konsole/Violet Light.colorscheme rename to old_work/iterm2colors/konsole/Violet Light.colorscheme diff --git a/iterm2colors/konsole/WarmNeon.colorscheme b/old_work/iterm2colors/konsole/WarmNeon.colorscheme similarity index 100% rename from iterm2colors/konsole/WarmNeon.colorscheme rename to old_work/iterm2colors/konsole/WarmNeon.colorscheme diff --git a/iterm2colors/konsole/Wez.colorscheme b/old_work/iterm2colors/konsole/Wez.colorscheme similarity index 100% rename from iterm2colors/konsole/Wez.colorscheme rename to old_work/iterm2colors/konsole/Wez.colorscheme diff --git a/iterm2colors/konsole/WildCherry.colorscheme b/old_work/iterm2colors/konsole/WildCherry.colorscheme similarity index 100% rename from iterm2colors/konsole/WildCherry.colorscheme rename to old_work/iterm2colors/konsole/WildCherry.colorscheme diff --git a/iterm2colors/konsole/Wombat.colorscheme b/old_work/iterm2colors/konsole/Wombat.colorscheme similarity index 100% rename from iterm2colors/konsole/Wombat.colorscheme rename to old_work/iterm2colors/konsole/Wombat.colorscheme diff --git a/iterm2colors/konsole/Wryan.colorscheme b/old_work/iterm2colors/konsole/Wryan.colorscheme similarity index 100% rename from iterm2colors/konsole/Wryan.colorscheme rename to old_work/iterm2colors/konsole/Wryan.colorscheme diff --git a/iterm2colors/konsole/Zenburn.colorscheme b/old_work/iterm2colors/konsole/Zenburn.colorscheme similarity index 100% rename from iterm2colors/konsole/Zenburn.colorscheme rename to old_work/iterm2colors/konsole/Zenburn.colorscheme diff --git a/iterm2colors/konsole/ayu.colorscheme b/old_work/iterm2colors/konsole/ayu.colorscheme similarity index 100% rename from iterm2colors/konsole/ayu.colorscheme rename to old_work/iterm2colors/konsole/ayu.colorscheme diff --git a/iterm2colors/konsole/ayu_light.colorscheme b/old_work/iterm2colors/konsole/ayu_light.colorscheme similarity index 100% rename from iterm2colors/konsole/ayu_light.colorscheme rename to old_work/iterm2colors/konsole/ayu_light.colorscheme diff --git a/iterm2colors/konsole/deep.colorscheme b/old_work/iterm2colors/konsole/deep.colorscheme similarity index 100% rename from iterm2colors/konsole/deep.colorscheme rename to old_work/iterm2colors/konsole/deep.colorscheme diff --git a/iterm2colors/konsole/idleToes.colorscheme b/old_work/iterm2colors/konsole/idleToes.colorscheme similarity index 100% rename from iterm2colors/konsole/idleToes.colorscheme rename to old_work/iterm2colors/konsole/idleToes.colorscheme diff --git a/iterm2colors/putty/3024 Day.reg b/old_work/iterm2colors/putty/3024 Day.reg similarity index 100% rename from iterm2colors/putty/3024 Day.reg rename to old_work/iterm2colors/putty/3024 Day.reg diff --git a/iterm2colors/putty/3024 Night.reg b/old_work/iterm2colors/putty/3024 Night.reg similarity index 100% rename from iterm2colors/putty/3024 Night.reg rename to old_work/iterm2colors/putty/3024 Night.reg diff --git a/iterm2colors/putty/AdventureTime.reg b/old_work/iterm2colors/putty/AdventureTime.reg similarity index 100% rename from iterm2colors/putty/AdventureTime.reg rename to old_work/iterm2colors/putty/AdventureTime.reg diff --git a/iterm2colors/putty/Afterglow.reg b/old_work/iterm2colors/putty/Afterglow.reg similarity index 100% rename from iterm2colors/putty/Afterglow.reg rename to old_work/iterm2colors/putty/Afterglow.reg diff --git a/iterm2colors/putty/AlienBlood.reg b/old_work/iterm2colors/putty/AlienBlood.reg similarity index 100% rename from iterm2colors/putty/AlienBlood.reg rename to old_work/iterm2colors/putty/AlienBlood.reg diff --git a/iterm2colors/putty/Argonaut.reg b/old_work/iterm2colors/putty/Argonaut.reg similarity index 100% rename from iterm2colors/putty/Argonaut.reg rename to old_work/iterm2colors/putty/Argonaut.reg diff --git a/iterm2colors/putty/Arthur.reg b/old_work/iterm2colors/putty/Arthur.reg similarity index 100% rename from iterm2colors/putty/Arthur.reg rename to old_work/iterm2colors/putty/Arthur.reg diff --git a/iterm2colors/putty/AtelierSulphurpool.reg b/old_work/iterm2colors/putty/AtelierSulphurpool.reg similarity index 100% rename from iterm2colors/putty/AtelierSulphurpool.reg rename to old_work/iterm2colors/putty/AtelierSulphurpool.reg diff --git a/iterm2colors/putty/Atom.reg b/old_work/iterm2colors/putty/Atom.reg similarity index 100% rename from iterm2colors/putty/Atom.reg rename to old_work/iterm2colors/putty/Atom.reg diff --git a/iterm2colors/putty/AtomOneLight.reg b/old_work/iterm2colors/putty/AtomOneLight.reg similarity index 100% rename from iterm2colors/putty/AtomOneLight.reg rename to old_work/iterm2colors/putty/AtomOneLight.reg diff --git a/iterm2colors/putty/Batman.reg b/old_work/iterm2colors/putty/Batman.reg similarity index 100% rename from iterm2colors/putty/Batman.reg rename to old_work/iterm2colors/putty/Batman.reg diff --git a/iterm2colors/putty/Belafonte Day.reg b/old_work/iterm2colors/putty/Belafonte Day.reg similarity index 100% rename from iterm2colors/putty/Belafonte Day.reg rename to old_work/iterm2colors/putty/Belafonte Day.reg diff --git a/iterm2colors/putty/Belafonte Night.reg b/old_work/iterm2colors/putty/Belafonte Night.reg similarity index 100% rename from iterm2colors/putty/Belafonte Night.reg rename to old_work/iterm2colors/putty/Belafonte Night.reg diff --git a/iterm2colors/putty/BirdsOfParadise.reg b/old_work/iterm2colors/putty/BirdsOfParadise.reg similarity index 100% rename from iterm2colors/putty/BirdsOfParadise.reg rename to old_work/iterm2colors/putty/BirdsOfParadise.reg diff --git a/iterm2colors/putty/Blazer.reg b/old_work/iterm2colors/putty/Blazer.reg similarity index 100% rename from iterm2colors/putty/Blazer.reg rename to old_work/iterm2colors/putty/Blazer.reg diff --git a/iterm2colors/putty/Borland.reg b/old_work/iterm2colors/putty/Borland.reg similarity index 100% rename from iterm2colors/putty/Borland.reg rename to old_work/iterm2colors/putty/Borland.reg diff --git a/iterm2colors/putty/Bright Lights.reg b/old_work/iterm2colors/putty/Bright Lights.reg similarity index 100% rename from iterm2colors/putty/Bright Lights.reg rename to old_work/iterm2colors/putty/Bright Lights.reg diff --git a/iterm2colors/putty/Broadcast.reg b/old_work/iterm2colors/putty/Broadcast.reg similarity index 100% rename from iterm2colors/putty/Broadcast.reg rename to old_work/iterm2colors/putty/Broadcast.reg diff --git a/iterm2colors/putty/Brogrammer.reg b/old_work/iterm2colors/putty/Brogrammer.reg similarity index 100% rename from iterm2colors/putty/Brogrammer.reg rename to old_work/iterm2colors/putty/Brogrammer.reg diff --git a/iterm2colors/putty/C64.reg b/old_work/iterm2colors/putty/C64.reg similarity index 100% rename from iterm2colors/putty/C64.reg rename to old_work/iterm2colors/putty/C64.reg diff --git a/iterm2colors/putty/CLRS.reg b/old_work/iterm2colors/putty/CLRS.reg similarity index 100% rename from iterm2colors/putty/CLRS.reg rename to old_work/iterm2colors/putty/CLRS.reg diff --git a/iterm2colors/putty/Chalk.reg b/old_work/iterm2colors/putty/Chalk.reg similarity index 100% rename from iterm2colors/putty/Chalk.reg rename to old_work/iterm2colors/putty/Chalk.reg diff --git a/iterm2colors/putty/Chalkboard.reg b/old_work/iterm2colors/putty/Chalkboard.reg similarity index 100% rename from iterm2colors/putty/Chalkboard.reg rename to old_work/iterm2colors/putty/Chalkboard.reg diff --git a/iterm2colors/putty/Ciapre.reg b/old_work/iterm2colors/putty/Ciapre.reg similarity index 100% rename from iterm2colors/putty/Ciapre.reg rename to old_work/iterm2colors/putty/Ciapre.reg diff --git a/iterm2colors/putty/Cobalt Neon.reg b/old_work/iterm2colors/putty/Cobalt Neon.reg similarity index 100% rename from iterm2colors/putty/Cobalt Neon.reg rename to old_work/iterm2colors/putty/Cobalt Neon.reg diff --git a/iterm2colors/putty/Cobalt2.reg b/old_work/iterm2colors/putty/Cobalt2.reg similarity index 100% rename from iterm2colors/putty/Cobalt2.reg rename to old_work/iterm2colors/putty/Cobalt2.reg diff --git a/iterm2colors/putty/CrayonPonyFish.reg b/old_work/iterm2colors/putty/CrayonPonyFish.reg similarity index 100% rename from iterm2colors/putty/CrayonPonyFish.reg rename to old_work/iterm2colors/putty/CrayonPonyFish.reg diff --git a/iterm2colors/putty/Dark Pastel.reg b/old_work/iterm2colors/putty/Dark Pastel.reg similarity index 100% rename from iterm2colors/putty/Dark Pastel.reg rename to old_work/iterm2colors/putty/Dark Pastel.reg diff --git a/iterm2colors/putty/Darkside.reg b/old_work/iterm2colors/putty/Darkside.reg similarity index 100% rename from iterm2colors/putty/Darkside.reg rename to old_work/iterm2colors/putty/Darkside.reg diff --git a/iterm2colors/putty/Desert.reg b/old_work/iterm2colors/putty/Desert.reg similarity index 100% rename from iterm2colors/putty/Desert.reg rename to old_work/iterm2colors/putty/Desert.reg diff --git a/iterm2colors/putty/DimmedMonokai.reg b/old_work/iterm2colors/putty/DimmedMonokai.reg similarity index 100% rename from iterm2colors/putty/DimmedMonokai.reg rename to old_work/iterm2colors/putty/DimmedMonokai.reg diff --git a/iterm2colors/putty/DotGov.reg b/old_work/iterm2colors/putty/DotGov.reg similarity index 100% rename from iterm2colors/putty/DotGov.reg rename to old_work/iterm2colors/putty/DotGov.reg diff --git a/iterm2colors/putty/Dracula.reg b/old_work/iterm2colors/putty/Dracula.reg similarity index 100% rename from iterm2colors/putty/Dracula.reg rename to old_work/iterm2colors/putty/Dracula.reg diff --git a/iterm2colors/putty/Duotone Dark.reg b/old_work/iterm2colors/putty/Duotone Dark.reg similarity index 100% rename from iterm2colors/putty/Duotone Dark.reg rename to old_work/iterm2colors/putty/Duotone Dark.reg diff --git a/iterm2colors/putty/ENCOM.reg b/old_work/iterm2colors/putty/ENCOM.reg similarity index 100% rename from iterm2colors/putty/ENCOM.reg rename to old_work/iterm2colors/putty/ENCOM.reg diff --git a/iterm2colors/putty/Earthsong.reg b/old_work/iterm2colors/putty/Earthsong.reg similarity index 100% rename from iterm2colors/putty/Earthsong.reg rename to old_work/iterm2colors/putty/Earthsong.reg diff --git a/iterm2colors/putty/Elemental.reg b/old_work/iterm2colors/putty/Elemental.reg similarity index 100% rename from iterm2colors/putty/Elemental.reg rename to old_work/iterm2colors/putty/Elemental.reg diff --git a/iterm2colors/putty/Elementary.reg b/old_work/iterm2colors/putty/Elementary.reg similarity index 100% rename from iterm2colors/putty/Elementary.reg rename to old_work/iterm2colors/putty/Elementary.reg diff --git a/iterm2colors/putty/Espresso Libre.reg b/old_work/iterm2colors/putty/Espresso Libre.reg similarity index 100% rename from iterm2colors/putty/Espresso Libre.reg rename to old_work/iterm2colors/putty/Espresso Libre.reg diff --git a/iterm2colors/putty/Espresso.reg b/old_work/iterm2colors/putty/Espresso.reg similarity index 100% rename from iterm2colors/putty/Espresso.reg rename to old_work/iterm2colors/putty/Espresso.reg diff --git a/iterm2colors/putty/Fideloper.reg b/old_work/iterm2colors/putty/Fideloper.reg similarity index 100% rename from iterm2colors/putty/Fideloper.reg rename to old_work/iterm2colors/putty/Fideloper.reg diff --git a/iterm2colors/putty/FirefoxDev.reg b/old_work/iterm2colors/putty/FirefoxDev.reg similarity index 100% rename from iterm2colors/putty/FirefoxDev.reg rename to old_work/iterm2colors/putty/FirefoxDev.reg diff --git a/iterm2colors/putty/Firewatch.reg b/old_work/iterm2colors/putty/Firewatch.reg similarity index 100% rename from iterm2colors/putty/Firewatch.reg rename to old_work/iterm2colors/putty/Firewatch.reg diff --git a/iterm2colors/putty/FishTank.reg b/old_work/iterm2colors/putty/FishTank.reg similarity index 100% rename from iterm2colors/putty/FishTank.reg rename to old_work/iterm2colors/putty/FishTank.reg diff --git a/iterm2colors/putty/Flat.reg b/old_work/iterm2colors/putty/Flat.reg similarity index 100% rename from iterm2colors/putty/Flat.reg rename to old_work/iterm2colors/putty/Flat.reg diff --git a/iterm2colors/putty/Flatland.reg b/old_work/iterm2colors/putty/Flatland.reg similarity index 100% rename from iterm2colors/putty/Flatland.reg rename to old_work/iterm2colors/putty/Flatland.reg diff --git a/iterm2colors/putty/Floraverse.reg b/old_work/iterm2colors/putty/Floraverse.reg similarity index 100% rename from iterm2colors/putty/Floraverse.reg rename to old_work/iterm2colors/putty/Floraverse.reg diff --git a/iterm2colors/putty/ForestBlue.reg b/old_work/iterm2colors/putty/ForestBlue.reg similarity index 100% rename from iterm2colors/putty/ForestBlue.reg rename to old_work/iterm2colors/putty/ForestBlue.reg diff --git a/iterm2colors/putty/FrontEndDelight.reg b/old_work/iterm2colors/putty/FrontEndDelight.reg similarity index 100% rename from iterm2colors/putty/FrontEndDelight.reg rename to old_work/iterm2colors/putty/FrontEndDelight.reg diff --git a/iterm2colors/putty/FunForrest.reg b/old_work/iterm2colors/putty/FunForrest.reg similarity index 100% rename from iterm2colors/putty/FunForrest.reg rename to old_work/iterm2colors/putty/FunForrest.reg diff --git a/iterm2colors/putty/Galaxy.reg b/old_work/iterm2colors/putty/Galaxy.reg similarity index 100% rename from iterm2colors/putty/Galaxy.reg rename to old_work/iterm2colors/putty/Galaxy.reg diff --git a/iterm2colors/putty/Github.reg b/old_work/iterm2colors/putty/Github.reg similarity index 100% rename from iterm2colors/putty/Github.reg rename to old_work/iterm2colors/putty/Github.reg diff --git a/iterm2colors/putty/Glacier.reg b/old_work/iterm2colors/putty/Glacier.reg similarity index 100% rename from iterm2colors/putty/Glacier.reg rename to old_work/iterm2colors/putty/Glacier.reg diff --git a/iterm2colors/putty/Grape.reg b/old_work/iterm2colors/putty/Grape.reg similarity index 100% rename from iterm2colors/putty/Grape.reg rename to old_work/iterm2colors/putty/Grape.reg diff --git a/iterm2colors/putty/Grass.reg b/old_work/iterm2colors/putty/Grass.reg similarity index 100% rename from iterm2colors/putty/Grass.reg rename to old_work/iterm2colors/putty/Grass.reg diff --git a/iterm2colors/putty/Gruvbox Dark.reg b/old_work/iterm2colors/putty/Gruvbox Dark.reg similarity index 100% rename from iterm2colors/putty/Gruvbox Dark.reg rename to old_work/iterm2colors/putty/Gruvbox Dark.reg diff --git a/iterm2colors/putty/Hardcore.reg b/old_work/iterm2colors/putty/Hardcore.reg similarity index 100% rename from iterm2colors/putty/Hardcore.reg rename to old_work/iterm2colors/putty/Hardcore.reg diff --git a/iterm2colors/putty/Harper.reg b/old_work/iterm2colors/putty/Harper.reg similarity index 100% rename from iterm2colors/putty/Harper.reg rename to old_work/iterm2colors/putty/Harper.reg diff --git a/iterm2colors/putty/Highway.reg b/old_work/iterm2colors/putty/Highway.reg similarity index 100% rename from iterm2colors/putty/Highway.reg rename to old_work/iterm2colors/putty/Highway.reg diff --git a/iterm2colors/putty/Hipster Green.reg b/old_work/iterm2colors/putty/Hipster Green.reg similarity index 100% rename from iterm2colors/putty/Hipster Green.reg rename to old_work/iterm2colors/putty/Hipster Green.reg diff --git a/iterm2colors/putty/Homebrew.reg b/old_work/iterm2colors/putty/Homebrew.reg similarity index 100% rename from iterm2colors/putty/Homebrew.reg rename to old_work/iterm2colors/putty/Homebrew.reg diff --git a/iterm2colors/putty/Hurtado.reg b/old_work/iterm2colors/putty/Hurtado.reg similarity index 100% rename from iterm2colors/putty/Hurtado.reg rename to old_work/iterm2colors/putty/Hurtado.reg diff --git a/iterm2colors/putty/Hybrid.reg b/old_work/iterm2colors/putty/Hybrid.reg similarity index 100% rename from iterm2colors/putty/Hybrid.reg rename to old_work/iterm2colors/putty/Hybrid.reg diff --git a/iterm2colors/putty/IC_Green_PPL.reg b/old_work/iterm2colors/putty/IC_Green_PPL.reg similarity index 100% rename from iterm2colors/putty/IC_Green_PPL.reg rename to old_work/iterm2colors/putty/IC_Green_PPL.reg diff --git a/iterm2colors/putty/IC_Orange_PPL.reg b/old_work/iterm2colors/putty/IC_Orange_PPL.reg similarity index 100% rename from iterm2colors/putty/IC_Orange_PPL.reg rename to old_work/iterm2colors/putty/IC_Orange_PPL.reg diff --git a/iterm2colors/putty/IR_Black.reg b/old_work/iterm2colors/putty/IR_Black.reg similarity index 100% rename from iterm2colors/putty/IR_Black.reg rename to old_work/iterm2colors/putty/IR_Black.reg diff --git a/iterm2colors/putty/Jackie Brown.reg b/old_work/iterm2colors/putty/Jackie Brown.reg similarity index 100% rename from iterm2colors/putty/Jackie Brown.reg rename to old_work/iterm2colors/putty/Jackie Brown.reg diff --git a/iterm2colors/putty/Japanesque.reg b/old_work/iterm2colors/putty/Japanesque.reg similarity index 100% rename from iterm2colors/putty/Japanesque.reg rename to old_work/iterm2colors/putty/Japanesque.reg diff --git a/iterm2colors/putty/Jellybeans.reg b/old_work/iterm2colors/putty/Jellybeans.reg similarity index 100% rename from iterm2colors/putty/Jellybeans.reg rename to old_work/iterm2colors/putty/Jellybeans.reg diff --git a/iterm2colors/putty/JetBrains Darcula.reg b/old_work/iterm2colors/putty/JetBrains Darcula.reg similarity index 100% rename from iterm2colors/putty/JetBrains Darcula.reg rename to old_work/iterm2colors/putty/JetBrains Darcula.reg diff --git a/iterm2colors/putty/Kibble.reg b/old_work/iterm2colors/putty/Kibble.reg similarity index 100% rename from iterm2colors/putty/Kibble.reg rename to old_work/iterm2colors/putty/Kibble.reg diff --git a/iterm2colors/putty/Later This Evening.reg b/old_work/iterm2colors/putty/Later This Evening.reg similarity index 100% rename from iterm2colors/putty/Later This Evening.reg rename to old_work/iterm2colors/putty/Later This Evening.reg diff --git a/iterm2colors/putty/Lavandula.reg b/old_work/iterm2colors/putty/Lavandula.reg similarity index 100% rename from iterm2colors/putty/Lavandula.reg rename to old_work/iterm2colors/putty/Lavandula.reg diff --git a/iterm2colors/putty/LiquidCarbon.reg b/old_work/iterm2colors/putty/LiquidCarbon.reg similarity index 100% rename from iterm2colors/putty/LiquidCarbon.reg rename to old_work/iterm2colors/putty/LiquidCarbon.reg diff --git a/iterm2colors/putty/LiquidCarbonTransparent.reg b/old_work/iterm2colors/putty/LiquidCarbonTransparent.reg similarity index 100% rename from iterm2colors/putty/LiquidCarbonTransparent.reg rename to old_work/iterm2colors/putty/LiquidCarbonTransparent.reg diff --git a/iterm2colors/putty/LiquidCarbonTransparentInverse.reg b/old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg similarity index 100% rename from iterm2colors/putty/LiquidCarbonTransparentInverse.reg rename to old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg diff --git a/iterm2colors/putty/Man Page.reg b/old_work/iterm2colors/putty/Man Page.reg similarity index 100% rename from iterm2colors/putty/Man Page.reg rename to old_work/iterm2colors/putty/Man Page.reg diff --git a/iterm2colors/putty/Material.reg b/old_work/iterm2colors/putty/Material.reg similarity index 100% rename from iterm2colors/putty/Material.reg rename to old_work/iterm2colors/putty/Material.reg diff --git a/iterm2colors/putty/MaterialDark.reg b/old_work/iterm2colors/putty/MaterialDark.reg similarity index 100% rename from iterm2colors/putty/MaterialDark.reg rename to old_work/iterm2colors/putty/MaterialDark.reg diff --git a/iterm2colors/putty/Mathias.reg b/old_work/iterm2colors/putty/Mathias.reg similarity index 100% rename from iterm2colors/putty/Mathias.reg rename to old_work/iterm2colors/putty/Mathias.reg diff --git a/iterm2colors/putty/Medallion.reg b/old_work/iterm2colors/putty/Medallion.reg similarity index 100% rename from iterm2colors/putty/Medallion.reg rename to old_work/iterm2colors/putty/Medallion.reg diff --git a/iterm2colors/putty/Misterioso.reg b/old_work/iterm2colors/putty/Misterioso.reg similarity index 100% rename from iterm2colors/putty/Misterioso.reg rename to old_work/iterm2colors/putty/Misterioso.reg diff --git a/iterm2colors/putty/Molokai.reg b/old_work/iterm2colors/putty/Molokai.reg similarity index 100% rename from iterm2colors/putty/Molokai.reg rename to old_work/iterm2colors/putty/Molokai.reg diff --git a/iterm2colors/putty/MonaLisa.reg b/old_work/iterm2colors/putty/MonaLisa.reg similarity index 100% rename from iterm2colors/putty/MonaLisa.reg rename to old_work/iterm2colors/putty/MonaLisa.reg diff --git a/iterm2colors/putty/Monokai Soda.reg b/old_work/iterm2colors/putty/Monokai Soda.reg similarity index 100% rename from iterm2colors/putty/Monokai Soda.reg rename to old_work/iterm2colors/putty/Monokai Soda.reg diff --git a/iterm2colors/putty/Monokai Vivid.reg b/old_work/iterm2colors/putty/Monokai Vivid.reg similarity index 100% rename from iterm2colors/putty/Monokai Vivid.reg rename to old_work/iterm2colors/putty/Monokai Vivid.reg diff --git a/iterm2colors/putty/N0tch2k.reg b/old_work/iterm2colors/putty/N0tch2k.reg similarity index 100% rename from iterm2colors/putty/N0tch2k.reg rename to old_work/iterm2colors/putty/N0tch2k.reg diff --git a/iterm2colors/putty/Neopolitan.reg b/old_work/iterm2colors/putty/Neopolitan.reg similarity index 100% rename from iterm2colors/putty/Neopolitan.reg rename to old_work/iterm2colors/putty/Neopolitan.reg diff --git a/iterm2colors/putty/Neutron.reg b/old_work/iterm2colors/putty/Neutron.reg similarity index 100% rename from iterm2colors/putty/Neutron.reg rename to old_work/iterm2colors/putty/Neutron.reg diff --git a/iterm2colors/putty/NightLion v1.reg b/old_work/iterm2colors/putty/NightLion v1.reg similarity index 100% rename from iterm2colors/putty/NightLion v1.reg rename to old_work/iterm2colors/putty/NightLion v1.reg diff --git a/iterm2colors/putty/NightLion v2.reg b/old_work/iterm2colors/putty/NightLion v2.reg similarity index 100% rename from iterm2colors/putty/NightLion v2.reg rename to old_work/iterm2colors/putty/NightLion v2.reg diff --git a/iterm2colors/putty/Novel.reg b/old_work/iterm2colors/putty/Novel.reg similarity index 100% rename from iterm2colors/putty/Novel.reg rename to old_work/iterm2colors/putty/Novel.reg diff --git a/iterm2colors/putty/Obsidian.reg b/old_work/iterm2colors/putty/Obsidian.reg similarity index 100% rename from iterm2colors/putty/Obsidian.reg rename to old_work/iterm2colors/putty/Obsidian.reg diff --git a/iterm2colors/putty/Ocean.reg b/old_work/iterm2colors/putty/Ocean.reg similarity index 100% rename from iterm2colors/putty/Ocean.reg rename to old_work/iterm2colors/putty/Ocean.reg diff --git a/iterm2colors/putty/OceanicMaterial.reg b/old_work/iterm2colors/putty/OceanicMaterial.reg similarity index 100% rename from iterm2colors/putty/OceanicMaterial.reg rename to old_work/iterm2colors/putty/OceanicMaterial.reg diff --git a/iterm2colors/putty/Ollie.reg b/old_work/iterm2colors/putty/Ollie.reg similarity index 100% rename from iterm2colors/putty/Ollie.reg rename to old_work/iterm2colors/putty/Ollie.reg diff --git a/iterm2colors/putty/OneHalfDark.reg b/old_work/iterm2colors/putty/OneHalfDark.reg similarity index 100% rename from iterm2colors/putty/OneHalfDark.reg rename to old_work/iterm2colors/putty/OneHalfDark.reg diff --git a/iterm2colors/putty/OneHalfLight.reg b/old_work/iterm2colors/putty/OneHalfLight.reg similarity index 100% rename from iterm2colors/putty/OneHalfLight.reg rename to old_work/iterm2colors/putty/OneHalfLight.reg diff --git a/iterm2colors/putty/Pandora.reg b/old_work/iterm2colors/putty/Pandora.reg similarity index 100% rename from iterm2colors/putty/Pandora.reg rename to old_work/iterm2colors/putty/Pandora.reg diff --git a/iterm2colors/putty/Paraiso Dark.reg b/old_work/iterm2colors/putty/Paraiso Dark.reg similarity index 100% rename from iterm2colors/putty/Paraiso Dark.reg rename to old_work/iterm2colors/putty/Paraiso Dark.reg diff --git a/iterm2colors/putty/Parasio Dark.reg b/old_work/iterm2colors/putty/Parasio Dark.reg similarity index 100% rename from iterm2colors/putty/Parasio Dark.reg rename to old_work/iterm2colors/putty/Parasio Dark.reg diff --git a/iterm2colors/putty/PaulMillr.reg b/old_work/iterm2colors/putty/PaulMillr.reg similarity index 100% rename from iterm2colors/putty/PaulMillr.reg rename to old_work/iterm2colors/putty/PaulMillr.reg diff --git a/iterm2colors/putty/PencilDark.reg b/old_work/iterm2colors/putty/PencilDark.reg similarity index 100% rename from iterm2colors/putty/PencilDark.reg rename to old_work/iterm2colors/putty/PencilDark.reg diff --git a/iterm2colors/putty/PencilLight.reg b/old_work/iterm2colors/putty/PencilLight.reg similarity index 100% rename from iterm2colors/putty/PencilLight.reg rename to old_work/iterm2colors/putty/PencilLight.reg diff --git a/iterm2colors/putty/Piatto Light.reg b/old_work/iterm2colors/putty/Piatto Light.reg similarity index 100% rename from iterm2colors/putty/Piatto Light.reg rename to old_work/iterm2colors/putty/Piatto Light.reg diff --git a/iterm2colors/putty/Pnevma.reg b/old_work/iterm2colors/putty/Pnevma.reg similarity index 100% rename from iterm2colors/putty/Pnevma.reg rename to old_work/iterm2colors/putty/Pnevma.reg diff --git a/iterm2colors/putty/Pro.reg b/old_work/iterm2colors/putty/Pro.reg similarity index 100% rename from iterm2colors/putty/Pro.reg rename to old_work/iterm2colors/putty/Pro.reg diff --git a/iterm2colors/putty/Red Alert.reg b/old_work/iterm2colors/putty/Red Alert.reg similarity index 100% rename from iterm2colors/putty/Red Alert.reg rename to old_work/iterm2colors/putty/Red Alert.reg diff --git a/iterm2colors/putty/Red Sands.reg b/old_work/iterm2colors/putty/Red Sands.reg similarity index 100% rename from iterm2colors/putty/Red Sands.reg rename to old_work/iterm2colors/putty/Red Sands.reg diff --git a/iterm2colors/putty/Rippedcasts.reg b/old_work/iterm2colors/putty/Rippedcasts.reg similarity index 100% rename from iterm2colors/putty/Rippedcasts.reg rename to old_work/iterm2colors/putty/Rippedcasts.reg diff --git a/iterm2colors/putty/Royal.reg b/old_work/iterm2colors/putty/Royal.reg similarity index 100% rename from iterm2colors/putty/Royal.reg rename to old_work/iterm2colors/putty/Royal.reg diff --git a/iterm2colors/putty/Ryuuko.reg b/old_work/iterm2colors/putty/Ryuuko.reg similarity index 100% rename from iterm2colors/putty/Ryuuko.reg rename to old_work/iterm2colors/putty/Ryuuko.reg diff --git a/iterm2colors/putty/SeaShells.reg b/old_work/iterm2colors/putty/SeaShells.reg similarity index 100% rename from iterm2colors/putty/SeaShells.reg rename to old_work/iterm2colors/putty/SeaShells.reg diff --git a/iterm2colors/putty/Seafoam Pastel.reg b/old_work/iterm2colors/putty/Seafoam Pastel.reg similarity index 100% rename from iterm2colors/putty/Seafoam Pastel.reg rename to old_work/iterm2colors/putty/Seafoam Pastel.reg diff --git a/iterm2colors/putty/Seti.reg b/old_work/iterm2colors/putty/Seti.reg similarity index 100% rename from iterm2colors/putty/Seti.reg rename to old_work/iterm2colors/putty/Seti.reg diff --git a/iterm2colors/putty/Shaman.reg b/old_work/iterm2colors/putty/Shaman.reg similarity index 100% rename from iterm2colors/putty/Shaman.reg rename to old_work/iterm2colors/putty/Shaman.reg diff --git a/iterm2colors/putty/Slate.reg b/old_work/iterm2colors/putty/Slate.reg similarity index 100% rename from iterm2colors/putty/Slate.reg rename to old_work/iterm2colors/putty/Slate.reg diff --git a/iterm2colors/putty/Smyck.reg b/old_work/iterm2colors/putty/Smyck.reg similarity index 100% rename from iterm2colors/putty/Smyck.reg rename to old_work/iterm2colors/putty/Smyck.reg diff --git a/iterm2colors/putty/SoftServer.reg b/old_work/iterm2colors/putty/SoftServer.reg similarity index 100% rename from iterm2colors/putty/SoftServer.reg rename to old_work/iterm2colors/putty/SoftServer.reg diff --git a/iterm2colors/putty/Solarized Darcula.reg b/old_work/iterm2colors/putty/Solarized Darcula.reg similarity index 100% rename from iterm2colors/putty/Solarized Darcula.reg rename to old_work/iterm2colors/putty/Solarized Darcula.reg diff --git a/iterm2colors/putty/Solarized Dark - Patched.reg b/old_work/iterm2colors/putty/Solarized Dark - Patched.reg similarity index 100% rename from iterm2colors/putty/Solarized Dark - Patched.reg rename to old_work/iterm2colors/putty/Solarized Dark - Patched.reg diff --git a/iterm2colors/putty/Solarized Dark Higher Contrast.reg b/old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg similarity index 100% rename from iterm2colors/putty/Solarized Dark Higher Contrast.reg rename to old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg diff --git a/iterm2colors/putty/Solarized Dark.reg b/old_work/iterm2colors/putty/Solarized Dark.reg similarity index 100% rename from iterm2colors/putty/Solarized Dark.reg rename to old_work/iterm2colors/putty/Solarized Dark.reg diff --git a/iterm2colors/putty/Solarized Light.reg b/old_work/iterm2colors/putty/Solarized Light.reg similarity index 100% rename from iterm2colors/putty/Solarized Light.reg rename to old_work/iterm2colors/putty/Solarized Light.reg diff --git a/iterm2colors/putty/SpaceGray Eighties Dull.reg b/old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg similarity index 100% rename from iterm2colors/putty/SpaceGray Eighties Dull.reg rename to old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg diff --git a/iterm2colors/putty/SpaceGray Eighties.reg b/old_work/iterm2colors/putty/SpaceGray Eighties.reg similarity index 100% rename from iterm2colors/putty/SpaceGray Eighties.reg rename to old_work/iterm2colors/putty/SpaceGray Eighties.reg diff --git a/iterm2colors/putty/SpaceGray.reg b/old_work/iterm2colors/putty/SpaceGray.reg similarity index 100% rename from iterm2colors/putty/SpaceGray.reg rename to old_work/iterm2colors/putty/SpaceGray.reg diff --git a/iterm2colors/putty/Spacedust.reg b/old_work/iterm2colors/putty/Spacedust.reg similarity index 100% rename from iterm2colors/putty/Spacedust.reg rename to old_work/iterm2colors/putty/Spacedust.reg diff --git a/iterm2colors/putty/Spiderman.reg b/old_work/iterm2colors/putty/Spiderman.reg similarity index 100% rename from iterm2colors/putty/Spiderman.reg rename to old_work/iterm2colors/putty/Spiderman.reg diff --git a/iterm2colors/putty/Spring.reg b/old_work/iterm2colors/putty/Spring.reg similarity index 100% rename from iterm2colors/putty/Spring.reg rename to old_work/iterm2colors/putty/Spring.reg diff --git a/iterm2colors/putty/Square.reg b/old_work/iterm2colors/putty/Square.reg similarity index 100% rename from iterm2colors/putty/Square.reg rename to old_work/iterm2colors/putty/Square.reg diff --git a/iterm2colors/putty/Sundried.reg b/old_work/iterm2colors/putty/Sundried.reg similarity index 100% rename from iterm2colors/putty/Sundried.reg rename to old_work/iterm2colors/putty/Sundried.reg diff --git a/iterm2colors/putty/Symfonic.reg b/old_work/iterm2colors/putty/Symfonic.reg similarity index 100% rename from iterm2colors/putty/Symfonic.reg rename to old_work/iterm2colors/putty/Symfonic.reg diff --git a/iterm2colors/putty/Teerb.reg b/old_work/iterm2colors/putty/Teerb.reg similarity index 100% rename from iterm2colors/putty/Teerb.reg rename to old_work/iterm2colors/putty/Teerb.reg diff --git a/iterm2colors/putty/Terminal Basic.reg b/old_work/iterm2colors/putty/Terminal Basic.reg similarity index 100% rename from iterm2colors/putty/Terminal Basic.reg rename to old_work/iterm2colors/putty/Terminal Basic.reg diff --git a/iterm2colors/putty/Thayer Bright.reg b/old_work/iterm2colors/putty/Thayer Bright.reg similarity index 100% rename from iterm2colors/putty/Thayer Bright.reg rename to old_work/iterm2colors/putty/Thayer Bright.reg diff --git a/iterm2colors/putty/The Hulk.reg b/old_work/iterm2colors/putty/The Hulk.reg similarity index 100% rename from iterm2colors/putty/The Hulk.reg rename to old_work/iterm2colors/putty/The Hulk.reg diff --git a/iterm2colors/putty/Tomorrow Night Blue.reg b/old_work/iterm2colors/putty/Tomorrow Night Blue.reg similarity index 100% rename from iterm2colors/putty/Tomorrow Night Blue.reg rename to old_work/iterm2colors/putty/Tomorrow Night Blue.reg diff --git a/iterm2colors/putty/Tomorrow Night Bright.reg b/old_work/iterm2colors/putty/Tomorrow Night Bright.reg similarity index 100% rename from iterm2colors/putty/Tomorrow Night Bright.reg rename to old_work/iterm2colors/putty/Tomorrow Night Bright.reg diff --git a/iterm2colors/putty/Tomorrow Night Eighties.reg b/old_work/iterm2colors/putty/Tomorrow Night Eighties.reg similarity index 100% rename from iterm2colors/putty/Tomorrow Night Eighties.reg rename to old_work/iterm2colors/putty/Tomorrow Night Eighties.reg diff --git a/iterm2colors/putty/Tomorrow Night.reg b/old_work/iterm2colors/putty/Tomorrow Night.reg similarity index 100% rename from iterm2colors/putty/Tomorrow Night.reg rename to old_work/iterm2colors/putty/Tomorrow Night.reg diff --git a/iterm2colors/putty/Tomorrow.reg b/old_work/iterm2colors/putty/Tomorrow.reg similarity index 100% rename from iterm2colors/putty/Tomorrow.reg rename to old_work/iterm2colors/putty/Tomorrow.reg diff --git a/iterm2colors/putty/ToyChest.reg b/old_work/iterm2colors/putty/ToyChest.reg similarity index 100% rename from iterm2colors/putty/ToyChest.reg rename to old_work/iterm2colors/putty/ToyChest.reg diff --git a/iterm2colors/putty/Treehouse.reg b/old_work/iterm2colors/putty/Treehouse.reg similarity index 100% rename from iterm2colors/putty/Treehouse.reg rename to old_work/iterm2colors/putty/Treehouse.reg diff --git a/iterm2colors/putty/Twilight.reg b/old_work/iterm2colors/putty/Twilight.reg similarity index 100% rename from iterm2colors/putty/Twilight.reg rename to old_work/iterm2colors/putty/Twilight.reg diff --git a/iterm2colors/putty/Ubuntu.reg b/old_work/iterm2colors/putty/Ubuntu.reg similarity index 100% rename from iterm2colors/putty/Ubuntu.reg rename to old_work/iterm2colors/putty/Ubuntu.reg diff --git a/iterm2colors/putty/UnderTheSea.reg b/old_work/iterm2colors/putty/UnderTheSea.reg similarity index 100% rename from iterm2colors/putty/UnderTheSea.reg rename to old_work/iterm2colors/putty/UnderTheSea.reg diff --git a/iterm2colors/putty/Urple.reg b/old_work/iterm2colors/putty/Urple.reg similarity index 100% rename from iterm2colors/putty/Urple.reg rename to old_work/iterm2colors/putty/Urple.reg diff --git a/iterm2colors/putty/Vaughn.reg b/old_work/iterm2colors/putty/Vaughn.reg similarity index 100% rename from iterm2colors/putty/Vaughn.reg rename to old_work/iterm2colors/putty/Vaughn.reg diff --git a/iterm2colors/putty/VibrantInk.reg b/old_work/iterm2colors/putty/VibrantInk.reg similarity index 100% rename from iterm2colors/putty/VibrantInk.reg rename to old_work/iterm2colors/putty/VibrantInk.reg diff --git a/iterm2colors/putty/Violet Dark.reg b/old_work/iterm2colors/putty/Violet Dark.reg similarity index 100% rename from iterm2colors/putty/Violet Dark.reg rename to old_work/iterm2colors/putty/Violet Dark.reg diff --git a/iterm2colors/putty/Violet Light.reg b/old_work/iterm2colors/putty/Violet Light.reg similarity index 100% rename from iterm2colors/putty/Violet Light.reg rename to old_work/iterm2colors/putty/Violet Light.reg diff --git a/iterm2colors/putty/WarmNeon.reg b/old_work/iterm2colors/putty/WarmNeon.reg similarity index 100% rename from iterm2colors/putty/WarmNeon.reg rename to old_work/iterm2colors/putty/WarmNeon.reg diff --git a/iterm2colors/putty/Wez.reg b/old_work/iterm2colors/putty/Wez.reg similarity index 100% rename from iterm2colors/putty/Wez.reg rename to old_work/iterm2colors/putty/Wez.reg diff --git a/iterm2colors/putty/WildCherry.reg b/old_work/iterm2colors/putty/WildCherry.reg similarity index 100% rename from iterm2colors/putty/WildCherry.reg rename to old_work/iterm2colors/putty/WildCherry.reg diff --git a/iterm2colors/putty/Wombat.reg b/old_work/iterm2colors/putty/Wombat.reg similarity index 100% rename from iterm2colors/putty/Wombat.reg rename to old_work/iterm2colors/putty/Wombat.reg diff --git a/iterm2colors/putty/Wryan.reg b/old_work/iterm2colors/putty/Wryan.reg similarity index 100% rename from iterm2colors/putty/Wryan.reg rename to old_work/iterm2colors/putty/Wryan.reg diff --git a/iterm2colors/putty/Zenburn.reg b/old_work/iterm2colors/putty/Zenburn.reg similarity index 100% rename from iterm2colors/putty/Zenburn.reg rename to old_work/iterm2colors/putty/Zenburn.reg diff --git a/iterm2colors/putty/ayu.reg b/old_work/iterm2colors/putty/ayu.reg similarity index 100% rename from iterm2colors/putty/ayu.reg rename to old_work/iterm2colors/putty/ayu.reg diff --git a/iterm2colors/putty/ayu_light.reg b/old_work/iterm2colors/putty/ayu_light.reg similarity index 100% rename from iterm2colors/putty/ayu_light.reg rename to old_work/iterm2colors/putty/ayu_light.reg diff --git a/iterm2colors/putty/deep.reg b/old_work/iterm2colors/putty/deep.reg similarity index 100% rename from iterm2colors/putty/deep.reg rename to old_work/iterm2colors/putty/deep.reg diff --git a/iterm2colors/putty/idleToes.reg b/old_work/iterm2colors/putty/idleToes.reg similarity index 100% rename from iterm2colors/putty/idleToes.reg rename to old_work/iterm2colors/putty/idleToes.reg diff --git a/iterm2colors/schemes/3024 Day.itermcolors b/old_work/iterm2colors/schemes/3024 Day.itermcolors similarity index 100% rename from iterm2colors/schemes/3024 Day.itermcolors rename to old_work/iterm2colors/schemes/3024 Day.itermcolors diff --git a/iterm2colors/schemes/3024 Night.itermcolors b/old_work/iterm2colors/schemes/3024 Night.itermcolors similarity index 100% rename from iterm2colors/schemes/3024 Night.itermcolors rename to old_work/iterm2colors/schemes/3024 Night.itermcolors diff --git a/iterm2colors/schemes/AdventureTime.itermcolors b/old_work/iterm2colors/schemes/AdventureTime.itermcolors similarity index 100% rename from iterm2colors/schemes/AdventureTime.itermcolors rename to old_work/iterm2colors/schemes/AdventureTime.itermcolors diff --git a/iterm2colors/schemes/Afterglow.itermcolors b/old_work/iterm2colors/schemes/Afterglow.itermcolors similarity index 100% rename from iterm2colors/schemes/Afterglow.itermcolors rename to old_work/iterm2colors/schemes/Afterglow.itermcolors diff --git a/iterm2colors/schemes/AlienBlood.itermcolors b/old_work/iterm2colors/schemes/AlienBlood.itermcolors similarity index 100% rename from iterm2colors/schemes/AlienBlood.itermcolors rename to old_work/iterm2colors/schemes/AlienBlood.itermcolors diff --git a/iterm2colors/schemes/Argonaut.itermcolors b/old_work/iterm2colors/schemes/Argonaut.itermcolors similarity index 100% rename from iterm2colors/schemes/Argonaut.itermcolors rename to old_work/iterm2colors/schemes/Argonaut.itermcolors diff --git a/iterm2colors/schemes/Arthur.itermcolors b/old_work/iterm2colors/schemes/Arthur.itermcolors similarity index 100% rename from iterm2colors/schemes/Arthur.itermcolors rename to old_work/iterm2colors/schemes/Arthur.itermcolors diff --git a/iterm2colors/schemes/AtelierSulphurpool.itermcolors b/old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors similarity index 100% rename from iterm2colors/schemes/AtelierSulphurpool.itermcolors rename to old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors diff --git a/iterm2colors/schemes/Atom.itermcolors b/old_work/iterm2colors/schemes/Atom.itermcolors similarity index 100% rename from iterm2colors/schemes/Atom.itermcolors rename to old_work/iterm2colors/schemes/Atom.itermcolors diff --git a/iterm2colors/schemes/AtomOneLight.itermcolors b/old_work/iterm2colors/schemes/AtomOneLight.itermcolors similarity index 100% rename from iterm2colors/schemes/AtomOneLight.itermcolors rename to old_work/iterm2colors/schemes/AtomOneLight.itermcolors diff --git a/iterm2colors/schemes/Batman.itermcolors b/old_work/iterm2colors/schemes/Batman.itermcolors similarity index 100% rename from iterm2colors/schemes/Batman.itermcolors rename to old_work/iterm2colors/schemes/Batman.itermcolors diff --git a/iterm2colors/schemes/Belafonte Day.itermcolors b/old_work/iterm2colors/schemes/Belafonte Day.itermcolors similarity index 100% rename from iterm2colors/schemes/Belafonte Day.itermcolors rename to old_work/iterm2colors/schemes/Belafonte Day.itermcolors diff --git a/iterm2colors/schemes/Belafonte Night.itermcolors b/old_work/iterm2colors/schemes/Belafonte Night.itermcolors similarity index 100% rename from iterm2colors/schemes/Belafonte Night.itermcolors rename to old_work/iterm2colors/schemes/Belafonte Night.itermcolors diff --git a/iterm2colors/schemes/BirdsOfParadise.itermcolors b/old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors similarity index 100% rename from iterm2colors/schemes/BirdsOfParadise.itermcolors rename to old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors diff --git a/iterm2colors/schemes/Blazer.itermcolors b/old_work/iterm2colors/schemes/Blazer.itermcolors similarity index 100% rename from iterm2colors/schemes/Blazer.itermcolors rename to old_work/iterm2colors/schemes/Blazer.itermcolors diff --git a/iterm2colors/schemes/Borland.itermcolors b/old_work/iterm2colors/schemes/Borland.itermcolors similarity index 100% rename from iterm2colors/schemes/Borland.itermcolors rename to old_work/iterm2colors/schemes/Borland.itermcolors diff --git a/iterm2colors/schemes/Bright Lights.itermcolors b/old_work/iterm2colors/schemes/Bright Lights.itermcolors similarity index 100% rename from iterm2colors/schemes/Bright Lights.itermcolors rename to old_work/iterm2colors/schemes/Bright Lights.itermcolors diff --git a/iterm2colors/schemes/Broadcast.itermcolors b/old_work/iterm2colors/schemes/Broadcast.itermcolors similarity index 100% rename from iterm2colors/schemes/Broadcast.itermcolors rename to old_work/iterm2colors/schemes/Broadcast.itermcolors diff --git a/iterm2colors/schemes/Brogrammer.itermcolors b/old_work/iterm2colors/schemes/Brogrammer.itermcolors similarity index 100% rename from iterm2colors/schemes/Brogrammer.itermcolors rename to old_work/iterm2colors/schemes/Brogrammer.itermcolors diff --git a/iterm2colors/schemes/C64.itermcolors b/old_work/iterm2colors/schemes/C64.itermcolors similarity index 100% rename from iterm2colors/schemes/C64.itermcolors rename to old_work/iterm2colors/schemes/C64.itermcolors diff --git a/iterm2colors/schemes/CLRS.itermcolors b/old_work/iterm2colors/schemes/CLRS.itermcolors similarity index 100% rename from iterm2colors/schemes/CLRS.itermcolors rename to old_work/iterm2colors/schemes/CLRS.itermcolors diff --git a/iterm2colors/schemes/Chalk.itermcolors b/old_work/iterm2colors/schemes/Chalk.itermcolors similarity index 100% rename from iterm2colors/schemes/Chalk.itermcolors rename to old_work/iterm2colors/schemes/Chalk.itermcolors diff --git a/iterm2colors/schemes/Chalkboard.itermcolors b/old_work/iterm2colors/schemes/Chalkboard.itermcolors similarity index 100% rename from iterm2colors/schemes/Chalkboard.itermcolors rename to old_work/iterm2colors/schemes/Chalkboard.itermcolors diff --git a/iterm2colors/schemes/Ciapre.itermcolors b/old_work/iterm2colors/schemes/Ciapre.itermcolors similarity index 100% rename from iterm2colors/schemes/Ciapre.itermcolors rename to old_work/iterm2colors/schemes/Ciapre.itermcolors diff --git a/iterm2colors/schemes/Cobalt Neon.itermcolors b/old_work/iterm2colors/schemes/Cobalt Neon.itermcolors similarity index 100% rename from iterm2colors/schemes/Cobalt Neon.itermcolors rename to old_work/iterm2colors/schemes/Cobalt Neon.itermcolors diff --git a/iterm2colors/schemes/Cobalt2.itermcolors b/old_work/iterm2colors/schemes/Cobalt2.itermcolors similarity index 100% rename from iterm2colors/schemes/Cobalt2.itermcolors rename to old_work/iterm2colors/schemes/Cobalt2.itermcolors diff --git a/iterm2colors/schemes/CrayonPonyFish.itermcolors b/old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors similarity index 100% rename from iterm2colors/schemes/CrayonPonyFish.itermcolors rename to old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors diff --git a/iterm2colors/schemes/Dark Pastel.itermcolors b/old_work/iterm2colors/schemes/Dark Pastel.itermcolors similarity index 100% rename from iterm2colors/schemes/Dark Pastel.itermcolors rename to old_work/iterm2colors/schemes/Dark Pastel.itermcolors diff --git a/iterm2colors/schemes/Darkside.itermcolors b/old_work/iterm2colors/schemes/Darkside.itermcolors similarity index 100% rename from iterm2colors/schemes/Darkside.itermcolors rename to old_work/iterm2colors/schemes/Darkside.itermcolors diff --git a/iterm2colors/schemes/Desert.itermcolors b/old_work/iterm2colors/schemes/Desert.itermcolors similarity index 100% rename from iterm2colors/schemes/Desert.itermcolors rename to old_work/iterm2colors/schemes/Desert.itermcolors diff --git a/iterm2colors/schemes/DimmedMonokai.itermcolors b/old_work/iterm2colors/schemes/DimmedMonokai.itermcolors similarity index 100% rename from iterm2colors/schemes/DimmedMonokai.itermcolors rename to old_work/iterm2colors/schemes/DimmedMonokai.itermcolors diff --git a/iterm2colors/schemes/DotGov.itermcolors b/old_work/iterm2colors/schemes/DotGov.itermcolors similarity index 100% rename from iterm2colors/schemes/DotGov.itermcolors rename to old_work/iterm2colors/schemes/DotGov.itermcolors diff --git a/iterm2colors/schemes/Dracula.itermcolors b/old_work/iterm2colors/schemes/Dracula.itermcolors similarity index 100% rename from iterm2colors/schemes/Dracula.itermcolors rename to old_work/iterm2colors/schemes/Dracula.itermcolors diff --git a/iterm2colors/schemes/Duotone Dark.itermcolors b/old_work/iterm2colors/schemes/Duotone Dark.itermcolors similarity index 100% rename from iterm2colors/schemes/Duotone Dark.itermcolors rename to old_work/iterm2colors/schemes/Duotone Dark.itermcolors diff --git a/iterm2colors/schemes/ENCOM.itermcolors b/old_work/iterm2colors/schemes/ENCOM.itermcolors similarity index 100% rename from iterm2colors/schemes/ENCOM.itermcolors rename to old_work/iterm2colors/schemes/ENCOM.itermcolors diff --git a/iterm2colors/schemes/Earthsong.itermcolors b/old_work/iterm2colors/schemes/Earthsong.itermcolors similarity index 100% rename from iterm2colors/schemes/Earthsong.itermcolors rename to old_work/iterm2colors/schemes/Earthsong.itermcolors diff --git a/iterm2colors/schemes/Elemental.itermcolors b/old_work/iterm2colors/schemes/Elemental.itermcolors similarity index 100% rename from iterm2colors/schemes/Elemental.itermcolors rename to old_work/iterm2colors/schemes/Elemental.itermcolors diff --git a/iterm2colors/schemes/Elementary.itermcolors b/old_work/iterm2colors/schemes/Elementary.itermcolors similarity index 100% rename from iterm2colors/schemes/Elementary.itermcolors rename to old_work/iterm2colors/schemes/Elementary.itermcolors diff --git a/iterm2colors/schemes/Espresso Libre.itermcolors b/old_work/iterm2colors/schemes/Espresso Libre.itermcolors similarity index 100% rename from iterm2colors/schemes/Espresso Libre.itermcolors rename to old_work/iterm2colors/schemes/Espresso Libre.itermcolors diff --git a/iterm2colors/schemes/Espresso.itermcolors b/old_work/iterm2colors/schemes/Espresso.itermcolors similarity index 100% rename from iterm2colors/schemes/Espresso.itermcolors rename to old_work/iterm2colors/schemes/Espresso.itermcolors diff --git a/iterm2colors/schemes/Fideloper.itermcolors b/old_work/iterm2colors/schemes/Fideloper.itermcolors similarity index 100% rename from iterm2colors/schemes/Fideloper.itermcolors rename to old_work/iterm2colors/schemes/Fideloper.itermcolors diff --git a/iterm2colors/schemes/FirefoxDev.itermcolors b/old_work/iterm2colors/schemes/FirefoxDev.itermcolors similarity index 100% rename from iterm2colors/schemes/FirefoxDev.itermcolors rename to old_work/iterm2colors/schemes/FirefoxDev.itermcolors diff --git a/iterm2colors/schemes/Firewatch.itermcolors b/old_work/iterm2colors/schemes/Firewatch.itermcolors similarity index 100% rename from iterm2colors/schemes/Firewatch.itermcolors rename to old_work/iterm2colors/schemes/Firewatch.itermcolors diff --git a/iterm2colors/schemes/FishTank.itermcolors b/old_work/iterm2colors/schemes/FishTank.itermcolors similarity index 100% rename from iterm2colors/schemes/FishTank.itermcolors rename to old_work/iterm2colors/schemes/FishTank.itermcolors diff --git a/iterm2colors/schemes/Flat.itermcolors b/old_work/iterm2colors/schemes/Flat.itermcolors similarity index 100% rename from iterm2colors/schemes/Flat.itermcolors rename to old_work/iterm2colors/schemes/Flat.itermcolors diff --git a/iterm2colors/schemes/Flatland.itermcolors b/old_work/iterm2colors/schemes/Flatland.itermcolors similarity index 100% rename from iterm2colors/schemes/Flatland.itermcolors rename to old_work/iterm2colors/schemes/Flatland.itermcolors diff --git a/iterm2colors/schemes/Floraverse.itermcolors b/old_work/iterm2colors/schemes/Floraverse.itermcolors similarity index 100% rename from iterm2colors/schemes/Floraverse.itermcolors rename to old_work/iterm2colors/schemes/Floraverse.itermcolors diff --git a/iterm2colors/schemes/ForestBlue.itermcolors b/old_work/iterm2colors/schemes/ForestBlue.itermcolors similarity index 100% rename from iterm2colors/schemes/ForestBlue.itermcolors rename to old_work/iterm2colors/schemes/ForestBlue.itermcolors diff --git a/iterm2colors/schemes/FrontEndDelight.itermcolors b/old_work/iterm2colors/schemes/FrontEndDelight.itermcolors similarity index 100% rename from iterm2colors/schemes/FrontEndDelight.itermcolors rename to old_work/iterm2colors/schemes/FrontEndDelight.itermcolors diff --git a/iterm2colors/schemes/FunForrest.itermcolors b/old_work/iterm2colors/schemes/FunForrest.itermcolors similarity index 100% rename from iterm2colors/schemes/FunForrest.itermcolors rename to old_work/iterm2colors/schemes/FunForrest.itermcolors diff --git a/iterm2colors/schemes/Galaxy.itermcolors b/old_work/iterm2colors/schemes/Galaxy.itermcolors similarity index 100% rename from iterm2colors/schemes/Galaxy.itermcolors rename to old_work/iterm2colors/schemes/Galaxy.itermcolors diff --git a/iterm2colors/schemes/Github.itermcolors b/old_work/iterm2colors/schemes/Github.itermcolors similarity index 100% rename from iterm2colors/schemes/Github.itermcolors rename to old_work/iterm2colors/schemes/Github.itermcolors diff --git a/iterm2colors/schemes/Glacier.itermcolors b/old_work/iterm2colors/schemes/Glacier.itermcolors similarity index 100% rename from iterm2colors/schemes/Glacier.itermcolors rename to old_work/iterm2colors/schemes/Glacier.itermcolors diff --git a/iterm2colors/schemes/Grape.itermcolors b/old_work/iterm2colors/schemes/Grape.itermcolors similarity index 100% rename from iterm2colors/schemes/Grape.itermcolors rename to old_work/iterm2colors/schemes/Grape.itermcolors diff --git a/iterm2colors/schemes/Grass.itermcolors b/old_work/iterm2colors/schemes/Grass.itermcolors similarity index 100% rename from iterm2colors/schemes/Grass.itermcolors rename to old_work/iterm2colors/schemes/Grass.itermcolors diff --git a/iterm2colors/schemes/Gruvbox Dark.itermcolors b/old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors similarity index 100% rename from iterm2colors/schemes/Gruvbox Dark.itermcolors rename to old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors diff --git a/iterm2colors/schemes/Hardcore.itermcolors b/old_work/iterm2colors/schemes/Hardcore.itermcolors similarity index 100% rename from iterm2colors/schemes/Hardcore.itermcolors rename to old_work/iterm2colors/schemes/Hardcore.itermcolors diff --git a/iterm2colors/schemes/Harper.itermcolors b/old_work/iterm2colors/schemes/Harper.itermcolors similarity index 100% rename from iterm2colors/schemes/Harper.itermcolors rename to old_work/iterm2colors/schemes/Harper.itermcolors diff --git a/iterm2colors/schemes/Highway.itermcolors b/old_work/iterm2colors/schemes/Highway.itermcolors similarity index 100% rename from iterm2colors/schemes/Highway.itermcolors rename to old_work/iterm2colors/schemes/Highway.itermcolors diff --git a/iterm2colors/schemes/Hipster Green.itermcolors b/old_work/iterm2colors/schemes/Hipster Green.itermcolors similarity index 100% rename from iterm2colors/schemes/Hipster Green.itermcolors rename to old_work/iterm2colors/schemes/Hipster Green.itermcolors diff --git a/iterm2colors/schemes/Homebrew.itermcolors b/old_work/iterm2colors/schemes/Homebrew.itermcolors similarity index 100% rename from iterm2colors/schemes/Homebrew.itermcolors rename to old_work/iterm2colors/schemes/Homebrew.itermcolors diff --git a/iterm2colors/schemes/Hurtado.itermcolors b/old_work/iterm2colors/schemes/Hurtado.itermcolors similarity index 100% rename from iterm2colors/schemes/Hurtado.itermcolors rename to old_work/iterm2colors/schemes/Hurtado.itermcolors diff --git a/iterm2colors/schemes/Hybrid.itermcolors b/old_work/iterm2colors/schemes/Hybrid.itermcolors similarity index 100% rename from iterm2colors/schemes/Hybrid.itermcolors rename to old_work/iterm2colors/schemes/Hybrid.itermcolors diff --git a/iterm2colors/schemes/IC_Green_PPL.itermcolors b/old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors similarity index 100% rename from iterm2colors/schemes/IC_Green_PPL.itermcolors rename to old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors diff --git a/iterm2colors/schemes/IC_Orange_PPL.itermcolors b/old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors similarity index 100% rename from iterm2colors/schemes/IC_Orange_PPL.itermcolors rename to old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors diff --git a/iterm2colors/schemes/IR_Black.itermcolors b/old_work/iterm2colors/schemes/IR_Black.itermcolors similarity index 100% rename from iterm2colors/schemes/IR_Black.itermcolors rename to old_work/iterm2colors/schemes/IR_Black.itermcolors diff --git a/iterm2colors/schemes/Jackie Brown.itermcolors b/old_work/iterm2colors/schemes/Jackie Brown.itermcolors similarity index 100% rename from iterm2colors/schemes/Jackie Brown.itermcolors rename to old_work/iterm2colors/schemes/Jackie Brown.itermcolors diff --git a/iterm2colors/schemes/Japanesque.itermcolors b/old_work/iterm2colors/schemes/Japanesque.itermcolors similarity index 100% rename from iterm2colors/schemes/Japanesque.itermcolors rename to old_work/iterm2colors/schemes/Japanesque.itermcolors diff --git a/iterm2colors/schemes/Jellybeans.itermcolors b/old_work/iterm2colors/schemes/Jellybeans.itermcolors similarity index 100% rename from iterm2colors/schemes/Jellybeans.itermcolors rename to old_work/iterm2colors/schemes/Jellybeans.itermcolors diff --git a/iterm2colors/schemes/JetBrains Darcula.itermcolors b/old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors similarity index 100% rename from iterm2colors/schemes/JetBrains Darcula.itermcolors rename to old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors diff --git a/iterm2colors/schemes/Kibble.itermcolors b/old_work/iterm2colors/schemes/Kibble.itermcolors similarity index 100% rename from iterm2colors/schemes/Kibble.itermcolors rename to old_work/iterm2colors/schemes/Kibble.itermcolors diff --git a/iterm2colors/schemes/Later This Evening.itermcolors b/old_work/iterm2colors/schemes/Later This Evening.itermcolors similarity index 100% rename from iterm2colors/schemes/Later This Evening.itermcolors rename to old_work/iterm2colors/schemes/Later This Evening.itermcolors diff --git a/iterm2colors/schemes/Lavandula.itermcolors b/old_work/iterm2colors/schemes/Lavandula.itermcolors similarity index 100% rename from iterm2colors/schemes/Lavandula.itermcolors rename to old_work/iterm2colors/schemes/Lavandula.itermcolors diff --git a/iterm2colors/schemes/LiquidCarbon.itermcolors b/old_work/iterm2colors/schemes/LiquidCarbon.itermcolors similarity index 100% rename from iterm2colors/schemes/LiquidCarbon.itermcolors rename to old_work/iterm2colors/schemes/LiquidCarbon.itermcolors diff --git a/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors b/old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors similarity index 100% rename from iterm2colors/schemes/LiquidCarbonTransparent.itermcolors rename to old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors diff --git a/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors b/old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors similarity index 100% rename from iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors rename to old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors diff --git a/iterm2colors/schemes/Man Page.itermcolors b/old_work/iterm2colors/schemes/Man Page.itermcolors similarity index 100% rename from iterm2colors/schemes/Man Page.itermcolors rename to old_work/iterm2colors/schemes/Man Page.itermcolors diff --git a/iterm2colors/schemes/Material.itermcolors b/old_work/iterm2colors/schemes/Material.itermcolors similarity index 100% rename from iterm2colors/schemes/Material.itermcolors rename to old_work/iterm2colors/schemes/Material.itermcolors diff --git a/iterm2colors/schemes/MaterialDark.itermcolors b/old_work/iterm2colors/schemes/MaterialDark.itermcolors similarity index 100% rename from iterm2colors/schemes/MaterialDark.itermcolors rename to old_work/iterm2colors/schemes/MaterialDark.itermcolors diff --git a/iterm2colors/schemes/Mathias.itermcolors b/old_work/iterm2colors/schemes/Mathias.itermcolors similarity index 100% rename from iterm2colors/schemes/Mathias.itermcolors rename to old_work/iterm2colors/schemes/Mathias.itermcolors diff --git a/iterm2colors/schemes/Medallion.itermcolors b/old_work/iterm2colors/schemes/Medallion.itermcolors similarity index 100% rename from iterm2colors/schemes/Medallion.itermcolors rename to old_work/iterm2colors/schemes/Medallion.itermcolors diff --git a/iterm2colors/schemes/Misterioso.itermcolors b/old_work/iterm2colors/schemes/Misterioso.itermcolors similarity index 100% rename from iterm2colors/schemes/Misterioso.itermcolors rename to old_work/iterm2colors/schemes/Misterioso.itermcolors diff --git a/iterm2colors/schemes/Molokai.itermcolors b/old_work/iterm2colors/schemes/Molokai.itermcolors similarity index 100% rename from iterm2colors/schemes/Molokai.itermcolors rename to old_work/iterm2colors/schemes/Molokai.itermcolors diff --git a/iterm2colors/schemes/MonaLisa.itermcolors b/old_work/iterm2colors/schemes/MonaLisa.itermcolors similarity index 100% rename from iterm2colors/schemes/MonaLisa.itermcolors rename to old_work/iterm2colors/schemes/MonaLisa.itermcolors diff --git a/iterm2colors/schemes/Monokai Soda.itermcolors b/old_work/iterm2colors/schemes/Monokai Soda.itermcolors similarity index 100% rename from iterm2colors/schemes/Monokai Soda.itermcolors rename to old_work/iterm2colors/schemes/Monokai Soda.itermcolors diff --git a/iterm2colors/schemes/Monokai Vivid.itermcolors b/old_work/iterm2colors/schemes/Monokai Vivid.itermcolors similarity index 100% rename from iterm2colors/schemes/Monokai Vivid.itermcolors rename to old_work/iterm2colors/schemes/Monokai Vivid.itermcolors diff --git a/iterm2colors/schemes/N0tch2k.itermcolors b/old_work/iterm2colors/schemes/N0tch2k.itermcolors similarity index 100% rename from iterm2colors/schemes/N0tch2k.itermcolors rename to old_work/iterm2colors/schemes/N0tch2k.itermcolors diff --git a/iterm2colors/schemes/Neopolitan.itermcolors b/old_work/iterm2colors/schemes/Neopolitan.itermcolors similarity index 100% rename from iterm2colors/schemes/Neopolitan.itermcolors rename to old_work/iterm2colors/schemes/Neopolitan.itermcolors diff --git a/iterm2colors/schemes/Neutron.itermcolors b/old_work/iterm2colors/schemes/Neutron.itermcolors similarity index 100% rename from iterm2colors/schemes/Neutron.itermcolors rename to old_work/iterm2colors/schemes/Neutron.itermcolors diff --git a/iterm2colors/schemes/NightLion v1.itermcolors b/old_work/iterm2colors/schemes/NightLion v1.itermcolors similarity index 100% rename from iterm2colors/schemes/NightLion v1.itermcolors rename to old_work/iterm2colors/schemes/NightLion v1.itermcolors diff --git a/iterm2colors/schemes/NightLion v2.itermcolors b/old_work/iterm2colors/schemes/NightLion v2.itermcolors similarity index 100% rename from iterm2colors/schemes/NightLion v2.itermcolors rename to old_work/iterm2colors/schemes/NightLion v2.itermcolors diff --git a/iterm2colors/schemes/Novel.itermcolors b/old_work/iterm2colors/schemes/Novel.itermcolors similarity index 100% rename from iterm2colors/schemes/Novel.itermcolors rename to old_work/iterm2colors/schemes/Novel.itermcolors diff --git a/iterm2colors/schemes/Obsidian.itermcolors b/old_work/iterm2colors/schemes/Obsidian.itermcolors similarity index 100% rename from iterm2colors/schemes/Obsidian.itermcolors rename to old_work/iterm2colors/schemes/Obsidian.itermcolors diff --git a/iterm2colors/schemes/Ocean.itermcolors b/old_work/iterm2colors/schemes/Ocean.itermcolors similarity index 100% rename from iterm2colors/schemes/Ocean.itermcolors rename to old_work/iterm2colors/schemes/Ocean.itermcolors diff --git a/iterm2colors/schemes/OceanicMaterial.itermcolors b/old_work/iterm2colors/schemes/OceanicMaterial.itermcolors similarity index 100% rename from iterm2colors/schemes/OceanicMaterial.itermcolors rename to old_work/iterm2colors/schemes/OceanicMaterial.itermcolors diff --git a/iterm2colors/schemes/Ollie.itermcolors b/old_work/iterm2colors/schemes/Ollie.itermcolors similarity index 100% rename from iterm2colors/schemes/Ollie.itermcolors rename to old_work/iterm2colors/schemes/Ollie.itermcolors diff --git a/iterm2colors/schemes/OneHalfDark.itermcolors b/old_work/iterm2colors/schemes/OneHalfDark.itermcolors similarity index 100% rename from iterm2colors/schemes/OneHalfDark.itermcolors rename to old_work/iterm2colors/schemes/OneHalfDark.itermcolors diff --git a/iterm2colors/schemes/OneHalfLight.itermcolors b/old_work/iterm2colors/schemes/OneHalfLight.itermcolors similarity index 100% rename from iterm2colors/schemes/OneHalfLight.itermcolors rename to old_work/iterm2colors/schemes/OneHalfLight.itermcolors diff --git a/iterm2colors/schemes/Pandora.itermcolors b/old_work/iterm2colors/schemes/Pandora.itermcolors similarity index 100% rename from iterm2colors/schemes/Pandora.itermcolors rename to old_work/iterm2colors/schemes/Pandora.itermcolors diff --git a/iterm2colors/schemes/Parasio Dark.itermcolors b/old_work/iterm2colors/schemes/Parasio Dark.itermcolors similarity index 100% rename from iterm2colors/schemes/Parasio Dark.itermcolors rename to old_work/iterm2colors/schemes/Parasio Dark.itermcolors diff --git a/iterm2colors/schemes/PaulMillr.itermcolors b/old_work/iterm2colors/schemes/PaulMillr.itermcolors similarity index 100% rename from iterm2colors/schemes/PaulMillr.itermcolors rename to old_work/iterm2colors/schemes/PaulMillr.itermcolors diff --git a/iterm2colors/schemes/PencilDark.itermcolors b/old_work/iterm2colors/schemes/PencilDark.itermcolors similarity index 100% rename from iterm2colors/schemes/PencilDark.itermcolors rename to old_work/iterm2colors/schemes/PencilDark.itermcolors diff --git a/iterm2colors/schemes/PencilLight.itermcolors b/old_work/iterm2colors/schemes/PencilLight.itermcolors similarity index 100% rename from iterm2colors/schemes/PencilLight.itermcolors rename to old_work/iterm2colors/schemes/PencilLight.itermcolors diff --git a/iterm2colors/schemes/Piatto Light.itermcolors b/old_work/iterm2colors/schemes/Piatto Light.itermcolors similarity index 100% rename from iterm2colors/schemes/Piatto Light.itermcolors rename to old_work/iterm2colors/schemes/Piatto Light.itermcolors diff --git a/iterm2colors/schemes/Pnevma.itermcolors b/old_work/iterm2colors/schemes/Pnevma.itermcolors similarity index 100% rename from iterm2colors/schemes/Pnevma.itermcolors rename to old_work/iterm2colors/schemes/Pnevma.itermcolors diff --git a/iterm2colors/schemes/Pro.itermcolors b/old_work/iterm2colors/schemes/Pro.itermcolors similarity index 100% rename from iterm2colors/schemes/Pro.itermcolors rename to old_work/iterm2colors/schemes/Pro.itermcolors diff --git a/iterm2colors/schemes/Red Alert.itermcolors b/old_work/iterm2colors/schemes/Red Alert.itermcolors similarity index 100% rename from iterm2colors/schemes/Red Alert.itermcolors rename to old_work/iterm2colors/schemes/Red Alert.itermcolors diff --git a/iterm2colors/schemes/Red Sands.itermcolors b/old_work/iterm2colors/schemes/Red Sands.itermcolors similarity index 100% rename from iterm2colors/schemes/Red Sands.itermcolors rename to old_work/iterm2colors/schemes/Red Sands.itermcolors diff --git a/iterm2colors/schemes/Rippedcasts.itermcolors b/old_work/iterm2colors/schemes/Rippedcasts.itermcolors similarity index 100% rename from iterm2colors/schemes/Rippedcasts.itermcolors rename to old_work/iterm2colors/schemes/Rippedcasts.itermcolors diff --git a/iterm2colors/schemes/Royal.itermcolors b/old_work/iterm2colors/schemes/Royal.itermcolors similarity index 100% rename from iterm2colors/schemes/Royal.itermcolors rename to old_work/iterm2colors/schemes/Royal.itermcolors diff --git a/iterm2colors/schemes/Ryuuko.itermcolors b/old_work/iterm2colors/schemes/Ryuuko.itermcolors similarity index 100% rename from iterm2colors/schemes/Ryuuko.itermcolors rename to old_work/iterm2colors/schemes/Ryuuko.itermcolors diff --git a/iterm2colors/schemes/SeaShells.itermcolors b/old_work/iterm2colors/schemes/SeaShells.itermcolors similarity index 100% rename from iterm2colors/schemes/SeaShells.itermcolors rename to old_work/iterm2colors/schemes/SeaShells.itermcolors diff --git a/iterm2colors/schemes/Seafoam Pastel.itermcolors b/old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors similarity index 100% rename from iterm2colors/schemes/Seafoam Pastel.itermcolors rename to old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors diff --git a/iterm2colors/schemes/Seti.itermcolors b/old_work/iterm2colors/schemes/Seti.itermcolors similarity index 100% rename from iterm2colors/schemes/Seti.itermcolors rename to old_work/iterm2colors/schemes/Seti.itermcolors diff --git a/iterm2colors/schemes/Shaman.itermcolors b/old_work/iterm2colors/schemes/Shaman.itermcolors similarity index 100% rename from iterm2colors/schemes/Shaman.itermcolors rename to old_work/iterm2colors/schemes/Shaman.itermcolors diff --git a/iterm2colors/schemes/Slate.itermcolors b/old_work/iterm2colors/schemes/Slate.itermcolors similarity index 100% rename from iterm2colors/schemes/Slate.itermcolors rename to old_work/iterm2colors/schemes/Slate.itermcolors diff --git a/iterm2colors/schemes/Smyck.itermcolors b/old_work/iterm2colors/schemes/Smyck.itermcolors similarity index 100% rename from iterm2colors/schemes/Smyck.itermcolors rename to old_work/iterm2colors/schemes/Smyck.itermcolors diff --git a/iterm2colors/schemes/SoftServer.itermcolors b/old_work/iterm2colors/schemes/SoftServer.itermcolors similarity index 100% rename from iterm2colors/schemes/SoftServer.itermcolors rename to old_work/iterm2colors/schemes/SoftServer.itermcolors diff --git a/iterm2colors/schemes/Solarized Darcula.itermcolors b/old_work/iterm2colors/schemes/Solarized Darcula.itermcolors similarity index 100% rename from iterm2colors/schemes/Solarized Darcula.itermcolors rename to old_work/iterm2colors/schemes/Solarized Darcula.itermcolors diff --git a/iterm2colors/schemes/Solarized Dark - Patched.itermcolors b/old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors similarity index 100% rename from iterm2colors/schemes/Solarized Dark - Patched.itermcolors rename to old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors diff --git a/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors b/old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors similarity index 100% rename from iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors rename to old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors diff --git a/iterm2colors/schemes/Solarized Dark.itermcolors b/old_work/iterm2colors/schemes/Solarized Dark.itermcolors similarity index 100% rename from iterm2colors/schemes/Solarized Dark.itermcolors rename to old_work/iterm2colors/schemes/Solarized Dark.itermcolors diff --git a/iterm2colors/schemes/Solarized Light.itermcolors b/old_work/iterm2colors/schemes/Solarized Light.itermcolors similarity index 100% rename from iterm2colors/schemes/Solarized Light.itermcolors rename to old_work/iterm2colors/schemes/Solarized Light.itermcolors diff --git a/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors b/old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors similarity index 100% rename from iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors rename to old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors diff --git a/iterm2colors/schemes/SpaceGray Eighties.itermcolors b/old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors similarity index 100% rename from iterm2colors/schemes/SpaceGray Eighties.itermcolors rename to old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors diff --git a/iterm2colors/schemes/SpaceGray.itermcolors b/old_work/iterm2colors/schemes/SpaceGray.itermcolors similarity index 100% rename from iterm2colors/schemes/SpaceGray.itermcolors rename to old_work/iterm2colors/schemes/SpaceGray.itermcolors diff --git a/iterm2colors/schemes/Spacedust.itermcolors b/old_work/iterm2colors/schemes/Spacedust.itermcolors similarity index 100% rename from iterm2colors/schemes/Spacedust.itermcolors rename to old_work/iterm2colors/schemes/Spacedust.itermcolors diff --git a/iterm2colors/schemes/Spiderman.itermcolors b/old_work/iterm2colors/schemes/Spiderman.itermcolors similarity index 100% rename from iterm2colors/schemes/Spiderman.itermcolors rename to old_work/iterm2colors/schemes/Spiderman.itermcolors diff --git a/iterm2colors/schemes/Spring.itermcolors b/old_work/iterm2colors/schemes/Spring.itermcolors similarity index 100% rename from iterm2colors/schemes/Spring.itermcolors rename to old_work/iterm2colors/schemes/Spring.itermcolors diff --git a/iterm2colors/schemes/Square.itermcolors b/old_work/iterm2colors/schemes/Square.itermcolors similarity index 100% rename from iterm2colors/schemes/Square.itermcolors rename to old_work/iterm2colors/schemes/Square.itermcolors diff --git a/iterm2colors/schemes/Sundried.itermcolors b/old_work/iterm2colors/schemes/Sundried.itermcolors similarity index 100% rename from iterm2colors/schemes/Sundried.itermcolors rename to old_work/iterm2colors/schemes/Sundried.itermcolors diff --git a/iterm2colors/schemes/Symfonic.itermcolors b/old_work/iterm2colors/schemes/Symfonic.itermcolors similarity index 100% rename from iterm2colors/schemes/Symfonic.itermcolors rename to old_work/iterm2colors/schemes/Symfonic.itermcolors diff --git a/iterm2colors/schemes/Teerb.itermcolors b/old_work/iterm2colors/schemes/Teerb.itermcolors similarity index 100% rename from iterm2colors/schemes/Teerb.itermcolors rename to old_work/iterm2colors/schemes/Teerb.itermcolors diff --git a/iterm2colors/schemes/Terminal Basic.itermcolors b/old_work/iterm2colors/schemes/Terminal Basic.itermcolors similarity index 100% rename from iterm2colors/schemes/Terminal Basic.itermcolors rename to old_work/iterm2colors/schemes/Terminal Basic.itermcolors diff --git a/iterm2colors/schemes/Thayer Bright.itermcolors b/old_work/iterm2colors/schemes/Thayer Bright.itermcolors similarity index 100% rename from iterm2colors/schemes/Thayer Bright.itermcolors rename to old_work/iterm2colors/schemes/Thayer Bright.itermcolors diff --git a/iterm2colors/schemes/The Hulk.itermcolors b/old_work/iterm2colors/schemes/The Hulk.itermcolors similarity index 100% rename from iterm2colors/schemes/The Hulk.itermcolors rename to old_work/iterm2colors/schemes/The Hulk.itermcolors diff --git a/iterm2colors/schemes/Tomorrow Night Blue.itermcolors b/old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors similarity index 100% rename from iterm2colors/schemes/Tomorrow Night Blue.itermcolors rename to old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors diff --git a/iterm2colors/schemes/Tomorrow Night Bright.itermcolors b/old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors similarity index 100% rename from iterm2colors/schemes/Tomorrow Night Bright.itermcolors rename to old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors diff --git a/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors b/old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors similarity index 100% rename from iterm2colors/schemes/Tomorrow Night Eighties.itermcolors rename to old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors diff --git a/iterm2colors/schemes/Tomorrow Night.itermcolors b/old_work/iterm2colors/schemes/Tomorrow Night.itermcolors similarity index 100% rename from iterm2colors/schemes/Tomorrow Night.itermcolors rename to old_work/iterm2colors/schemes/Tomorrow Night.itermcolors diff --git a/iterm2colors/schemes/Tomorrow.itermcolors b/old_work/iterm2colors/schemes/Tomorrow.itermcolors similarity index 100% rename from iterm2colors/schemes/Tomorrow.itermcolors rename to old_work/iterm2colors/schemes/Tomorrow.itermcolors diff --git a/iterm2colors/schemes/ToyChest.itermcolors b/old_work/iterm2colors/schemes/ToyChest.itermcolors similarity index 100% rename from iterm2colors/schemes/ToyChest.itermcolors rename to old_work/iterm2colors/schemes/ToyChest.itermcolors diff --git a/iterm2colors/schemes/Treehouse.itermcolors b/old_work/iterm2colors/schemes/Treehouse.itermcolors similarity index 100% rename from iterm2colors/schemes/Treehouse.itermcolors rename to old_work/iterm2colors/schemes/Treehouse.itermcolors diff --git a/iterm2colors/schemes/Twilight.itermcolors b/old_work/iterm2colors/schemes/Twilight.itermcolors similarity index 100% rename from iterm2colors/schemes/Twilight.itermcolors rename to old_work/iterm2colors/schemes/Twilight.itermcolors diff --git a/iterm2colors/schemes/Ubuntu.itermcolors b/old_work/iterm2colors/schemes/Ubuntu.itermcolors similarity index 100% rename from iterm2colors/schemes/Ubuntu.itermcolors rename to old_work/iterm2colors/schemes/Ubuntu.itermcolors diff --git a/iterm2colors/schemes/UnderTheSea.itermcolors b/old_work/iterm2colors/schemes/UnderTheSea.itermcolors similarity index 100% rename from iterm2colors/schemes/UnderTheSea.itermcolors rename to old_work/iterm2colors/schemes/UnderTheSea.itermcolors diff --git a/iterm2colors/schemes/Urple.itermcolors b/old_work/iterm2colors/schemes/Urple.itermcolors similarity index 100% rename from iterm2colors/schemes/Urple.itermcolors rename to old_work/iterm2colors/schemes/Urple.itermcolors diff --git a/iterm2colors/schemes/Vaughn.itermcolors b/old_work/iterm2colors/schemes/Vaughn.itermcolors similarity index 100% rename from iterm2colors/schemes/Vaughn.itermcolors rename to old_work/iterm2colors/schemes/Vaughn.itermcolors diff --git a/iterm2colors/schemes/VibrantInk.itermcolors b/old_work/iterm2colors/schemes/VibrantInk.itermcolors similarity index 100% rename from iterm2colors/schemes/VibrantInk.itermcolors rename to old_work/iterm2colors/schemes/VibrantInk.itermcolors diff --git a/iterm2colors/schemes/Violet Dark.itermcolors b/old_work/iterm2colors/schemes/Violet Dark.itermcolors similarity index 100% rename from iterm2colors/schemes/Violet Dark.itermcolors rename to old_work/iterm2colors/schemes/Violet Dark.itermcolors diff --git a/iterm2colors/schemes/Violet Light.itermcolors b/old_work/iterm2colors/schemes/Violet Light.itermcolors similarity index 100% rename from iterm2colors/schemes/Violet Light.itermcolors rename to old_work/iterm2colors/schemes/Violet Light.itermcolors diff --git a/iterm2colors/schemes/WarmNeon.itermcolors b/old_work/iterm2colors/schemes/WarmNeon.itermcolors similarity index 100% rename from iterm2colors/schemes/WarmNeon.itermcolors rename to old_work/iterm2colors/schemes/WarmNeon.itermcolors diff --git a/iterm2colors/schemes/Wez.itermcolors b/old_work/iterm2colors/schemes/Wez.itermcolors similarity index 100% rename from iterm2colors/schemes/Wez.itermcolors rename to old_work/iterm2colors/schemes/Wez.itermcolors diff --git a/iterm2colors/schemes/WildCherry.itermcolors b/old_work/iterm2colors/schemes/WildCherry.itermcolors similarity index 100% rename from iterm2colors/schemes/WildCherry.itermcolors rename to old_work/iterm2colors/schemes/WildCherry.itermcolors diff --git a/iterm2colors/schemes/Wombat.itermcolors b/old_work/iterm2colors/schemes/Wombat.itermcolors similarity index 100% rename from iterm2colors/schemes/Wombat.itermcolors rename to old_work/iterm2colors/schemes/Wombat.itermcolors diff --git a/iterm2colors/schemes/Wryan.itermcolors b/old_work/iterm2colors/schemes/Wryan.itermcolors similarity index 100% rename from iterm2colors/schemes/Wryan.itermcolors rename to old_work/iterm2colors/schemes/Wryan.itermcolors diff --git a/iterm2colors/schemes/Zenburn.itermcolors b/old_work/iterm2colors/schemes/Zenburn.itermcolors similarity index 100% rename from iterm2colors/schemes/Zenburn.itermcolors rename to old_work/iterm2colors/schemes/Zenburn.itermcolors diff --git a/iterm2colors/schemes/ayu.itermcolors b/old_work/iterm2colors/schemes/ayu.itermcolors similarity index 100% rename from iterm2colors/schemes/ayu.itermcolors rename to old_work/iterm2colors/schemes/ayu.itermcolors diff --git a/iterm2colors/schemes/ayu_light.itermcolors b/old_work/iterm2colors/schemes/ayu_light.itermcolors similarity index 100% rename from iterm2colors/schemes/ayu_light.itermcolors rename to old_work/iterm2colors/schemes/ayu_light.itermcolors diff --git a/iterm2colors/schemes/deep.itermcolors b/old_work/iterm2colors/schemes/deep.itermcolors similarity index 100% rename from iterm2colors/schemes/deep.itermcolors rename to old_work/iterm2colors/schemes/deep.itermcolors diff --git a/iterm2colors/schemes/idleToes.itermcolors b/old_work/iterm2colors/schemes/idleToes.itermcolors similarity index 100% rename from iterm2colors/schemes/idleToes.itermcolors rename to old_work/iterm2colors/schemes/idleToes.itermcolors diff --git a/iterm2colors/screenshots/3024_day.png b/old_work/iterm2colors/screenshots/3024_day.png similarity index 100% rename from iterm2colors/screenshots/3024_day.png rename to old_work/iterm2colors/screenshots/3024_day.png diff --git a/iterm2colors/screenshots/3024_night.png b/old_work/iterm2colors/screenshots/3024_night.png similarity index 100% rename from iterm2colors/screenshots/3024_night.png rename to old_work/iterm2colors/screenshots/3024_night.png diff --git a/iterm2colors/screenshots/README.md b/old_work/iterm2colors/screenshots/README.md similarity index 100% rename from iterm2colors/screenshots/README.md rename to old_work/iterm2colors/screenshots/README.md diff --git a/iterm2colors/screenshots/adventure_time.png b/old_work/iterm2colors/screenshots/adventure_time.png similarity index 100% rename from iterm2colors/screenshots/adventure_time.png rename to old_work/iterm2colors/screenshots/adventure_time.png diff --git a/iterm2colors/screenshots/afterglow.png b/old_work/iterm2colors/screenshots/afterglow.png similarity index 100% rename from iterm2colors/screenshots/afterglow.png rename to old_work/iterm2colors/screenshots/afterglow.png diff --git a/iterm2colors/screenshots/alien_blood.png b/old_work/iterm2colors/screenshots/alien_blood.png similarity index 100% rename from iterm2colors/screenshots/alien_blood.png rename to old_work/iterm2colors/screenshots/alien_blood.png diff --git a/iterm2colors/screenshots/argonaut.png b/old_work/iterm2colors/screenshots/argonaut.png similarity index 100% rename from iterm2colors/screenshots/argonaut.png rename to old_work/iterm2colors/screenshots/argonaut.png diff --git a/iterm2colors/screenshots/arthur.png b/old_work/iterm2colors/screenshots/arthur.png similarity index 100% rename from iterm2colors/screenshots/arthur.png rename to old_work/iterm2colors/screenshots/arthur.png diff --git a/iterm2colors/screenshots/atelier-sulphurpool_dark.png b/old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png similarity index 100% rename from iterm2colors/screenshots/atelier-sulphurpool_dark.png rename to old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png diff --git a/iterm2colors/screenshots/atom.png b/old_work/iterm2colors/screenshots/atom.png similarity index 100% rename from iterm2colors/screenshots/atom.png rename to old_work/iterm2colors/screenshots/atom.png diff --git a/iterm2colors/screenshots/atom_one_light.png b/old_work/iterm2colors/screenshots/atom_one_light.png similarity index 100% rename from iterm2colors/screenshots/atom_one_light.png rename to old_work/iterm2colors/screenshots/atom_one_light.png diff --git a/iterm2colors/screenshots/ayu.png b/old_work/iterm2colors/screenshots/ayu.png similarity index 100% rename from iterm2colors/screenshots/ayu.png rename to old_work/iterm2colors/screenshots/ayu.png diff --git a/iterm2colors/screenshots/ayu_light.png b/old_work/iterm2colors/screenshots/ayu_light.png similarity index 100% rename from iterm2colors/screenshots/ayu_light.png rename to old_work/iterm2colors/screenshots/ayu_light.png diff --git a/iterm2colors/screenshots/batman.png b/old_work/iterm2colors/screenshots/batman.png similarity index 100% rename from iterm2colors/screenshots/batman.png rename to old_work/iterm2colors/screenshots/batman.png diff --git a/iterm2colors/screenshots/belafonte_day.png b/old_work/iterm2colors/screenshots/belafonte_day.png similarity index 100% rename from iterm2colors/screenshots/belafonte_day.png rename to old_work/iterm2colors/screenshots/belafonte_day.png diff --git a/iterm2colors/screenshots/belafonte_night.png b/old_work/iterm2colors/screenshots/belafonte_night.png similarity index 100% rename from iterm2colors/screenshots/belafonte_night.png rename to old_work/iterm2colors/screenshots/belafonte_night.png diff --git a/iterm2colors/screenshots/birds_of_paradise.png b/old_work/iterm2colors/screenshots/birds_of_paradise.png similarity index 100% rename from iterm2colors/screenshots/birds_of_paradise.png rename to old_work/iterm2colors/screenshots/birds_of_paradise.png diff --git a/iterm2colors/screenshots/blazer.png b/old_work/iterm2colors/screenshots/blazer.png similarity index 100% rename from iterm2colors/screenshots/blazer.png rename to old_work/iterm2colors/screenshots/blazer.png diff --git a/iterm2colors/screenshots/borland.png b/old_work/iterm2colors/screenshots/borland.png similarity index 100% rename from iterm2colors/screenshots/borland.png rename to old_work/iterm2colors/screenshots/borland.png diff --git a/iterm2colors/screenshots/bright_lights.png b/old_work/iterm2colors/screenshots/bright_lights.png similarity index 100% rename from iterm2colors/screenshots/bright_lights.png rename to old_work/iterm2colors/screenshots/bright_lights.png diff --git a/iterm2colors/screenshots/broadcast.png b/old_work/iterm2colors/screenshots/broadcast.png similarity index 100% rename from iterm2colors/screenshots/broadcast.png rename to old_work/iterm2colors/screenshots/broadcast.png diff --git a/iterm2colors/screenshots/brogrammer.png b/old_work/iterm2colors/screenshots/brogrammer.png similarity index 100% rename from iterm2colors/screenshots/brogrammer.png rename to old_work/iterm2colors/screenshots/brogrammer.png diff --git a/iterm2colors/screenshots/c64.png b/old_work/iterm2colors/screenshots/c64.png similarity index 100% rename from iterm2colors/screenshots/c64.png rename to old_work/iterm2colors/screenshots/c64.png diff --git a/iterm2colors/screenshots/chalk.png b/old_work/iterm2colors/screenshots/chalk.png similarity index 100% rename from iterm2colors/screenshots/chalk.png rename to old_work/iterm2colors/screenshots/chalk.png diff --git a/iterm2colors/screenshots/chalkboard.png b/old_work/iterm2colors/screenshots/chalkboard.png similarity index 100% rename from iterm2colors/screenshots/chalkboard.png rename to old_work/iterm2colors/screenshots/chalkboard.png diff --git a/iterm2colors/screenshots/ciapre.png b/old_work/iterm2colors/screenshots/ciapre.png similarity index 100% rename from iterm2colors/screenshots/ciapre.png rename to old_work/iterm2colors/screenshots/ciapre.png diff --git a/iterm2colors/screenshots/clrs.png b/old_work/iterm2colors/screenshots/clrs.png similarity index 100% rename from iterm2colors/screenshots/clrs.png rename to old_work/iterm2colors/screenshots/clrs.png diff --git a/iterm2colors/screenshots/cobalt2.png b/old_work/iterm2colors/screenshots/cobalt2.png similarity index 100% rename from iterm2colors/screenshots/cobalt2.png rename to old_work/iterm2colors/screenshots/cobalt2.png diff --git a/iterm2colors/screenshots/cobalt_neon.png b/old_work/iterm2colors/screenshots/cobalt_neon.png similarity index 100% rename from iterm2colors/screenshots/cobalt_neon.png rename to old_work/iterm2colors/screenshots/cobalt_neon.png diff --git a/iterm2colors/screenshots/crayon_pony_fish.png b/old_work/iterm2colors/screenshots/crayon_pony_fish.png similarity index 100% rename from iterm2colors/screenshots/crayon_pony_fish.png rename to old_work/iterm2colors/screenshots/crayon_pony_fish.png diff --git a/iterm2colors/screenshots/dark_pastel.png b/old_work/iterm2colors/screenshots/dark_pastel.png similarity index 100% rename from iterm2colors/screenshots/dark_pastel.png rename to old_work/iterm2colors/screenshots/dark_pastel.png diff --git a/iterm2colors/screenshots/darkside.png b/old_work/iterm2colors/screenshots/darkside.png similarity index 100% rename from iterm2colors/screenshots/darkside.png rename to old_work/iterm2colors/screenshots/darkside.png diff --git a/iterm2colors/screenshots/deep.png b/old_work/iterm2colors/screenshots/deep.png similarity index 100% rename from iterm2colors/screenshots/deep.png rename to old_work/iterm2colors/screenshots/deep.png diff --git a/iterm2colors/screenshots/desert.png b/old_work/iterm2colors/screenshots/desert.png similarity index 100% rename from iterm2colors/screenshots/desert.png rename to old_work/iterm2colors/screenshots/desert.png diff --git a/iterm2colors/screenshots/dimmed_monokai.png b/old_work/iterm2colors/screenshots/dimmed_monokai.png similarity index 100% rename from iterm2colors/screenshots/dimmed_monokai.png rename to old_work/iterm2colors/screenshots/dimmed_monokai.png diff --git a/iterm2colors/screenshots/dot_gov.png b/old_work/iterm2colors/screenshots/dot_gov.png similarity index 100% rename from iterm2colors/screenshots/dot_gov.png rename to old_work/iterm2colors/screenshots/dot_gov.png diff --git a/iterm2colors/screenshots/dracula.png b/old_work/iterm2colors/screenshots/dracula.png similarity index 100% rename from iterm2colors/screenshots/dracula.png rename to old_work/iterm2colors/screenshots/dracula.png diff --git a/iterm2colors/screenshots/duotone_dark.png b/old_work/iterm2colors/screenshots/duotone_dark.png similarity index 100% rename from iterm2colors/screenshots/duotone_dark.png rename to old_work/iterm2colors/screenshots/duotone_dark.png diff --git a/iterm2colors/screenshots/earthsong.png b/old_work/iterm2colors/screenshots/earthsong.png similarity index 100% rename from iterm2colors/screenshots/earthsong.png rename to old_work/iterm2colors/screenshots/earthsong.png diff --git a/iterm2colors/screenshots/elemental.png b/old_work/iterm2colors/screenshots/elemental.png similarity index 100% rename from iterm2colors/screenshots/elemental.png rename to old_work/iterm2colors/screenshots/elemental.png diff --git a/iterm2colors/screenshots/elementary.png b/old_work/iterm2colors/screenshots/elementary.png similarity index 100% rename from iterm2colors/screenshots/elementary.png rename to old_work/iterm2colors/screenshots/elementary.png diff --git a/iterm2colors/screenshots/encom.png b/old_work/iterm2colors/screenshots/encom.png similarity index 100% rename from iterm2colors/screenshots/encom.png rename to old_work/iterm2colors/screenshots/encom.png diff --git a/iterm2colors/screenshots/espresso.png b/old_work/iterm2colors/screenshots/espresso.png similarity index 100% rename from iterm2colors/screenshots/espresso.png rename to old_work/iterm2colors/screenshots/espresso.png diff --git a/iterm2colors/screenshots/espresso_libre.png b/old_work/iterm2colors/screenshots/espresso_libre.png similarity index 100% rename from iterm2colors/screenshots/espresso_libre.png rename to old_work/iterm2colors/screenshots/espresso_libre.png diff --git a/iterm2colors/screenshots/fideloper.png b/old_work/iterm2colors/screenshots/fideloper.png similarity index 100% rename from iterm2colors/screenshots/fideloper.png rename to old_work/iterm2colors/screenshots/fideloper.png diff --git a/iterm2colors/screenshots/firefox_dev.png b/old_work/iterm2colors/screenshots/firefox_dev.png similarity index 100% rename from iterm2colors/screenshots/firefox_dev.png rename to old_work/iterm2colors/screenshots/firefox_dev.png diff --git a/iterm2colors/screenshots/firewatch.png b/old_work/iterm2colors/screenshots/firewatch.png similarity index 100% rename from iterm2colors/screenshots/firewatch.png rename to old_work/iterm2colors/screenshots/firewatch.png diff --git a/iterm2colors/screenshots/fish_tank.png b/old_work/iterm2colors/screenshots/fish_tank.png similarity index 100% rename from iterm2colors/screenshots/fish_tank.png rename to old_work/iterm2colors/screenshots/fish_tank.png diff --git a/iterm2colors/screenshots/flat.png b/old_work/iterm2colors/screenshots/flat.png similarity index 100% rename from iterm2colors/screenshots/flat.png rename to old_work/iterm2colors/screenshots/flat.png diff --git a/iterm2colors/screenshots/flatland.png b/old_work/iterm2colors/screenshots/flatland.png similarity index 100% rename from iterm2colors/screenshots/flatland.png rename to old_work/iterm2colors/screenshots/flatland.png diff --git a/iterm2colors/screenshots/floraverse.png b/old_work/iterm2colors/screenshots/floraverse.png similarity index 100% rename from iterm2colors/screenshots/floraverse.png rename to old_work/iterm2colors/screenshots/floraverse.png diff --git a/iterm2colors/screenshots/forest_blue.png b/old_work/iterm2colors/screenshots/forest_blue.png similarity index 100% rename from iterm2colors/screenshots/forest_blue.png rename to old_work/iterm2colors/screenshots/forest_blue.png diff --git a/iterm2colors/screenshots/front_end_delight.png b/old_work/iterm2colors/screenshots/front_end_delight.png similarity index 100% rename from iterm2colors/screenshots/front_end_delight.png rename to old_work/iterm2colors/screenshots/front_end_delight.png diff --git a/iterm2colors/screenshots/fun_forrest.png b/old_work/iterm2colors/screenshots/fun_forrest.png similarity index 100% rename from iterm2colors/screenshots/fun_forrest.png rename to old_work/iterm2colors/screenshots/fun_forrest.png diff --git a/iterm2colors/screenshots/galaxy.png b/old_work/iterm2colors/screenshots/galaxy.png similarity index 100% rename from iterm2colors/screenshots/galaxy.png rename to old_work/iterm2colors/screenshots/galaxy.png diff --git a/iterm2colors/screenshots/github.png b/old_work/iterm2colors/screenshots/github.png similarity index 100% rename from iterm2colors/screenshots/github.png rename to old_work/iterm2colors/screenshots/github.png diff --git a/iterm2colors/screenshots/glacier.png b/old_work/iterm2colors/screenshots/glacier.png similarity index 100% rename from iterm2colors/screenshots/glacier.png rename to old_work/iterm2colors/screenshots/glacier.png diff --git a/iterm2colors/screenshots/grape.png b/old_work/iterm2colors/screenshots/grape.png similarity index 100% rename from iterm2colors/screenshots/grape.png rename to old_work/iterm2colors/screenshots/grape.png diff --git a/iterm2colors/screenshots/grass.png b/old_work/iterm2colors/screenshots/grass.png similarity index 100% rename from iterm2colors/screenshots/grass.png rename to old_work/iterm2colors/screenshots/grass.png diff --git a/iterm2colors/screenshots/gruvbox_dark.png b/old_work/iterm2colors/screenshots/gruvbox_dark.png similarity index 100% rename from iterm2colors/screenshots/gruvbox_dark.png rename to old_work/iterm2colors/screenshots/gruvbox_dark.png diff --git a/iterm2colors/screenshots/hardcore.png b/old_work/iterm2colors/screenshots/hardcore.png similarity index 100% rename from iterm2colors/screenshots/hardcore.png rename to old_work/iterm2colors/screenshots/hardcore.png diff --git a/iterm2colors/screenshots/harper.png b/old_work/iterm2colors/screenshots/harper.png similarity index 100% rename from iterm2colors/screenshots/harper.png rename to old_work/iterm2colors/screenshots/harper.png diff --git a/iterm2colors/screenshots/highway.png b/old_work/iterm2colors/screenshots/highway.png similarity index 100% rename from iterm2colors/screenshots/highway.png rename to old_work/iterm2colors/screenshots/highway.png diff --git a/iterm2colors/screenshots/hipster_green.png b/old_work/iterm2colors/screenshots/hipster_green.png similarity index 100% rename from iterm2colors/screenshots/hipster_green.png rename to old_work/iterm2colors/screenshots/hipster_green.png diff --git a/iterm2colors/screenshots/homebrew.png b/old_work/iterm2colors/screenshots/homebrew.png similarity index 100% rename from iterm2colors/screenshots/homebrew.png rename to old_work/iterm2colors/screenshots/homebrew.png diff --git a/iterm2colors/screenshots/hurtado.png b/old_work/iterm2colors/screenshots/hurtado.png similarity index 100% rename from iterm2colors/screenshots/hurtado.png rename to old_work/iterm2colors/screenshots/hurtado.png diff --git a/iterm2colors/screenshots/hybrid.png b/old_work/iterm2colors/screenshots/hybrid.png similarity index 100% rename from iterm2colors/screenshots/hybrid.png rename to old_work/iterm2colors/screenshots/hybrid.png diff --git a/iterm2colors/screenshots/ic_green_ppl.png b/old_work/iterm2colors/screenshots/ic_green_ppl.png similarity index 100% rename from iterm2colors/screenshots/ic_green_ppl.png rename to old_work/iterm2colors/screenshots/ic_green_ppl.png diff --git a/iterm2colors/screenshots/ic_orange_ppl.png b/old_work/iterm2colors/screenshots/ic_orange_ppl.png similarity index 100% rename from iterm2colors/screenshots/ic_orange_ppl.png rename to old_work/iterm2colors/screenshots/ic_orange_ppl.png diff --git a/iterm2colors/screenshots/idleToes.png b/old_work/iterm2colors/screenshots/idleToes.png similarity index 100% rename from iterm2colors/screenshots/idleToes.png rename to old_work/iterm2colors/screenshots/idleToes.png diff --git a/iterm2colors/screenshots/ir_black.png b/old_work/iterm2colors/screenshots/ir_black.png similarity index 100% rename from iterm2colors/screenshots/ir_black.png rename to old_work/iterm2colors/screenshots/ir_black.png diff --git a/iterm2colors/screenshots/jackie_brown.png b/old_work/iterm2colors/screenshots/jackie_brown.png similarity index 100% rename from iterm2colors/screenshots/jackie_brown.png rename to old_work/iterm2colors/screenshots/jackie_brown.png diff --git a/iterm2colors/screenshots/japanesque.png b/old_work/iterm2colors/screenshots/japanesque.png similarity index 100% rename from iterm2colors/screenshots/japanesque.png rename to old_work/iterm2colors/screenshots/japanesque.png diff --git a/iterm2colors/screenshots/jellybeans.png b/old_work/iterm2colors/screenshots/jellybeans.png similarity index 100% rename from iterm2colors/screenshots/jellybeans.png rename to old_work/iterm2colors/screenshots/jellybeans.png diff --git a/iterm2colors/screenshots/jetbrains_darcula.png b/old_work/iterm2colors/screenshots/jetbrains_darcula.png similarity index 100% rename from iterm2colors/screenshots/jetbrains_darcula.png rename to old_work/iterm2colors/screenshots/jetbrains_darcula.png diff --git a/iterm2colors/screenshots/kibble.png b/old_work/iterm2colors/screenshots/kibble.png similarity index 100% rename from iterm2colors/screenshots/kibble.png rename to old_work/iterm2colors/screenshots/kibble.png diff --git a/iterm2colors/screenshots/later_this_evening.png b/old_work/iterm2colors/screenshots/later_this_evening.png similarity index 100% rename from iterm2colors/screenshots/later_this_evening.png rename to old_work/iterm2colors/screenshots/later_this_evening.png diff --git a/iterm2colors/screenshots/lavandula.png b/old_work/iterm2colors/screenshots/lavandula.png similarity index 100% rename from iterm2colors/screenshots/lavandula.png rename to old_work/iterm2colors/screenshots/lavandula.png diff --git a/iterm2colors/screenshots/liquid_carbon.png b/old_work/iterm2colors/screenshots/liquid_carbon.png similarity index 100% rename from iterm2colors/screenshots/liquid_carbon.png rename to old_work/iterm2colors/screenshots/liquid_carbon.png diff --git a/iterm2colors/screenshots/liquid_carbon_transparent.png b/old_work/iterm2colors/screenshots/liquid_carbon_transparent.png similarity index 100% rename from iterm2colors/screenshots/liquid_carbon_transparent.png rename to old_work/iterm2colors/screenshots/liquid_carbon_transparent.png diff --git a/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png b/old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png similarity index 100% rename from iterm2colors/screenshots/liquid_carbon_transparent_inverse.png rename to old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png diff --git a/iterm2colors/screenshots/man_page.png b/old_work/iterm2colors/screenshots/man_page.png similarity index 100% rename from iterm2colors/screenshots/man_page.png rename to old_work/iterm2colors/screenshots/man_page.png diff --git a/iterm2colors/screenshots/material.png b/old_work/iterm2colors/screenshots/material.png similarity index 100% rename from iterm2colors/screenshots/material.png rename to old_work/iterm2colors/screenshots/material.png diff --git a/iterm2colors/screenshots/material_dark.png b/old_work/iterm2colors/screenshots/material_dark.png similarity index 100% rename from iterm2colors/screenshots/material_dark.png rename to old_work/iterm2colors/screenshots/material_dark.png diff --git a/iterm2colors/screenshots/mathias.png b/old_work/iterm2colors/screenshots/mathias.png similarity index 100% rename from iterm2colors/screenshots/mathias.png rename to old_work/iterm2colors/screenshots/mathias.png diff --git a/iterm2colors/screenshots/medallion.png b/old_work/iterm2colors/screenshots/medallion.png similarity index 100% rename from iterm2colors/screenshots/medallion.png rename to old_work/iterm2colors/screenshots/medallion.png diff --git a/iterm2colors/screenshots/misterioso.png b/old_work/iterm2colors/screenshots/misterioso.png similarity index 100% rename from iterm2colors/screenshots/misterioso.png rename to old_work/iterm2colors/screenshots/misterioso.png diff --git a/iterm2colors/screenshots/molokai.png b/old_work/iterm2colors/screenshots/molokai.png similarity index 100% rename from iterm2colors/screenshots/molokai.png rename to old_work/iterm2colors/screenshots/molokai.png diff --git a/iterm2colors/screenshots/mona_lisa.png b/old_work/iterm2colors/screenshots/mona_lisa.png similarity index 100% rename from iterm2colors/screenshots/mona_lisa.png rename to old_work/iterm2colors/screenshots/mona_lisa.png diff --git a/iterm2colors/screenshots/monokai_soda.png b/old_work/iterm2colors/screenshots/monokai_soda.png similarity index 100% rename from iterm2colors/screenshots/monokai_soda.png rename to old_work/iterm2colors/screenshots/monokai_soda.png diff --git a/iterm2colors/screenshots/monokai_vivid.png b/old_work/iterm2colors/screenshots/monokai_vivid.png similarity index 100% rename from iterm2colors/screenshots/monokai_vivid.png rename to old_work/iterm2colors/screenshots/monokai_vivid.png diff --git a/iterm2colors/screenshots/n0tch2k.png b/old_work/iterm2colors/screenshots/n0tch2k.png similarity index 100% rename from iterm2colors/screenshots/n0tch2k.png rename to old_work/iterm2colors/screenshots/n0tch2k.png diff --git a/iterm2colors/screenshots/neopolitan.png b/old_work/iterm2colors/screenshots/neopolitan.png similarity index 100% rename from iterm2colors/screenshots/neopolitan.png rename to old_work/iterm2colors/screenshots/neopolitan.png diff --git a/iterm2colors/screenshots/neutron.png b/old_work/iterm2colors/screenshots/neutron.png similarity index 100% rename from iterm2colors/screenshots/neutron.png rename to old_work/iterm2colors/screenshots/neutron.png diff --git a/iterm2colors/screenshots/nightlion_v1.png b/old_work/iterm2colors/screenshots/nightlion_v1.png similarity index 100% rename from iterm2colors/screenshots/nightlion_v1.png rename to old_work/iterm2colors/screenshots/nightlion_v1.png diff --git a/iterm2colors/screenshots/nightlion_v2.png b/old_work/iterm2colors/screenshots/nightlion_v2.png similarity index 100% rename from iterm2colors/screenshots/nightlion_v2.png rename to old_work/iterm2colors/screenshots/nightlion_v2.png diff --git a/iterm2colors/screenshots/novel.png b/old_work/iterm2colors/screenshots/novel.png similarity index 100% rename from iterm2colors/screenshots/novel.png rename to old_work/iterm2colors/screenshots/novel.png diff --git a/iterm2colors/screenshots/obsidian.png b/old_work/iterm2colors/screenshots/obsidian.png similarity index 100% rename from iterm2colors/screenshots/obsidian.png rename to old_work/iterm2colors/screenshots/obsidian.png diff --git a/iterm2colors/screenshots/ocean.png b/old_work/iterm2colors/screenshots/ocean.png similarity index 100% rename from iterm2colors/screenshots/ocean.png rename to old_work/iterm2colors/screenshots/ocean.png diff --git a/iterm2colors/screenshots/oceanic_material.png b/old_work/iterm2colors/screenshots/oceanic_material.png similarity index 100% rename from iterm2colors/screenshots/oceanic_material.png rename to old_work/iterm2colors/screenshots/oceanic_material.png diff --git a/iterm2colors/screenshots/ollie.png b/old_work/iterm2colors/screenshots/ollie.png similarity index 100% rename from iterm2colors/screenshots/ollie.png rename to old_work/iterm2colors/screenshots/ollie.png diff --git a/iterm2colors/screenshots/onehalfdark.png b/old_work/iterm2colors/screenshots/onehalfdark.png similarity index 100% rename from iterm2colors/screenshots/onehalfdark.png rename to old_work/iterm2colors/screenshots/onehalfdark.png diff --git a/iterm2colors/screenshots/onehalflight.png b/old_work/iterm2colors/screenshots/onehalflight.png similarity index 100% rename from iterm2colors/screenshots/onehalflight.png rename to old_work/iterm2colors/screenshots/onehalflight.png diff --git a/iterm2colors/screenshots/pandora.png b/old_work/iterm2colors/screenshots/pandora.png similarity index 100% rename from iterm2colors/screenshots/pandora.png rename to old_work/iterm2colors/screenshots/pandora.png diff --git a/iterm2colors/screenshots/paraiso_dark.png b/old_work/iterm2colors/screenshots/paraiso_dark.png similarity index 100% rename from iterm2colors/screenshots/paraiso_dark.png rename to old_work/iterm2colors/screenshots/paraiso_dark.png diff --git a/iterm2colors/screenshots/paul_millr.png b/old_work/iterm2colors/screenshots/paul_millr.png similarity index 100% rename from iterm2colors/screenshots/paul_millr.png rename to old_work/iterm2colors/screenshots/paul_millr.png diff --git a/iterm2colors/screenshots/pencil_dark.png b/old_work/iterm2colors/screenshots/pencil_dark.png similarity index 100% rename from iterm2colors/screenshots/pencil_dark.png rename to old_work/iterm2colors/screenshots/pencil_dark.png diff --git a/iterm2colors/screenshots/pencil_light.png b/old_work/iterm2colors/screenshots/pencil_light.png similarity index 100% rename from iterm2colors/screenshots/pencil_light.png rename to old_work/iterm2colors/screenshots/pencil_light.png diff --git a/iterm2colors/screenshots/piatto_light.png b/old_work/iterm2colors/screenshots/piatto_light.png similarity index 100% rename from iterm2colors/screenshots/piatto_light.png rename to old_work/iterm2colors/screenshots/piatto_light.png diff --git a/iterm2colors/screenshots/pnevma.png b/old_work/iterm2colors/screenshots/pnevma.png similarity index 100% rename from iterm2colors/screenshots/pnevma.png rename to old_work/iterm2colors/screenshots/pnevma.png diff --git a/iterm2colors/screenshots/pro.png b/old_work/iterm2colors/screenshots/pro.png similarity index 100% rename from iterm2colors/screenshots/pro.png rename to old_work/iterm2colors/screenshots/pro.png diff --git a/iterm2colors/screenshots/red_alert.png b/old_work/iterm2colors/screenshots/red_alert.png similarity index 100% rename from iterm2colors/screenshots/red_alert.png rename to old_work/iterm2colors/screenshots/red_alert.png diff --git a/iterm2colors/screenshots/red_sands.png b/old_work/iterm2colors/screenshots/red_sands.png similarity index 100% rename from iterm2colors/screenshots/red_sands.png rename to old_work/iterm2colors/screenshots/red_sands.png diff --git a/iterm2colors/screenshots/rippedcasts.png b/old_work/iterm2colors/screenshots/rippedcasts.png similarity index 100% rename from iterm2colors/screenshots/rippedcasts.png rename to old_work/iterm2colors/screenshots/rippedcasts.png diff --git a/iterm2colors/screenshots/royal.png b/old_work/iterm2colors/screenshots/royal.png similarity index 100% rename from iterm2colors/screenshots/royal.png rename to old_work/iterm2colors/screenshots/royal.png diff --git a/iterm2colors/screenshots/ryuuko.png b/old_work/iterm2colors/screenshots/ryuuko.png similarity index 100% rename from iterm2colors/screenshots/ryuuko.png rename to old_work/iterm2colors/screenshots/ryuuko.png diff --git a/iterm2colors/screenshots/sea_shells.png b/old_work/iterm2colors/screenshots/sea_shells.png similarity index 100% rename from iterm2colors/screenshots/sea_shells.png rename to old_work/iterm2colors/screenshots/sea_shells.png diff --git a/iterm2colors/screenshots/seafoam_pastel.png b/old_work/iterm2colors/screenshots/seafoam_pastel.png similarity index 100% rename from iterm2colors/screenshots/seafoam_pastel.png rename to old_work/iterm2colors/screenshots/seafoam_pastel.png diff --git a/iterm2colors/screenshots/seti.png b/old_work/iterm2colors/screenshots/seti.png similarity index 100% rename from iterm2colors/screenshots/seti.png rename to old_work/iterm2colors/screenshots/seti.png diff --git a/iterm2colors/screenshots/shaman.png b/old_work/iterm2colors/screenshots/shaman.png similarity index 100% rename from iterm2colors/screenshots/shaman.png rename to old_work/iterm2colors/screenshots/shaman.png diff --git a/iterm2colors/screenshots/slate.png b/old_work/iterm2colors/screenshots/slate.png similarity index 100% rename from iterm2colors/screenshots/slate.png rename to old_work/iterm2colors/screenshots/slate.png diff --git a/iterm2colors/screenshots/smyck.png b/old_work/iterm2colors/screenshots/smyck.png similarity index 100% rename from iterm2colors/screenshots/smyck.png rename to old_work/iterm2colors/screenshots/smyck.png diff --git a/iterm2colors/screenshots/soft_server.png b/old_work/iterm2colors/screenshots/soft_server.png similarity index 100% rename from iterm2colors/screenshots/soft_server.png rename to old_work/iterm2colors/screenshots/soft_server.png diff --git a/iterm2colors/screenshots/solarized_darcula.png b/old_work/iterm2colors/screenshots/solarized_darcula.png similarity index 100% rename from iterm2colors/screenshots/solarized_darcula.png rename to old_work/iterm2colors/screenshots/solarized_darcula.png diff --git a/iterm2colors/screenshots/solarized_darcula_with_background.png b/old_work/iterm2colors/screenshots/solarized_darcula_with_background.png similarity index 100% rename from iterm2colors/screenshots/solarized_darcula_with_background.png rename to old_work/iterm2colors/screenshots/solarized_darcula_with_background.png diff --git a/iterm2colors/screenshots/solarized_dark.png b/old_work/iterm2colors/screenshots/solarized_dark.png similarity index 100% rename from iterm2colors/screenshots/solarized_dark.png rename to old_work/iterm2colors/screenshots/solarized_dark.png diff --git a/iterm2colors/screenshots/solarized_dark_higher_contrast.png b/old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png similarity index 100% rename from iterm2colors/screenshots/solarized_dark_higher_contrast.png rename to old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png diff --git a/iterm2colors/screenshots/solarized_dark_patched.png b/old_work/iterm2colors/screenshots/solarized_dark_patched.png similarity index 100% rename from iterm2colors/screenshots/solarized_dark_patched.png rename to old_work/iterm2colors/screenshots/solarized_dark_patched.png diff --git a/iterm2colors/screenshots/solarized_light.png b/old_work/iterm2colors/screenshots/solarized_light.png similarity index 100% rename from iterm2colors/screenshots/solarized_light.png rename to old_work/iterm2colors/screenshots/solarized_light.png diff --git a/iterm2colors/screenshots/space_gray.png b/old_work/iterm2colors/screenshots/space_gray.png similarity index 100% rename from iterm2colors/screenshots/space_gray.png rename to old_work/iterm2colors/screenshots/space_gray.png diff --git a/iterm2colors/screenshots/spacedust.png b/old_work/iterm2colors/screenshots/spacedust.png similarity index 100% rename from iterm2colors/screenshots/spacedust.png rename to old_work/iterm2colors/screenshots/spacedust.png diff --git a/iterm2colors/screenshots/spacegray_eighties.png b/old_work/iterm2colors/screenshots/spacegray_eighties.png similarity index 100% rename from iterm2colors/screenshots/spacegray_eighties.png rename to old_work/iterm2colors/screenshots/spacegray_eighties.png diff --git a/iterm2colors/screenshots/spacegray_eighties_dull.png b/old_work/iterm2colors/screenshots/spacegray_eighties_dull.png similarity index 100% rename from iterm2colors/screenshots/spacegray_eighties_dull.png rename to old_work/iterm2colors/screenshots/spacegray_eighties_dull.png diff --git a/iterm2colors/screenshots/spiderman.png b/old_work/iterm2colors/screenshots/spiderman.png similarity index 100% rename from iterm2colors/screenshots/spiderman.png rename to old_work/iterm2colors/screenshots/spiderman.png diff --git a/iterm2colors/screenshots/spring.png b/old_work/iterm2colors/screenshots/spring.png similarity index 100% rename from iterm2colors/screenshots/spring.png rename to old_work/iterm2colors/screenshots/spring.png diff --git a/iterm2colors/screenshots/square.png b/old_work/iterm2colors/screenshots/square.png similarity index 100% rename from iterm2colors/screenshots/square.png rename to old_work/iterm2colors/screenshots/square.png diff --git a/iterm2colors/screenshots/sundried.png b/old_work/iterm2colors/screenshots/sundried.png similarity index 100% rename from iterm2colors/screenshots/sundried.png rename to old_work/iterm2colors/screenshots/sundried.png diff --git a/iterm2colors/screenshots/symfonic.png b/old_work/iterm2colors/screenshots/symfonic.png similarity index 100% rename from iterm2colors/screenshots/symfonic.png rename to old_work/iterm2colors/screenshots/symfonic.png diff --git a/iterm2colors/screenshots/teerb.png b/old_work/iterm2colors/screenshots/teerb.png similarity index 100% rename from iterm2colors/screenshots/teerb.png rename to old_work/iterm2colors/screenshots/teerb.png diff --git a/iterm2colors/screenshots/terminal_basic.png b/old_work/iterm2colors/screenshots/terminal_basic.png similarity index 100% rename from iterm2colors/screenshots/terminal_basic.png rename to old_work/iterm2colors/screenshots/terminal_basic.png diff --git a/iterm2colors/screenshots/thayer_bright.png b/old_work/iterm2colors/screenshots/thayer_bright.png similarity index 100% rename from iterm2colors/screenshots/thayer_bright.png rename to old_work/iterm2colors/screenshots/thayer_bright.png diff --git a/iterm2colors/screenshots/the_hulk.png b/old_work/iterm2colors/screenshots/the_hulk.png similarity index 100% rename from iterm2colors/screenshots/the_hulk.png rename to old_work/iterm2colors/screenshots/the_hulk.png diff --git a/iterm2colors/screenshots/tomorrow.png b/old_work/iterm2colors/screenshots/tomorrow.png similarity index 100% rename from iterm2colors/screenshots/tomorrow.png rename to old_work/iterm2colors/screenshots/tomorrow.png diff --git a/iterm2colors/screenshots/tomorrow_night.png b/old_work/iterm2colors/screenshots/tomorrow_night.png similarity index 100% rename from iterm2colors/screenshots/tomorrow_night.png rename to old_work/iterm2colors/screenshots/tomorrow_night.png diff --git a/iterm2colors/screenshots/tomorrow_night_blue.png b/old_work/iterm2colors/screenshots/tomorrow_night_blue.png similarity index 100% rename from iterm2colors/screenshots/tomorrow_night_blue.png rename to old_work/iterm2colors/screenshots/tomorrow_night_blue.png diff --git a/iterm2colors/screenshots/tomorrow_night_bright.png b/old_work/iterm2colors/screenshots/tomorrow_night_bright.png similarity index 100% rename from iterm2colors/screenshots/tomorrow_night_bright.png rename to old_work/iterm2colors/screenshots/tomorrow_night_bright.png diff --git a/iterm2colors/screenshots/tomorrow_night_eighties.png b/old_work/iterm2colors/screenshots/tomorrow_night_eighties.png similarity index 100% rename from iterm2colors/screenshots/tomorrow_night_eighties.png rename to old_work/iterm2colors/screenshots/tomorrow_night_eighties.png diff --git a/iterm2colors/screenshots/toy_chest.png b/old_work/iterm2colors/screenshots/toy_chest.png similarity index 100% rename from iterm2colors/screenshots/toy_chest.png rename to old_work/iterm2colors/screenshots/toy_chest.png diff --git a/iterm2colors/screenshots/treehouse.png b/old_work/iterm2colors/screenshots/treehouse.png similarity index 100% rename from iterm2colors/screenshots/treehouse.png rename to old_work/iterm2colors/screenshots/treehouse.png diff --git a/iterm2colors/screenshots/twilight.png b/old_work/iterm2colors/screenshots/twilight.png similarity index 100% rename from iterm2colors/screenshots/twilight.png rename to old_work/iterm2colors/screenshots/twilight.png diff --git a/iterm2colors/screenshots/ubuntu.png b/old_work/iterm2colors/screenshots/ubuntu.png similarity index 100% rename from iterm2colors/screenshots/ubuntu.png rename to old_work/iterm2colors/screenshots/ubuntu.png diff --git a/iterm2colors/screenshots/under_the_sea.png b/old_work/iterm2colors/screenshots/under_the_sea.png similarity index 100% rename from iterm2colors/screenshots/under_the_sea.png rename to old_work/iterm2colors/screenshots/under_the_sea.png diff --git a/iterm2colors/screenshots/urple.png b/old_work/iterm2colors/screenshots/urple.png similarity index 100% rename from iterm2colors/screenshots/urple.png rename to old_work/iterm2colors/screenshots/urple.png diff --git a/iterm2colors/screenshots/vaughn.png b/old_work/iterm2colors/screenshots/vaughn.png similarity index 100% rename from iterm2colors/screenshots/vaughn.png rename to old_work/iterm2colors/screenshots/vaughn.png diff --git a/iterm2colors/screenshots/vibrant_ink.png b/old_work/iterm2colors/screenshots/vibrant_ink.png similarity index 100% rename from iterm2colors/screenshots/vibrant_ink.png rename to old_work/iterm2colors/screenshots/vibrant_ink.png diff --git a/iterm2colors/screenshots/violet_dark.png b/old_work/iterm2colors/screenshots/violet_dark.png similarity index 100% rename from iterm2colors/screenshots/violet_dark.png rename to old_work/iterm2colors/screenshots/violet_dark.png diff --git a/iterm2colors/screenshots/violet_light.png b/old_work/iterm2colors/screenshots/violet_light.png similarity index 100% rename from iterm2colors/screenshots/violet_light.png rename to old_work/iterm2colors/screenshots/violet_light.png diff --git a/iterm2colors/screenshots/warm_neon.png b/old_work/iterm2colors/screenshots/warm_neon.png similarity index 100% rename from iterm2colors/screenshots/warm_neon.png rename to old_work/iterm2colors/screenshots/warm_neon.png diff --git a/iterm2colors/screenshots/wez.png b/old_work/iterm2colors/screenshots/wez.png similarity index 100% rename from iterm2colors/screenshots/wez.png rename to old_work/iterm2colors/screenshots/wez.png diff --git a/iterm2colors/screenshots/wild_cherry.png b/old_work/iterm2colors/screenshots/wild_cherry.png similarity index 100% rename from iterm2colors/screenshots/wild_cherry.png rename to old_work/iterm2colors/screenshots/wild_cherry.png diff --git a/iterm2colors/screenshots/wombat.png b/old_work/iterm2colors/screenshots/wombat.png similarity index 100% rename from iterm2colors/screenshots/wombat.png rename to old_work/iterm2colors/screenshots/wombat.png diff --git a/iterm2colors/screenshots/wryan.png b/old_work/iterm2colors/screenshots/wryan.png similarity index 100% rename from iterm2colors/screenshots/wryan.png rename to old_work/iterm2colors/screenshots/wryan.png diff --git a/iterm2colors/screenshots/zenburn.png b/old_work/iterm2colors/screenshots/zenburn.png similarity index 100% rename from iterm2colors/screenshots/zenburn.png rename to old_work/iterm2colors/screenshots/zenburn.png diff --git a/iterm2colors/terminal/3024 Day.terminal b/old_work/iterm2colors/terminal/3024 Day.terminal similarity index 100% rename from iterm2colors/terminal/3024 Day.terminal rename to old_work/iterm2colors/terminal/3024 Day.terminal diff --git a/iterm2colors/terminal/3024 Night.terminal b/old_work/iterm2colors/terminal/3024 Night.terminal similarity index 100% rename from iterm2colors/terminal/3024 Night.terminal rename to old_work/iterm2colors/terminal/3024 Night.terminal diff --git a/iterm2colors/terminal/AdventureTime.terminal b/old_work/iterm2colors/terminal/AdventureTime.terminal similarity index 100% rename from iterm2colors/terminal/AdventureTime.terminal rename to old_work/iterm2colors/terminal/AdventureTime.terminal diff --git a/iterm2colors/terminal/Afterglow.terminal b/old_work/iterm2colors/terminal/Afterglow.terminal similarity index 100% rename from iterm2colors/terminal/Afterglow.terminal rename to old_work/iterm2colors/terminal/Afterglow.terminal diff --git a/iterm2colors/terminal/AlienBlood.terminal b/old_work/iterm2colors/terminal/AlienBlood.terminal similarity index 100% rename from iterm2colors/terminal/AlienBlood.terminal rename to old_work/iterm2colors/terminal/AlienBlood.terminal diff --git a/iterm2colors/terminal/Argonaut.terminal b/old_work/iterm2colors/terminal/Argonaut.terminal similarity index 100% rename from iterm2colors/terminal/Argonaut.terminal rename to old_work/iterm2colors/terminal/Argonaut.terminal diff --git a/iterm2colors/terminal/Arthur.terminal b/old_work/iterm2colors/terminal/Arthur.terminal similarity index 100% rename from iterm2colors/terminal/Arthur.terminal rename to old_work/iterm2colors/terminal/Arthur.terminal diff --git a/iterm2colors/terminal/AtelierSulphurpool.terminal b/old_work/iterm2colors/terminal/AtelierSulphurpool.terminal similarity index 100% rename from iterm2colors/terminal/AtelierSulphurpool.terminal rename to old_work/iterm2colors/terminal/AtelierSulphurpool.terminal diff --git a/iterm2colors/terminal/Atom.terminal b/old_work/iterm2colors/terminal/Atom.terminal similarity index 100% rename from iterm2colors/terminal/Atom.terminal rename to old_work/iterm2colors/terminal/Atom.terminal diff --git a/iterm2colors/terminal/AtomOneLight.terminal b/old_work/iterm2colors/terminal/AtomOneLight.terminal similarity index 100% rename from iterm2colors/terminal/AtomOneLight.terminal rename to old_work/iterm2colors/terminal/AtomOneLight.terminal diff --git a/iterm2colors/terminal/Batman.terminal b/old_work/iterm2colors/terminal/Batman.terminal similarity index 100% rename from iterm2colors/terminal/Batman.terminal rename to old_work/iterm2colors/terminal/Batman.terminal diff --git a/iterm2colors/terminal/Belafonte Day.terminal b/old_work/iterm2colors/terminal/Belafonte Day.terminal similarity index 100% rename from iterm2colors/terminal/Belafonte Day.terminal rename to old_work/iterm2colors/terminal/Belafonte Day.terminal diff --git a/iterm2colors/terminal/Belafonte Night.terminal b/old_work/iterm2colors/terminal/Belafonte Night.terminal similarity index 100% rename from iterm2colors/terminal/Belafonte Night.terminal rename to old_work/iterm2colors/terminal/Belafonte Night.terminal diff --git a/iterm2colors/terminal/BirdsOfParadise.terminal b/old_work/iterm2colors/terminal/BirdsOfParadise.terminal similarity index 100% rename from iterm2colors/terminal/BirdsOfParadise.terminal rename to old_work/iterm2colors/terminal/BirdsOfParadise.terminal diff --git a/iterm2colors/terminal/Blazer.terminal b/old_work/iterm2colors/terminal/Blazer.terminal similarity index 100% rename from iterm2colors/terminal/Blazer.terminal rename to old_work/iterm2colors/terminal/Blazer.terminal diff --git a/iterm2colors/terminal/Borland.terminal b/old_work/iterm2colors/terminal/Borland.terminal similarity index 100% rename from iterm2colors/terminal/Borland.terminal rename to old_work/iterm2colors/terminal/Borland.terminal diff --git a/iterm2colors/terminal/Bright Lights.terminal b/old_work/iterm2colors/terminal/Bright Lights.terminal similarity index 100% rename from iterm2colors/terminal/Bright Lights.terminal rename to old_work/iterm2colors/terminal/Bright Lights.terminal diff --git a/iterm2colors/terminal/Broadcast.terminal b/old_work/iterm2colors/terminal/Broadcast.terminal similarity index 100% rename from iterm2colors/terminal/Broadcast.terminal rename to old_work/iterm2colors/terminal/Broadcast.terminal diff --git a/iterm2colors/terminal/Brogrammer.terminal b/old_work/iterm2colors/terminal/Brogrammer.terminal similarity index 100% rename from iterm2colors/terminal/Brogrammer.terminal rename to old_work/iterm2colors/terminal/Brogrammer.terminal diff --git a/iterm2colors/terminal/C64.terminal b/old_work/iterm2colors/terminal/C64.terminal similarity index 100% rename from iterm2colors/terminal/C64.terminal rename to old_work/iterm2colors/terminal/C64.terminal diff --git a/iterm2colors/terminal/CLRS.terminal b/old_work/iterm2colors/terminal/CLRS.terminal similarity index 100% rename from iterm2colors/terminal/CLRS.terminal rename to old_work/iterm2colors/terminal/CLRS.terminal diff --git a/iterm2colors/terminal/Chalk.terminal b/old_work/iterm2colors/terminal/Chalk.terminal similarity index 100% rename from iterm2colors/terminal/Chalk.terminal rename to old_work/iterm2colors/terminal/Chalk.terminal diff --git a/iterm2colors/terminal/Chalkboard.terminal b/old_work/iterm2colors/terminal/Chalkboard.terminal similarity index 100% rename from iterm2colors/terminal/Chalkboard.terminal rename to old_work/iterm2colors/terminal/Chalkboard.terminal diff --git a/iterm2colors/terminal/Ciapre.terminal b/old_work/iterm2colors/terminal/Ciapre.terminal similarity index 100% rename from iterm2colors/terminal/Ciapre.terminal rename to old_work/iterm2colors/terminal/Ciapre.terminal diff --git a/iterm2colors/terminal/Cobalt Neon.terminal b/old_work/iterm2colors/terminal/Cobalt Neon.terminal similarity index 100% rename from iterm2colors/terminal/Cobalt Neon.terminal rename to old_work/iterm2colors/terminal/Cobalt Neon.terminal diff --git a/iterm2colors/terminal/Cobalt2.terminal b/old_work/iterm2colors/terminal/Cobalt2.terminal similarity index 100% rename from iterm2colors/terminal/Cobalt2.terminal rename to old_work/iterm2colors/terminal/Cobalt2.terminal diff --git a/iterm2colors/terminal/CrayonPonyFish.terminal b/old_work/iterm2colors/terminal/CrayonPonyFish.terminal similarity index 100% rename from iterm2colors/terminal/CrayonPonyFish.terminal rename to old_work/iterm2colors/terminal/CrayonPonyFish.terminal diff --git a/iterm2colors/terminal/Dark Pastel.terminal b/old_work/iterm2colors/terminal/Dark Pastel.terminal similarity index 100% rename from iterm2colors/terminal/Dark Pastel.terminal rename to old_work/iterm2colors/terminal/Dark Pastel.terminal diff --git a/iterm2colors/terminal/Darkside.terminal b/old_work/iterm2colors/terminal/Darkside.terminal similarity index 100% rename from iterm2colors/terminal/Darkside.terminal rename to old_work/iterm2colors/terminal/Darkside.terminal diff --git a/iterm2colors/terminal/Desert.terminal b/old_work/iterm2colors/terminal/Desert.terminal similarity index 100% rename from iterm2colors/terminal/Desert.terminal rename to old_work/iterm2colors/terminal/Desert.terminal diff --git a/iterm2colors/terminal/DimmedMonokai.terminal b/old_work/iterm2colors/terminal/DimmedMonokai.terminal similarity index 100% rename from iterm2colors/terminal/DimmedMonokai.terminal rename to old_work/iterm2colors/terminal/DimmedMonokai.terminal diff --git a/iterm2colors/terminal/DotGov.terminal b/old_work/iterm2colors/terminal/DotGov.terminal similarity index 100% rename from iterm2colors/terminal/DotGov.terminal rename to old_work/iterm2colors/terminal/DotGov.terminal diff --git a/iterm2colors/terminal/Dracula.terminal b/old_work/iterm2colors/terminal/Dracula.terminal similarity index 100% rename from iterm2colors/terminal/Dracula.terminal rename to old_work/iterm2colors/terminal/Dracula.terminal diff --git a/iterm2colors/terminal/Duotone Dark.terminal b/old_work/iterm2colors/terminal/Duotone Dark.terminal similarity index 100% rename from iterm2colors/terminal/Duotone Dark.terminal rename to old_work/iterm2colors/terminal/Duotone Dark.terminal diff --git a/iterm2colors/terminal/ENCOM.terminal b/old_work/iterm2colors/terminal/ENCOM.terminal similarity index 100% rename from iterm2colors/terminal/ENCOM.terminal rename to old_work/iterm2colors/terminal/ENCOM.terminal diff --git a/iterm2colors/terminal/Earthsong.terminal b/old_work/iterm2colors/terminal/Earthsong.terminal similarity index 100% rename from iterm2colors/terminal/Earthsong.terminal rename to old_work/iterm2colors/terminal/Earthsong.terminal diff --git a/iterm2colors/terminal/Elemental.terminal b/old_work/iterm2colors/terminal/Elemental.terminal similarity index 100% rename from iterm2colors/terminal/Elemental.terminal rename to old_work/iterm2colors/terminal/Elemental.terminal diff --git a/iterm2colors/terminal/Espresso Libre.terminal b/old_work/iterm2colors/terminal/Espresso Libre.terminal similarity index 100% rename from iterm2colors/terminal/Espresso Libre.terminal rename to old_work/iterm2colors/terminal/Espresso Libre.terminal diff --git a/iterm2colors/terminal/Espresso.terminal b/old_work/iterm2colors/terminal/Espresso.terminal similarity index 100% rename from iterm2colors/terminal/Espresso.terminal rename to old_work/iterm2colors/terminal/Espresso.terminal diff --git a/iterm2colors/terminal/Fideloper.terminal b/old_work/iterm2colors/terminal/Fideloper.terminal similarity index 100% rename from iterm2colors/terminal/Fideloper.terminal rename to old_work/iterm2colors/terminal/Fideloper.terminal diff --git a/iterm2colors/terminal/FishTank.terminal b/old_work/iterm2colors/terminal/FishTank.terminal similarity index 100% rename from iterm2colors/terminal/FishTank.terminal rename to old_work/iterm2colors/terminal/FishTank.terminal diff --git a/iterm2colors/terminal/Flat.terminal b/old_work/iterm2colors/terminal/Flat.terminal similarity index 100% rename from iterm2colors/terminal/Flat.terminal rename to old_work/iterm2colors/terminal/Flat.terminal diff --git a/iterm2colors/terminal/Flatland.terminal b/old_work/iterm2colors/terminal/Flatland.terminal similarity index 100% rename from iterm2colors/terminal/Flatland.terminal rename to old_work/iterm2colors/terminal/Flatland.terminal diff --git a/iterm2colors/terminal/Floraverse.terminal b/old_work/iterm2colors/terminal/Floraverse.terminal similarity index 100% rename from iterm2colors/terminal/Floraverse.terminal rename to old_work/iterm2colors/terminal/Floraverse.terminal diff --git a/iterm2colors/terminal/FrontEndDelight.terminal b/old_work/iterm2colors/terminal/FrontEndDelight.terminal similarity index 100% rename from iterm2colors/terminal/FrontEndDelight.terminal rename to old_work/iterm2colors/terminal/FrontEndDelight.terminal diff --git a/iterm2colors/terminal/FunForrest.terminal b/old_work/iterm2colors/terminal/FunForrest.terminal similarity index 100% rename from iterm2colors/terminal/FunForrest.terminal rename to old_work/iterm2colors/terminal/FunForrest.terminal diff --git a/iterm2colors/terminal/Galaxy.terminal b/old_work/iterm2colors/terminal/Galaxy.terminal similarity index 100% rename from iterm2colors/terminal/Galaxy.terminal rename to old_work/iterm2colors/terminal/Galaxy.terminal diff --git a/iterm2colors/terminal/Github.terminal b/old_work/iterm2colors/terminal/Github.terminal similarity index 100% rename from iterm2colors/terminal/Github.terminal rename to old_work/iterm2colors/terminal/Github.terminal diff --git a/iterm2colors/terminal/Glacier.terminal b/old_work/iterm2colors/terminal/Glacier.terminal similarity index 100% rename from iterm2colors/terminal/Glacier.terminal rename to old_work/iterm2colors/terminal/Glacier.terminal diff --git a/iterm2colors/terminal/Grape.terminal b/old_work/iterm2colors/terminal/Grape.terminal similarity index 100% rename from iterm2colors/terminal/Grape.terminal rename to old_work/iterm2colors/terminal/Grape.terminal diff --git a/iterm2colors/terminal/Grass.terminal b/old_work/iterm2colors/terminal/Grass.terminal similarity index 100% rename from iterm2colors/terminal/Grass.terminal rename to old_work/iterm2colors/terminal/Grass.terminal diff --git a/iterm2colors/terminal/Hardcore.terminal b/old_work/iterm2colors/terminal/Hardcore.terminal similarity index 100% rename from iterm2colors/terminal/Hardcore.terminal rename to old_work/iterm2colors/terminal/Hardcore.terminal diff --git a/iterm2colors/terminal/Harper.terminal b/old_work/iterm2colors/terminal/Harper.terminal similarity index 100% rename from iterm2colors/terminal/Harper.terminal rename to old_work/iterm2colors/terminal/Harper.terminal diff --git a/iterm2colors/terminal/Highway.terminal b/old_work/iterm2colors/terminal/Highway.terminal similarity index 100% rename from iterm2colors/terminal/Highway.terminal rename to old_work/iterm2colors/terminal/Highway.terminal diff --git a/iterm2colors/terminal/Hipster Green.terminal b/old_work/iterm2colors/terminal/Hipster Green.terminal similarity index 100% rename from iterm2colors/terminal/Hipster Green.terminal rename to old_work/iterm2colors/terminal/Hipster Green.terminal diff --git a/iterm2colors/terminal/Homebrew.terminal b/old_work/iterm2colors/terminal/Homebrew.terminal similarity index 100% rename from iterm2colors/terminal/Homebrew.terminal rename to old_work/iterm2colors/terminal/Homebrew.terminal diff --git a/iterm2colors/terminal/Hurtado.terminal b/old_work/iterm2colors/terminal/Hurtado.terminal similarity index 100% rename from iterm2colors/terminal/Hurtado.terminal rename to old_work/iterm2colors/terminal/Hurtado.terminal diff --git a/iterm2colors/terminal/Hybrid.terminal b/old_work/iterm2colors/terminal/Hybrid.terminal similarity index 100% rename from iterm2colors/terminal/Hybrid.terminal rename to old_work/iterm2colors/terminal/Hybrid.terminal diff --git a/iterm2colors/terminal/IC_Green_PPL.terminal b/old_work/iterm2colors/terminal/IC_Green_PPL.terminal similarity index 100% rename from iterm2colors/terminal/IC_Green_PPL.terminal rename to old_work/iterm2colors/terminal/IC_Green_PPL.terminal diff --git a/iterm2colors/terminal/IC_Orange_PPL.terminal b/old_work/iterm2colors/terminal/IC_Orange_PPL.terminal similarity index 100% rename from iterm2colors/terminal/IC_Orange_PPL.terminal rename to old_work/iterm2colors/terminal/IC_Orange_PPL.terminal diff --git a/iterm2colors/terminal/IR_Black.terminal b/old_work/iterm2colors/terminal/IR_Black.terminal similarity index 100% rename from iterm2colors/terminal/IR_Black.terminal rename to old_work/iterm2colors/terminal/IR_Black.terminal diff --git a/iterm2colors/terminal/Jackie Brown.terminal b/old_work/iterm2colors/terminal/Jackie Brown.terminal similarity index 100% rename from iterm2colors/terminal/Jackie Brown.terminal rename to old_work/iterm2colors/terminal/Jackie Brown.terminal diff --git a/iterm2colors/terminal/Japanesque.terminal b/old_work/iterm2colors/terminal/Japanesque.terminal similarity index 100% rename from iterm2colors/terminal/Japanesque.terminal rename to old_work/iterm2colors/terminal/Japanesque.terminal diff --git a/iterm2colors/terminal/Jellybeans.terminal b/old_work/iterm2colors/terminal/Jellybeans.terminal similarity index 100% rename from iterm2colors/terminal/Jellybeans.terminal rename to old_work/iterm2colors/terminal/Jellybeans.terminal diff --git a/iterm2colors/terminal/JetBrains Darcula.terminal b/old_work/iterm2colors/terminal/JetBrains Darcula.terminal similarity index 100% rename from iterm2colors/terminal/JetBrains Darcula.terminal rename to old_work/iterm2colors/terminal/JetBrains Darcula.terminal diff --git a/iterm2colors/terminal/Kibble.terminal b/old_work/iterm2colors/terminal/Kibble.terminal similarity index 100% rename from iterm2colors/terminal/Kibble.terminal rename to old_work/iterm2colors/terminal/Kibble.terminal diff --git a/iterm2colors/terminal/Later This Evening.terminal b/old_work/iterm2colors/terminal/Later This Evening.terminal similarity index 100% rename from iterm2colors/terminal/Later This Evening.terminal rename to old_work/iterm2colors/terminal/Later This Evening.terminal diff --git a/iterm2colors/terminal/Lavandula.terminal b/old_work/iterm2colors/terminal/Lavandula.terminal similarity index 100% rename from iterm2colors/terminal/Lavandula.terminal rename to old_work/iterm2colors/terminal/Lavandula.terminal diff --git a/iterm2colors/terminal/LiquidCarbon.terminal b/old_work/iterm2colors/terminal/LiquidCarbon.terminal similarity index 100% rename from iterm2colors/terminal/LiquidCarbon.terminal rename to old_work/iterm2colors/terminal/LiquidCarbon.terminal diff --git a/iterm2colors/terminal/LiquidCarbonTransparent.terminal b/old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal similarity index 100% rename from iterm2colors/terminal/LiquidCarbonTransparent.terminal rename to old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal diff --git a/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal b/old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal similarity index 100% rename from iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal rename to old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal diff --git a/iterm2colors/terminal/Man Page.terminal b/old_work/iterm2colors/terminal/Man Page.terminal similarity index 100% rename from iterm2colors/terminal/Man Page.terminal rename to old_work/iterm2colors/terminal/Man Page.terminal diff --git a/iterm2colors/terminal/Material.terminal b/old_work/iterm2colors/terminal/Material.terminal similarity index 100% rename from iterm2colors/terminal/Material.terminal rename to old_work/iterm2colors/terminal/Material.terminal diff --git a/iterm2colors/terminal/MaterialDark.terminal b/old_work/iterm2colors/terminal/MaterialDark.terminal similarity index 100% rename from iterm2colors/terminal/MaterialDark.terminal rename to old_work/iterm2colors/terminal/MaterialDark.terminal diff --git a/iterm2colors/terminal/Mathias.terminal b/old_work/iterm2colors/terminal/Mathias.terminal similarity index 100% rename from iterm2colors/terminal/Mathias.terminal rename to old_work/iterm2colors/terminal/Mathias.terminal diff --git a/iterm2colors/terminal/Medallion.terminal b/old_work/iterm2colors/terminal/Medallion.terminal similarity index 100% rename from iterm2colors/terminal/Medallion.terminal rename to old_work/iterm2colors/terminal/Medallion.terminal diff --git a/iterm2colors/terminal/Misterioso.terminal b/old_work/iterm2colors/terminal/Misterioso.terminal similarity index 100% rename from iterm2colors/terminal/Misterioso.terminal rename to old_work/iterm2colors/terminal/Misterioso.terminal diff --git a/iterm2colors/terminal/Molokai.terminal b/old_work/iterm2colors/terminal/Molokai.terminal similarity index 100% rename from iterm2colors/terminal/Molokai.terminal rename to old_work/iterm2colors/terminal/Molokai.terminal diff --git a/iterm2colors/terminal/MonaLisa.terminal b/old_work/iterm2colors/terminal/MonaLisa.terminal similarity index 100% rename from iterm2colors/terminal/MonaLisa.terminal rename to old_work/iterm2colors/terminal/MonaLisa.terminal diff --git a/iterm2colors/terminal/Monokai Soda.terminal b/old_work/iterm2colors/terminal/Monokai Soda.terminal similarity index 100% rename from iterm2colors/terminal/Monokai Soda.terminal rename to old_work/iterm2colors/terminal/Monokai Soda.terminal diff --git a/iterm2colors/terminal/N0tch2k.terminal b/old_work/iterm2colors/terminal/N0tch2k.terminal similarity index 100% rename from iterm2colors/terminal/N0tch2k.terminal rename to old_work/iterm2colors/terminal/N0tch2k.terminal diff --git a/iterm2colors/terminal/Neopolitan.terminal b/old_work/iterm2colors/terminal/Neopolitan.terminal similarity index 100% rename from iterm2colors/terminal/Neopolitan.terminal rename to old_work/iterm2colors/terminal/Neopolitan.terminal diff --git a/iterm2colors/terminal/Neutron.terminal b/old_work/iterm2colors/terminal/Neutron.terminal similarity index 100% rename from iterm2colors/terminal/Neutron.terminal rename to old_work/iterm2colors/terminal/Neutron.terminal diff --git a/iterm2colors/terminal/NightLion v1.terminal b/old_work/iterm2colors/terminal/NightLion v1.terminal similarity index 100% rename from iterm2colors/terminal/NightLion v1.terminal rename to old_work/iterm2colors/terminal/NightLion v1.terminal diff --git a/iterm2colors/terminal/NightLion v2.terminal b/old_work/iterm2colors/terminal/NightLion v2.terminal similarity index 100% rename from iterm2colors/terminal/NightLion v2.terminal rename to old_work/iterm2colors/terminal/NightLion v2.terminal diff --git a/iterm2colors/terminal/Novel.terminal b/old_work/iterm2colors/terminal/Novel.terminal similarity index 100% rename from iterm2colors/terminal/Novel.terminal rename to old_work/iterm2colors/terminal/Novel.terminal diff --git a/iterm2colors/terminal/Obsidian.terminal b/old_work/iterm2colors/terminal/Obsidian.terminal similarity index 100% rename from iterm2colors/terminal/Obsidian.terminal rename to old_work/iterm2colors/terminal/Obsidian.terminal diff --git a/iterm2colors/terminal/Ocean.terminal b/old_work/iterm2colors/terminal/Ocean.terminal similarity index 100% rename from iterm2colors/terminal/Ocean.terminal rename to old_work/iterm2colors/terminal/Ocean.terminal diff --git a/iterm2colors/terminal/OceanicMaterial.terminal b/old_work/iterm2colors/terminal/OceanicMaterial.terminal similarity index 100% rename from iterm2colors/terminal/OceanicMaterial.terminal rename to old_work/iterm2colors/terminal/OceanicMaterial.terminal diff --git a/iterm2colors/terminal/Ollie.terminal b/old_work/iterm2colors/terminal/Ollie.terminal similarity index 100% rename from iterm2colors/terminal/Ollie.terminal rename to old_work/iterm2colors/terminal/Ollie.terminal diff --git a/iterm2colors/terminal/OneHalfDark.terminal b/old_work/iterm2colors/terminal/OneHalfDark.terminal similarity index 100% rename from iterm2colors/terminal/OneHalfDark.terminal rename to old_work/iterm2colors/terminal/OneHalfDark.terminal diff --git a/iterm2colors/terminal/OneHalfLight.terminal b/old_work/iterm2colors/terminal/OneHalfLight.terminal similarity index 100% rename from iterm2colors/terminal/OneHalfLight.terminal rename to old_work/iterm2colors/terminal/OneHalfLight.terminal diff --git a/iterm2colors/terminal/Parasio Dark.terminal b/old_work/iterm2colors/terminal/Parasio Dark.terminal similarity index 100% rename from iterm2colors/terminal/Parasio Dark.terminal rename to old_work/iterm2colors/terminal/Parasio Dark.terminal diff --git a/iterm2colors/terminal/PaulMillr.terminal b/old_work/iterm2colors/terminal/PaulMillr.terminal similarity index 100% rename from iterm2colors/terminal/PaulMillr.terminal rename to old_work/iterm2colors/terminal/PaulMillr.terminal diff --git a/iterm2colors/terminal/PencilDark.terminal b/old_work/iterm2colors/terminal/PencilDark.terminal similarity index 100% rename from iterm2colors/terminal/PencilDark.terminal rename to old_work/iterm2colors/terminal/PencilDark.terminal diff --git a/iterm2colors/terminal/PencilLight.terminal b/old_work/iterm2colors/terminal/PencilLight.terminal similarity index 100% rename from iterm2colors/terminal/PencilLight.terminal rename to old_work/iterm2colors/terminal/PencilLight.terminal diff --git a/iterm2colors/terminal/Piatto Light.terminal b/old_work/iterm2colors/terminal/Piatto Light.terminal similarity index 100% rename from iterm2colors/terminal/Piatto Light.terminal rename to old_work/iterm2colors/terminal/Piatto Light.terminal diff --git a/iterm2colors/terminal/Pnevma.terminal b/old_work/iterm2colors/terminal/Pnevma.terminal similarity index 100% rename from iterm2colors/terminal/Pnevma.terminal rename to old_work/iterm2colors/terminal/Pnevma.terminal diff --git a/iterm2colors/terminal/Pro.terminal b/old_work/iterm2colors/terminal/Pro.terminal similarity index 100% rename from iterm2colors/terminal/Pro.terminal rename to old_work/iterm2colors/terminal/Pro.terminal diff --git a/iterm2colors/terminal/Red Alert.terminal b/old_work/iterm2colors/terminal/Red Alert.terminal similarity index 100% rename from iterm2colors/terminal/Red Alert.terminal rename to old_work/iterm2colors/terminal/Red Alert.terminal diff --git a/iterm2colors/terminal/Red Sands.terminal b/old_work/iterm2colors/terminal/Red Sands.terminal similarity index 100% rename from iterm2colors/terminal/Red Sands.terminal rename to old_work/iterm2colors/terminal/Red Sands.terminal diff --git a/iterm2colors/terminal/Rippedcasts.terminal b/old_work/iterm2colors/terminal/Rippedcasts.terminal similarity index 100% rename from iterm2colors/terminal/Rippedcasts.terminal rename to old_work/iterm2colors/terminal/Rippedcasts.terminal diff --git a/iterm2colors/terminal/Royal.terminal b/old_work/iterm2colors/terminal/Royal.terminal similarity index 100% rename from iterm2colors/terminal/Royal.terminal rename to old_work/iterm2colors/terminal/Royal.terminal diff --git a/iterm2colors/terminal/SeaShells.terminal b/old_work/iterm2colors/terminal/SeaShells.terminal similarity index 100% rename from iterm2colors/terminal/SeaShells.terminal rename to old_work/iterm2colors/terminal/SeaShells.terminal diff --git a/iterm2colors/terminal/Seafoam Pastel.terminal b/old_work/iterm2colors/terminal/Seafoam Pastel.terminal similarity index 100% rename from iterm2colors/terminal/Seafoam Pastel.terminal rename to old_work/iterm2colors/terminal/Seafoam Pastel.terminal diff --git a/iterm2colors/terminal/Seti.terminal b/old_work/iterm2colors/terminal/Seti.terminal similarity index 100% rename from iterm2colors/terminal/Seti.terminal rename to old_work/iterm2colors/terminal/Seti.terminal diff --git a/iterm2colors/terminal/Shaman.terminal b/old_work/iterm2colors/terminal/Shaman.terminal similarity index 100% rename from iterm2colors/terminal/Shaman.terminal rename to old_work/iterm2colors/terminal/Shaman.terminal diff --git a/iterm2colors/terminal/Slate.terminal b/old_work/iterm2colors/terminal/Slate.terminal similarity index 100% rename from iterm2colors/terminal/Slate.terminal rename to old_work/iterm2colors/terminal/Slate.terminal diff --git a/iterm2colors/terminal/Smyck.terminal b/old_work/iterm2colors/terminal/Smyck.terminal similarity index 100% rename from iterm2colors/terminal/Smyck.terminal rename to old_work/iterm2colors/terminal/Smyck.terminal diff --git a/iterm2colors/terminal/SoftServer.terminal b/old_work/iterm2colors/terminal/SoftServer.terminal similarity index 100% rename from iterm2colors/terminal/SoftServer.terminal rename to old_work/iterm2colors/terminal/SoftServer.terminal diff --git a/iterm2colors/terminal/Solarized Darcula.terminal b/old_work/iterm2colors/terminal/Solarized Darcula.terminal similarity index 100% rename from iterm2colors/terminal/Solarized Darcula.terminal rename to old_work/iterm2colors/terminal/Solarized Darcula.terminal diff --git a/iterm2colors/terminal/Solarized Dark - Patched.terminal b/old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal similarity index 100% rename from iterm2colors/terminal/Solarized Dark - Patched.terminal rename to old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal diff --git a/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal b/old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal similarity index 100% rename from iterm2colors/terminal/Solarized Dark Higher Contrast.terminal rename to old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal diff --git a/iterm2colors/terminal/Solarized Dark.terminal b/old_work/iterm2colors/terminal/Solarized Dark.terminal similarity index 100% rename from iterm2colors/terminal/Solarized Dark.terminal rename to old_work/iterm2colors/terminal/Solarized Dark.terminal diff --git a/iterm2colors/terminal/Solarized Light.terminal b/old_work/iterm2colors/terminal/Solarized Light.terminal similarity index 100% rename from iterm2colors/terminal/Solarized Light.terminal rename to old_work/iterm2colors/terminal/Solarized Light.terminal diff --git a/iterm2colors/terminal/SpaceGray Eighties Dull.terminal b/old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal similarity index 100% rename from iterm2colors/terminal/SpaceGray Eighties Dull.terminal rename to old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal diff --git a/iterm2colors/terminal/SpaceGray Eighties.terminal b/old_work/iterm2colors/terminal/SpaceGray Eighties.terminal similarity index 100% rename from iterm2colors/terminal/SpaceGray Eighties.terminal rename to old_work/iterm2colors/terminal/SpaceGray Eighties.terminal diff --git a/iterm2colors/terminal/SpaceGray.terminal b/old_work/iterm2colors/terminal/SpaceGray.terminal similarity index 100% rename from iterm2colors/terminal/SpaceGray.terminal rename to old_work/iterm2colors/terminal/SpaceGray.terminal diff --git a/iterm2colors/terminal/Spacedust.terminal b/old_work/iterm2colors/terminal/Spacedust.terminal similarity index 100% rename from iterm2colors/terminal/Spacedust.terminal rename to old_work/iterm2colors/terminal/Spacedust.terminal diff --git a/iterm2colors/terminal/Spiderman.terminal b/old_work/iterm2colors/terminal/Spiderman.terminal similarity index 100% rename from iterm2colors/terminal/Spiderman.terminal rename to old_work/iterm2colors/terminal/Spiderman.terminal diff --git a/iterm2colors/terminal/Spring.terminal b/old_work/iterm2colors/terminal/Spring.terminal similarity index 100% rename from iterm2colors/terminal/Spring.terminal rename to old_work/iterm2colors/terminal/Spring.terminal diff --git a/iterm2colors/terminal/Square.terminal b/old_work/iterm2colors/terminal/Square.terminal similarity index 100% rename from iterm2colors/terminal/Square.terminal rename to old_work/iterm2colors/terminal/Square.terminal diff --git a/iterm2colors/terminal/Sundried.terminal b/old_work/iterm2colors/terminal/Sundried.terminal similarity index 100% rename from iterm2colors/terminal/Sundried.terminal rename to old_work/iterm2colors/terminal/Sundried.terminal diff --git a/iterm2colors/terminal/Symfonic.terminal b/old_work/iterm2colors/terminal/Symfonic.terminal similarity index 100% rename from iterm2colors/terminal/Symfonic.terminal rename to old_work/iterm2colors/terminal/Symfonic.terminal diff --git a/iterm2colors/terminal/Teerb.terminal b/old_work/iterm2colors/terminal/Teerb.terminal similarity index 100% rename from iterm2colors/terminal/Teerb.terminal rename to old_work/iterm2colors/terminal/Teerb.terminal diff --git a/iterm2colors/terminal/Terminal Basic.terminal b/old_work/iterm2colors/terminal/Terminal Basic.terminal similarity index 100% rename from iterm2colors/terminal/Terminal Basic.terminal rename to old_work/iterm2colors/terminal/Terminal Basic.terminal diff --git a/iterm2colors/terminal/Thayer Bright.terminal b/old_work/iterm2colors/terminal/Thayer Bright.terminal similarity index 100% rename from iterm2colors/terminal/Thayer Bright.terminal rename to old_work/iterm2colors/terminal/Thayer Bright.terminal diff --git a/iterm2colors/terminal/The Hulk.terminal b/old_work/iterm2colors/terminal/The Hulk.terminal similarity index 100% rename from iterm2colors/terminal/The Hulk.terminal rename to old_work/iterm2colors/terminal/The Hulk.terminal diff --git a/iterm2colors/terminal/Tomorrow Night Blue.terminal b/old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal similarity index 100% rename from iterm2colors/terminal/Tomorrow Night Blue.terminal rename to old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal diff --git a/iterm2colors/terminal/Tomorrow Night Bright.terminal b/old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal similarity index 100% rename from iterm2colors/terminal/Tomorrow Night Bright.terminal rename to old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal diff --git a/iterm2colors/terminal/Tomorrow Night Eighties.terminal b/old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal similarity index 100% rename from iterm2colors/terminal/Tomorrow Night Eighties.terminal rename to old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal diff --git a/iterm2colors/terminal/Tomorrow Night.terminal b/old_work/iterm2colors/terminal/Tomorrow Night.terminal similarity index 100% rename from iterm2colors/terminal/Tomorrow Night.terminal rename to old_work/iterm2colors/terminal/Tomorrow Night.terminal diff --git a/iterm2colors/terminal/Tomorrow.terminal b/old_work/iterm2colors/terminal/Tomorrow.terminal similarity index 100% rename from iterm2colors/terminal/Tomorrow.terminal rename to old_work/iterm2colors/terminal/Tomorrow.terminal diff --git a/iterm2colors/terminal/ToyChest.terminal b/old_work/iterm2colors/terminal/ToyChest.terminal similarity index 100% rename from iterm2colors/terminal/ToyChest.terminal rename to old_work/iterm2colors/terminal/ToyChest.terminal diff --git a/iterm2colors/terminal/Treehouse.terminal b/old_work/iterm2colors/terminal/Treehouse.terminal similarity index 100% rename from iterm2colors/terminal/Treehouse.terminal rename to old_work/iterm2colors/terminal/Treehouse.terminal diff --git a/iterm2colors/terminal/Twilight.terminal b/old_work/iterm2colors/terminal/Twilight.terminal similarity index 100% rename from iterm2colors/terminal/Twilight.terminal rename to old_work/iterm2colors/terminal/Twilight.terminal diff --git a/iterm2colors/terminal/Ubuntu.terminal b/old_work/iterm2colors/terminal/Ubuntu.terminal similarity index 100% rename from iterm2colors/terminal/Ubuntu.terminal rename to old_work/iterm2colors/terminal/Ubuntu.terminal diff --git a/iterm2colors/terminal/Urple.terminal b/old_work/iterm2colors/terminal/Urple.terminal similarity index 100% rename from iterm2colors/terminal/Urple.terminal rename to old_work/iterm2colors/terminal/Urple.terminal diff --git a/iterm2colors/terminal/Vaughn.terminal b/old_work/iterm2colors/terminal/Vaughn.terminal similarity index 100% rename from iterm2colors/terminal/Vaughn.terminal rename to old_work/iterm2colors/terminal/Vaughn.terminal diff --git a/iterm2colors/terminal/VibrantInk.terminal b/old_work/iterm2colors/terminal/VibrantInk.terminal similarity index 100% rename from iterm2colors/terminal/VibrantInk.terminal rename to old_work/iterm2colors/terminal/VibrantInk.terminal diff --git a/iterm2colors/terminal/WarmNeon.terminal b/old_work/iterm2colors/terminal/WarmNeon.terminal similarity index 100% rename from iterm2colors/terminal/WarmNeon.terminal rename to old_work/iterm2colors/terminal/WarmNeon.terminal diff --git a/iterm2colors/terminal/Wez.terminal b/old_work/iterm2colors/terminal/Wez.terminal similarity index 100% rename from iterm2colors/terminal/Wez.terminal rename to old_work/iterm2colors/terminal/Wez.terminal diff --git a/iterm2colors/terminal/WildCherry.terminal b/old_work/iterm2colors/terminal/WildCherry.terminal similarity index 100% rename from iterm2colors/terminal/WildCherry.terminal rename to old_work/iterm2colors/terminal/WildCherry.terminal diff --git a/iterm2colors/terminal/Wombat.terminal b/old_work/iterm2colors/terminal/Wombat.terminal similarity index 100% rename from iterm2colors/terminal/Wombat.terminal rename to old_work/iterm2colors/terminal/Wombat.terminal diff --git a/iterm2colors/terminal/Wryan.terminal b/old_work/iterm2colors/terminal/Wryan.terminal similarity index 100% rename from iterm2colors/terminal/Wryan.terminal rename to old_work/iterm2colors/terminal/Wryan.terminal diff --git a/iterm2colors/terminal/Zenburn.terminal b/old_work/iterm2colors/terminal/Zenburn.terminal similarity index 100% rename from iterm2colors/terminal/Zenburn.terminal rename to old_work/iterm2colors/terminal/Zenburn.terminal diff --git a/iterm2colors/terminal/ayu.terminal b/old_work/iterm2colors/terminal/ayu.terminal similarity index 100% rename from iterm2colors/terminal/ayu.terminal rename to old_work/iterm2colors/terminal/ayu.terminal diff --git a/iterm2colors/terminal/idleToes.terminal b/old_work/iterm2colors/terminal/idleToes.terminal similarity index 100% rename from iterm2colors/terminal/idleToes.terminal rename to old_work/iterm2colors/terminal/idleToes.terminal diff --git a/iterm2colors/terminator/3024 Day.config b/old_work/iterm2colors/terminator/3024 Day.config similarity index 100% rename from iterm2colors/terminator/3024 Day.config rename to old_work/iterm2colors/terminator/3024 Day.config diff --git a/iterm2colors/terminator/3024 Night.config b/old_work/iterm2colors/terminator/3024 Night.config similarity index 100% rename from iterm2colors/terminator/3024 Night.config rename to old_work/iterm2colors/terminator/3024 Night.config diff --git a/iterm2colors/terminator/AdventureTime.config b/old_work/iterm2colors/terminator/AdventureTime.config similarity index 100% rename from iterm2colors/terminator/AdventureTime.config rename to old_work/iterm2colors/terminator/AdventureTime.config diff --git a/iterm2colors/terminator/Afterglow.config b/old_work/iterm2colors/terminator/Afterglow.config similarity index 100% rename from iterm2colors/terminator/Afterglow.config rename to old_work/iterm2colors/terminator/Afterglow.config diff --git a/iterm2colors/terminator/AlienBlood.config b/old_work/iterm2colors/terminator/AlienBlood.config similarity index 100% rename from iterm2colors/terminator/AlienBlood.config rename to old_work/iterm2colors/terminator/AlienBlood.config diff --git a/iterm2colors/terminator/Argonaut.config b/old_work/iterm2colors/terminator/Argonaut.config similarity index 100% rename from iterm2colors/terminator/Argonaut.config rename to old_work/iterm2colors/terminator/Argonaut.config diff --git a/iterm2colors/terminator/Arthur.config b/old_work/iterm2colors/terminator/Arthur.config similarity index 100% rename from iterm2colors/terminator/Arthur.config rename to old_work/iterm2colors/terminator/Arthur.config diff --git a/iterm2colors/terminator/AtelierSulphurpool.config b/old_work/iterm2colors/terminator/AtelierSulphurpool.config similarity index 100% rename from iterm2colors/terminator/AtelierSulphurpool.config rename to old_work/iterm2colors/terminator/AtelierSulphurpool.config diff --git a/iterm2colors/terminator/Atom.config b/old_work/iterm2colors/terminator/Atom.config similarity index 100% rename from iterm2colors/terminator/Atom.config rename to old_work/iterm2colors/terminator/Atom.config diff --git a/iterm2colors/terminator/AtomOneLight.config b/old_work/iterm2colors/terminator/AtomOneLight.config similarity index 100% rename from iterm2colors/terminator/AtomOneLight.config rename to old_work/iterm2colors/terminator/AtomOneLight.config diff --git a/iterm2colors/terminator/Batman.config b/old_work/iterm2colors/terminator/Batman.config similarity index 100% rename from iterm2colors/terminator/Batman.config rename to old_work/iterm2colors/terminator/Batman.config diff --git a/iterm2colors/terminator/Belafonte Day.config b/old_work/iterm2colors/terminator/Belafonte Day.config similarity index 100% rename from iterm2colors/terminator/Belafonte Day.config rename to old_work/iterm2colors/terminator/Belafonte Day.config diff --git a/iterm2colors/terminator/Belafonte Night.config b/old_work/iterm2colors/terminator/Belafonte Night.config similarity index 100% rename from iterm2colors/terminator/Belafonte Night.config rename to old_work/iterm2colors/terminator/Belafonte Night.config diff --git a/iterm2colors/terminator/BirdsOfParadise.config b/old_work/iterm2colors/terminator/BirdsOfParadise.config similarity index 100% rename from iterm2colors/terminator/BirdsOfParadise.config rename to old_work/iterm2colors/terminator/BirdsOfParadise.config diff --git a/iterm2colors/terminator/Blazer.config b/old_work/iterm2colors/terminator/Blazer.config similarity index 100% rename from iterm2colors/terminator/Blazer.config rename to old_work/iterm2colors/terminator/Blazer.config diff --git a/iterm2colors/terminator/Borland.config b/old_work/iterm2colors/terminator/Borland.config similarity index 100% rename from iterm2colors/terminator/Borland.config rename to old_work/iterm2colors/terminator/Borland.config diff --git a/iterm2colors/terminator/Bright Lights.config b/old_work/iterm2colors/terminator/Bright Lights.config similarity index 100% rename from iterm2colors/terminator/Bright Lights.config rename to old_work/iterm2colors/terminator/Bright Lights.config diff --git a/iterm2colors/terminator/Broadcast.config b/old_work/iterm2colors/terminator/Broadcast.config similarity index 100% rename from iterm2colors/terminator/Broadcast.config rename to old_work/iterm2colors/terminator/Broadcast.config diff --git a/iterm2colors/terminator/Brogrammer.config b/old_work/iterm2colors/terminator/Brogrammer.config similarity index 100% rename from iterm2colors/terminator/Brogrammer.config rename to old_work/iterm2colors/terminator/Brogrammer.config diff --git a/iterm2colors/terminator/C64.config b/old_work/iterm2colors/terminator/C64.config similarity index 100% rename from iterm2colors/terminator/C64.config rename to old_work/iterm2colors/terminator/C64.config diff --git a/iterm2colors/terminator/CLRS.config b/old_work/iterm2colors/terminator/CLRS.config similarity index 100% rename from iterm2colors/terminator/CLRS.config rename to old_work/iterm2colors/terminator/CLRS.config diff --git a/iterm2colors/terminator/Chalk.config b/old_work/iterm2colors/terminator/Chalk.config similarity index 100% rename from iterm2colors/terminator/Chalk.config rename to old_work/iterm2colors/terminator/Chalk.config diff --git a/iterm2colors/terminator/Chalkboard.config b/old_work/iterm2colors/terminator/Chalkboard.config similarity index 100% rename from iterm2colors/terminator/Chalkboard.config rename to old_work/iterm2colors/terminator/Chalkboard.config diff --git a/iterm2colors/terminator/Ciapre.config b/old_work/iterm2colors/terminator/Ciapre.config similarity index 100% rename from iterm2colors/terminator/Ciapre.config rename to old_work/iterm2colors/terminator/Ciapre.config diff --git a/iterm2colors/terminator/Cobalt Neon.config b/old_work/iterm2colors/terminator/Cobalt Neon.config similarity index 100% rename from iterm2colors/terminator/Cobalt Neon.config rename to old_work/iterm2colors/terminator/Cobalt Neon.config diff --git a/iterm2colors/terminator/Cobalt2.config b/old_work/iterm2colors/terminator/Cobalt2.config similarity index 100% rename from iterm2colors/terminator/Cobalt2.config rename to old_work/iterm2colors/terminator/Cobalt2.config diff --git a/iterm2colors/terminator/CrayonPonyFish.config b/old_work/iterm2colors/terminator/CrayonPonyFish.config similarity index 100% rename from iterm2colors/terminator/CrayonPonyFish.config rename to old_work/iterm2colors/terminator/CrayonPonyFish.config diff --git a/iterm2colors/terminator/Dark Pastel.config b/old_work/iterm2colors/terminator/Dark Pastel.config similarity index 100% rename from iterm2colors/terminator/Dark Pastel.config rename to old_work/iterm2colors/terminator/Dark Pastel.config diff --git a/iterm2colors/terminator/Darkside.config b/old_work/iterm2colors/terminator/Darkside.config similarity index 100% rename from iterm2colors/terminator/Darkside.config rename to old_work/iterm2colors/terminator/Darkside.config diff --git a/iterm2colors/terminator/Desert.config b/old_work/iterm2colors/terminator/Desert.config similarity index 100% rename from iterm2colors/terminator/Desert.config rename to old_work/iterm2colors/terminator/Desert.config diff --git a/iterm2colors/terminator/DimmedMonokai.config b/old_work/iterm2colors/terminator/DimmedMonokai.config similarity index 100% rename from iterm2colors/terminator/DimmedMonokai.config rename to old_work/iterm2colors/terminator/DimmedMonokai.config diff --git a/iterm2colors/terminator/DotGov.config b/old_work/iterm2colors/terminator/DotGov.config similarity index 100% rename from iterm2colors/terminator/DotGov.config rename to old_work/iterm2colors/terminator/DotGov.config diff --git a/iterm2colors/terminator/Dracula.config b/old_work/iterm2colors/terminator/Dracula.config similarity index 100% rename from iterm2colors/terminator/Dracula.config rename to old_work/iterm2colors/terminator/Dracula.config diff --git a/iterm2colors/terminator/Duotone Dark.config b/old_work/iterm2colors/terminator/Duotone Dark.config similarity index 100% rename from iterm2colors/terminator/Duotone Dark.config rename to old_work/iterm2colors/terminator/Duotone Dark.config diff --git a/iterm2colors/terminator/ENCOM.config b/old_work/iterm2colors/terminator/ENCOM.config similarity index 100% rename from iterm2colors/terminator/ENCOM.config rename to old_work/iterm2colors/terminator/ENCOM.config diff --git a/iterm2colors/terminator/Earthsong.config b/old_work/iterm2colors/terminator/Earthsong.config similarity index 100% rename from iterm2colors/terminator/Earthsong.config rename to old_work/iterm2colors/terminator/Earthsong.config diff --git a/iterm2colors/terminator/Elemental.config b/old_work/iterm2colors/terminator/Elemental.config similarity index 100% rename from iterm2colors/terminator/Elemental.config rename to old_work/iterm2colors/terminator/Elemental.config diff --git a/iterm2colors/terminator/Elementary.config b/old_work/iterm2colors/terminator/Elementary.config similarity index 100% rename from iterm2colors/terminator/Elementary.config rename to old_work/iterm2colors/terminator/Elementary.config diff --git a/iterm2colors/terminator/Espresso Libre.config b/old_work/iterm2colors/terminator/Espresso Libre.config similarity index 100% rename from iterm2colors/terminator/Espresso Libre.config rename to old_work/iterm2colors/terminator/Espresso Libre.config diff --git a/iterm2colors/terminator/Espresso.config b/old_work/iterm2colors/terminator/Espresso.config similarity index 100% rename from iterm2colors/terminator/Espresso.config rename to old_work/iterm2colors/terminator/Espresso.config diff --git a/iterm2colors/terminator/Fideloper.config b/old_work/iterm2colors/terminator/Fideloper.config similarity index 100% rename from iterm2colors/terminator/Fideloper.config rename to old_work/iterm2colors/terminator/Fideloper.config diff --git a/iterm2colors/terminator/FirefoxDev.config b/old_work/iterm2colors/terminator/FirefoxDev.config similarity index 100% rename from iterm2colors/terminator/FirefoxDev.config rename to old_work/iterm2colors/terminator/FirefoxDev.config diff --git a/iterm2colors/terminator/Firewatch.config b/old_work/iterm2colors/terminator/Firewatch.config similarity index 100% rename from iterm2colors/terminator/Firewatch.config rename to old_work/iterm2colors/terminator/Firewatch.config diff --git a/iterm2colors/terminator/FishTank.config b/old_work/iterm2colors/terminator/FishTank.config similarity index 100% rename from iterm2colors/terminator/FishTank.config rename to old_work/iterm2colors/terminator/FishTank.config diff --git a/iterm2colors/terminator/Flat.config b/old_work/iterm2colors/terminator/Flat.config similarity index 100% rename from iterm2colors/terminator/Flat.config rename to old_work/iterm2colors/terminator/Flat.config diff --git a/iterm2colors/terminator/Flatland.config b/old_work/iterm2colors/terminator/Flatland.config similarity index 100% rename from iterm2colors/terminator/Flatland.config rename to old_work/iterm2colors/terminator/Flatland.config diff --git a/iterm2colors/terminator/Floraverse.config b/old_work/iterm2colors/terminator/Floraverse.config similarity index 100% rename from iterm2colors/terminator/Floraverse.config rename to old_work/iterm2colors/terminator/Floraverse.config diff --git a/iterm2colors/terminator/ForestBlue.config b/old_work/iterm2colors/terminator/ForestBlue.config similarity index 100% rename from iterm2colors/terminator/ForestBlue.config rename to old_work/iterm2colors/terminator/ForestBlue.config diff --git a/iterm2colors/terminator/FrontEndDelight.config b/old_work/iterm2colors/terminator/FrontEndDelight.config similarity index 100% rename from iterm2colors/terminator/FrontEndDelight.config rename to old_work/iterm2colors/terminator/FrontEndDelight.config diff --git a/iterm2colors/terminator/FunForrest.config b/old_work/iterm2colors/terminator/FunForrest.config similarity index 100% rename from iterm2colors/terminator/FunForrest.config rename to old_work/iterm2colors/terminator/FunForrest.config diff --git a/iterm2colors/terminator/Galaxy.config b/old_work/iterm2colors/terminator/Galaxy.config similarity index 100% rename from iterm2colors/terminator/Galaxy.config rename to old_work/iterm2colors/terminator/Galaxy.config diff --git a/iterm2colors/terminator/Github.config b/old_work/iterm2colors/terminator/Github.config similarity index 100% rename from iterm2colors/terminator/Github.config rename to old_work/iterm2colors/terminator/Github.config diff --git a/iterm2colors/terminator/Glacier.config b/old_work/iterm2colors/terminator/Glacier.config similarity index 100% rename from iterm2colors/terminator/Glacier.config rename to old_work/iterm2colors/terminator/Glacier.config diff --git a/iterm2colors/terminator/Grape.config b/old_work/iterm2colors/terminator/Grape.config similarity index 100% rename from iterm2colors/terminator/Grape.config rename to old_work/iterm2colors/terminator/Grape.config diff --git a/iterm2colors/terminator/Grass.config b/old_work/iterm2colors/terminator/Grass.config similarity index 100% rename from iterm2colors/terminator/Grass.config rename to old_work/iterm2colors/terminator/Grass.config diff --git a/iterm2colors/terminator/Gruvbox Dark.config b/old_work/iterm2colors/terminator/Gruvbox Dark.config similarity index 100% rename from iterm2colors/terminator/Gruvbox Dark.config rename to old_work/iterm2colors/terminator/Gruvbox Dark.config diff --git a/iterm2colors/terminator/Hardcore.config b/old_work/iterm2colors/terminator/Hardcore.config similarity index 100% rename from iterm2colors/terminator/Hardcore.config rename to old_work/iterm2colors/terminator/Hardcore.config diff --git a/iterm2colors/terminator/Harper.config b/old_work/iterm2colors/terminator/Harper.config similarity index 100% rename from iterm2colors/terminator/Harper.config rename to old_work/iterm2colors/terminator/Harper.config diff --git a/iterm2colors/terminator/Highway.config b/old_work/iterm2colors/terminator/Highway.config similarity index 100% rename from iterm2colors/terminator/Highway.config rename to old_work/iterm2colors/terminator/Highway.config diff --git a/iterm2colors/terminator/Hipster Green.config b/old_work/iterm2colors/terminator/Hipster Green.config similarity index 100% rename from iterm2colors/terminator/Hipster Green.config rename to old_work/iterm2colors/terminator/Hipster Green.config diff --git a/iterm2colors/terminator/Homebrew.config b/old_work/iterm2colors/terminator/Homebrew.config similarity index 100% rename from iterm2colors/terminator/Homebrew.config rename to old_work/iterm2colors/terminator/Homebrew.config diff --git a/iterm2colors/terminator/Hurtado.config b/old_work/iterm2colors/terminator/Hurtado.config similarity index 100% rename from iterm2colors/terminator/Hurtado.config rename to old_work/iterm2colors/terminator/Hurtado.config diff --git a/iterm2colors/terminator/Hybrid.config b/old_work/iterm2colors/terminator/Hybrid.config similarity index 100% rename from iterm2colors/terminator/Hybrid.config rename to old_work/iterm2colors/terminator/Hybrid.config diff --git a/iterm2colors/terminator/IC_Green_PPL.config b/old_work/iterm2colors/terminator/IC_Green_PPL.config similarity index 100% rename from iterm2colors/terminator/IC_Green_PPL.config rename to old_work/iterm2colors/terminator/IC_Green_PPL.config diff --git a/iterm2colors/terminator/IC_Orange_PPL.config b/old_work/iterm2colors/terminator/IC_Orange_PPL.config similarity index 100% rename from iterm2colors/terminator/IC_Orange_PPL.config rename to old_work/iterm2colors/terminator/IC_Orange_PPL.config diff --git a/iterm2colors/terminator/IR_Black.config b/old_work/iterm2colors/terminator/IR_Black.config similarity index 100% rename from iterm2colors/terminator/IR_Black.config rename to old_work/iterm2colors/terminator/IR_Black.config diff --git a/iterm2colors/terminator/Jackie Brown.config b/old_work/iterm2colors/terminator/Jackie Brown.config similarity index 100% rename from iterm2colors/terminator/Jackie Brown.config rename to old_work/iterm2colors/terminator/Jackie Brown.config diff --git a/iterm2colors/terminator/Japanesque.config b/old_work/iterm2colors/terminator/Japanesque.config similarity index 100% rename from iterm2colors/terminator/Japanesque.config rename to old_work/iterm2colors/terminator/Japanesque.config diff --git a/iterm2colors/terminator/Jellybeans.config b/old_work/iterm2colors/terminator/Jellybeans.config similarity index 100% rename from iterm2colors/terminator/Jellybeans.config rename to old_work/iterm2colors/terminator/Jellybeans.config diff --git a/iterm2colors/terminator/JetBrains Darcula.config b/old_work/iterm2colors/terminator/JetBrains Darcula.config similarity index 100% rename from iterm2colors/terminator/JetBrains Darcula.config rename to old_work/iterm2colors/terminator/JetBrains Darcula.config diff --git a/iterm2colors/terminator/Kibble.config b/old_work/iterm2colors/terminator/Kibble.config similarity index 100% rename from iterm2colors/terminator/Kibble.config rename to old_work/iterm2colors/terminator/Kibble.config diff --git a/iterm2colors/terminator/Later This Evening.config b/old_work/iterm2colors/terminator/Later This Evening.config similarity index 100% rename from iterm2colors/terminator/Later This Evening.config rename to old_work/iterm2colors/terminator/Later This Evening.config diff --git a/iterm2colors/terminator/Lavandula.config b/old_work/iterm2colors/terminator/Lavandula.config similarity index 100% rename from iterm2colors/terminator/Lavandula.config rename to old_work/iterm2colors/terminator/Lavandula.config diff --git a/iterm2colors/terminator/LiquidCarbon.config b/old_work/iterm2colors/terminator/LiquidCarbon.config similarity index 100% rename from iterm2colors/terminator/LiquidCarbon.config rename to old_work/iterm2colors/terminator/LiquidCarbon.config diff --git a/iterm2colors/terminator/LiquidCarbonTransparent.config b/old_work/iterm2colors/terminator/LiquidCarbonTransparent.config similarity index 100% rename from iterm2colors/terminator/LiquidCarbonTransparent.config rename to old_work/iterm2colors/terminator/LiquidCarbonTransparent.config diff --git a/iterm2colors/terminator/LiquidCarbonTransparentInverse.config b/old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config similarity index 100% rename from iterm2colors/terminator/LiquidCarbonTransparentInverse.config rename to old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config diff --git a/iterm2colors/terminator/Man Page.config b/old_work/iterm2colors/terminator/Man Page.config similarity index 100% rename from iterm2colors/terminator/Man Page.config rename to old_work/iterm2colors/terminator/Man Page.config diff --git a/iterm2colors/terminator/Material.config b/old_work/iterm2colors/terminator/Material.config similarity index 100% rename from iterm2colors/terminator/Material.config rename to old_work/iterm2colors/terminator/Material.config diff --git a/iterm2colors/terminator/MaterialDark.config b/old_work/iterm2colors/terminator/MaterialDark.config similarity index 100% rename from iterm2colors/terminator/MaterialDark.config rename to old_work/iterm2colors/terminator/MaterialDark.config diff --git a/iterm2colors/terminator/Mathias.config b/old_work/iterm2colors/terminator/Mathias.config similarity index 100% rename from iterm2colors/terminator/Mathias.config rename to old_work/iterm2colors/terminator/Mathias.config diff --git a/iterm2colors/terminator/Medallion.config b/old_work/iterm2colors/terminator/Medallion.config similarity index 100% rename from iterm2colors/terminator/Medallion.config rename to old_work/iterm2colors/terminator/Medallion.config diff --git a/iterm2colors/terminator/Misterioso.config b/old_work/iterm2colors/terminator/Misterioso.config similarity index 100% rename from iterm2colors/terminator/Misterioso.config rename to old_work/iterm2colors/terminator/Misterioso.config diff --git a/iterm2colors/terminator/Molokai.config b/old_work/iterm2colors/terminator/Molokai.config similarity index 100% rename from iterm2colors/terminator/Molokai.config rename to old_work/iterm2colors/terminator/Molokai.config diff --git a/iterm2colors/terminator/MonaLisa.config b/old_work/iterm2colors/terminator/MonaLisa.config similarity index 100% rename from iterm2colors/terminator/MonaLisa.config rename to old_work/iterm2colors/terminator/MonaLisa.config diff --git a/iterm2colors/terminator/Monokai Soda.config b/old_work/iterm2colors/terminator/Monokai Soda.config similarity index 100% rename from iterm2colors/terminator/Monokai Soda.config rename to old_work/iterm2colors/terminator/Monokai Soda.config diff --git a/iterm2colors/terminator/Monokai Vivid.config b/old_work/iterm2colors/terminator/Monokai Vivid.config similarity index 100% rename from iterm2colors/terminator/Monokai Vivid.config rename to old_work/iterm2colors/terminator/Monokai Vivid.config diff --git a/iterm2colors/terminator/N0tch2k.config b/old_work/iterm2colors/terminator/N0tch2k.config similarity index 100% rename from iterm2colors/terminator/N0tch2k.config rename to old_work/iterm2colors/terminator/N0tch2k.config diff --git a/iterm2colors/terminator/Neopolitan.config b/old_work/iterm2colors/terminator/Neopolitan.config similarity index 100% rename from iterm2colors/terminator/Neopolitan.config rename to old_work/iterm2colors/terminator/Neopolitan.config diff --git a/iterm2colors/terminator/Neutron.config b/old_work/iterm2colors/terminator/Neutron.config similarity index 100% rename from iterm2colors/terminator/Neutron.config rename to old_work/iterm2colors/terminator/Neutron.config diff --git a/iterm2colors/terminator/NightLion v1.config b/old_work/iterm2colors/terminator/NightLion v1.config similarity index 100% rename from iterm2colors/terminator/NightLion v1.config rename to old_work/iterm2colors/terminator/NightLion v1.config diff --git a/iterm2colors/terminator/NightLion v2.config b/old_work/iterm2colors/terminator/NightLion v2.config similarity index 100% rename from iterm2colors/terminator/NightLion v2.config rename to old_work/iterm2colors/terminator/NightLion v2.config diff --git a/iterm2colors/terminator/Novel.config b/old_work/iterm2colors/terminator/Novel.config similarity index 100% rename from iterm2colors/terminator/Novel.config rename to old_work/iterm2colors/terminator/Novel.config diff --git a/iterm2colors/terminator/Obsidian.config b/old_work/iterm2colors/terminator/Obsidian.config similarity index 100% rename from iterm2colors/terminator/Obsidian.config rename to old_work/iterm2colors/terminator/Obsidian.config diff --git a/iterm2colors/terminator/Ocean.config b/old_work/iterm2colors/terminator/Ocean.config similarity index 100% rename from iterm2colors/terminator/Ocean.config rename to old_work/iterm2colors/terminator/Ocean.config diff --git a/iterm2colors/terminator/OceanicMaterial.config b/old_work/iterm2colors/terminator/OceanicMaterial.config similarity index 100% rename from iterm2colors/terminator/OceanicMaterial.config rename to old_work/iterm2colors/terminator/OceanicMaterial.config diff --git a/iterm2colors/terminator/Ollie.config b/old_work/iterm2colors/terminator/Ollie.config similarity index 100% rename from iterm2colors/terminator/Ollie.config rename to old_work/iterm2colors/terminator/Ollie.config diff --git a/iterm2colors/terminator/OneHalfDark.config b/old_work/iterm2colors/terminator/OneHalfDark.config similarity index 100% rename from iterm2colors/terminator/OneHalfDark.config rename to old_work/iterm2colors/terminator/OneHalfDark.config diff --git a/iterm2colors/terminator/OneHalfLight.config b/old_work/iterm2colors/terminator/OneHalfLight.config similarity index 100% rename from iterm2colors/terminator/OneHalfLight.config rename to old_work/iterm2colors/terminator/OneHalfLight.config diff --git a/iterm2colors/terminator/Pandora.config b/old_work/iterm2colors/terminator/Pandora.config similarity index 100% rename from iterm2colors/terminator/Pandora.config rename to old_work/iterm2colors/terminator/Pandora.config diff --git a/iterm2colors/terminator/Paraiso Dark.config b/old_work/iterm2colors/terminator/Paraiso Dark.config similarity index 100% rename from iterm2colors/terminator/Paraiso Dark.config rename to old_work/iterm2colors/terminator/Paraiso Dark.config diff --git a/iterm2colors/terminator/Parasio Dark.config b/old_work/iterm2colors/terminator/Parasio Dark.config similarity index 100% rename from iterm2colors/terminator/Parasio Dark.config rename to old_work/iterm2colors/terminator/Parasio Dark.config diff --git a/iterm2colors/terminator/PaulMillr.config b/old_work/iterm2colors/terminator/PaulMillr.config similarity index 100% rename from iterm2colors/terminator/PaulMillr.config rename to old_work/iterm2colors/terminator/PaulMillr.config diff --git a/iterm2colors/terminator/PencilDark.config b/old_work/iterm2colors/terminator/PencilDark.config similarity index 100% rename from iterm2colors/terminator/PencilDark.config rename to old_work/iterm2colors/terminator/PencilDark.config diff --git a/iterm2colors/terminator/PencilLight.config b/old_work/iterm2colors/terminator/PencilLight.config similarity index 100% rename from iterm2colors/terminator/PencilLight.config rename to old_work/iterm2colors/terminator/PencilLight.config diff --git a/iterm2colors/terminator/Piatto Light.config b/old_work/iterm2colors/terminator/Piatto Light.config similarity index 100% rename from iterm2colors/terminator/Piatto Light.config rename to old_work/iterm2colors/terminator/Piatto Light.config diff --git a/iterm2colors/terminator/Pnevma.config b/old_work/iterm2colors/terminator/Pnevma.config similarity index 100% rename from iterm2colors/terminator/Pnevma.config rename to old_work/iterm2colors/terminator/Pnevma.config diff --git a/iterm2colors/terminator/Pro.config b/old_work/iterm2colors/terminator/Pro.config similarity index 100% rename from iterm2colors/terminator/Pro.config rename to old_work/iterm2colors/terminator/Pro.config diff --git a/iterm2colors/terminator/Red Alert.config b/old_work/iterm2colors/terminator/Red Alert.config similarity index 100% rename from iterm2colors/terminator/Red Alert.config rename to old_work/iterm2colors/terminator/Red Alert.config diff --git a/iterm2colors/terminator/Red Sands.config b/old_work/iterm2colors/terminator/Red Sands.config similarity index 100% rename from iterm2colors/terminator/Red Sands.config rename to old_work/iterm2colors/terminator/Red Sands.config diff --git a/iterm2colors/terminator/Rippedcasts.config b/old_work/iterm2colors/terminator/Rippedcasts.config similarity index 100% rename from iterm2colors/terminator/Rippedcasts.config rename to old_work/iterm2colors/terminator/Rippedcasts.config diff --git a/iterm2colors/terminator/Royal.config b/old_work/iterm2colors/terminator/Royal.config similarity index 100% rename from iterm2colors/terminator/Royal.config rename to old_work/iterm2colors/terminator/Royal.config diff --git a/iterm2colors/terminator/Ryuuko.config b/old_work/iterm2colors/terminator/Ryuuko.config similarity index 100% rename from iterm2colors/terminator/Ryuuko.config rename to old_work/iterm2colors/terminator/Ryuuko.config diff --git a/iterm2colors/terminator/SeaShells.config b/old_work/iterm2colors/terminator/SeaShells.config similarity index 100% rename from iterm2colors/terminator/SeaShells.config rename to old_work/iterm2colors/terminator/SeaShells.config diff --git a/iterm2colors/terminator/Seafoam Pastel.config b/old_work/iterm2colors/terminator/Seafoam Pastel.config similarity index 100% rename from iterm2colors/terminator/Seafoam Pastel.config rename to old_work/iterm2colors/terminator/Seafoam Pastel.config diff --git a/iterm2colors/terminator/Seti.config b/old_work/iterm2colors/terminator/Seti.config similarity index 100% rename from iterm2colors/terminator/Seti.config rename to old_work/iterm2colors/terminator/Seti.config diff --git a/iterm2colors/terminator/Shaman.config b/old_work/iterm2colors/terminator/Shaman.config similarity index 100% rename from iterm2colors/terminator/Shaman.config rename to old_work/iterm2colors/terminator/Shaman.config diff --git a/iterm2colors/terminator/Slate.config b/old_work/iterm2colors/terminator/Slate.config similarity index 100% rename from iterm2colors/terminator/Slate.config rename to old_work/iterm2colors/terminator/Slate.config diff --git a/iterm2colors/terminator/Smyck.config b/old_work/iterm2colors/terminator/Smyck.config similarity index 100% rename from iterm2colors/terminator/Smyck.config rename to old_work/iterm2colors/terminator/Smyck.config diff --git a/iterm2colors/terminator/SoftServer.config b/old_work/iterm2colors/terminator/SoftServer.config similarity index 100% rename from iterm2colors/terminator/SoftServer.config rename to old_work/iterm2colors/terminator/SoftServer.config diff --git a/iterm2colors/terminator/Solarized Darcula.config b/old_work/iterm2colors/terminator/Solarized Darcula.config similarity index 100% rename from iterm2colors/terminator/Solarized Darcula.config rename to old_work/iterm2colors/terminator/Solarized Darcula.config diff --git a/iterm2colors/terminator/Solarized Dark - Patched.config b/old_work/iterm2colors/terminator/Solarized Dark - Patched.config similarity index 100% rename from iterm2colors/terminator/Solarized Dark - Patched.config rename to old_work/iterm2colors/terminator/Solarized Dark - Patched.config diff --git a/iterm2colors/terminator/Solarized Dark Higher Contrast.config b/old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config similarity index 100% rename from iterm2colors/terminator/Solarized Dark Higher Contrast.config rename to old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config diff --git a/iterm2colors/terminator/Solarized Dark.config b/old_work/iterm2colors/terminator/Solarized Dark.config similarity index 100% rename from iterm2colors/terminator/Solarized Dark.config rename to old_work/iterm2colors/terminator/Solarized Dark.config diff --git a/iterm2colors/terminator/Solarized Light.config b/old_work/iterm2colors/terminator/Solarized Light.config similarity index 100% rename from iterm2colors/terminator/Solarized Light.config rename to old_work/iterm2colors/terminator/Solarized Light.config diff --git a/iterm2colors/terminator/SpaceGray Eighties Dull.config b/old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config similarity index 100% rename from iterm2colors/terminator/SpaceGray Eighties Dull.config rename to old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config diff --git a/iterm2colors/terminator/SpaceGray Eighties.config b/old_work/iterm2colors/terminator/SpaceGray Eighties.config similarity index 100% rename from iterm2colors/terminator/SpaceGray Eighties.config rename to old_work/iterm2colors/terminator/SpaceGray Eighties.config diff --git a/iterm2colors/terminator/SpaceGray.config b/old_work/iterm2colors/terminator/SpaceGray.config similarity index 100% rename from iterm2colors/terminator/SpaceGray.config rename to old_work/iterm2colors/terminator/SpaceGray.config diff --git a/iterm2colors/terminator/Spacedust.config b/old_work/iterm2colors/terminator/Spacedust.config similarity index 100% rename from iterm2colors/terminator/Spacedust.config rename to old_work/iterm2colors/terminator/Spacedust.config diff --git a/iterm2colors/terminator/Spiderman.config b/old_work/iterm2colors/terminator/Spiderman.config similarity index 100% rename from iterm2colors/terminator/Spiderman.config rename to old_work/iterm2colors/terminator/Spiderman.config diff --git a/iterm2colors/terminator/Spring.config b/old_work/iterm2colors/terminator/Spring.config similarity index 100% rename from iterm2colors/terminator/Spring.config rename to old_work/iterm2colors/terminator/Spring.config diff --git a/iterm2colors/terminator/Square.config b/old_work/iterm2colors/terminator/Square.config similarity index 100% rename from iterm2colors/terminator/Square.config rename to old_work/iterm2colors/terminator/Square.config diff --git a/iterm2colors/terminator/Sundried.config b/old_work/iterm2colors/terminator/Sundried.config similarity index 100% rename from iterm2colors/terminator/Sundried.config rename to old_work/iterm2colors/terminator/Sundried.config diff --git a/iterm2colors/terminator/Symfonic.config b/old_work/iterm2colors/terminator/Symfonic.config similarity index 100% rename from iterm2colors/terminator/Symfonic.config rename to old_work/iterm2colors/terminator/Symfonic.config diff --git a/iterm2colors/terminator/Teerb.config b/old_work/iterm2colors/terminator/Teerb.config similarity index 100% rename from iterm2colors/terminator/Teerb.config rename to old_work/iterm2colors/terminator/Teerb.config diff --git a/iterm2colors/terminator/Terminal Basic.config b/old_work/iterm2colors/terminator/Terminal Basic.config similarity index 100% rename from iterm2colors/terminator/Terminal Basic.config rename to old_work/iterm2colors/terminator/Terminal Basic.config diff --git a/iterm2colors/terminator/Thayer Bright.config b/old_work/iterm2colors/terminator/Thayer Bright.config similarity index 100% rename from iterm2colors/terminator/Thayer Bright.config rename to old_work/iterm2colors/terminator/Thayer Bright.config diff --git a/iterm2colors/terminator/The Hulk.config b/old_work/iterm2colors/terminator/The Hulk.config similarity index 100% rename from iterm2colors/terminator/The Hulk.config rename to old_work/iterm2colors/terminator/The Hulk.config diff --git a/iterm2colors/terminator/Tomorrow Night Blue.config b/old_work/iterm2colors/terminator/Tomorrow Night Blue.config similarity index 100% rename from iterm2colors/terminator/Tomorrow Night Blue.config rename to old_work/iterm2colors/terminator/Tomorrow Night Blue.config diff --git a/iterm2colors/terminator/Tomorrow Night Bright.config b/old_work/iterm2colors/terminator/Tomorrow Night Bright.config similarity index 100% rename from iterm2colors/terminator/Tomorrow Night Bright.config rename to old_work/iterm2colors/terminator/Tomorrow Night Bright.config diff --git a/iterm2colors/terminator/Tomorrow Night Eighties.config b/old_work/iterm2colors/terminator/Tomorrow Night Eighties.config similarity index 100% rename from iterm2colors/terminator/Tomorrow Night Eighties.config rename to old_work/iterm2colors/terminator/Tomorrow Night Eighties.config diff --git a/iterm2colors/terminator/Tomorrow Night.config b/old_work/iterm2colors/terminator/Tomorrow Night.config similarity index 100% rename from iterm2colors/terminator/Tomorrow Night.config rename to old_work/iterm2colors/terminator/Tomorrow Night.config diff --git a/iterm2colors/terminator/Tomorrow.config b/old_work/iterm2colors/terminator/Tomorrow.config similarity index 100% rename from iterm2colors/terminator/Tomorrow.config rename to old_work/iterm2colors/terminator/Tomorrow.config diff --git a/iterm2colors/terminator/ToyChest.config b/old_work/iterm2colors/terminator/ToyChest.config similarity index 100% rename from iterm2colors/terminator/ToyChest.config rename to old_work/iterm2colors/terminator/ToyChest.config diff --git a/iterm2colors/terminator/Treehouse.config b/old_work/iterm2colors/terminator/Treehouse.config similarity index 100% rename from iterm2colors/terminator/Treehouse.config rename to old_work/iterm2colors/terminator/Treehouse.config diff --git a/iterm2colors/terminator/Twilight.config b/old_work/iterm2colors/terminator/Twilight.config similarity index 100% rename from iterm2colors/terminator/Twilight.config rename to old_work/iterm2colors/terminator/Twilight.config diff --git a/iterm2colors/terminator/Ubuntu.config b/old_work/iterm2colors/terminator/Ubuntu.config similarity index 100% rename from iterm2colors/terminator/Ubuntu.config rename to old_work/iterm2colors/terminator/Ubuntu.config diff --git a/iterm2colors/terminator/UnderTheSea.config b/old_work/iterm2colors/terminator/UnderTheSea.config similarity index 100% rename from iterm2colors/terminator/UnderTheSea.config rename to old_work/iterm2colors/terminator/UnderTheSea.config diff --git a/iterm2colors/terminator/Urple.config b/old_work/iterm2colors/terminator/Urple.config similarity index 100% rename from iterm2colors/terminator/Urple.config rename to old_work/iterm2colors/terminator/Urple.config diff --git a/iterm2colors/terminator/Vaughn.config b/old_work/iterm2colors/terminator/Vaughn.config similarity index 100% rename from iterm2colors/terminator/Vaughn.config rename to old_work/iterm2colors/terminator/Vaughn.config diff --git a/iterm2colors/terminator/VibrantInk.config b/old_work/iterm2colors/terminator/VibrantInk.config similarity index 100% rename from iterm2colors/terminator/VibrantInk.config rename to old_work/iterm2colors/terminator/VibrantInk.config diff --git a/iterm2colors/terminator/Violet Dark.config b/old_work/iterm2colors/terminator/Violet Dark.config similarity index 100% rename from iterm2colors/terminator/Violet Dark.config rename to old_work/iterm2colors/terminator/Violet Dark.config diff --git a/iterm2colors/terminator/Violet Light.config b/old_work/iterm2colors/terminator/Violet Light.config similarity index 100% rename from iterm2colors/terminator/Violet Light.config rename to old_work/iterm2colors/terminator/Violet Light.config diff --git a/iterm2colors/terminator/WarmNeon.config b/old_work/iterm2colors/terminator/WarmNeon.config similarity index 100% rename from iterm2colors/terminator/WarmNeon.config rename to old_work/iterm2colors/terminator/WarmNeon.config diff --git a/iterm2colors/terminator/Wez.config b/old_work/iterm2colors/terminator/Wez.config similarity index 100% rename from iterm2colors/terminator/Wez.config rename to old_work/iterm2colors/terminator/Wez.config diff --git a/iterm2colors/terminator/WildCherry.config b/old_work/iterm2colors/terminator/WildCherry.config similarity index 100% rename from iterm2colors/terminator/WildCherry.config rename to old_work/iterm2colors/terminator/WildCherry.config diff --git a/iterm2colors/terminator/Wombat.config b/old_work/iterm2colors/terminator/Wombat.config similarity index 100% rename from iterm2colors/terminator/Wombat.config rename to old_work/iterm2colors/terminator/Wombat.config diff --git a/iterm2colors/terminator/Wryan.config b/old_work/iterm2colors/terminator/Wryan.config similarity index 100% rename from iterm2colors/terminator/Wryan.config rename to old_work/iterm2colors/terminator/Wryan.config diff --git a/iterm2colors/terminator/Zenburn.config b/old_work/iterm2colors/terminator/Zenburn.config similarity index 100% rename from iterm2colors/terminator/Zenburn.config rename to old_work/iterm2colors/terminator/Zenburn.config diff --git a/iterm2colors/terminator/ayu.config b/old_work/iterm2colors/terminator/ayu.config similarity index 100% rename from iterm2colors/terminator/ayu.config rename to old_work/iterm2colors/terminator/ayu.config diff --git a/iterm2colors/terminator/ayu_light.config b/old_work/iterm2colors/terminator/ayu_light.config similarity index 100% rename from iterm2colors/terminator/ayu_light.config rename to old_work/iterm2colors/terminator/ayu_light.config diff --git a/iterm2colors/terminator/deep.config b/old_work/iterm2colors/terminator/deep.config similarity index 100% rename from iterm2colors/terminator/deep.config rename to old_work/iterm2colors/terminator/deep.config diff --git a/iterm2colors/terminator/idleToes.config b/old_work/iterm2colors/terminator/idleToes.config similarity index 100% rename from iterm2colors/terminator/idleToes.config rename to old_work/iterm2colors/terminator/idleToes.config diff --git a/iterm2colors/termite/3024 b/old_work/iterm2colors/termite/3024 similarity index 100% rename from iterm2colors/termite/3024 rename to old_work/iterm2colors/termite/3024 diff --git a/iterm2colors/termite/3024 Night b/old_work/iterm2colors/termite/3024 Night similarity index 100% rename from iterm2colors/termite/3024 Night rename to old_work/iterm2colors/termite/3024 Night diff --git a/iterm2colors/termite/AdventureTime b/old_work/iterm2colors/termite/AdventureTime similarity index 100% rename from iterm2colors/termite/AdventureTime rename to old_work/iterm2colors/termite/AdventureTime diff --git a/iterm2colors/termite/Afterglow b/old_work/iterm2colors/termite/Afterglow similarity index 100% rename from iterm2colors/termite/Afterglow rename to old_work/iterm2colors/termite/Afterglow diff --git a/iterm2colors/termite/AlienBlood b/old_work/iterm2colors/termite/AlienBlood similarity index 100% rename from iterm2colors/termite/AlienBlood rename to old_work/iterm2colors/termite/AlienBlood diff --git a/iterm2colors/termite/Argonaut b/old_work/iterm2colors/termite/Argonaut similarity index 100% rename from iterm2colors/termite/Argonaut rename to old_work/iterm2colors/termite/Argonaut diff --git a/iterm2colors/termite/Arthur b/old_work/iterm2colors/termite/Arthur similarity index 100% rename from iterm2colors/termite/Arthur rename to old_work/iterm2colors/termite/Arthur diff --git a/iterm2colors/termite/AtelierSulphurpool b/old_work/iterm2colors/termite/AtelierSulphurpool similarity index 100% rename from iterm2colors/termite/AtelierSulphurpool rename to old_work/iterm2colors/termite/AtelierSulphurpool diff --git a/iterm2colors/termite/Atom b/old_work/iterm2colors/termite/Atom similarity index 100% rename from iterm2colors/termite/Atom rename to old_work/iterm2colors/termite/Atom diff --git a/iterm2colors/termite/AtomOneLight b/old_work/iterm2colors/termite/AtomOneLight similarity index 100% rename from iterm2colors/termite/AtomOneLight rename to old_work/iterm2colors/termite/AtomOneLight diff --git a/iterm2colors/termite/Batman b/old_work/iterm2colors/termite/Batman similarity index 100% rename from iterm2colors/termite/Batman rename to old_work/iterm2colors/termite/Batman diff --git a/iterm2colors/termite/Belafonte Day b/old_work/iterm2colors/termite/Belafonte Day similarity index 100% rename from iterm2colors/termite/Belafonte Day rename to old_work/iterm2colors/termite/Belafonte Day diff --git a/iterm2colors/termite/Belafonte Night b/old_work/iterm2colors/termite/Belafonte Night similarity index 100% rename from iterm2colors/termite/Belafonte Night rename to old_work/iterm2colors/termite/Belafonte Night diff --git a/iterm2colors/termite/BirdsOfParadise b/old_work/iterm2colors/termite/BirdsOfParadise similarity index 100% rename from iterm2colors/termite/BirdsOfParadise rename to old_work/iterm2colors/termite/BirdsOfParadise diff --git a/iterm2colors/termite/Blazer b/old_work/iterm2colors/termite/Blazer similarity index 100% rename from iterm2colors/termite/Blazer rename to old_work/iterm2colors/termite/Blazer diff --git a/iterm2colors/termite/Borland b/old_work/iterm2colors/termite/Borland similarity index 100% rename from iterm2colors/termite/Borland rename to old_work/iterm2colors/termite/Borland diff --git a/iterm2colors/termite/Broadcast b/old_work/iterm2colors/termite/Broadcast similarity index 100% rename from iterm2colors/termite/Broadcast rename to old_work/iterm2colors/termite/Broadcast diff --git a/iterm2colors/termite/Brogrammer b/old_work/iterm2colors/termite/Brogrammer similarity index 100% rename from iterm2colors/termite/Brogrammer rename to old_work/iterm2colors/termite/Brogrammer diff --git a/iterm2colors/termite/C64 b/old_work/iterm2colors/termite/C64 similarity index 100% rename from iterm2colors/termite/C64 rename to old_work/iterm2colors/termite/C64 diff --git a/iterm2colors/termite/CLRS b/old_work/iterm2colors/termite/CLRS similarity index 100% rename from iterm2colors/termite/CLRS rename to old_work/iterm2colors/termite/CLRS diff --git a/iterm2colors/termite/Chalk b/old_work/iterm2colors/termite/Chalk similarity index 100% rename from iterm2colors/termite/Chalk rename to old_work/iterm2colors/termite/Chalk diff --git a/iterm2colors/termite/Chalkboard b/old_work/iterm2colors/termite/Chalkboard similarity index 100% rename from iterm2colors/termite/Chalkboard rename to old_work/iterm2colors/termite/Chalkboard diff --git a/iterm2colors/termite/Ciapre b/old_work/iterm2colors/termite/Ciapre similarity index 100% rename from iterm2colors/termite/Ciapre rename to old_work/iterm2colors/termite/Ciapre diff --git a/iterm2colors/termite/Cobalt Neon b/old_work/iterm2colors/termite/Cobalt Neon similarity index 100% rename from iterm2colors/termite/Cobalt Neon rename to old_work/iterm2colors/termite/Cobalt Neon diff --git a/iterm2colors/termite/Cobalt2 b/old_work/iterm2colors/termite/Cobalt2 similarity index 100% rename from iterm2colors/termite/Cobalt2 rename to old_work/iterm2colors/termite/Cobalt2 diff --git a/iterm2colors/termite/CrayonPonyFish b/old_work/iterm2colors/termite/CrayonPonyFish similarity index 100% rename from iterm2colors/termite/CrayonPonyFish rename to old_work/iterm2colors/termite/CrayonPonyFish diff --git a/iterm2colors/termite/Dark Pastel b/old_work/iterm2colors/termite/Dark Pastel similarity index 100% rename from iterm2colors/termite/Dark Pastel rename to old_work/iterm2colors/termite/Dark Pastel diff --git a/iterm2colors/termite/Darkside b/old_work/iterm2colors/termite/Darkside similarity index 100% rename from iterm2colors/termite/Darkside rename to old_work/iterm2colors/termite/Darkside diff --git a/iterm2colors/termite/Desert b/old_work/iterm2colors/termite/Desert similarity index 100% rename from iterm2colors/termite/Desert rename to old_work/iterm2colors/termite/Desert diff --git a/iterm2colors/termite/DimmedMonokai b/old_work/iterm2colors/termite/DimmedMonokai similarity index 100% rename from iterm2colors/termite/DimmedMonokai rename to old_work/iterm2colors/termite/DimmedMonokai diff --git a/iterm2colors/termite/DotGov b/old_work/iterm2colors/termite/DotGov similarity index 100% rename from iterm2colors/termite/DotGov rename to old_work/iterm2colors/termite/DotGov diff --git a/iterm2colors/termite/Dracula b/old_work/iterm2colors/termite/Dracula similarity index 100% rename from iterm2colors/termite/Dracula rename to old_work/iterm2colors/termite/Dracula diff --git a/iterm2colors/termite/ENCOM b/old_work/iterm2colors/termite/ENCOM similarity index 100% rename from iterm2colors/termite/ENCOM rename to old_work/iterm2colors/termite/ENCOM diff --git a/iterm2colors/termite/Earthsong b/old_work/iterm2colors/termite/Earthsong similarity index 100% rename from iterm2colors/termite/Earthsong rename to old_work/iterm2colors/termite/Earthsong diff --git a/iterm2colors/termite/Elemental b/old_work/iterm2colors/termite/Elemental similarity index 100% rename from iterm2colors/termite/Elemental rename to old_work/iterm2colors/termite/Elemental diff --git a/iterm2colors/termite/Espresso b/old_work/iterm2colors/termite/Espresso similarity index 100% rename from iterm2colors/termite/Espresso rename to old_work/iterm2colors/termite/Espresso diff --git a/iterm2colors/termite/Espresso Libre b/old_work/iterm2colors/termite/Espresso Libre similarity index 100% rename from iterm2colors/termite/Espresso Libre rename to old_work/iterm2colors/termite/Espresso Libre diff --git a/iterm2colors/termite/Fideloper b/old_work/iterm2colors/termite/Fideloper similarity index 100% rename from iterm2colors/termite/Fideloper rename to old_work/iterm2colors/termite/Fideloper diff --git a/iterm2colors/termite/FishTank b/old_work/iterm2colors/termite/FishTank similarity index 100% rename from iterm2colors/termite/FishTank rename to old_work/iterm2colors/termite/FishTank diff --git a/iterm2colors/termite/Flat b/old_work/iterm2colors/termite/Flat similarity index 100% rename from iterm2colors/termite/Flat rename to old_work/iterm2colors/termite/Flat diff --git a/iterm2colors/termite/Flatland b/old_work/iterm2colors/termite/Flatland similarity index 100% rename from iterm2colors/termite/Flatland rename to old_work/iterm2colors/termite/Flatland diff --git a/iterm2colors/termite/Floraverse b/old_work/iterm2colors/termite/Floraverse similarity index 100% rename from iterm2colors/termite/Floraverse rename to old_work/iterm2colors/termite/Floraverse diff --git a/iterm2colors/termite/FrontEndDelight b/old_work/iterm2colors/termite/FrontEndDelight similarity index 100% rename from iterm2colors/termite/FrontEndDelight rename to old_work/iterm2colors/termite/FrontEndDelight diff --git a/iterm2colors/termite/FunForrest b/old_work/iterm2colors/termite/FunForrest similarity index 100% rename from iterm2colors/termite/FunForrest rename to old_work/iterm2colors/termite/FunForrest diff --git a/iterm2colors/termite/Galaxy b/old_work/iterm2colors/termite/Galaxy similarity index 100% rename from iterm2colors/termite/Galaxy rename to old_work/iterm2colors/termite/Galaxy diff --git a/iterm2colors/termite/Github b/old_work/iterm2colors/termite/Github similarity index 100% rename from iterm2colors/termite/Github rename to old_work/iterm2colors/termite/Github diff --git a/iterm2colors/termite/Grape b/old_work/iterm2colors/termite/Grape similarity index 100% rename from iterm2colors/termite/Grape rename to old_work/iterm2colors/termite/Grape diff --git a/iterm2colors/termite/Grass b/old_work/iterm2colors/termite/Grass similarity index 100% rename from iterm2colors/termite/Grass rename to old_work/iterm2colors/termite/Grass diff --git a/iterm2colors/termite/Hardcore b/old_work/iterm2colors/termite/Hardcore similarity index 100% rename from iterm2colors/termite/Hardcore rename to old_work/iterm2colors/termite/Hardcore diff --git a/iterm2colors/termite/Harper b/old_work/iterm2colors/termite/Harper similarity index 100% rename from iterm2colors/termite/Harper rename to old_work/iterm2colors/termite/Harper diff --git a/iterm2colors/termite/Highway b/old_work/iterm2colors/termite/Highway similarity index 100% rename from iterm2colors/termite/Highway rename to old_work/iterm2colors/termite/Highway diff --git a/iterm2colors/termite/Hipster Green b/old_work/iterm2colors/termite/Hipster Green similarity index 100% rename from iterm2colors/termite/Hipster Green rename to old_work/iterm2colors/termite/Hipster Green diff --git a/iterm2colors/termite/Homebrew b/old_work/iterm2colors/termite/Homebrew similarity index 100% rename from iterm2colors/termite/Homebrew rename to old_work/iterm2colors/termite/Homebrew diff --git a/iterm2colors/termite/Hurtado b/old_work/iterm2colors/termite/Hurtado similarity index 100% rename from iterm2colors/termite/Hurtado rename to old_work/iterm2colors/termite/Hurtado diff --git a/iterm2colors/termite/Hybrid b/old_work/iterm2colors/termite/Hybrid similarity index 100% rename from iterm2colors/termite/Hybrid rename to old_work/iterm2colors/termite/Hybrid diff --git a/iterm2colors/termite/IC_Green_PPL b/old_work/iterm2colors/termite/IC_Green_PPL similarity index 100% rename from iterm2colors/termite/IC_Green_PPL rename to old_work/iterm2colors/termite/IC_Green_PPL diff --git a/iterm2colors/termite/IC_Orange_PPL b/old_work/iterm2colors/termite/IC_Orange_PPL similarity index 100% rename from iterm2colors/termite/IC_Orange_PPL rename to old_work/iterm2colors/termite/IC_Orange_PPL diff --git a/iterm2colors/termite/IR_Black b/old_work/iterm2colors/termite/IR_Black similarity index 100% rename from iterm2colors/termite/IR_Black rename to old_work/iterm2colors/termite/IR_Black diff --git a/iterm2colors/termite/Jackie Brown b/old_work/iterm2colors/termite/Jackie Brown similarity index 100% rename from iterm2colors/termite/Jackie Brown rename to old_work/iterm2colors/termite/Jackie Brown diff --git a/iterm2colors/termite/Japanesque b/old_work/iterm2colors/termite/Japanesque similarity index 100% rename from iterm2colors/termite/Japanesque rename to old_work/iterm2colors/termite/Japanesque diff --git a/iterm2colors/termite/Jellybeans b/old_work/iterm2colors/termite/Jellybeans similarity index 100% rename from iterm2colors/termite/Jellybeans rename to old_work/iterm2colors/termite/Jellybeans diff --git a/iterm2colors/termite/Kibble b/old_work/iterm2colors/termite/Kibble similarity index 100% rename from iterm2colors/termite/Kibble rename to old_work/iterm2colors/termite/Kibble diff --git a/iterm2colors/termite/Later This Evening b/old_work/iterm2colors/termite/Later This Evening similarity index 100% rename from iterm2colors/termite/Later This Evening rename to old_work/iterm2colors/termite/Later This Evening diff --git a/iterm2colors/termite/Lavandula b/old_work/iterm2colors/termite/Lavandula similarity index 100% rename from iterm2colors/termite/Lavandula rename to old_work/iterm2colors/termite/Lavandula diff --git a/iterm2colors/termite/LiquidCarbon b/old_work/iterm2colors/termite/LiquidCarbon similarity index 100% rename from iterm2colors/termite/LiquidCarbon rename to old_work/iterm2colors/termite/LiquidCarbon diff --git a/iterm2colors/termite/LiquidCarbonTransparent b/old_work/iterm2colors/termite/LiquidCarbonTransparent similarity index 100% rename from iterm2colors/termite/LiquidCarbonTransparent rename to old_work/iterm2colors/termite/LiquidCarbonTransparent diff --git a/iterm2colors/termite/LiquidCarbonTransparentInverse b/old_work/iterm2colors/termite/LiquidCarbonTransparentInverse similarity index 100% rename from iterm2colors/termite/LiquidCarbonTransparentInverse rename to old_work/iterm2colors/termite/LiquidCarbonTransparentInverse diff --git a/iterm2colors/termite/Man Page b/old_work/iterm2colors/termite/Man Page similarity index 100% rename from iterm2colors/termite/Man Page rename to old_work/iterm2colors/termite/Man Page diff --git a/iterm2colors/termite/Material b/old_work/iterm2colors/termite/Material similarity index 100% rename from iterm2colors/termite/Material rename to old_work/iterm2colors/termite/Material diff --git a/iterm2colors/termite/MaterialDark b/old_work/iterm2colors/termite/MaterialDark similarity index 100% rename from iterm2colors/termite/MaterialDark rename to old_work/iterm2colors/termite/MaterialDark diff --git a/iterm2colors/termite/Mathias b/old_work/iterm2colors/termite/Mathias similarity index 100% rename from iterm2colors/termite/Mathias rename to old_work/iterm2colors/termite/Mathias diff --git a/iterm2colors/termite/Medallion b/old_work/iterm2colors/termite/Medallion similarity index 100% rename from iterm2colors/termite/Medallion rename to old_work/iterm2colors/termite/Medallion diff --git a/iterm2colors/termite/Misterioso b/old_work/iterm2colors/termite/Misterioso similarity index 100% rename from iterm2colors/termite/Misterioso rename to old_work/iterm2colors/termite/Misterioso diff --git a/iterm2colors/termite/Molokai b/old_work/iterm2colors/termite/Molokai similarity index 100% rename from iterm2colors/termite/Molokai rename to old_work/iterm2colors/termite/Molokai diff --git a/iterm2colors/termite/MonaLisa b/old_work/iterm2colors/termite/MonaLisa similarity index 100% rename from iterm2colors/termite/MonaLisa rename to old_work/iterm2colors/termite/MonaLisa diff --git a/iterm2colors/termite/Monokai Soda b/old_work/iterm2colors/termite/Monokai Soda similarity index 100% rename from iterm2colors/termite/Monokai Soda rename to old_work/iterm2colors/termite/Monokai Soda diff --git a/iterm2colors/termite/N0tch2k b/old_work/iterm2colors/termite/N0tch2k similarity index 100% rename from iterm2colors/termite/N0tch2k rename to old_work/iterm2colors/termite/N0tch2k diff --git a/iterm2colors/termite/Neopolitan b/old_work/iterm2colors/termite/Neopolitan similarity index 100% rename from iterm2colors/termite/Neopolitan rename to old_work/iterm2colors/termite/Neopolitan diff --git a/iterm2colors/termite/Neutron b/old_work/iterm2colors/termite/Neutron similarity index 100% rename from iterm2colors/termite/Neutron rename to old_work/iterm2colors/termite/Neutron diff --git a/iterm2colors/termite/NightLion v1 b/old_work/iterm2colors/termite/NightLion v1 similarity index 100% rename from iterm2colors/termite/NightLion v1 rename to old_work/iterm2colors/termite/NightLion v1 diff --git a/iterm2colors/termite/NightLion v2 b/old_work/iterm2colors/termite/NightLion v2 similarity index 100% rename from iterm2colors/termite/NightLion v2 rename to old_work/iterm2colors/termite/NightLion v2 diff --git a/iterm2colors/termite/Novel b/old_work/iterm2colors/termite/Novel similarity index 100% rename from iterm2colors/termite/Novel rename to old_work/iterm2colors/termite/Novel diff --git a/iterm2colors/termite/Obsidian b/old_work/iterm2colors/termite/Obsidian similarity index 100% rename from iterm2colors/termite/Obsidian rename to old_work/iterm2colors/termite/Obsidian diff --git a/iterm2colors/termite/Ocean b/old_work/iterm2colors/termite/Ocean similarity index 100% rename from iterm2colors/termite/Ocean rename to old_work/iterm2colors/termite/Ocean diff --git a/iterm2colors/termite/OceanicMaterial b/old_work/iterm2colors/termite/OceanicMaterial similarity index 100% rename from iterm2colors/termite/OceanicMaterial rename to old_work/iterm2colors/termite/OceanicMaterial diff --git a/iterm2colors/termite/Ollie b/old_work/iterm2colors/termite/Ollie similarity index 100% rename from iterm2colors/termite/Ollie rename to old_work/iterm2colors/termite/Ollie diff --git a/iterm2colors/termite/Paraiso Dark b/old_work/iterm2colors/termite/Paraiso Dark similarity index 100% rename from iterm2colors/termite/Paraiso Dark rename to old_work/iterm2colors/termite/Paraiso Dark diff --git a/iterm2colors/termite/Parasio Dark b/old_work/iterm2colors/termite/Parasio Dark similarity index 100% rename from iterm2colors/termite/Parasio Dark rename to old_work/iterm2colors/termite/Parasio Dark diff --git a/iterm2colors/termite/PaulMillr b/old_work/iterm2colors/termite/PaulMillr similarity index 100% rename from iterm2colors/termite/PaulMillr rename to old_work/iterm2colors/termite/PaulMillr diff --git a/iterm2colors/termite/PencilDark b/old_work/iterm2colors/termite/PencilDark similarity index 100% rename from iterm2colors/termite/PencilDark rename to old_work/iterm2colors/termite/PencilDark diff --git a/iterm2colors/termite/PencilLight b/old_work/iterm2colors/termite/PencilLight similarity index 100% rename from iterm2colors/termite/PencilLight rename to old_work/iterm2colors/termite/PencilLight diff --git a/iterm2colors/termite/Piatto Light b/old_work/iterm2colors/termite/Piatto Light similarity index 100% rename from iterm2colors/termite/Piatto Light rename to old_work/iterm2colors/termite/Piatto Light diff --git a/iterm2colors/termite/Pnevma b/old_work/iterm2colors/termite/Pnevma similarity index 100% rename from iterm2colors/termite/Pnevma rename to old_work/iterm2colors/termite/Pnevma diff --git a/iterm2colors/termite/Pro b/old_work/iterm2colors/termite/Pro similarity index 100% rename from iterm2colors/termite/Pro rename to old_work/iterm2colors/termite/Pro diff --git a/iterm2colors/termite/Red Alert b/old_work/iterm2colors/termite/Red Alert similarity index 100% rename from iterm2colors/termite/Red Alert rename to old_work/iterm2colors/termite/Red Alert diff --git a/iterm2colors/termite/Red Sands b/old_work/iterm2colors/termite/Red Sands similarity index 100% rename from iterm2colors/termite/Red Sands rename to old_work/iterm2colors/termite/Red Sands diff --git a/iterm2colors/termite/Rippedcasts b/old_work/iterm2colors/termite/Rippedcasts similarity index 100% rename from iterm2colors/termite/Rippedcasts rename to old_work/iterm2colors/termite/Rippedcasts diff --git a/iterm2colors/termite/Royal b/old_work/iterm2colors/termite/Royal similarity index 100% rename from iterm2colors/termite/Royal rename to old_work/iterm2colors/termite/Royal diff --git a/iterm2colors/termite/SeaShells b/old_work/iterm2colors/termite/SeaShells similarity index 100% rename from iterm2colors/termite/SeaShells rename to old_work/iterm2colors/termite/SeaShells diff --git a/iterm2colors/termite/Seafoam Pastel b/old_work/iterm2colors/termite/Seafoam Pastel similarity index 100% rename from iterm2colors/termite/Seafoam Pastel rename to old_work/iterm2colors/termite/Seafoam Pastel diff --git a/iterm2colors/termite/Seti b/old_work/iterm2colors/termite/Seti similarity index 100% rename from iterm2colors/termite/Seti rename to old_work/iterm2colors/termite/Seti diff --git a/iterm2colors/termite/Shaman b/old_work/iterm2colors/termite/Shaman similarity index 100% rename from iterm2colors/termite/Shaman rename to old_work/iterm2colors/termite/Shaman diff --git a/iterm2colors/termite/Slate b/old_work/iterm2colors/termite/Slate similarity index 100% rename from iterm2colors/termite/Slate rename to old_work/iterm2colors/termite/Slate diff --git a/iterm2colors/termite/Smyck b/old_work/iterm2colors/termite/Smyck similarity index 100% rename from iterm2colors/termite/Smyck rename to old_work/iterm2colors/termite/Smyck diff --git a/iterm2colors/termite/SoftServer b/old_work/iterm2colors/termite/SoftServer similarity index 100% rename from iterm2colors/termite/SoftServer rename to old_work/iterm2colors/termite/SoftServer diff --git a/iterm2colors/termite/Solarized Darcula b/old_work/iterm2colors/termite/Solarized Darcula similarity index 100% rename from iterm2colors/termite/Solarized Darcula rename to old_work/iterm2colors/termite/Solarized Darcula diff --git a/iterm2colors/termite/Solarized Dark b/old_work/iterm2colors/termite/Solarized Dark similarity index 100% rename from iterm2colors/termite/Solarized Dark rename to old_work/iterm2colors/termite/Solarized Dark diff --git a/iterm2colors/termite/Solarized Dark Higher Contrast b/old_work/iterm2colors/termite/Solarized Dark Higher Contrast similarity index 100% rename from iterm2colors/termite/Solarized Dark Higher Contrast rename to old_work/iterm2colors/termite/Solarized Dark Higher Contrast diff --git a/iterm2colors/termite/Solarized Light b/old_work/iterm2colors/termite/Solarized Light similarity index 100% rename from iterm2colors/termite/Solarized Light rename to old_work/iterm2colors/termite/Solarized Light diff --git a/iterm2colors/termite/SpaceGray b/old_work/iterm2colors/termite/SpaceGray similarity index 100% rename from iterm2colors/termite/SpaceGray rename to old_work/iterm2colors/termite/SpaceGray diff --git a/iterm2colors/termite/SpaceGray Eighties b/old_work/iterm2colors/termite/SpaceGray Eighties similarity index 100% rename from iterm2colors/termite/SpaceGray Eighties rename to old_work/iterm2colors/termite/SpaceGray Eighties diff --git a/iterm2colors/termite/SpaceGray Eighties Dull b/old_work/iterm2colors/termite/SpaceGray Eighties Dull similarity index 100% rename from iterm2colors/termite/SpaceGray Eighties Dull rename to old_work/iterm2colors/termite/SpaceGray Eighties Dull diff --git a/iterm2colors/termite/Spacedust b/old_work/iterm2colors/termite/Spacedust similarity index 100% rename from iterm2colors/termite/Spacedust rename to old_work/iterm2colors/termite/Spacedust diff --git a/iterm2colors/termite/Spiderman b/old_work/iterm2colors/termite/Spiderman similarity index 100% rename from iterm2colors/termite/Spiderman rename to old_work/iterm2colors/termite/Spiderman diff --git a/iterm2colors/termite/Spring b/old_work/iterm2colors/termite/Spring similarity index 100% rename from iterm2colors/termite/Spring rename to old_work/iterm2colors/termite/Spring diff --git a/iterm2colors/termite/Square b/old_work/iterm2colors/termite/Square similarity index 100% rename from iterm2colors/termite/Square rename to old_work/iterm2colors/termite/Square diff --git a/iterm2colors/termite/Sundried b/old_work/iterm2colors/termite/Sundried similarity index 100% rename from iterm2colors/termite/Sundried rename to old_work/iterm2colors/termite/Sundried diff --git a/iterm2colors/termite/Symfonic b/old_work/iterm2colors/termite/Symfonic similarity index 100% rename from iterm2colors/termite/Symfonic rename to old_work/iterm2colors/termite/Symfonic diff --git a/iterm2colors/termite/Teerb b/old_work/iterm2colors/termite/Teerb similarity index 100% rename from iterm2colors/termite/Teerb rename to old_work/iterm2colors/termite/Teerb diff --git a/iterm2colors/termite/Terminal Basic b/old_work/iterm2colors/termite/Terminal Basic similarity index 100% rename from iterm2colors/termite/Terminal Basic rename to old_work/iterm2colors/termite/Terminal Basic diff --git a/iterm2colors/termite/Thayer Bright b/old_work/iterm2colors/termite/Thayer Bright similarity index 100% rename from iterm2colors/termite/Thayer Bright rename to old_work/iterm2colors/termite/Thayer Bright diff --git a/iterm2colors/termite/The Hulk b/old_work/iterm2colors/termite/The Hulk similarity index 100% rename from iterm2colors/termite/The Hulk rename to old_work/iterm2colors/termite/The Hulk diff --git a/iterm2colors/termite/Tomorrow b/old_work/iterm2colors/termite/Tomorrow similarity index 100% rename from iterm2colors/termite/Tomorrow rename to old_work/iterm2colors/termite/Tomorrow diff --git a/iterm2colors/termite/Tomorrow Night b/old_work/iterm2colors/termite/Tomorrow Night similarity index 100% rename from iterm2colors/termite/Tomorrow Night rename to old_work/iterm2colors/termite/Tomorrow Night diff --git a/iterm2colors/termite/Tomorrow Night Blue b/old_work/iterm2colors/termite/Tomorrow Night Blue similarity index 100% rename from iterm2colors/termite/Tomorrow Night Blue rename to old_work/iterm2colors/termite/Tomorrow Night Blue diff --git a/iterm2colors/termite/Tomorrow Night Bright b/old_work/iterm2colors/termite/Tomorrow Night Bright similarity index 100% rename from iterm2colors/termite/Tomorrow Night Bright rename to old_work/iterm2colors/termite/Tomorrow Night Bright diff --git a/iterm2colors/termite/Tomorrow Night Eighties b/old_work/iterm2colors/termite/Tomorrow Night Eighties similarity index 100% rename from iterm2colors/termite/Tomorrow Night Eighties rename to old_work/iterm2colors/termite/Tomorrow Night Eighties diff --git a/iterm2colors/termite/ToyChest b/old_work/iterm2colors/termite/ToyChest similarity index 100% rename from iterm2colors/termite/ToyChest rename to old_work/iterm2colors/termite/ToyChest diff --git a/iterm2colors/termite/Treehouse b/old_work/iterm2colors/termite/Treehouse similarity index 100% rename from iterm2colors/termite/Treehouse rename to old_work/iterm2colors/termite/Treehouse diff --git a/iterm2colors/termite/Twilight b/old_work/iterm2colors/termite/Twilight similarity index 100% rename from iterm2colors/termite/Twilight rename to old_work/iterm2colors/termite/Twilight diff --git a/iterm2colors/termite/Urple b/old_work/iterm2colors/termite/Urple similarity index 100% rename from iterm2colors/termite/Urple rename to old_work/iterm2colors/termite/Urple diff --git a/iterm2colors/termite/Vaughn b/old_work/iterm2colors/termite/Vaughn similarity index 100% rename from iterm2colors/termite/Vaughn rename to old_work/iterm2colors/termite/Vaughn diff --git a/iterm2colors/termite/VibrantInk b/old_work/iterm2colors/termite/VibrantInk similarity index 100% rename from iterm2colors/termite/VibrantInk rename to old_work/iterm2colors/termite/VibrantInk diff --git a/iterm2colors/termite/WarmNeon b/old_work/iterm2colors/termite/WarmNeon similarity index 100% rename from iterm2colors/termite/WarmNeon rename to old_work/iterm2colors/termite/WarmNeon diff --git a/iterm2colors/termite/Wez b/old_work/iterm2colors/termite/Wez similarity index 100% rename from iterm2colors/termite/Wez rename to old_work/iterm2colors/termite/Wez diff --git a/iterm2colors/termite/WildCherry b/old_work/iterm2colors/termite/WildCherry similarity index 100% rename from iterm2colors/termite/WildCherry rename to old_work/iterm2colors/termite/WildCherry diff --git a/iterm2colors/termite/Wombat b/old_work/iterm2colors/termite/Wombat similarity index 100% rename from iterm2colors/termite/Wombat rename to old_work/iterm2colors/termite/Wombat diff --git a/iterm2colors/termite/Wryan b/old_work/iterm2colors/termite/Wryan similarity index 100% rename from iterm2colors/termite/Wryan rename to old_work/iterm2colors/termite/Wryan diff --git a/iterm2colors/termite/Zenburn b/old_work/iterm2colors/termite/Zenburn similarity index 100% rename from iterm2colors/termite/Zenburn rename to old_work/iterm2colors/termite/Zenburn diff --git a/iterm2colors/termite/idleToes b/old_work/iterm2colors/termite/idleToes similarity index 100% rename from iterm2colors/termite/idleToes rename to old_work/iterm2colors/termite/idleToes diff --git a/iterm2colors/tools/genMD.py b/old_work/iterm2colors/tools/genMD.py similarity index 100% rename from iterm2colors/tools/genMD.py rename to old_work/iterm2colors/tools/genMD.py diff --git a/iterm2colors/tools/iterm2terminal.swift b/old_work/iterm2colors/tools/iterm2terminal.swift similarity index 100% rename from iterm2colors/tools/iterm2terminal.swift rename to old_work/iterm2colors/tools/iterm2terminal.swift diff --git a/iterm2colors/tools/iterm2xrdb b/old_work/iterm2colors/tools/iterm2xrdb similarity index 100% rename from iterm2colors/tools/iterm2xrdb rename to old_work/iterm2colors/tools/iterm2xrdb diff --git a/iterm2colors/tools/preview.rb b/old_work/iterm2colors/tools/preview.rb similarity index 100% rename from iterm2colors/tools/preview.rb rename to old_work/iterm2colors/tools/preview.rb diff --git a/iterm2colors/tools/screenshotTable.sh b/old_work/iterm2colors/tools/screenshotTable.sh similarity index 100% rename from iterm2colors/tools/screenshotTable.sh rename to old_work/iterm2colors/tools/screenshotTable.sh diff --git a/iterm2colors/tools/update_all.py b/old_work/iterm2colors/tools/update_all.py similarity index 100% rename from iterm2colors/tools/update_all.py rename to old_work/iterm2colors/tools/update_all.py diff --git a/iterm2colors/tools/xrdb2Xresources.py b/old_work/iterm2colors/tools/xrdb2Xresources.py similarity index 100% rename from iterm2colors/tools/xrdb2Xresources.py rename to old_work/iterm2colors/tools/xrdb2Xresources.py diff --git a/iterm2colors/tools/xrdb2hterm b/old_work/iterm2colors/tools/xrdb2hterm similarity index 100% rename from iterm2colors/tools/xrdb2hterm rename to old_work/iterm2colors/tools/xrdb2hterm diff --git a/iterm2colors/tools/xrdb2konsole.py b/old_work/iterm2colors/tools/xrdb2konsole.py similarity index 100% rename from iterm2colors/tools/xrdb2konsole.py rename to old_work/iterm2colors/tools/xrdb2konsole.py diff --git a/iterm2colors/tools/xrdb2putty.py b/old_work/iterm2colors/tools/xrdb2putty.py similarity index 100% rename from iterm2colors/tools/xrdb2putty.py rename to old_work/iterm2colors/tools/xrdb2putty.py diff --git a/iterm2colors/tools/xrdb2terminator.py b/old_work/iterm2colors/tools/xrdb2terminator.py similarity index 100% rename from iterm2colors/tools/xrdb2terminator.py rename to old_work/iterm2colors/tools/xrdb2terminator.py diff --git a/iterm2colors/tools/xrdb2xfce_terminal.py b/old_work/iterm2colors/tools/xrdb2xfce_terminal.py similarity index 100% rename from iterm2colors/tools/xrdb2xfce_terminal.py rename to old_work/iterm2colors/tools/xrdb2xfce_terminal.py diff --git a/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/3024 Day.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/3024 Night.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Afterglow.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Argonaut.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Arthur.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Arthur.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Atom.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Atom.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Batman.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Batman.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Blazer.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Blazer.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Borland.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Borland.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Broadcast.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/C64.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/C64.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/CLRS.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/CLRS.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Chalk.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Chalk.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Ciapre.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Darkside.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Darkside.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Desert.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Desert.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/DotGov.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/DotGov.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Dracula.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Dracula.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/ENCOM.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Earthsong.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Elemental.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Elemental.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Elementary.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Elementary.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Espresso.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Espresso.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Fideloper.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Firewatch.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/FishTank.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/FishTank.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Flat.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Flat.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Flatland.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Flatland.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Floraverse.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/FunForrest.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Galaxy.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Github.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Github.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Glacier.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Glacier.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Grape.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Grape.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Grass.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Grass.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Hardcore.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Harper.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Harper.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Highway.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Highway.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Homebrew.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Hurtado.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Hybrid.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/IR_Black.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Japanesque.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Kibble.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Kibble.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Lavandula.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Man Page.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Man Page.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Material.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Material.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Mathias.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Mathias.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Medallion.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Medallion.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Misterioso.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Molokai.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Molokai.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Neutron.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Neutron.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Novel.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Novel.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Obsidian.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Ocean.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Ocean.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Ollie.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Ollie.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Pandora.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Pandora.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/PencilDark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/PencilLight.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Pnevma.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Pro.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Pro.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Red Alert.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Red Sands.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Royal.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Royal.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/SeaShells.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Seti.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Seti.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Shaman.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Shaman.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Slate.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Slate.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Smyck.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Smyck.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/SoftServer.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Spacedust.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Spiderman.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Spring.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Spring.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Square.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Square.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Sundried.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Sundried.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Symfonic.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Teerb.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Teerb.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/The Hulk.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/ToyChest.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Treehouse.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Twilight.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Twilight.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Urple.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Urple.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Vaughn.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Violet Light.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Wez.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Wez.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/WildCherry.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Wombat.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Wombat.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Wryan.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Wryan.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/Zenburn.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/ayu.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/ayu.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/ayu_light.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/deep.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/deep.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme diff --git a/iterm2colors/xfce4terminal/colorschemes/idleToes.theme b/old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme similarity index 100% rename from iterm2colors/xfce4terminal/colorschemes/idleToes.theme rename to old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme diff --git a/iterm2colors/xrdb/3024 Day.xrdb b/old_work/iterm2colors/xrdb/3024 Day.xrdb similarity index 100% rename from iterm2colors/xrdb/3024 Day.xrdb rename to old_work/iterm2colors/xrdb/3024 Day.xrdb diff --git a/iterm2colors/xrdb/3024 Night.xrdb b/old_work/iterm2colors/xrdb/3024 Night.xrdb similarity index 100% rename from iterm2colors/xrdb/3024 Night.xrdb rename to old_work/iterm2colors/xrdb/3024 Night.xrdb diff --git a/iterm2colors/xrdb/AdventureTime.xrdb b/old_work/iterm2colors/xrdb/AdventureTime.xrdb similarity index 100% rename from iterm2colors/xrdb/AdventureTime.xrdb rename to old_work/iterm2colors/xrdb/AdventureTime.xrdb diff --git a/iterm2colors/xrdb/Afterglow.xrdb b/old_work/iterm2colors/xrdb/Afterglow.xrdb similarity index 100% rename from iterm2colors/xrdb/Afterglow.xrdb rename to old_work/iterm2colors/xrdb/Afterglow.xrdb diff --git a/iterm2colors/xrdb/AlienBlood.xrdb b/old_work/iterm2colors/xrdb/AlienBlood.xrdb similarity index 100% rename from iterm2colors/xrdb/AlienBlood.xrdb rename to old_work/iterm2colors/xrdb/AlienBlood.xrdb diff --git a/iterm2colors/xrdb/Argonaut.xrdb b/old_work/iterm2colors/xrdb/Argonaut.xrdb similarity index 100% rename from iterm2colors/xrdb/Argonaut.xrdb rename to old_work/iterm2colors/xrdb/Argonaut.xrdb diff --git a/iterm2colors/xrdb/Arthur.xrdb b/old_work/iterm2colors/xrdb/Arthur.xrdb similarity index 100% rename from iterm2colors/xrdb/Arthur.xrdb rename to old_work/iterm2colors/xrdb/Arthur.xrdb diff --git a/iterm2colors/xrdb/AtelierSulphurpool.xrdb b/old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb similarity index 100% rename from iterm2colors/xrdb/AtelierSulphurpool.xrdb rename to old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb diff --git a/iterm2colors/xrdb/Atom.xrdb b/old_work/iterm2colors/xrdb/Atom.xrdb similarity index 100% rename from iterm2colors/xrdb/Atom.xrdb rename to old_work/iterm2colors/xrdb/Atom.xrdb diff --git a/iterm2colors/xrdb/AtomOneLight.xrdb b/old_work/iterm2colors/xrdb/AtomOneLight.xrdb similarity index 100% rename from iterm2colors/xrdb/AtomOneLight.xrdb rename to old_work/iterm2colors/xrdb/AtomOneLight.xrdb diff --git a/iterm2colors/xrdb/Batman.xrdb b/old_work/iterm2colors/xrdb/Batman.xrdb similarity index 100% rename from iterm2colors/xrdb/Batman.xrdb rename to old_work/iterm2colors/xrdb/Batman.xrdb diff --git a/iterm2colors/xrdb/Belafonte Day.xrdb b/old_work/iterm2colors/xrdb/Belafonte Day.xrdb similarity index 100% rename from iterm2colors/xrdb/Belafonte Day.xrdb rename to old_work/iterm2colors/xrdb/Belafonte Day.xrdb diff --git a/iterm2colors/xrdb/Belafonte Night.xrdb b/old_work/iterm2colors/xrdb/Belafonte Night.xrdb similarity index 100% rename from iterm2colors/xrdb/Belafonte Night.xrdb rename to old_work/iterm2colors/xrdb/Belafonte Night.xrdb diff --git a/iterm2colors/xrdb/BirdsOfParadise.xrdb b/old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb similarity index 100% rename from iterm2colors/xrdb/BirdsOfParadise.xrdb rename to old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb diff --git a/iterm2colors/xrdb/Blazer.xrdb b/old_work/iterm2colors/xrdb/Blazer.xrdb similarity index 100% rename from iterm2colors/xrdb/Blazer.xrdb rename to old_work/iterm2colors/xrdb/Blazer.xrdb diff --git a/iterm2colors/xrdb/Borland.xrdb b/old_work/iterm2colors/xrdb/Borland.xrdb similarity index 100% rename from iterm2colors/xrdb/Borland.xrdb rename to old_work/iterm2colors/xrdb/Borland.xrdb diff --git a/iterm2colors/xrdb/Bright Lights.xrdb b/old_work/iterm2colors/xrdb/Bright Lights.xrdb similarity index 100% rename from iterm2colors/xrdb/Bright Lights.xrdb rename to old_work/iterm2colors/xrdb/Bright Lights.xrdb diff --git a/iterm2colors/xrdb/Broadcast.xrdb b/old_work/iterm2colors/xrdb/Broadcast.xrdb similarity index 100% rename from iterm2colors/xrdb/Broadcast.xrdb rename to old_work/iterm2colors/xrdb/Broadcast.xrdb diff --git a/iterm2colors/xrdb/Brogrammer.xrdb b/old_work/iterm2colors/xrdb/Brogrammer.xrdb similarity index 100% rename from iterm2colors/xrdb/Brogrammer.xrdb rename to old_work/iterm2colors/xrdb/Brogrammer.xrdb diff --git a/iterm2colors/xrdb/C64.xrdb b/old_work/iterm2colors/xrdb/C64.xrdb similarity index 100% rename from iterm2colors/xrdb/C64.xrdb rename to old_work/iterm2colors/xrdb/C64.xrdb diff --git a/iterm2colors/xrdb/CLRS.xrdb b/old_work/iterm2colors/xrdb/CLRS.xrdb similarity index 100% rename from iterm2colors/xrdb/CLRS.xrdb rename to old_work/iterm2colors/xrdb/CLRS.xrdb diff --git a/iterm2colors/xrdb/Chalk.xrdb b/old_work/iterm2colors/xrdb/Chalk.xrdb similarity index 100% rename from iterm2colors/xrdb/Chalk.xrdb rename to old_work/iterm2colors/xrdb/Chalk.xrdb diff --git a/iterm2colors/xrdb/Chalkboard.xrdb b/old_work/iterm2colors/xrdb/Chalkboard.xrdb similarity index 100% rename from iterm2colors/xrdb/Chalkboard.xrdb rename to old_work/iterm2colors/xrdb/Chalkboard.xrdb diff --git a/iterm2colors/xrdb/Ciapre.xrdb b/old_work/iterm2colors/xrdb/Ciapre.xrdb similarity index 100% rename from iterm2colors/xrdb/Ciapre.xrdb rename to old_work/iterm2colors/xrdb/Ciapre.xrdb diff --git a/iterm2colors/xrdb/Cobalt Neon.xrdb b/old_work/iterm2colors/xrdb/Cobalt Neon.xrdb similarity index 100% rename from iterm2colors/xrdb/Cobalt Neon.xrdb rename to old_work/iterm2colors/xrdb/Cobalt Neon.xrdb diff --git a/iterm2colors/xrdb/Cobalt2.xrdb b/old_work/iterm2colors/xrdb/Cobalt2.xrdb similarity index 100% rename from iterm2colors/xrdb/Cobalt2.xrdb rename to old_work/iterm2colors/xrdb/Cobalt2.xrdb diff --git a/iterm2colors/xrdb/CrayonPonyFish.xrdb b/old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb similarity index 100% rename from iterm2colors/xrdb/CrayonPonyFish.xrdb rename to old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb diff --git a/iterm2colors/xrdb/Dark Pastel.xrdb b/old_work/iterm2colors/xrdb/Dark Pastel.xrdb similarity index 100% rename from iterm2colors/xrdb/Dark Pastel.xrdb rename to old_work/iterm2colors/xrdb/Dark Pastel.xrdb diff --git a/iterm2colors/xrdb/Darkside.xrdb b/old_work/iterm2colors/xrdb/Darkside.xrdb similarity index 100% rename from iterm2colors/xrdb/Darkside.xrdb rename to old_work/iterm2colors/xrdb/Darkside.xrdb diff --git a/iterm2colors/xrdb/Desert.xrdb b/old_work/iterm2colors/xrdb/Desert.xrdb similarity index 100% rename from iterm2colors/xrdb/Desert.xrdb rename to old_work/iterm2colors/xrdb/Desert.xrdb diff --git a/iterm2colors/xrdb/DimmedMonokai.xrdb b/old_work/iterm2colors/xrdb/DimmedMonokai.xrdb similarity index 100% rename from iterm2colors/xrdb/DimmedMonokai.xrdb rename to old_work/iterm2colors/xrdb/DimmedMonokai.xrdb diff --git a/iterm2colors/xrdb/DotGov.xrdb b/old_work/iterm2colors/xrdb/DotGov.xrdb similarity index 100% rename from iterm2colors/xrdb/DotGov.xrdb rename to old_work/iterm2colors/xrdb/DotGov.xrdb diff --git a/iterm2colors/xrdb/Dracula.xrdb b/old_work/iterm2colors/xrdb/Dracula.xrdb similarity index 100% rename from iterm2colors/xrdb/Dracula.xrdb rename to old_work/iterm2colors/xrdb/Dracula.xrdb diff --git a/iterm2colors/xrdb/Duotone Dark.xrdb b/old_work/iterm2colors/xrdb/Duotone Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Duotone Dark.xrdb rename to old_work/iterm2colors/xrdb/Duotone Dark.xrdb diff --git a/iterm2colors/xrdb/ENCOM.xrdb b/old_work/iterm2colors/xrdb/ENCOM.xrdb similarity index 100% rename from iterm2colors/xrdb/ENCOM.xrdb rename to old_work/iterm2colors/xrdb/ENCOM.xrdb diff --git a/iterm2colors/xrdb/Earthsong.xrdb b/old_work/iterm2colors/xrdb/Earthsong.xrdb similarity index 100% rename from iterm2colors/xrdb/Earthsong.xrdb rename to old_work/iterm2colors/xrdb/Earthsong.xrdb diff --git a/iterm2colors/xrdb/Elemental.xrdb b/old_work/iterm2colors/xrdb/Elemental.xrdb similarity index 100% rename from iterm2colors/xrdb/Elemental.xrdb rename to old_work/iterm2colors/xrdb/Elemental.xrdb diff --git a/iterm2colors/xrdb/Elementary.xrdb b/old_work/iterm2colors/xrdb/Elementary.xrdb similarity index 100% rename from iterm2colors/xrdb/Elementary.xrdb rename to old_work/iterm2colors/xrdb/Elementary.xrdb diff --git a/iterm2colors/xrdb/Espresso Libre.xrdb b/old_work/iterm2colors/xrdb/Espresso Libre.xrdb similarity index 100% rename from iterm2colors/xrdb/Espresso Libre.xrdb rename to old_work/iterm2colors/xrdb/Espresso Libre.xrdb diff --git a/iterm2colors/xrdb/Espresso.xrdb b/old_work/iterm2colors/xrdb/Espresso.xrdb similarity index 100% rename from iterm2colors/xrdb/Espresso.xrdb rename to old_work/iterm2colors/xrdb/Espresso.xrdb diff --git a/iterm2colors/xrdb/Fideloper.xrdb b/old_work/iterm2colors/xrdb/Fideloper.xrdb similarity index 100% rename from iterm2colors/xrdb/Fideloper.xrdb rename to old_work/iterm2colors/xrdb/Fideloper.xrdb diff --git a/iterm2colors/xrdb/FirefoxDev.xrdb b/old_work/iterm2colors/xrdb/FirefoxDev.xrdb similarity index 100% rename from iterm2colors/xrdb/FirefoxDev.xrdb rename to old_work/iterm2colors/xrdb/FirefoxDev.xrdb diff --git a/iterm2colors/xrdb/Firewatch.xrdb b/old_work/iterm2colors/xrdb/Firewatch.xrdb similarity index 100% rename from iterm2colors/xrdb/Firewatch.xrdb rename to old_work/iterm2colors/xrdb/Firewatch.xrdb diff --git a/iterm2colors/xrdb/FishTank.xrdb b/old_work/iterm2colors/xrdb/FishTank.xrdb similarity index 100% rename from iterm2colors/xrdb/FishTank.xrdb rename to old_work/iterm2colors/xrdb/FishTank.xrdb diff --git a/iterm2colors/xrdb/Flat.xrdb b/old_work/iterm2colors/xrdb/Flat.xrdb similarity index 100% rename from iterm2colors/xrdb/Flat.xrdb rename to old_work/iterm2colors/xrdb/Flat.xrdb diff --git a/iterm2colors/xrdb/Flatland.xrdb b/old_work/iterm2colors/xrdb/Flatland.xrdb similarity index 100% rename from iterm2colors/xrdb/Flatland.xrdb rename to old_work/iterm2colors/xrdb/Flatland.xrdb diff --git a/iterm2colors/xrdb/Floraverse.xrdb b/old_work/iterm2colors/xrdb/Floraverse.xrdb similarity index 100% rename from iterm2colors/xrdb/Floraverse.xrdb rename to old_work/iterm2colors/xrdb/Floraverse.xrdb diff --git a/iterm2colors/xrdb/ForestBlue.xrdb b/old_work/iterm2colors/xrdb/ForestBlue.xrdb similarity index 100% rename from iterm2colors/xrdb/ForestBlue.xrdb rename to old_work/iterm2colors/xrdb/ForestBlue.xrdb diff --git a/iterm2colors/xrdb/FrontEndDelight.xrdb b/old_work/iterm2colors/xrdb/FrontEndDelight.xrdb similarity index 100% rename from iterm2colors/xrdb/FrontEndDelight.xrdb rename to old_work/iterm2colors/xrdb/FrontEndDelight.xrdb diff --git a/iterm2colors/xrdb/FunForrest.xrdb b/old_work/iterm2colors/xrdb/FunForrest.xrdb similarity index 100% rename from iterm2colors/xrdb/FunForrest.xrdb rename to old_work/iterm2colors/xrdb/FunForrest.xrdb diff --git a/iterm2colors/xrdb/Galaxy.xrdb b/old_work/iterm2colors/xrdb/Galaxy.xrdb similarity index 100% rename from iterm2colors/xrdb/Galaxy.xrdb rename to old_work/iterm2colors/xrdb/Galaxy.xrdb diff --git a/iterm2colors/xrdb/Github.xrdb b/old_work/iterm2colors/xrdb/Github.xrdb similarity index 100% rename from iterm2colors/xrdb/Github.xrdb rename to old_work/iterm2colors/xrdb/Github.xrdb diff --git a/iterm2colors/xrdb/Glacier.xrdb b/old_work/iterm2colors/xrdb/Glacier.xrdb similarity index 100% rename from iterm2colors/xrdb/Glacier.xrdb rename to old_work/iterm2colors/xrdb/Glacier.xrdb diff --git a/iterm2colors/xrdb/Grape.xrdb b/old_work/iterm2colors/xrdb/Grape.xrdb similarity index 100% rename from iterm2colors/xrdb/Grape.xrdb rename to old_work/iterm2colors/xrdb/Grape.xrdb diff --git a/iterm2colors/xrdb/Grass.xrdb b/old_work/iterm2colors/xrdb/Grass.xrdb similarity index 100% rename from iterm2colors/xrdb/Grass.xrdb rename to old_work/iterm2colors/xrdb/Grass.xrdb diff --git a/iterm2colors/xrdb/Gruvbox Dark.xrdb b/old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Gruvbox Dark.xrdb rename to old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb diff --git a/iterm2colors/xrdb/Hardcore.xrdb b/old_work/iterm2colors/xrdb/Hardcore.xrdb similarity index 100% rename from iterm2colors/xrdb/Hardcore.xrdb rename to old_work/iterm2colors/xrdb/Hardcore.xrdb diff --git a/iterm2colors/xrdb/Harper.xrdb b/old_work/iterm2colors/xrdb/Harper.xrdb similarity index 100% rename from iterm2colors/xrdb/Harper.xrdb rename to old_work/iterm2colors/xrdb/Harper.xrdb diff --git a/iterm2colors/xrdb/Highway.xrdb b/old_work/iterm2colors/xrdb/Highway.xrdb similarity index 100% rename from iterm2colors/xrdb/Highway.xrdb rename to old_work/iterm2colors/xrdb/Highway.xrdb diff --git a/iterm2colors/xrdb/Hipster Green.xrdb b/old_work/iterm2colors/xrdb/Hipster Green.xrdb similarity index 100% rename from iterm2colors/xrdb/Hipster Green.xrdb rename to old_work/iterm2colors/xrdb/Hipster Green.xrdb diff --git a/iterm2colors/xrdb/Homebrew.xrdb b/old_work/iterm2colors/xrdb/Homebrew.xrdb similarity index 100% rename from iterm2colors/xrdb/Homebrew.xrdb rename to old_work/iterm2colors/xrdb/Homebrew.xrdb diff --git a/iterm2colors/xrdb/Hurtado.xrdb b/old_work/iterm2colors/xrdb/Hurtado.xrdb similarity index 100% rename from iterm2colors/xrdb/Hurtado.xrdb rename to old_work/iterm2colors/xrdb/Hurtado.xrdb diff --git a/iterm2colors/xrdb/Hybrid.xrdb b/old_work/iterm2colors/xrdb/Hybrid.xrdb similarity index 100% rename from iterm2colors/xrdb/Hybrid.xrdb rename to old_work/iterm2colors/xrdb/Hybrid.xrdb diff --git a/iterm2colors/xrdb/IC_Green_PPL.xrdb b/old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb similarity index 100% rename from iterm2colors/xrdb/IC_Green_PPL.xrdb rename to old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb diff --git a/iterm2colors/xrdb/IC_Orange_PPL.xrdb b/old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb similarity index 100% rename from iterm2colors/xrdb/IC_Orange_PPL.xrdb rename to old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb diff --git a/iterm2colors/xrdb/IR_Black.xrdb b/old_work/iterm2colors/xrdb/IR_Black.xrdb similarity index 100% rename from iterm2colors/xrdb/IR_Black.xrdb rename to old_work/iterm2colors/xrdb/IR_Black.xrdb diff --git a/iterm2colors/xrdb/Jackie Brown.xrdb b/old_work/iterm2colors/xrdb/Jackie Brown.xrdb similarity index 100% rename from iterm2colors/xrdb/Jackie Brown.xrdb rename to old_work/iterm2colors/xrdb/Jackie Brown.xrdb diff --git a/iterm2colors/xrdb/Japanesque.xrdb b/old_work/iterm2colors/xrdb/Japanesque.xrdb similarity index 100% rename from iterm2colors/xrdb/Japanesque.xrdb rename to old_work/iterm2colors/xrdb/Japanesque.xrdb diff --git a/iterm2colors/xrdb/Jellybeans.xrdb b/old_work/iterm2colors/xrdb/Jellybeans.xrdb similarity index 100% rename from iterm2colors/xrdb/Jellybeans.xrdb rename to old_work/iterm2colors/xrdb/Jellybeans.xrdb diff --git a/iterm2colors/xrdb/JetBrains Darcula.xrdb b/old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb similarity index 100% rename from iterm2colors/xrdb/JetBrains Darcula.xrdb rename to old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb diff --git a/iterm2colors/xrdb/Kibble.xrdb b/old_work/iterm2colors/xrdb/Kibble.xrdb similarity index 100% rename from iterm2colors/xrdb/Kibble.xrdb rename to old_work/iterm2colors/xrdb/Kibble.xrdb diff --git a/iterm2colors/xrdb/Later This Evening.xrdb b/old_work/iterm2colors/xrdb/Later This Evening.xrdb similarity index 100% rename from iterm2colors/xrdb/Later This Evening.xrdb rename to old_work/iterm2colors/xrdb/Later This Evening.xrdb diff --git a/iterm2colors/xrdb/Lavandula.xrdb b/old_work/iterm2colors/xrdb/Lavandula.xrdb similarity index 100% rename from iterm2colors/xrdb/Lavandula.xrdb rename to old_work/iterm2colors/xrdb/Lavandula.xrdb diff --git a/iterm2colors/xrdb/LiquidCarbon.xrdb b/old_work/iterm2colors/xrdb/LiquidCarbon.xrdb similarity index 100% rename from iterm2colors/xrdb/LiquidCarbon.xrdb rename to old_work/iterm2colors/xrdb/LiquidCarbon.xrdb diff --git a/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb b/old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb similarity index 100% rename from iterm2colors/xrdb/LiquidCarbonTransparent.xrdb rename to old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb diff --git a/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb b/old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb similarity index 100% rename from iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb rename to old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb diff --git a/iterm2colors/xrdb/Man Page.xrdb b/old_work/iterm2colors/xrdb/Man Page.xrdb similarity index 100% rename from iterm2colors/xrdb/Man Page.xrdb rename to old_work/iterm2colors/xrdb/Man Page.xrdb diff --git a/iterm2colors/xrdb/Material.xrdb b/old_work/iterm2colors/xrdb/Material.xrdb similarity index 100% rename from iterm2colors/xrdb/Material.xrdb rename to old_work/iterm2colors/xrdb/Material.xrdb diff --git a/iterm2colors/xrdb/MaterialDark.xrdb b/old_work/iterm2colors/xrdb/MaterialDark.xrdb similarity index 100% rename from iterm2colors/xrdb/MaterialDark.xrdb rename to old_work/iterm2colors/xrdb/MaterialDark.xrdb diff --git a/iterm2colors/xrdb/Mathias.xrdb b/old_work/iterm2colors/xrdb/Mathias.xrdb similarity index 100% rename from iterm2colors/xrdb/Mathias.xrdb rename to old_work/iterm2colors/xrdb/Mathias.xrdb diff --git a/iterm2colors/xrdb/Medallion.xrdb b/old_work/iterm2colors/xrdb/Medallion.xrdb similarity index 100% rename from iterm2colors/xrdb/Medallion.xrdb rename to old_work/iterm2colors/xrdb/Medallion.xrdb diff --git a/iterm2colors/xrdb/Misterioso.xrdb b/old_work/iterm2colors/xrdb/Misterioso.xrdb similarity index 100% rename from iterm2colors/xrdb/Misterioso.xrdb rename to old_work/iterm2colors/xrdb/Misterioso.xrdb diff --git a/iterm2colors/xrdb/Molokai.xrdb b/old_work/iterm2colors/xrdb/Molokai.xrdb similarity index 100% rename from iterm2colors/xrdb/Molokai.xrdb rename to old_work/iterm2colors/xrdb/Molokai.xrdb diff --git a/iterm2colors/xrdb/MonaLisa.xrdb b/old_work/iterm2colors/xrdb/MonaLisa.xrdb similarity index 100% rename from iterm2colors/xrdb/MonaLisa.xrdb rename to old_work/iterm2colors/xrdb/MonaLisa.xrdb diff --git a/iterm2colors/xrdb/Monokai Soda.xrdb b/old_work/iterm2colors/xrdb/Monokai Soda.xrdb similarity index 100% rename from iterm2colors/xrdb/Monokai Soda.xrdb rename to old_work/iterm2colors/xrdb/Monokai Soda.xrdb diff --git a/iterm2colors/xrdb/Monokai Vivid.xrdb b/old_work/iterm2colors/xrdb/Monokai Vivid.xrdb similarity index 100% rename from iterm2colors/xrdb/Monokai Vivid.xrdb rename to old_work/iterm2colors/xrdb/Monokai Vivid.xrdb diff --git a/iterm2colors/xrdb/N0tch2k.xrdb b/old_work/iterm2colors/xrdb/N0tch2k.xrdb similarity index 100% rename from iterm2colors/xrdb/N0tch2k.xrdb rename to old_work/iterm2colors/xrdb/N0tch2k.xrdb diff --git a/iterm2colors/xrdb/Neopolitan.xrdb b/old_work/iterm2colors/xrdb/Neopolitan.xrdb similarity index 100% rename from iterm2colors/xrdb/Neopolitan.xrdb rename to old_work/iterm2colors/xrdb/Neopolitan.xrdb diff --git a/iterm2colors/xrdb/Neutron.xrdb b/old_work/iterm2colors/xrdb/Neutron.xrdb similarity index 100% rename from iterm2colors/xrdb/Neutron.xrdb rename to old_work/iterm2colors/xrdb/Neutron.xrdb diff --git a/iterm2colors/xrdb/NightLion v1.xrdb b/old_work/iterm2colors/xrdb/NightLion v1.xrdb similarity index 100% rename from iterm2colors/xrdb/NightLion v1.xrdb rename to old_work/iterm2colors/xrdb/NightLion v1.xrdb diff --git a/iterm2colors/xrdb/NightLion v2.xrdb b/old_work/iterm2colors/xrdb/NightLion v2.xrdb similarity index 100% rename from iterm2colors/xrdb/NightLion v2.xrdb rename to old_work/iterm2colors/xrdb/NightLion v2.xrdb diff --git a/iterm2colors/xrdb/Novel.xrdb b/old_work/iterm2colors/xrdb/Novel.xrdb similarity index 100% rename from iterm2colors/xrdb/Novel.xrdb rename to old_work/iterm2colors/xrdb/Novel.xrdb diff --git a/iterm2colors/xrdb/Obsidian.xrdb b/old_work/iterm2colors/xrdb/Obsidian.xrdb similarity index 100% rename from iterm2colors/xrdb/Obsidian.xrdb rename to old_work/iterm2colors/xrdb/Obsidian.xrdb diff --git a/iterm2colors/xrdb/Ocean.xrdb b/old_work/iterm2colors/xrdb/Ocean.xrdb similarity index 100% rename from iterm2colors/xrdb/Ocean.xrdb rename to old_work/iterm2colors/xrdb/Ocean.xrdb diff --git a/iterm2colors/xrdb/OceanicMaterial.xrdb b/old_work/iterm2colors/xrdb/OceanicMaterial.xrdb similarity index 100% rename from iterm2colors/xrdb/OceanicMaterial.xrdb rename to old_work/iterm2colors/xrdb/OceanicMaterial.xrdb diff --git a/iterm2colors/xrdb/Ollie.xrdb b/old_work/iterm2colors/xrdb/Ollie.xrdb similarity index 100% rename from iterm2colors/xrdb/Ollie.xrdb rename to old_work/iterm2colors/xrdb/Ollie.xrdb diff --git a/iterm2colors/xrdb/OneHalfDark.xrdb b/old_work/iterm2colors/xrdb/OneHalfDark.xrdb similarity index 100% rename from iterm2colors/xrdb/OneHalfDark.xrdb rename to old_work/iterm2colors/xrdb/OneHalfDark.xrdb diff --git a/iterm2colors/xrdb/OneHalfLight.xrdb b/old_work/iterm2colors/xrdb/OneHalfLight.xrdb similarity index 100% rename from iterm2colors/xrdb/OneHalfLight.xrdb rename to old_work/iterm2colors/xrdb/OneHalfLight.xrdb diff --git a/iterm2colors/xrdb/Pandora.xrdb b/old_work/iterm2colors/xrdb/Pandora.xrdb similarity index 100% rename from iterm2colors/xrdb/Pandora.xrdb rename to old_work/iterm2colors/xrdb/Pandora.xrdb diff --git a/iterm2colors/xrdb/Paraiso Dark.xrdb b/old_work/iterm2colors/xrdb/Paraiso Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Paraiso Dark.xrdb rename to old_work/iterm2colors/xrdb/Paraiso Dark.xrdb diff --git a/iterm2colors/xrdb/Parasio Dark.xrdb b/old_work/iterm2colors/xrdb/Parasio Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Parasio Dark.xrdb rename to old_work/iterm2colors/xrdb/Parasio Dark.xrdb diff --git a/iterm2colors/xrdb/PaulMillr.xrdb b/old_work/iterm2colors/xrdb/PaulMillr.xrdb similarity index 100% rename from iterm2colors/xrdb/PaulMillr.xrdb rename to old_work/iterm2colors/xrdb/PaulMillr.xrdb diff --git a/iterm2colors/xrdb/PencilDark.xrdb b/old_work/iterm2colors/xrdb/PencilDark.xrdb similarity index 100% rename from iterm2colors/xrdb/PencilDark.xrdb rename to old_work/iterm2colors/xrdb/PencilDark.xrdb diff --git a/iterm2colors/xrdb/PencilLight.xrdb b/old_work/iterm2colors/xrdb/PencilLight.xrdb similarity index 100% rename from iterm2colors/xrdb/PencilLight.xrdb rename to old_work/iterm2colors/xrdb/PencilLight.xrdb diff --git a/iterm2colors/xrdb/Piatto Light.xrdb b/old_work/iterm2colors/xrdb/Piatto Light.xrdb similarity index 100% rename from iterm2colors/xrdb/Piatto Light.xrdb rename to old_work/iterm2colors/xrdb/Piatto Light.xrdb diff --git a/iterm2colors/xrdb/Pnevma.xrdb b/old_work/iterm2colors/xrdb/Pnevma.xrdb similarity index 100% rename from iterm2colors/xrdb/Pnevma.xrdb rename to old_work/iterm2colors/xrdb/Pnevma.xrdb diff --git a/iterm2colors/xrdb/Pro.xrdb b/old_work/iterm2colors/xrdb/Pro.xrdb similarity index 100% rename from iterm2colors/xrdb/Pro.xrdb rename to old_work/iterm2colors/xrdb/Pro.xrdb diff --git a/iterm2colors/xrdb/Red Alert.xrdb b/old_work/iterm2colors/xrdb/Red Alert.xrdb similarity index 100% rename from iterm2colors/xrdb/Red Alert.xrdb rename to old_work/iterm2colors/xrdb/Red Alert.xrdb diff --git a/iterm2colors/xrdb/Red Sands.xrdb b/old_work/iterm2colors/xrdb/Red Sands.xrdb similarity index 100% rename from iterm2colors/xrdb/Red Sands.xrdb rename to old_work/iterm2colors/xrdb/Red Sands.xrdb diff --git a/iterm2colors/xrdb/Rippedcasts.xrdb b/old_work/iterm2colors/xrdb/Rippedcasts.xrdb similarity index 100% rename from iterm2colors/xrdb/Rippedcasts.xrdb rename to old_work/iterm2colors/xrdb/Rippedcasts.xrdb diff --git a/iterm2colors/xrdb/Royal.xrdb b/old_work/iterm2colors/xrdb/Royal.xrdb similarity index 100% rename from iterm2colors/xrdb/Royal.xrdb rename to old_work/iterm2colors/xrdb/Royal.xrdb diff --git a/iterm2colors/xrdb/Ryuuko.xrdb b/old_work/iterm2colors/xrdb/Ryuuko.xrdb similarity index 100% rename from iterm2colors/xrdb/Ryuuko.xrdb rename to old_work/iterm2colors/xrdb/Ryuuko.xrdb diff --git a/iterm2colors/xrdb/SeaShells.xrdb b/old_work/iterm2colors/xrdb/SeaShells.xrdb similarity index 100% rename from iterm2colors/xrdb/SeaShells.xrdb rename to old_work/iterm2colors/xrdb/SeaShells.xrdb diff --git a/iterm2colors/xrdb/Seafoam Pastel.xrdb b/old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb similarity index 100% rename from iterm2colors/xrdb/Seafoam Pastel.xrdb rename to old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb diff --git a/iterm2colors/xrdb/Seti.xrdb b/old_work/iterm2colors/xrdb/Seti.xrdb similarity index 100% rename from iterm2colors/xrdb/Seti.xrdb rename to old_work/iterm2colors/xrdb/Seti.xrdb diff --git a/iterm2colors/xrdb/Shaman.xrdb b/old_work/iterm2colors/xrdb/Shaman.xrdb similarity index 100% rename from iterm2colors/xrdb/Shaman.xrdb rename to old_work/iterm2colors/xrdb/Shaman.xrdb diff --git a/iterm2colors/xrdb/Slate.xrdb b/old_work/iterm2colors/xrdb/Slate.xrdb similarity index 100% rename from iterm2colors/xrdb/Slate.xrdb rename to old_work/iterm2colors/xrdb/Slate.xrdb diff --git a/iterm2colors/xrdb/Smyck.xrdb b/old_work/iterm2colors/xrdb/Smyck.xrdb similarity index 100% rename from iterm2colors/xrdb/Smyck.xrdb rename to old_work/iterm2colors/xrdb/Smyck.xrdb diff --git a/iterm2colors/xrdb/SoftServer.xrdb b/old_work/iterm2colors/xrdb/SoftServer.xrdb similarity index 100% rename from iterm2colors/xrdb/SoftServer.xrdb rename to old_work/iterm2colors/xrdb/SoftServer.xrdb diff --git a/iterm2colors/xrdb/Solarized Darcula.xrdb b/old_work/iterm2colors/xrdb/Solarized Darcula.xrdb similarity index 100% rename from iterm2colors/xrdb/Solarized Darcula.xrdb rename to old_work/iterm2colors/xrdb/Solarized Darcula.xrdb diff --git a/iterm2colors/xrdb/Solarized Dark - Patched.xrdb b/old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb similarity index 100% rename from iterm2colors/xrdb/Solarized Dark - Patched.xrdb rename to old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb diff --git a/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb b/old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb similarity index 100% rename from iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb rename to old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb diff --git a/iterm2colors/xrdb/Solarized Dark.xrdb b/old_work/iterm2colors/xrdb/Solarized Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Solarized Dark.xrdb rename to old_work/iterm2colors/xrdb/Solarized Dark.xrdb diff --git a/iterm2colors/xrdb/Solarized Light.xrdb b/old_work/iterm2colors/xrdb/Solarized Light.xrdb similarity index 100% rename from iterm2colors/xrdb/Solarized Light.xrdb rename to old_work/iterm2colors/xrdb/Solarized Light.xrdb diff --git a/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb b/old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb similarity index 100% rename from iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb rename to old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb diff --git a/iterm2colors/xrdb/SpaceGray Eighties.xrdb b/old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb similarity index 100% rename from iterm2colors/xrdb/SpaceGray Eighties.xrdb rename to old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb diff --git a/iterm2colors/xrdb/SpaceGray.xrdb b/old_work/iterm2colors/xrdb/SpaceGray.xrdb similarity index 100% rename from iterm2colors/xrdb/SpaceGray.xrdb rename to old_work/iterm2colors/xrdb/SpaceGray.xrdb diff --git a/iterm2colors/xrdb/Spacedust.xrdb b/old_work/iterm2colors/xrdb/Spacedust.xrdb similarity index 100% rename from iterm2colors/xrdb/Spacedust.xrdb rename to old_work/iterm2colors/xrdb/Spacedust.xrdb diff --git a/iterm2colors/xrdb/Spiderman.xrdb b/old_work/iterm2colors/xrdb/Spiderman.xrdb similarity index 100% rename from iterm2colors/xrdb/Spiderman.xrdb rename to old_work/iterm2colors/xrdb/Spiderman.xrdb diff --git a/iterm2colors/xrdb/Spring.xrdb b/old_work/iterm2colors/xrdb/Spring.xrdb similarity index 100% rename from iterm2colors/xrdb/Spring.xrdb rename to old_work/iterm2colors/xrdb/Spring.xrdb diff --git a/iterm2colors/xrdb/Square.xrdb b/old_work/iterm2colors/xrdb/Square.xrdb similarity index 100% rename from iterm2colors/xrdb/Square.xrdb rename to old_work/iterm2colors/xrdb/Square.xrdb diff --git a/iterm2colors/xrdb/Sundried.xrdb b/old_work/iterm2colors/xrdb/Sundried.xrdb similarity index 100% rename from iterm2colors/xrdb/Sundried.xrdb rename to old_work/iterm2colors/xrdb/Sundried.xrdb diff --git a/iterm2colors/xrdb/Symfonic.xrdb b/old_work/iterm2colors/xrdb/Symfonic.xrdb similarity index 100% rename from iterm2colors/xrdb/Symfonic.xrdb rename to old_work/iterm2colors/xrdb/Symfonic.xrdb diff --git a/iterm2colors/xrdb/Teerb.xrdb b/old_work/iterm2colors/xrdb/Teerb.xrdb similarity index 100% rename from iterm2colors/xrdb/Teerb.xrdb rename to old_work/iterm2colors/xrdb/Teerb.xrdb diff --git a/iterm2colors/xrdb/Terminal Basic.xrdb b/old_work/iterm2colors/xrdb/Terminal Basic.xrdb similarity index 100% rename from iterm2colors/xrdb/Terminal Basic.xrdb rename to old_work/iterm2colors/xrdb/Terminal Basic.xrdb diff --git a/iterm2colors/xrdb/Thayer Bright.xrdb b/old_work/iterm2colors/xrdb/Thayer Bright.xrdb similarity index 100% rename from iterm2colors/xrdb/Thayer Bright.xrdb rename to old_work/iterm2colors/xrdb/Thayer Bright.xrdb diff --git a/iterm2colors/xrdb/The Hulk.xrdb b/old_work/iterm2colors/xrdb/The Hulk.xrdb similarity index 100% rename from iterm2colors/xrdb/The Hulk.xrdb rename to old_work/iterm2colors/xrdb/The Hulk.xrdb diff --git a/iterm2colors/xrdb/Tomorrow Night Blue.xrdb b/old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb similarity index 100% rename from iterm2colors/xrdb/Tomorrow Night Blue.xrdb rename to old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb diff --git a/iterm2colors/xrdb/Tomorrow Night Bright.xrdb b/old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb similarity index 100% rename from iterm2colors/xrdb/Tomorrow Night Bright.xrdb rename to old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb diff --git a/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb b/old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb similarity index 100% rename from iterm2colors/xrdb/Tomorrow Night Eighties.xrdb rename to old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb diff --git a/iterm2colors/xrdb/Tomorrow Night.xrdb b/old_work/iterm2colors/xrdb/Tomorrow Night.xrdb similarity index 100% rename from iterm2colors/xrdb/Tomorrow Night.xrdb rename to old_work/iterm2colors/xrdb/Tomorrow Night.xrdb diff --git a/iterm2colors/xrdb/Tomorrow.xrdb b/old_work/iterm2colors/xrdb/Tomorrow.xrdb similarity index 100% rename from iterm2colors/xrdb/Tomorrow.xrdb rename to old_work/iterm2colors/xrdb/Tomorrow.xrdb diff --git a/iterm2colors/xrdb/ToyChest.xrdb b/old_work/iterm2colors/xrdb/ToyChest.xrdb similarity index 100% rename from iterm2colors/xrdb/ToyChest.xrdb rename to old_work/iterm2colors/xrdb/ToyChest.xrdb diff --git a/iterm2colors/xrdb/Treehouse.xrdb b/old_work/iterm2colors/xrdb/Treehouse.xrdb similarity index 100% rename from iterm2colors/xrdb/Treehouse.xrdb rename to old_work/iterm2colors/xrdb/Treehouse.xrdb diff --git a/iterm2colors/xrdb/Twilight.xrdb b/old_work/iterm2colors/xrdb/Twilight.xrdb similarity index 100% rename from iterm2colors/xrdb/Twilight.xrdb rename to old_work/iterm2colors/xrdb/Twilight.xrdb diff --git a/iterm2colors/xrdb/Ubuntu.xrdb b/old_work/iterm2colors/xrdb/Ubuntu.xrdb similarity index 100% rename from iterm2colors/xrdb/Ubuntu.xrdb rename to old_work/iterm2colors/xrdb/Ubuntu.xrdb diff --git a/iterm2colors/xrdb/UnderTheSea.xrdb b/old_work/iterm2colors/xrdb/UnderTheSea.xrdb similarity index 100% rename from iterm2colors/xrdb/UnderTheSea.xrdb rename to old_work/iterm2colors/xrdb/UnderTheSea.xrdb diff --git a/iterm2colors/xrdb/Urple.xrdb b/old_work/iterm2colors/xrdb/Urple.xrdb similarity index 100% rename from iterm2colors/xrdb/Urple.xrdb rename to old_work/iterm2colors/xrdb/Urple.xrdb diff --git a/iterm2colors/xrdb/Vaughn.xrdb b/old_work/iterm2colors/xrdb/Vaughn.xrdb similarity index 100% rename from iterm2colors/xrdb/Vaughn.xrdb rename to old_work/iterm2colors/xrdb/Vaughn.xrdb diff --git a/iterm2colors/xrdb/VibrantInk.xrdb b/old_work/iterm2colors/xrdb/VibrantInk.xrdb similarity index 100% rename from iterm2colors/xrdb/VibrantInk.xrdb rename to old_work/iterm2colors/xrdb/VibrantInk.xrdb diff --git a/iterm2colors/xrdb/Violet Dark.xrdb b/old_work/iterm2colors/xrdb/Violet Dark.xrdb similarity index 100% rename from iterm2colors/xrdb/Violet Dark.xrdb rename to old_work/iterm2colors/xrdb/Violet Dark.xrdb diff --git a/iterm2colors/xrdb/Violet Light.xrdb b/old_work/iterm2colors/xrdb/Violet Light.xrdb similarity index 100% rename from iterm2colors/xrdb/Violet Light.xrdb rename to old_work/iterm2colors/xrdb/Violet Light.xrdb diff --git a/iterm2colors/xrdb/WarmNeon.xrdb b/old_work/iterm2colors/xrdb/WarmNeon.xrdb similarity index 100% rename from iterm2colors/xrdb/WarmNeon.xrdb rename to old_work/iterm2colors/xrdb/WarmNeon.xrdb diff --git a/iterm2colors/xrdb/Wez.xrdb b/old_work/iterm2colors/xrdb/Wez.xrdb similarity index 100% rename from iterm2colors/xrdb/Wez.xrdb rename to old_work/iterm2colors/xrdb/Wez.xrdb diff --git a/iterm2colors/xrdb/WildCherry.xrdb b/old_work/iterm2colors/xrdb/WildCherry.xrdb similarity index 100% rename from iterm2colors/xrdb/WildCherry.xrdb rename to old_work/iterm2colors/xrdb/WildCherry.xrdb diff --git a/iterm2colors/xrdb/Wombat.xrdb b/old_work/iterm2colors/xrdb/Wombat.xrdb similarity index 100% rename from iterm2colors/xrdb/Wombat.xrdb rename to old_work/iterm2colors/xrdb/Wombat.xrdb diff --git a/iterm2colors/xrdb/Wryan.xrdb b/old_work/iterm2colors/xrdb/Wryan.xrdb similarity index 100% rename from iterm2colors/xrdb/Wryan.xrdb rename to old_work/iterm2colors/xrdb/Wryan.xrdb diff --git a/iterm2colors/xrdb/Zenburn.xrdb b/old_work/iterm2colors/xrdb/Zenburn.xrdb similarity index 100% rename from iterm2colors/xrdb/Zenburn.xrdb rename to old_work/iterm2colors/xrdb/Zenburn.xrdb diff --git a/iterm2colors/xrdb/ayu.xrdb b/old_work/iterm2colors/xrdb/ayu.xrdb similarity index 100% rename from iterm2colors/xrdb/ayu.xrdb rename to old_work/iterm2colors/xrdb/ayu.xrdb diff --git a/iterm2colors/xrdb/ayu_light.xrdb b/old_work/iterm2colors/xrdb/ayu_light.xrdb similarity index 100% rename from iterm2colors/xrdb/ayu_light.xrdb rename to old_work/iterm2colors/xrdb/ayu_light.xrdb diff --git a/iterm2colors/xrdb/deep.xrdb b/old_work/iterm2colors/xrdb/deep.xrdb similarity index 100% rename from iterm2colors/xrdb/deep.xrdb rename to old_work/iterm2colors/xrdb/deep.xrdb diff --git a/iterm2colors/xrdb/idleToes.xrdb b/old_work/iterm2colors/xrdb/idleToes.xrdb similarity index 100% rename from iterm2colors/xrdb/idleToes.xrdb rename to old_work/iterm2colors/xrdb/idleToes.xrdb diff --git a/st-alpha-20160727-308bfbf.diff b/old_work/st-alpha-20160727-308bfbf.diff similarity index 100% rename from st-alpha-20160727-308bfbf.diff rename to old_work/st-alpha-20160727-308bfbf.diff diff --git a/st-delkey-20160727-308bfbf.diff b/old_work/st-delkey-20160727-308bfbf.diff similarity index 100% rename from st-delkey-20160727-308bfbf.diff rename to old_work/st-delkey-20160727-308bfbf.diff diff --git a/st-no_bold_colors-20160727-308bfbf.diff b/old_work/st-no_bold_colors-20160727-308bfbf.diff similarity index 100% rename from st-no_bold_colors-20160727-308bfbf.diff rename to old_work/st-no_bold_colors-20160727-308bfbf.diff diff --git a/st-solarized-both-20160727-308bfbf.diff b/old_work/st-solarized-both-20160727-308bfbf.diff similarity index 100% rename from st-solarized-both-20160727-308bfbf.diff rename to old_work/st-solarized-both-20160727-308bfbf.diff diff --git a/old_work/st.1 b/old_work/st.1 new file mode 100644 index 0000000..1e3f1d4 --- /dev/null +++ b/old_work/st.1 @@ -0,0 +1,179 @@ +.TH ST 1 st\-VERSION +.SH NAME +st \- simple terminal +.SH SYNOPSIS +.B st +.RB [ \-aiv ] +.RB [ \-c +.IR class ] +.RB [ \-f +.IR font ] +.RB [ \-g +.IR geometry ] +.RB [ \-n +.IR name ] +.RB [ \-o +.IR iofile ] +.RB [ \-T +.IR title ] +.RB [ \-t +.IR title ] +.RB [ \-l +.IR line ] +.RB [ \-w +.IR windowid ] +.RB [[ \-e ] +.IR command +.RI [ arguments ...]] +.PP +.B st +.RB [ \-aiv ] +.RB [ \-c +.IR class ] +.RB [ \-f +.IR font ] +.RB [ \-g +.IR geometry ] +.RB [ \-n +.IR name ] +.RB [ \-o +.IR iofile ] +.RB [ \-T +.IR title ] +.RB [ \-t +.IR title ] +.RB [ \-w +.IR windowid ] +.RB \-l +.IR line +.RI [ stty_args ...] +.SH DESCRIPTION +.B st +is a simple terminal emulator. +.SH OPTIONS +.TP +.B \-a +disable alternate screens in terminal +.TP +.BI \-c " class" +defines the window class (default $TERM). +.TP +.BI \-f " font" +defines the +.I font +to use when st is run. +.TP +.BI \-g " geometry" +defines the X11 geometry string. +The form is [=][{xX}][{+-}{+-}]. See +.BR XParseGeometry (3) +for further details. +.TP +.B \-i +will fixate the position given with the -g option. +.TP +.BI \-n " name" +defines the window instance name (default $TERM). +.TP +.BI \-o " iofile" +writes all the I/O to +.I iofile. +This feature is useful when recording st sessions. A value of "-" means +standard output. +.TP +.BI \-T " title" +defines the window title (default 'st'). +.TP +.BI \-t " title" +defines the window title (default 'st'). +.TP +.BI \-w " windowid" +embeds st within the window identified by +.I windowid +.TP +.BI \-l " line" +use a tty +.I line +instead of a pseudo terminal. +.I line +should be a (pseudo-)serial device (e.g. /dev/ttySO on Linux for serial port +0). +When this flag is given +remaining arguments are used as flags for +.BR stty(1). +By default st initializes the serial line to 8 bits, no parity, 1 stop bit +and a 38400 baud rate. The speed is set by appending it as last argument +(e.g. 'st -l 115200'). Arguments before the last one are +.BR stty(1) +flags. If you want to set odd parity on 115200 baud use for example 'st -l +parenb parodd 115200'. Set the number of bits by using for example 'st -l cs7 +115200'. See +.BR stty(1) +for more arguments and cases. +.TP +.B \-v +prints version information to stderr, then exits. +.TP +.BI \-e " command " [ " arguments " "... ]" +st executes +.I command +instead of the shell. If this is used it +.B must be the last option +on the command line, as in xterm / rxvt. +This option is only intended for compability, +and all the remaining arguments are used as a command +even without it. +.SH SHORTCUTS +.TP +.B Break +Send a break in the serial line. +Break key is obtained in PC keyboards +pressing at the same time control and pause. +.TP +.B Ctrl-Print Screen +Toggle if st should print to the +.I iofile. +.TP +.B Shift-Print Screen +Print the full screen to the +.I iofile. +.TP +.B Print Screen +Print the selection to the +.I iofile. +.TP +.B Alt-Shift-Page Up +Increase font size. +.TP +.B Alt-Shift-Page Down +Decrease font size. +.TP +.B Alt-Shift-Home +Reset to default font size. +.TP +.B Shift-Insert +Paste from primary selection (middle mouse button). +.TP +.B Alt-Shift-Insert +Paste from clipboard selection. +.TP +.B Alt-Shift-c +Copy the selected text to the clipboard selection. +.TP +.B Alt-Shift-v +Paste from the clipboard selection. +.SH CUSTOMIZATION +.B st +can be customized by creating a custom config.h and (re)compiling the source +code. This keeps it fast, secure and simple. +.SH AUTHORS +See the LICENSE file for the authors. +.SH LICENSE +See the LICENSE file for the terms of redistribution. +.SH SEE ALSO +.BR tabbed (1), +.BR utmp (1), +.BR stty (1) +.SH BUGS +See the TODO file in the distribution. + diff --git a/old_work/st.c b/old_work/st.c new file mode 100644 index 0000000..a31527b --- /dev/null +++ b/old_work/st.c @@ -0,0 +1,4527 @@ +/* See LICENSE for license details. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "arg.h" + +char *argv0; + +#define Glyph Glyph_ +#define Font Font_ + +#if defined(__linux) + #include +#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) + #include +#elif defined(__FreeBSD__) || defined(__DragonFly__) + #include +#endif + + +/* XEMBED messages */ +#define XEMBED_FOCUS_IN 4 +#define XEMBED_FOCUS_OUT 5 + +/* Arbitrary sizes */ +#define UTF_INVALID 0xFFFD +#define UTF_SIZ 4 +#define ESC_BUF_SIZ (128*UTF_SIZ) +#define ESC_ARG_SIZ 16 +#define STR_BUF_SIZ ESC_BUF_SIZ +#define STR_ARG_SIZ ESC_ARG_SIZ +#define XK_ANY_MOD UINT_MAX +#define XK_NO_MOD 0 +#define XK_SWITCH_MOD (1<<13) +#define OPAQUE 0Xff + +/* macros */ +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#define LEN(a) (sizeof(a) / sizeof(a)[0]) +#define DEFAULT(a, b) (a) = (a) ? (a) : (b) +#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) +#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) +#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') +#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) +#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) +#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) +#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) +#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ + (a).bg != (b).bg) +#define IS_SET(flag) ((term.mode & (flag)) != 0) +#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \ + (t1.tv_nsec-t2.tv_nsec)/1E6) +#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) + +#define USE_ARGB (alpha != OPAQUE && opt_embed == NULL) + +#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) +#define IS_TRUECOL(x) (1 << 24 & (x)) +#define TRUERED(x) (((x) & 0xff0000) >> 8) +#define TRUEGREEN(x) (((x) & 0xff00)) +#define TRUEBLUE(x) (((x) & 0xff) << 8) + + +enum glyph_attribute { + ATTR_NULL = 0, + ATTR_BOLD = 1 << 0, + ATTR_FAINT = 1 << 1, + ATTR_ITALIC = 1 << 2, + ATTR_UNDERLINE = 1 << 3, + ATTR_BLINK = 1 << 4, + ATTR_REVERSE = 1 << 5, + ATTR_INVISIBLE = 1 << 6, + ATTR_STRUCK = 1 << 7, + ATTR_WRAP = 1 << 8, + ATTR_WIDE = 1 << 9, + ATTR_WDUMMY = 1 << 10, + ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, +}; + +enum cursor_movement { + CURSOR_SAVE, + CURSOR_LOAD +}; + +enum cursor_state { + CURSOR_DEFAULT = 0, + CURSOR_WRAPNEXT = 1, + CURSOR_ORIGIN = 2 +}; + +enum term_mode { + MODE_WRAP = 1 << 0, + MODE_INSERT = 1 << 1, + MODE_APPKEYPAD = 1 << 2, + MODE_ALTSCREEN = 1 << 3, + MODE_CRLF = 1 << 4, + MODE_MOUSEBTN = 1 << 5, + MODE_MOUSEMOTION = 1 << 6, + MODE_REVERSE = 1 << 7, + MODE_KBDLOCK = 1 << 8, + MODE_HIDE = 1 << 9, + MODE_ECHO = 1 << 10, + MODE_APPCURSOR = 1 << 11, + MODE_MOUSESGR = 1 << 12, + MODE_8BIT = 1 << 13, + MODE_BLINK = 1 << 14, + MODE_FBLINK = 1 << 15, + MODE_FOCUS = 1 << 16, + MODE_MOUSEX10 = 1 << 17, + MODE_MOUSEMANY = 1 << 18, + MODE_BRCKTPASTE = 1 << 19, + MODE_PRINT = 1 << 20, + MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ + |MODE_MOUSEMANY, +}; + +enum charset { + CS_GRAPHIC0, + CS_GRAPHIC1, + CS_UK, + CS_USA, + CS_MULTI, + CS_GER, + CS_FIN +}; + +enum escape_state { + ESC_START = 1, + ESC_CSI = 2, + ESC_STR = 4, /* DCS, OSC, PM, APC */ + ESC_ALTCHARSET = 8, + ESC_STR_END = 16, /* a final string was encountered */ + ESC_TEST = 32, /* Enter in test mode */ +}; + +enum window_state { + WIN_VISIBLE = 1, + WIN_FOCUSED = 2 +}; + +enum selection_mode { + SEL_IDLE = 0, + SEL_EMPTY = 1, + SEL_READY = 2 +}; + +enum selection_type { + SEL_REGULAR = 1, + SEL_RECTANGULAR = 2 +}; + +enum selection_snap { + SNAP_WORD = 1, + SNAP_LINE = 2 +}; + +typedef unsigned char uchar; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned short ushort; + +typedef uint_least32_t Rune; + +typedef XftDraw *Draw; +typedef XftColor Color; + +typedef struct { + Rune u; /* character code */ + ushort mode; /* attribute flags */ + uint32_t fg; /* foreground */ + uint32_t bg; /* background */ +} Glyph; + +typedef Glyph *Line; + +typedef struct { + Glyph attr; /* current char attributes */ + int x; + int y; + char state; +} TCursor; + +/* CSI Escape sequence structs */ +/* ESC '[' [[ [] [;]] []] */ +typedef struct { + char buf[ESC_BUF_SIZ]; /* raw string */ + int len; /* raw string length */ + char priv; + int arg[ESC_ARG_SIZ]; + int narg; /* nb of args */ + char mode[2]; +} CSIEscape; + +/* STR Escape sequence structs */ +/* ESC type [[ [] [;]] ] ESC '\' */ +typedef struct { + char type; /* ESC type ... */ + char buf[STR_BUF_SIZ]; /* raw string */ + int len; /* raw string length */ + char *args[STR_ARG_SIZ]; + int narg; /* nb of args */ +} STREscape; + +/* Internal representation of the screen */ +typedef struct { + int row; /* nb row */ + int col; /* nb col */ + Line *line; /* screen */ + Line *alt; /* alternate screen */ + int *dirty; /* dirtyness of lines */ + XftGlyphFontSpec *specbuf; /* font spec buffer used for rendering */ + TCursor c; /* cursor */ + int top; /* top scroll limit */ + int bot; /* bottom scroll limit */ + int mode; /* terminal mode flags */ + int esc; /* escape state flags */ + char trantbl[4]; /* charset table translation */ + int charset; /* current charset */ + int icharset; /* selected charset for sequence */ + int numlock; /* lock numbers in keyboard */ + int *tabs; +} Term; + +/* Purely graphic info */ +typedef struct { + Display *dpy; + Colormap cmap; + Window win; + Drawable buf; + Atom xembed, wmdeletewin, netwmname, netwmpid; + XIM xim; + XIC xic; + Draw draw; + Visual *vis; + XSetWindowAttributes attrs; + int scr; + int isfixed; /* is fixed geometry? */ + int l, t; /* left and top offset */ + int gm; /* geometry mask */ + int tw, th; /* tty width and height */ + int w, h; /* window width and height */ + int ch; /* char height */ + int cw; /* char width */ + int depth; /* bit depth */ + char state; /* focus, redraw, visible */ + int cursor; /* cursor style */ +} XWindow; + +typedef struct { + uint b; + uint mask; + char *s; +} MouseShortcut; + +typedef struct { + KeySym k; + uint mask; + char *s; + /* three valued logic variables: 0 indifferent, 1 on, -1 off */ + signed char appkey; /* application keypad */ + signed char appcursor; /* application cursor */ + signed char crlf; /* crlf mode */ +} Key; + +typedef struct { + int mode; + int type; + int snap; + /* + * Selection variables: + * nb – normalized coordinates of the beginning of the selection + * ne – normalized coordinates of the end of the selection + * ob – original coordinates of the beginning of the selection + * oe – original coordinates of the end of the selection + */ + struct { + int x, y; + } nb, ne, ob, oe; + + char *primary, *clipboard; + Atom xtarget; + int alt; + struct timespec tclick1; + struct timespec tclick2; +} Selection; + +typedef union { + int i; + uint ui; + float f; + const void *v; +} Arg; + +typedef struct { + uint mod; + KeySym keysym; + void (*func)(const Arg *); + const Arg arg; +} Shortcut; + +/* function definitions used in config.h */ +static void clipcopy(const Arg *); +static void clippaste(const Arg *); +static void numlock(const Arg *); +static void swapcolors(const Arg *); +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 sendbreak(const Arg *); + +/* Config.h for applying patches and the configuration. */ +#include "config.h" + +/* Font structure */ +typedef struct { + int height; + int width; + int ascent; + int descent; + short lbearing; + short rbearing; + XftFont *match; + FcFontSet *set; + FcPattern *pattern; +} Font; + +/* Drawing Context */ +typedef struct { + Color col[MAX(MAX(LEN(colorname), LEN(altcolorname)), 256)]; + Font font, bfont, ifont, ibfont; + GC gc; +} DC; + +static void die(const char *, ...); +static void draw(void); +static void redraw(void); +static void drawregion(int, int, int, int); +static void execsh(void); +static void stty(void); +static void sigchld(int); +static void run(void); + +static void csidump(void); +static void csihandle(void); +static void csiparse(void); +static void csireset(void); +static int eschandle(uchar); +static void strdump(void); +static void strhandle(void); +static void strparse(void); +static void strreset(void); + +static int tattrset(int); +static void tprinter(char *, size_t); +static void tdumpsel(void); +static void tdumpline(int); +static void tdump(void); +static void tclearregion(int, int, int, int); +static void tcursor(int); +static void tdeletechar(int); +static void tdeleteline(int); +static void tinsertblank(int); +static void tinsertblankline(int); +static int tlinelen(int); +static void tmoveto(int, int); +static void tmoveato(int, int); +static void tnew(int, int); +static void tnewline(int); +static void tputtab(int); +static void tputc(Rune); +static void treset(void); +static void tresize(int, int); +static void tscrollup(int, int); +static void tscrolldown(int, int); +static void tsetattr(int *, int); +static void tsetchar(Rune, Glyph *, int, int); +static void tsetscroll(int, int); +static void tswapscreen(void); +static void tsetdirt(int, int); +static void tsetdirtattr(int); +static void tsetmode(int, int, int *, int); +static void tfulldirt(void); +static void techo(Rune); +static void tcontrolcode(uchar ); +static void tdectest(char ); +static int32_t tdefcolor(int *, int *, int); +static void tdeftran(char); +static inline int match(uint, uint); +static void ttynew(void); +static size_t ttyread(void); +static void ttyresize(void); +static void ttysend(char *, size_t); +static void ttywrite(const char *, size_t); +static void tstrsequence(uchar); + +static inline ushort sixd_to_16bit(int); +static int xmakeglyphfontspecs(XftGlyphFontSpec *, const Glyph *, int, int, int); +static void xdrawglyphfontspecs(const XftGlyphFontSpec *, Glyph, int, int, int); +static void xdrawglyph(Glyph, int, int); +static void xhints(void); +static void xclear(int, int, int, int); +static void xdrawcursor(void); +static void xinit(void); +static void xloadcols(void); +static int xsetcolorname(int, const char *); +static int xgeommasktogravity(int); +static int xloadfont(Font *, FcPattern *); +static void xloadfonts(char *, double); +static void xsettitle(char *); +static void xresettitle(void); +static void xsetpointermotion(int); +static void xseturgency(int); +static void xsetsel(char *, Time); +static void xunloadfont(Font *); +static void xunloadfonts(void); +static void xresize(int, int); + +static void expose(XEvent *); +static void visibility(XEvent *); +static void unmap(XEvent *); +static char *kmap(KeySym, uint); +static void kpress(XEvent *); +static void cmessage(XEvent *); +static void cresize(int, int); +static void resize(XEvent *); +static void focus(XEvent *); +static void brelease(XEvent *); +static void bpress(XEvent *); +static void bmotion(XEvent *); +static void propnotify(XEvent *); +static void selnotify(XEvent *); +static void selclear(XEvent *); +static void selrequest(XEvent *); + +static void selinit(void); +static void selnormalize(void); +static inline int selected(int, int); +static char *getsel(void); +static void selcopy(Time); +static void selscroll(int, int); +static void selsnap(int *, int *, int); +static int x2col(int); +static int y2row(int); +static void getbuttoninfo(XEvent *); +static void mousereport(XEvent *); + +static size_t utf8decode(char *, Rune *, size_t); +static Rune utf8decodebyte(char, size_t *); +static size_t utf8encode(Rune, char *); +static char utf8encodebyte(Rune, size_t); +static char *utf8strchr(char *s, Rune u); +static size_t utf8validate(Rune *, size_t); + +static ssize_t xwrite(int, const char *, size_t); +static void *xmalloc(size_t); +static void *xrealloc(void *, size_t); +static char *xstrdup(char *); + +static void usage(void); + +static void (*handler[LASTEvent])(XEvent *) = { + [KeyPress] = kpress, + [ClientMessage] = cmessage, + [ConfigureNotify] = resize, + [VisibilityNotify] = visibility, + [UnmapNotify] = unmap, + [Expose] = expose, + [FocusIn] = focus, + [FocusOut] = focus, + [MotionNotify] = bmotion, + [ButtonPress] = bpress, + [ButtonRelease] = brelease, +/* + * Uncomment if you want the selection to disappear when you select something + * different in another window. + */ +/* [SelectionClear] = selclear, */ + [SelectionNotify] = selnotify, +/* + * PropertyNotify is only turned on when there is some INCR transfer happening + * for the selection retrieval. + */ + [PropertyNotify] = propnotify, + [SelectionRequest] = selrequest, +}; + +/* Globals */ +static DC dc; +static XWindow xw; +static Term term; +static CSIEscape csiescseq; +static STREscape strescseq; +static int cmdfd; +static pid_t pid; +static Selection sel; +static int iofd = 1; +static char **opt_cmd = NULL; +static char *opt_class = NULL; +static char *opt_embed = NULL; +static char *opt_font = NULL; +static char *opt_io = NULL; +static char *opt_line = NULL; +static char *opt_name = NULL; +static char *opt_title = NULL; +static int oldbutton = 3; /* button event on startup: 3 = release */ +static int bellon = 0; /* visual bell status */ + +static int usealtcolors = 0; /* 1 to use alternate palette */ + +static char *usedfont = NULL; +static double usedfontsize = 0; +static double defaultfontsize = 0; + +static uchar utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0}; +static uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8}; +static Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000}; +static Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF}; + +/* Font Ring Cache */ +enum { + FRC_NORMAL, + FRC_ITALIC, + FRC_BOLD, + FRC_ITALICBOLD +}; + +typedef struct { + XftFont *font; + int flags; + Rune unicodep; +} Fontcache; + +/* Fontcache is an array now. A new font will be appended to the array. */ +static Fontcache frc[16]; +static int frclen = 0; + +ssize_t +xwrite(int fd, const char *s, size_t len) +{ + size_t aux = len; + ssize_t r; + + while (len > 0) { + r = write(fd, s, len); + if (r < 0) + return r; + len -= r; + s += r; + } + + return aux; +} + +void * +xmalloc(size_t len) +{ + void *p = malloc(len); + + if (!p) + die("Out of memory\n"); + + return p; +} + +void * +xrealloc(void *p, size_t len) +{ + if ((p = realloc(p, len)) == NULL) + die("Out of memory\n"); + + return p; +} + +char * +xstrdup(char *s) +{ + if ((s = strdup(s)) == NULL) + die("Out of memory\n"); + + return s; +} + +size_t +utf8decode(char *c, Rune *u, size_t clen) +{ + size_t i, j, len, type; + Rune udecoded; + + *u = UTF_INVALID; + if (!clen) + return 0; + udecoded = utf8decodebyte(c[0], &len); + if (!BETWEEN(len, 1, UTF_SIZ)) + return 1; + for (i = 1, j = 1; i < clen && j < len; ++i, ++j) { + udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type); + if (type != 0) + return j; + } + if (j < len) + return 0; + *u = udecoded; + utf8validate(u, len); + + return len; +} + +Rune +utf8decodebyte(char c, size_t *i) +{ + for (*i = 0; *i < LEN(utfmask); ++(*i)) + if (((uchar)c & utfmask[*i]) == utfbyte[*i]) + return (uchar)c & ~utfmask[*i]; + + return 0; +} + +size_t +utf8encode(Rune u, char *c) +{ + size_t len, i; + + len = utf8validate(&u, 0); + if (len > UTF_SIZ) + return 0; + + for (i = len - 1; i != 0; --i) { + c[i] = utf8encodebyte(u, 0); + u >>= 6; + } + c[0] = utf8encodebyte(u, len); + + return len; +} + +char +utf8encodebyte(Rune u, size_t i) +{ + return utfbyte[i] | (u & ~utfmask[i]); +} + +char * +utf8strchr(char *s, Rune u) +{ + Rune r; + size_t i, j, len; + + len = strlen(s); + for (i = 0, j = 0; i < len; i += j) { + if (!(j = utf8decode(&s[i], &r, len - i))) + break; + if (r == u) + return &(s[i]); + } + + return NULL; +} + +size_t +utf8validate(Rune *u, size_t i) +{ + if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF)) + *u = UTF_INVALID; + for (i = 1; *u > utfmax[i]; ++i) + ; + + return i; +} + +void +selinit(void) +{ + clock_gettime(CLOCK_MONOTONIC, &sel.tclick1); + clock_gettime(CLOCK_MONOTONIC, &sel.tclick2); + sel.mode = SEL_IDLE; + sel.snap = 0; + sel.ob.x = -1; + sel.primary = NULL; + sel.clipboard = NULL; + sel.xtarget = XInternAtom(xw.dpy, "UTF8_STRING", 0); + if (sel.xtarget == None) + sel.xtarget = XA_STRING; +} + +int +x2col(int x) +{ + x -= borderpx; + x /= xw.cw; + + return LIMIT(x, 0, term.col-1); +} + +int +y2row(int y) +{ + y -= borderpx; + y /= xw.ch; + + return LIMIT(y, 0, term.row-1); +} + +int +tlinelen(int y) +{ + int i = term.col; + + if (term.line[y][i - 1].mode & ATTR_WRAP) + return i; + + while (i > 0 && term.line[y][i - 1].u == ' ') + --i; + + return i; +} + +void +selnormalize(void) +{ + int i; + + if (sel.type == SEL_REGULAR && sel.ob.y != sel.oe.y) { + sel.nb.x = sel.ob.y < sel.oe.y ? sel.ob.x : sel.oe.x; + sel.ne.x = sel.ob.y < sel.oe.y ? sel.oe.x : sel.ob.x; + } else { + sel.nb.x = MIN(sel.ob.x, sel.oe.x); + sel.ne.x = MAX(sel.ob.x, sel.oe.x); + } + sel.nb.y = MIN(sel.ob.y, sel.oe.y); + sel.ne.y = MAX(sel.ob.y, sel.oe.y); + + selsnap(&sel.nb.x, &sel.nb.y, -1); + selsnap(&sel.ne.x, &sel.ne.y, +1); + + /* expand selection over line breaks */ + if (sel.type == SEL_RECTANGULAR) + return; + i = tlinelen(sel.nb.y); + if (i < sel.nb.x) + sel.nb.x = i; + if (tlinelen(sel.ne.y) <= sel.ne.x) + sel.ne.x = term.col - 1; +} + +int +selected(int x, int y) +{ + if (sel.mode == SEL_EMPTY) + return 0; + + if (sel.type == SEL_RECTANGULAR) + return BETWEEN(y, sel.nb.y, sel.ne.y) + && BETWEEN(x, sel.nb.x, sel.ne.x); + + return BETWEEN(y, sel.nb.y, sel.ne.y) + && (y != sel.nb.y || x >= sel.nb.x) + && (y != sel.ne.y || x <= sel.ne.x); +} + +void +selsnap(int *x, int *y, int direction) +{ + int newx, newy, xt, yt; + int delim, prevdelim; + Glyph *gp, *prevgp; + + switch (sel.snap) { + case SNAP_WORD: + /* + * Snap around if the word wraps around at the end or + * beginning of a line. + */ + prevgp = &term.line[*y][*x]; + prevdelim = ISDELIM(prevgp->u); + for (;;) { + newx = *x + direction; + newy = *y; + if (!BETWEEN(newx, 0, term.col - 1)) { + newy += direction; + newx = (newx + term.col) % term.col; + if (!BETWEEN(newy, 0, term.row - 1)) + break; + + if (direction > 0) + yt = *y, xt = *x; + else + yt = newy, xt = newx; + if (!(term.line[yt][xt].mode & ATTR_WRAP)) + break; + } + + if (newx >= tlinelen(newy)) + break; + + gp = &term.line[newy][newx]; + delim = ISDELIM(gp->u); + if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim + || (delim && gp->u != prevgp->u))) + break; + + *x = newx; + *y = newy; + prevgp = gp; + prevdelim = delim; + } + break; + case SNAP_LINE: + /* + * Snap around if the the previous line or the current one + * has set ATTR_WRAP at its end. Then the whole next or + * previous line will be selected. + */ + *x = (direction < 0) ? 0 : term.col - 1; + if (direction < 0) { + for (; *y > 0; *y += direction) { + if (!(term.line[*y-1][term.col-1].mode + & ATTR_WRAP)) { + break; + } + } + } else if (direction > 0) { + for (; *y < term.row-1; *y += direction) { + if (!(term.line[*y][term.col-1].mode + & ATTR_WRAP)) { + break; + } + } + } + break; + } +} + +void +getbuttoninfo(XEvent *e) +{ + int type; + uint state = e->xbutton.state & ~(Button1Mask | forceselmod); + + sel.alt = IS_SET(MODE_ALTSCREEN); + + sel.oe.x = x2col(e->xbutton.x); + sel.oe.y = y2row(e->xbutton.y); + selnormalize(); + + sel.type = SEL_REGULAR; + for (type = 1; type < LEN(selmasks); ++type) { + if (match(selmasks[type], state)) { + sel.type = type; + break; + } + } +} + +void +mousereport(XEvent *e) +{ + int x = x2col(e->xbutton.x), y = y2row(e->xbutton.y), + button = e->xbutton.button, state = e->xbutton.state, + len; + char buf[40]; + static int ox, oy; + + /* from urxvt */ + if (e->xbutton.type == MotionNotify) { + if (x == ox && y == oy) + return; + if (!IS_SET(MODE_MOUSEMOTION) && !IS_SET(MODE_MOUSEMANY)) + return; + /* MOUSE_MOTION: no reporting if no button is pressed */ + if (IS_SET(MODE_MOUSEMOTION) && oldbutton == 3) + return; + + button = oldbutton + 32; + ox = x; + oy = y; + } else { + if (!IS_SET(MODE_MOUSESGR) && e->xbutton.type == ButtonRelease) { + button = 3; + } else { + button -= Button1; + if (button >= 3) + button += 64 - 3; + } + if (e->xbutton.type == ButtonPress) { + oldbutton = button; + ox = x; + oy = y; + } else if (e->xbutton.type == ButtonRelease) { + oldbutton = 3; + /* MODE_MOUSEX10: no button release reporting */ + if (IS_SET(MODE_MOUSEX10)) + return; + if (button == 64 || button == 65) + return; + } + } + + if (!IS_SET(MODE_MOUSEX10)) { + button += ((state & ShiftMask ) ? 4 : 0) + + ((state & Mod4Mask ) ? 8 : 0) + + ((state & ControlMask) ? 16 : 0); + } + + if (IS_SET(MODE_MOUSESGR)) { + len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c", + button, x+1, y+1, + e->xbutton.type == ButtonRelease ? 'm' : 'M'); + } else if (x < 223 && y < 223) { + len = snprintf(buf, sizeof(buf), "\033[M%c%c%c", + 32+button, 32+x+1, 32+y+1); + } else { + return; + } + + ttywrite(buf, len); +} + +void +bpress(XEvent *e) +{ + struct timespec now; + MouseShortcut *ms; + + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { + mousereport(e); + return; + } + + for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { + if (e->xbutton.button == ms->b + && match(ms->mask, e->xbutton.state)) { + ttysend(ms->s, strlen(ms->s)); + return; + } + } + + if (e->xbutton.button == Button1) { + clock_gettime(CLOCK_MONOTONIC, &now); + + /* Clear previous selection, logically and visually. */ + selclear(NULL); + sel.mode = SEL_EMPTY; + sel.type = SEL_REGULAR; + sel.oe.x = sel.ob.x = x2col(e->xbutton.x); + sel.oe.y = sel.ob.y = y2row(e->xbutton.y); + + /* + * If the user clicks below predefined timeouts specific + * snapping behaviour is exposed. + */ + if (TIMEDIFF(now, sel.tclick2) <= tripleclicktimeout) { + sel.snap = SNAP_LINE; + } else if (TIMEDIFF(now, sel.tclick1) <= doubleclicktimeout) { + sel.snap = SNAP_WORD; + } else { + sel.snap = 0; + } + selnormalize(); + + if (sel.snap != 0) + sel.mode = SEL_READY; + tsetdirt(sel.nb.y, sel.ne.y); + sel.tclick2 = sel.tclick1; + sel.tclick1 = now; + } +} + +char * +getsel(void) +{ + char *str, *ptr; + int y, bufsize, lastx, linelen; + Glyph *gp, *last; + + if (sel.ob.x == -1) + return NULL; + + bufsize = (term.col+1) * (sel.ne.y-sel.nb.y+1) * UTF_SIZ; + ptr = str = xmalloc(bufsize); + + /* append every set & selected glyph to the selection */ + for (y = sel.nb.y; y <= sel.ne.y; y++) { + if ((linelen = tlinelen(y)) == 0) { + *ptr++ = '\n'; + continue; + } + + if (sel.type == SEL_RECTANGULAR) { + gp = &term.line[y][sel.nb.x]; + lastx = sel.ne.x; + } else { + gp = &term.line[y][sel.nb.y == y ? sel.nb.x : 0]; + lastx = (sel.ne.y == y) ? sel.ne.x : term.col-1; + } + last = &term.line[y][MIN(lastx, linelen-1)]; + while (last >= gp && last->u == ' ') + --last; + + for ( ; gp <= last; ++gp) { + if (gp->mode & ATTR_WDUMMY) + continue; + + ptr += utf8encode(gp->u, ptr); + } + + /* + * Copy and pasting of line endings is inconsistent + * in the inconsistent terminal and GUI world. + * The best solution seems like to produce '\n' when + * something is copied from st and convert '\n' to + * '\r', when something to be pasted is received by + * st. + * FIXME: Fix the computer world. + */ + if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP)) + *ptr++ = '\n'; + } + *ptr = 0; + return str; +} + +void +selcopy(Time t) +{ + xsetsel(getsel(), t); +} + +void +propnotify(XEvent *e) +{ + XPropertyEvent *xpev; + Atom clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + + xpev = &e->xproperty; + if (xpev->state == PropertyNewValue && + (xpev->atom == XA_PRIMARY || + xpev->atom == clipboard)) { + selnotify(e); + } +} + +void +selnotify(XEvent *e) +{ + ulong nitems, ofs, rem; + int format; + uchar *data, *last, *repl; + Atom type, incratom, property; + + incratom = XInternAtom(xw.dpy, "INCR", 0); + + ofs = 0; + if (e->type == SelectionNotify) { + property = e->xselection.property; + } else if(e->type == PropertyNotify) { + property = e->xproperty.atom; + } else { + return; + } + if (property == None) + return; + + do { + if (XGetWindowProperty(xw.dpy, xw.win, property, ofs, + BUFSIZ/4, False, AnyPropertyType, + &type, &format, &nitems, &rem, + &data)) { + fprintf(stderr, "Clipboard allocation failed\n"); + return; + } + + if (e->type == PropertyNotify && nitems == 0 && rem == 0) { + /* + * If there is some PropertyNotify with no data, then + * this is the signal of the selection owner that all + * data has been transferred. We won't need to receive + * PropertyNotify events anymore. + */ + MODBIT(xw.attrs.event_mask, 0, PropertyChangeMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, + &xw.attrs); + } + + if (type == incratom) { + /* + * Activate the PropertyNotify events so we receive + * when the selection owner does send us the next + * chunk of data. + */ + MODBIT(xw.attrs.event_mask, 1, PropertyChangeMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, + &xw.attrs); + + /* + * Deleting the property is the transfer start signal. + */ + XDeleteProperty(xw.dpy, xw.win, (int)property); + continue; + } + + /* + * As seen in getsel: + * Line endings are inconsistent in the terminal and GUI world + * copy and pasting. When receiving some selection data, + * replace all '\n' with '\r'. + * FIXME: Fix the computer world. + */ + repl = data; + last = data + nitems * format / 8; + while ((repl = memchr(repl, '\n', last - repl))) { + *repl++ = '\r'; + } + + if (IS_SET(MODE_BRCKTPASTE) && ofs == 0) + ttywrite("\033[200~", 6); + ttysend((char *)data, nitems * format / 8); + if (IS_SET(MODE_BRCKTPASTE) && rem == 0) + ttywrite("\033[201~", 6); + XFree(data); + /* number of 32-bit chunks returned */ + ofs += nitems * format / 32; + } while (rem > 0); + + /* + * Deleting the property again tells the selection owner to send the + * next data chunk in the property. + */ + XDeleteProperty(xw.dpy, xw.win, (int)property); +} + +void +selpaste(const Arg *dummy) +{ + XConvertSelection(xw.dpy, XA_PRIMARY, sel.xtarget, XA_PRIMARY, + xw.win, CurrentTime); +} + +void +clipcopy(const Arg *dummy) +{ + Atom clipboard; + + if (sel.clipboard != NULL) + free(sel.clipboard); + + if (sel.primary != NULL) { + sel.clipboard = xstrdup(sel.primary); + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + XSetSelectionOwner(xw.dpy, clipboard, xw.win, CurrentTime); + } +} + +void +clippaste(const Arg *dummy) +{ + Atom clipboard; + + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + XConvertSelection(xw.dpy, clipboard, sel.xtarget, clipboard, + xw.win, CurrentTime); +} + +void +selclear(XEvent *e) +{ + if (sel.ob.x == -1) + return; + sel.mode = SEL_IDLE; + sel.ob.x = -1; + tsetdirt(sel.nb.y, sel.ne.y); +} + +void +selrequest(XEvent *e) +{ + XSelectionRequestEvent *xsre; + XSelectionEvent xev; + Atom xa_targets, string, clipboard; + char *seltext; + + xsre = (XSelectionRequestEvent *) e; + xev.type = SelectionNotify; + xev.requestor = xsre->requestor; + xev.selection = xsre->selection; + xev.target = xsre->target; + xev.time = xsre->time; + if (xsre->property == None) + xsre->property = xsre->target; + + /* reject */ + xev.property = None; + + xa_targets = XInternAtom(xw.dpy, "TARGETS", 0); + if (xsre->target == xa_targets) { + /* respond with the supported type */ + string = sel.xtarget; + XChangeProperty(xsre->display, xsre->requestor, xsre->property, + XA_ATOM, 32, PropModeReplace, + (uchar *) &string, 1); + xev.property = xsre->property; + } else if (xsre->target == sel.xtarget || xsre->target == XA_STRING) { + /* + * xith XA_STRING non ascii characters may be incorrect in the + * requestor. It is not our problem, use utf8. + */ + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + if (xsre->selection == XA_PRIMARY) { + seltext = sel.primary; + } else if (xsre->selection == clipboard) { + seltext = sel.clipboard; + } else { + fprintf(stderr, + "Unhandled clipboard selection 0x%lx\n", + xsre->selection); + return; + } + if (seltext != NULL) { + XChangeProperty(xsre->display, xsre->requestor, + xsre->property, xsre->target, + 8, PropModeReplace, + (uchar *)seltext, strlen(seltext)); + xev.property = xsre->property; + } + } + + /* all done, send a notification to the listener */ + if (!XSendEvent(xsre->display, xsre->requestor, 1, 0, (XEvent *) &xev)) + fprintf(stderr, "Error sending SelectionNotify event\n"); +} + +void +xsetsel(char *str, Time t) +{ + free(sel.primary); + sel.primary = str; + + XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); + if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) + selclear(0); +} + +void +brelease(XEvent *e) +{ + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { + mousereport(e); + return; + } + + if (e->xbutton.button == Button2) { + selpaste(NULL); + } else if (e->xbutton.button == Button1) { + if (sel.mode == SEL_READY) { + getbuttoninfo(e); + selcopy(e->xbutton.time); + } else + selclear(NULL); + sel.mode = SEL_IDLE; + tsetdirt(sel.nb.y, sel.ne.y); + } +} + +void +bmotion(XEvent *e) +{ + int oldey, oldex, oldsby, oldsey; + + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { + mousereport(e); + return; + } + + if (!sel.mode) + return; + + sel.mode = SEL_READY; + oldey = sel.oe.y; + oldex = sel.oe.x; + oldsby = sel.nb.y; + oldsey = sel.ne.y; + getbuttoninfo(e); + + if (oldey != sel.oe.y || oldex != sel.oe.x) + tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey)); +} + +void +die(const char *errstr, ...) +{ + va_list ap; + + va_start(ap, errstr); + vfprintf(stderr, errstr, ap); + va_end(ap); + exit(1); +} + +void +execsh(void) +{ + char **args, *sh, *prog; + const struct passwd *pw; + char buf[sizeof(long) * 8 + 1]; + + errno = 0; + if ((pw = getpwuid(getuid())) == NULL) { + if (errno) + die("getpwuid:%s\n", strerror(errno)); + else + die("who are you?\n"); + } + + if ((sh = getenv("SHELL")) == NULL) + sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; + + if (opt_cmd) + prog = opt_cmd[0]; + else if (utmp) + prog = utmp; + else + prog = sh; + args = (opt_cmd) ? opt_cmd : (char *[]) {prog, NULL}; + + snprintf(buf, sizeof(buf), "%lu", xw.win); + + unsetenv("COLUMNS"); + unsetenv("LINES"); + unsetenv("TERMCAP"); + setenv("LOGNAME", pw->pw_name, 1); + setenv("USER", pw->pw_name, 1); + setenv("SHELL", sh, 1); + setenv("HOME", pw->pw_dir, 1); + setenv("TERM", termname, 1); + setenv("WINDOWID", buf, 1); + + signal(SIGCHLD, SIG_DFL); + signal(SIGHUP, SIG_DFL); + signal(SIGINT, SIG_DFL); + signal(SIGQUIT, SIG_DFL); + signal(SIGTERM, SIG_DFL); + signal(SIGALRM, SIG_DFL); + + execvp(prog, args); + _exit(1); +} + +void +sigchld(int a) +{ + int stat; + pid_t p; + + if ((p = waitpid(pid, &stat, WNOHANG)) < 0) + die("Waiting for pid %hd failed: %s\n", pid, strerror(errno)); + + if (pid != p) + return; + + if (!WIFEXITED(stat) || WEXITSTATUS(stat)) + die("child finished with error '%d'\n", stat); + exit(0); +} + + +void +stty(void) +{ + char cmd[_POSIX_ARG_MAX], **p, *q, *s; + size_t n, siz; + + if ((n = strlen(stty_args)) > sizeof(cmd)-1) + die("incorrect stty parameters\n"); + memcpy(cmd, stty_args, n); + q = cmd + n; + siz = sizeof(cmd) - n; + for (p = opt_cmd; p && (s = *p); ++p) { + if ((n = strlen(s)) > siz-1) + die("stty parameter length too long\n"); + *q++ = ' '; + memcpy(q, s, n); + q += n; + siz -= n + 1; + } + *q = '\0'; + if (system(cmd) != 0) + perror("Couldn't call stty"); +} + +void +ttynew(void) +{ + int m, s; + struct winsize w = {term.row, term.col, 0, 0}; + + if (opt_io) { + term.mode |= MODE_PRINT; + iofd = (!strcmp(opt_io, "-")) ? + 1 : open(opt_io, O_WRONLY | O_CREAT, 0666); + if (iofd < 0) { + fprintf(stderr, "Error opening %s:%s\n", + opt_io, strerror(errno)); + } + } + + if (opt_line) { + if ((cmdfd = open(opt_line, O_RDWR)) < 0) + die("open line failed: %s\n", strerror(errno)); + dup2(cmdfd, 0); + stty(); + return; + } + + /* seems to work fine on linux, openbsd and freebsd */ + if (openpty(&m, &s, NULL, NULL, &w) < 0) + die("openpty failed: %s\n", strerror(errno)); + + switch (pid = fork()) { + case -1: + die("fork failed\n"); + break; + case 0: + close(iofd); + setsid(); /* create a new process group */ + dup2(s, 0); + dup2(s, 1); + dup2(s, 2); + if (ioctl(s, TIOCSCTTY, NULL) < 0) + die("ioctl TIOCSCTTY failed: %s\n", strerror(errno)); + close(s); + close(m); + execsh(); + break; + default: + close(s); + cmdfd = m; + signal(SIGCHLD, sigchld); + break; + } +} + +size_t +ttyread(void) +{ + static char buf[BUFSIZ]; + static int buflen = 0; + char *ptr; + int charsize; /* size of utf8 char in bytes */ + Rune unicodep; + int ret; + + /* append read bytes to unprocessed bytes */ + if ((ret = read(cmdfd, buf+buflen, LEN(buf)-buflen)) < 0) + die("Couldn't read from shell: %s\n", strerror(errno)); + + /* process every complete utf8 char */ + buflen += ret; + ptr = buf; + while ((charsize = utf8decode(ptr, &unicodep, buflen))) { + tputc(unicodep); + ptr += charsize; + buflen -= charsize; + } + + /* keep any uncomplete utf8 char for the next call */ + memmove(buf, ptr, buflen); + + return ret; +} + +void +ttywrite(const char *s, size_t n) +{ + fd_set wfd, rfd; + ssize_t r; + size_t lim = 256; + + /* + * Remember that we are using a pty, which might be a modem line. + * Writing too much will clog the line. That's why we are doing this + * dance. + * FIXME: Migrate the world to Plan 9. + */ + while (n > 0) { + FD_ZERO(&wfd); + FD_ZERO(&rfd); + FD_SET(cmdfd, &wfd); + FD_SET(cmdfd, &rfd); + + /* Check if we can write. */ + if (pselect(cmdfd+1, &rfd, &wfd, NULL, NULL, NULL) < 0) { + if (errno == EINTR) + continue; + die("select failed: %s\n", strerror(errno)); + } + if (FD_ISSET(cmdfd, &wfd)) { + /* + * Only write the bytes written by ttywrite() or the + * default of 256. This seems to be a reasonable value + * for a serial line. Bigger values might clog the I/O. + */ + if ((r = write(cmdfd, s, (n < lim)? n : lim)) < 0) + goto write_error; + if (r < n) { + /* + * We weren't able to write out everything. + * This means the buffer is getting full + * again. Empty it. + */ + if (n < lim) + lim = ttyread(); + n -= r; + s += r; + } else { + /* All bytes have been written. */ + break; + } + } + if (FD_ISSET(cmdfd, &rfd)) + lim = ttyread(); + } + return; + +write_error: + die("write error on tty: %s\n", strerror(errno)); +} + +void +ttysend(char *s, size_t n) +{ + int len; + Rune u; + + ttywrite(s, n); + if (IS_SET(MODE_ECHO)) + while ((len = utf8decode(s, &u, n)) > 0) { + techo(u); + n -= len; + s += len; + } +} + +void +ttyresize(void) +{ + struct winsize w; + + w.ws_row = term.row; + w.ws_col = term.col; + w.ws_xpixel = xw.tw; + w.ws_ypixel = xw.th; + if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) + fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); +} + +int +tattrset(int attr) +{ + int i, j; + + for (i = 0; i < term.row-1; i++) { + for (j = 0; j < term.col-1; j++) { + if (term.line[i][j].mode & attr) + return 1; + } + } + + return 0; +} + +void +tsetdirt(int top, int bot) +{ + int i; + + LIMIT(top, 0, term.row-1); + LIMIT(bot, 0, term.row-1); + + for (i = top; i <= bot; i++) + term.dirty[i] = 1; +} + +void +tsetdirtattr(int attr) +{ + int i, j; + + for (i = 0; i < term.row-1; i++) { + for (j = 0; j < term.col-1; j++) { + if (term.line[i][j].mode & attr) { + tsetdirt(i, i); + break; + } + } + } +} + +void +tfulldirt(void) +{ + tsetdirt(0, term.row-1); +} + +void +tcursor(int mode) +{ + static TCursor c[2]; + int alt = IS_SET(MODE_ALTSCREEN); + + if (mode == CURSOR_SAVE) { + c[alt] = term.c; + } else if (mode == CURSOR_LOAD) { + term.c = c[alt]; + tmoveto(c[alt].x, c[alt].y); + } +} + +void +treset(void) +{ + uint i; + + term.c = (TCursor){{ + .mode = ATTR_NULL, + .fg = defaultfg, + .bg = defaultbg + }, .x = 0, .y = 0, .state = CURSOR_DEFAULT}; + + memset(term.tabs, 0, term.col * sizeof(*term.tabs)); + for (i = tabspaces; i < term.col; i += tabspaces) + term.tabs[i] = 1; + term.top = 0; + term.bot = term.row - 1; + term.mode = MODE_WRAP; + memset(term.trantbl, CS_USA, sizeof(term.trantbl)); + term.charset = 0; + + for (i = 0; i < 2; i++) { + tmoveto(0, 0); + tcursor(CURSOR_SAVE); + tclearregion(0, 0, term.col-1, term.row-1); + tswapscreen(); + } +} + +void +tnew(int col, int row) +{ + term = (Term){ .c = { .attr = { .fg = defaultfg, .bg = defaultbg } } }; + tresize(col, row); + term.numlock = 1; + + treset(); +} + +void +tswapscreen(void) +{ + Line *tmp = term.line; + + term.line = term.alt; + term.alt = tmp; + term.mode ^= MODE_ALTSCREEN; + tfulldirt(); +} + +void +tscrolldown(int orig, int n) +{ + int i; + Line temp; + + LIMIT(n, 0, term.bot-orig+1); + + tsetdirt(orig, term.bot-n); + tclearregion(0, term.bot-n+1, term.col-1, term.bot); + + for (i = term.bot; i >= orig+n; i--) { + temp = term.line[i]; + term.line[i] = term.line[i-n]; + term.line[i-n] = temp; + } + + selscroll(orig, n); +} + +void +tscrollup(int orig, int n) +{ + int i; + Line temp; + + LIMIT(n, 0, term.bot-orig+1); + + tclearregion(0, orig, term.col-1, orig+n-1); + tsetdirt(orig+n, term.bot); + + for (i = orig; i <= term.bot-n; i++) { + temp = term.line[i]; + term.line[i] = term.line[i+n]; + term.line[i+n] = temp; + } + + selscroll(orig, -n); +} + +void +selscroll(int orig, int n) +{ + if (sel.ob.x == -1) + return; + + if (BETWEEN(sel.ob.y, orig, term.bot) || BETWEEN(sel.oe.y, orig, term.bot)) { + if ((sel.ob.y += n) > term.bot || (sel.oe.y += n) < term.top) { + selclear(NULL); + return; + } + if (sel.type == SEL_RECTANGULAR) { + if (sel.ob.y < term.top) + sel.ob.y = term.top; + if (sel.oe.y > term.bot) + sel.oe.y = term.bot; + } else { + if (sel.ob.y < term.top) { + sel.ob.y = term.top; + sel.ob.x = 0; + } + if (sel.oe.y > term.bot) { + sel.oe.y = term.bot; + sel.oe.x = term.col; + } + } + selnormalize(); + } +} + +void +tnewline(int first_col) +{ + int y = term.c.y; + + if (y == term.bot) { + tscrollup(term.top, 1); + } else { + y++; + } + tmoveto(first_col ? 0 : term.c.x, y); +} + +void +csiparse(void) +{ + char *p = csiescseq.buf, *np; + long int v; + + csiescseq.narg = 0; + if (*p == '?') { + csiescseq.priv = 1; + p++; + } + + csiescseq.buf[csiescseq.len] = '\0'; + while (p < csiescseq.buf+csiescseq.len) { + np = NULL; + v = strtol(p, &np, 10); + if (np == p) + v = 0; + if (v == LONG_MAX || v == LONG_MIN) + v = -1; + csiescseq.arg[csiescseq.narg++] = v; + p = np; + if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ) + break; + p++; + } + csiescseq.mode[0] = *p++; + csiescseq.mode[1] = (p < csiescseq.buf+csiescseq.len) ? *p : '\0'; +} + +/* for absolute user moves, when decom is set */ +void +tmoveato(int x, int y) +{ + tmoveto(x, y + ((term.c.state & CURSOR_ORIGIN) ? term.top: 0)); +} + +void +tmoveto(int x, int y) +{ + int miny, maxy; + + if (term.c.state & CURSOR_ORIGIN) { + miny = term.top; + maxy = term.bot; + } else { + miny = 0; + maxy = term.row - 1; + } + term.c.state &= ~CURSOR_WRAPNEXT; + term.c.x = LIMIT(x, 0, term.col-1); + term.c.y = LIMIT(y, miny, maxy); +} + +void +tsetchar(Rune u, Glyph *attr, int x, int y) +{ + static char *vt100_0[62] = { /* 0x41 - 0x7e */ + "↑", "↓", "→", "←", "█", "▚", "☃", /* A - G */ + 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */ + 0, 0, 0, 0, 0, 0, 0, 0, /* P - W */ + 0, 0, 0, 0, 0, 0, 0, " ", /* X - _ */ + "◆", "▒", "␉", "␌", "␍", "␊", "°", "±", /* ` - g */ + "␤", "␋", "┘", "┐", "┌", "└", "┼", "⎺", /* h - o */ + "⎻", "─", "⎼", "⎽", "├", "┤", "┴", "┬", /* p - w */ + "│", "≤", "≥", "π", "≠", "£", "·", /* x - ~ */ + }; + + /* + * The table is proudly stolen from rxvt. + */ + if (term.trantbl[term.charset] == CS_GRAPHIC0 && + BETWEEN(u, 0x41, 0x7e) && vt100_0[u - 0x41]) + utf8decode(vt100_0[u - 0x41], &u, UTF_SIZ); + + if (term.line[y][x].mode & ATTR_WIDE) { + if (x+1 < term.col) { + term.line[y][x+1].u = ' '; + term.line[y][x+1].mode &= ~ATTR_WDUMMY; + } + } else if (term.line[y][x].mode & ATTR_WDUMMY) { + term.line[y][x-1].u = ' '; + term.line[y][x-1].mode &= ~ATTR_WIDE; + } + + term.dirty[y] = 1; + term.line[y][x] = *attr; + term.line[y][x].u = u; +} + +void +tclearregion(int x1, int y1, int x2, int y2) +{ + int x, y, temp; + Glyph *gp; + + if (x1 > x2) + temp = x1, x1 = x2, x2 = temp; + if (y1 > y2) + temp = y1, y1 = y2, y2 = temp; + + LIMIT(x1, 0, term.col-1); + LIMIT(x2, 0, term.col-1); + LIMIT(y1, 0, term.row-1); + LIMIT(y2, 0, term.row-1); + + for (y = y1; y <= y2; y++) { + term.dirty[y] = 1; + for (x = x1; x <= x2; x++) { + gp = &term.line[y][x]; + if (selected(x, y)) + selclear(NULL); + gp->fg = term.c.attr.fg; + gp->bg = term.c.attr.bg; + gp->mode = 0; + gp->u = ' '; + } + } +} + +void +tdeletechar(int n) +{ + int dst, src, size; + Glyph *line; + + LIMIT(n, 0, term.col - term.c.x); + + dst = term.c.x; + src = term.c.x + n; + size = term.col - src; + line = term.line[term.c.y]; + + memmove(&line[dst], &line[src], size * sizeof(Glyph)); + tclearregion(term.col-n, term.c.y, term.col-1, term.c.y); +} + +void +tinsertblank(int n) +{ + int dst, src, size; + Glyph *line; + + LIMIT(n, 0, term.col - term.c.x); + + dst = term.c.x + n; + src = term.c.x; + size = term.col - dst; + line = term.line[term.c.y]; + + memmove(&line[dst], &line[src], size * sizeof(Glyph)); + tclearregion(src, term.c.y, dst - 1, term.c.y); +} + +void +tinsertblankline(int n) +{ + if (BETWEEN(term.c.y, term.top, term.bot)) + tscrolldown(term.c.y, n); +} + +void +tdeleteline(int n) +{ + if (BETWEEN(term.c.y, term.top, term.bot)) + tscrollup(term.c.y, n); +} + +int32_t +tdefcolor(int *attr, int *npar, int l) +{ + int32_t idx = -1; + uint r, g, b; + + switch (attr[*npar + 1]) { + case 2: /* direct color in RGB space */ + if (*npar + 4 >= l) { + fprintf(stderr, + "erresc(38): Incorrect number of parameters (%d)\n", + *npar); + break; + } + r = attr[*npar + 2]; + g = attr[*npar + 3]; + b = attr[*npar + 4]; + *npar += 4; + if (!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b, 0, 255)) + fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n", + r, g, b); + else + idx = TRUECOLOR(r, g, b); + break; + case 5: /* indexed color */ + if (*npar + 2 >= l) { + fprintf(stderr, + "erresc(38): Incorrect number of parameters (%d)\n", + *npar); + break; + } + *npar += 2; + if (!BETWEEN(attr[*npar], 0, 255)) + fprintf(stderr, "erresc: bad fgcolor %d\n", attr[*npar]); + else + idx = attr[*npar]; + break; + case 0: /* implemented defined (only foreground) */ + case 1: /* transparent */ + case 3: /* direct color in CMY space */ + case 4: /* direct color in CMYK space */ + default: + fprintf(stderr, + "erresc(38): gfx attr %d unknown\n", attr[*npar]); + break; + } + + return idx; +} + +void +tsetattr(int *attr, int l) +{ + int i; + int32_t idx; + + for (i = 0; i < l; i++) { + switch (attr[i]) { + case 0: + term.c.attr.mode &= ~( + ATTR_BOLD | + ATTR_FAINT | + ATTR_ITALIC | + ATTR_UNDERLINE | + ATTR_BLINK | + ATTR_REVERSE | + ATTR_INVISIBLE | + ATTR_STRUCK ); + term.c.attr.fg = defaultfg; + term.c.attr.bg = defaultbg; + break; + case 1: + term.c.attr.mode |= ATTR_BOLD; + break; + case 2: + term.c.attr.mode |= ATTR_FAINT; + break; + case 3: + term.c.attr.mode |= ATTR_ITALIC; + break; + case 4: + term.c.attr.mode |= ATTR_UNDERLINE; + break; + case 5: /* slow blink */ + /* FALLTHROUGH */ + case 6: /* rapid blink */ + term.c.attr.mode |= ATTR_BLINK; + break; + case 7: + term.c.attr.mode |= ATTR_REVERSE; + break; + case 8: + term.c.attr.mode |= ATTR_INVISIBLE; + break; + case 9: + term.c.attr.mode |= ATTR_STRUCK; + break; + case 22: + term.c.attr.mode &= ~(ATTR_BOLD | ATTR_FAINT); + break; + case 23: + term.c.attr.mode &= ~ATTR_ITALIC; + break; + case 24: + term.c.attr.mode &= ~ATTR_UNDERLINE; + break; + case 25: + term.c.attr.mode &= ~ATTR_BLINK; + break; + case 27: + term.c.attr.mode &= ~ATTR_REVERSE; + break; + case 28: + term.c.attr.mode &= ~ATTR_INVISIBLE; + break; + case 29: + term.c.attr.mode &= ~ATTR_STRUCK; + break; + case 38: + if ((idx = tdefcolor(attr, &i, l)) >= 0) + term.c.attr.fg = idx; + break; + case 39: + term.c.attr.fg = defaultfg; + break; + case 48: + if ((idx = tdefcolor(attr, &i, l)) >= 0) + term.c.attr.bg = idx; + break; + case 49: + term.c.attr.bg = defaultbg; + break; + default: + if (BETWEEN(attr[i], 30, 37)) { + term.c.attr.fg = attr[i] - 30; + } else if (BETWEEN(attr[i], 40, 47)) { + term.c.attr.bg = attr[i] - 40; + } else if (BETWEEN(attr[i], 90, 97)) { + term.c.attr.fg = attr[i] - 90 + 8; + } else if (BETWEEN(attr[i], 100, 107)) { + term.c.attr.bg = attr[i] - 100 + 8; + } else { + fprintf(stderr, + "erresc(default): gfx attr %d unknown\n", + attr[i]), csidump(); + } + break; + } + } +} + +void +tsetscroll(int t, int b) +{ + int temp; + + LIMIT(t, 0, term.row-1); + LIMIT(b, 0, term.row-1); + if (t > b) { + temp = t; + t = b; + b = temp; + } + term.top = t; + term.bot = b; +} + +void +tsetmode(int priv, int set, int *args, int narg) +{ + int *lim, mode; + int alt; + + for (lim = args + narg; args < lim; ++args) { + if (priv) { + switch (*args) { + case 1: /* DECCKM -- Cursor key */ + MODBIT(term.mode, set, MODE_APPCURSOR); + break; + case 5: /* DECSCNM -- Reverse video */ + mode = term.mode; + MODBIT(term.mode, set, MODE_REVERSE); + if (mode != term.mode) + redraw(); + break; + case 6: /* DECOM -- Origin */ + MODBIT(term.c.state, set, CURSOR_ORIGIN); + tmoveato(0, 0); + break; + case 7: /* DECAWM -- Auto wrap */ + MODBIT(term.mode, set, MODE_WRAP); + break; + case 0: /* Error (IGNORED) */ + case 2: /* DECANM -- ANSI/VT52 (IGNORED) */ + case 3: /* DECCOLM -- Column (IGNORED) */ + case 4: /* DECSCLM -- Scroll (IGNORED) */ + case 8: /* DECARM -- Auto repeat (IGNORED) */ + case 18: /* DECPFF -- Printer feed (IGNORED) */ + case 19: /* DECPEX -- Printer extent (IGNORED) */ + case 42: /* DECNRCM -- National characters (IGNORED) */ + case 12: /* att610 -- Start blinking cursor (IGNORED) */ + break; + case 25: /* DECTCEM -- Text Cursor Enable Mode */ + MODBIT(term.mode, !set, MODE_HIDE); + break; + case 9: /* X10 mouse compatibility mode */ + xsetpointermotion(0); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEX10); + break; + case 1000: /* 1000: report button press */ + xsetpointermotion(0); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEBTN); + break; + case 1002: /* 1002: report motion on button press */ + xsetpointermotion(0); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEMOTION); + break; + case 1003: /* 1003: enable all mouse motions */ + xsetpointermotion(set); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEMANY); + break; + case 1004: /* 1004: send focus events to tty */ + MODBIT(term.mode, set, MODE_FOCUS); + break; + case 1006: /* 1006: extended reporting mode */ + MODBIT(term.mode, set, MODE_MOUSESGR); + break; + case 1034: + MODBIT(term.mode, set, MODE_8BIT); + break; + case 1049: /* swap screen & set/restore cursor as xterm */ + if (!allowaltscreen) + break; + tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); + /* FALLTHROUGH */ + case 47: /* swap screen */ + case 1047: + if (!allowaltscreen) + break; + alt = IS_SET(MODE_ALTSCREEN); + if (alt) { + tclearregion(0, 0, term.col-1, + term.row-1); + } + if (set ^ alt) /* set is always 1 or 0 */ + tswapscreen(); + if (*args != 1049) + break; + /* FALLTHROUGH */ + case 1048: + tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); + break; + case 2004: /* 2004: bracketed paste mode */ + MODBIT(term.mode, set, MODE_BRCKTPASTE); + break; + /* Not implemented mouse modes. See comments there. */ + case 1001: /* mouse highlight mode; can hang the + terminal by design when implemented. */ + case 1005: /* UTF-8 mouse mode; will confuse + applications not supporting UTF-8 + and luit. */ + case 1015: /* urxvt mangled mouse mode; incompatible + and can be mistaken for other control + codes. */ + default: + fprintf(stderr, + "erresc: unknown private set/reset mode %d\n", + *args); + break; + } + } else { + switch (*args) { + case 0: /* Error (IGNORED) */ + break; + case 2: /* KAM -- keyboard action */ + MODBIT(term.mode, set, MODE_KBDLOCK); + break; + case 4: /* IRM -- Insertion-replacement */ + MODBIT(term.mode, set, MODE_INSERT); + break; + case 12: /* SRM -- Send/Receive */ + MODBIT(term.mode, !set, MODE_ECHO); + break; + case 20: /* LNM -- Linefeed/new line */ + MODBIT(term.mode, set, MODE_CRLF); + break; + default: + fprintf(stderr, + "erresc: unknown set/reset mode %d\n", + *args); + break; + } + } + } +} + +void +csihandle(void) +{ + char buf[40]; + int len; + + switch (csiescseq.mode[0]) { + default: + unknown: + fprintf(stderr, "erresc: unknown csi "); + csidump(); + /* die(""); */ + break; + case '@': /* ICH -- Insert blank char */ + DEFAULT(csiescseq.arg[0], 1); + tinsertblank(csiescseq.arg[0]); + break; + case 'A': /* CUU -- Cursor Up */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(term.c.x, term.c.y-csiescseq.arg[0]); + break; + case 'B': /* CUD -- Cursor Down */ + case 'e': /* VPR --Cursor Down */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(term.c.x, term.c.y+csiescseq.arg[0]); + break; + case 'i': /* MC -- Media Copy */ + switch (csiescseq.arg[0]) { + case 0: + tdump(); + break; + case 1: + tdumpline(term.c.y); + break; + case 2: + tdumpsel(); + break; + case 4: + term.mode &= ~MODE_PRINT; + break; + case 5: + term.mode |= MODE_PRINT; + break; + } + break; + case 'c': /* DA -- Device Attributes */ + if (csiescseq.arg[0] == 0) + ttywrite(vtiden, sizeof(vtiden) - 1); + break; + case 'C': /* CUF -- Cursor Forward */ + case 'a': /* HPR -- Cursor Forward */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(term.c.x+csiescseq.arg[0], term.c.y); + break; + case 'D': /* CUB -- Cursor Backward */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(term.c.x-csiescseq.arg[0], term.c.y); + break; + case 'E': /* CNL -- Cursor Down and first col */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(0, term.c.y+csiescseq.arg[0]); + break; + case 'F': /* CPL -- Cursor Up and first col */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(0, term.c.y-csiescseq.arg[0]); + break; + case 'g': /* TBC -- Tabulation clear */ + switch (csiescseq.arg[0]) { + case 0: /* clear current tab stop */ + term.tabs[term.c.x] = 0; + break; + case 3: /* clear all the tabs */ + memset(term.tabs, 0, term.col * sizeof(*term.tabs)); + break; + default: + goto unknown; + } + break; + case 'G': /* CHA -- Move to */ + case '`': /* HPA */ + DEFAULT(csiescseq.arg[0], 1); + tmoveto(csiescseq.arg[0]-1, term.c.y); + break; + case 'H': /* CUP -- Move to */ + case 'f': /* HVP */ + DEFAULT(csiescseq.arg[0], 1); + DEFAULT(csiescseq.arg[1], 1); + tmoveato(csiescseq.arg[1]-1, csiescseq.arg[0]-1); + break; + case 'I': /* CHT -- Cursor Forward Tabulation tab stops */ + DEFAULT(csiescseq.arg[0], 1); + tputtab(csiescseq.arg[0]); + break; + case 'J': /* ED -- Clear screen */ + selclear(NULL); + switch (csiescseq.arg[0]) { + case 0: /* below */ + tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); + if (term.c.y < term.row-1) { + tclearregion(0, term.c.y+1, term.col-1, + term.row-1); + } + break; + case 1: /* above */ + if (term.c.y > 1) + tclearregion(0, 0, term.col-1, term.c.y-1); + tclearregion(0, term.c.y, term.c.x, term.c.y); + break; + case 2: /* all */ + tclearregion(0, 0, term.col-1, term.row-1); + break; + default: + goto unknown; + } + break; + case 'K': /* EL -- Clear line */ + switch (csiescseq.arg[0]) { + case 0: /* right */ + tclearregion(term.c.x, term.c.y, term.col-1, + term.c.y); + break; + case 1: /* left */ + tclearregion(0, term.c.y, term.c.x, term.c.y); + break; + case 2: /* all */ + tclearregion(0, term.c.y, term.col-1, term.c.y); + break; + } + break; + case 'S': /* SU -- Scroll line up */ + DEFAULT(csiescseq.arg[0], 1); + tscrollup(term.top, csiescseq.arg[0]); + break; + case 'T': /* SD -- Scroll line down */ + DEFAULT(csiescseq.arg[0], 1); + tscrolldown(term.top, csiescseq.arg[0]); + break; + case 'L': /* IL -- Insert blank lines */ + DEFAULT(csiescseq.arg[0], 1); + tinsertblankline(csiescseq.arg[0]); + break; + case 'l': /* RM -- Reset Mode */ + tsetmode(csiescseq.priv, 0, csiescseq.arg, csiescseq.narg); + break; + case 'M': /* DL -- Delete lines */ + DEFAULT(csiescseq.arg[0], 1); + tdeleteline(csiescseq.arg[0]); + break; + case 'X': /* ECH -- Erase char */ + DEFAULT(csiescseq.arg[0], 1); + tclearregion(term.c.x, term.c.y, + term.c.x + csiescseq.arg[0] - 1, term.c.y); + break; + case 'P': /* DCH -- Delete char */ + DEFAULT(csiescseq.arg[0], 1); + tdeletechar(csiescseq.arg[0]); + break; + case 'Z': /* CBT -- Cursor Backward Tabulation tab stops */ + DEFAULT(csiescseq.arg[0], 1); + tputtab(-csiescseq.arg[0]); + break; + case 'd': /* VPA -- Move to */ + DEFAULT(csiescseq.arg[0], 1); + tmoveato(term.c.x, csiescseq.arg[0]-1); + break; + case 'h': /* SM -- Set terminal mode */ + tsetmode(csiescseq.priv, 1, csiescseq.arg, csiescseq.narg); + break; + case 'm': /* SGR -- Terminal attribute (color) */ + tsetattr(csiescseq.arg, csiescseq.narg); + break; + case 'n': /* DSR – Device Status Report (cursor position) */ + if (csiescseq.arg[0] == 6) { + len = snprintf(buf, sizeof(buf),"\033[%i;%iR", + term.c.y+1, term.c.x+1); + ttywrite(buf, len); + } + break; + case 'r': /* DECSTBM -- Set Scrolling Region */ + if (csiescseq.priv) { + goto unknown; + } else { + DEFAULT(csiescseq.arg[0], 1); + DEFAULT(csiescseq.arg[1], term.row); + tsetscroll(csiescseq.arg[0]-1, csiescseq.arg[1]-1); + tmoveato(0, 0); + } + break; + case 's': /* DECSC -- Save cursor position (ANSI.SYS) */ + tcursor(CURSOR_SAVE); + break; + case 'u': /* DECRC -- Restore cursor position (ANSI.SYS) */ + tcursor(CURSOR_LOAD); + break; + case ' ': + switch (csiescseq.mode[1]) { + case 'q': /* DECSCUSR -- Set Cursor Style */ + DEFAULT(csiescseq.arg[0], 1); + if (!BETWEEN(csiescseq.arg[0], 0, 6)) { + goto unknown; + } + xw.cursor = csiescseq.arg[0]; + break; + default: + goto unknown; + } + break; + } +} + +void +csidump(void) +{ + int i; + uint c; + + printf("ESC["); + for (i = 0; i < csiescseq.len; i++) { + c = csiescseq.buf[i] & 0xff; + if (isprint(c)) { + putchar(c); + } else if (c == '\n') { + printf("(\\n)"); + } else if (c == '\r') { + printf("(\\r)"); + } else if (c == 0x1b) { + printf("(\\e)"); + } else { + printf("(%02x)", c); + } + } + putchar('\n'); +} + +void +csireset(void) +{ + memset(&csiescseq, 0, sizeof(csiescseq)); +} + +void +strhandle(void) +{ + char *p = NULL; + int j, narg, par; + + term.esc &= ~(ESC_STR_END|ESC_STR); + strparse(); + par = (narg = strescseq.narg) ? atoi(strescseq.args[0]) : 0; + + switch (strescseq.type) { + case ']': /* OSC -- Operating System Command */ + switch (par) { + case 0: + case 1: + case 2: + if (narg > 1) + xsettitle(strescseq.args[1]); + return; + case 4: /* color set */ + if (narg < 3) + break; + p = strescseq.args[2]; + /* FALLTHROUGH */ + case 104: /* color reset, here p = NULL */ + j = (narg > 1) ? atoi(strescseq.args[1]) : -1; + if (xsetcolorname(j, p)) { + fprintf(stderr, "erresc: invalid color %s\n", p); + } else { + /* + * TODO if defaultbg color is changed, borders + * are dirty + */ + redraw(); + } + return; + } + break; + case 'k': /* old title set compatibility */ + xsettitle(strescseq.args[0]); + return; + case 'P': /* DCS -- Device Control String */ + case '_': /* APC -- Application Program Command */ + case '^': /* PM -- Privacy Message */ + return; + } + + fprintf(stderr, "erresc: unknown str "); + strdump(); +} + +void +strparse(void) +{ + int c; + char *p = strescseq.buf; + + strescseq.narg = 0; + strescseq.buf[strescseq.len] = '\0'; + + if (*p == '\0') + return; + + while (strescseq.narg < STR_ARG_SIZ) { + strescseq.args[strescseq.narg++] = p; + while ((c = *p) != ';' && c != '\0') + ++p; + if (c == '\0') + return; + *p++ = '\0'; + } +} + +void +strdump(void) +{ + int i; + uint c; + + printf("ESC%c", strescseq.type); + for (i = 0; i < strescseq.len; i++) { + c = strescseq.buf[i] & 0xff; + if (c == '\0') { + return; + } else if (isprint(c)) { + putchar(c); + } else if (c == '\n') { + printf("(\\n)"); + } else if (c == '\r') { + printf("(\\r)"); + } else if (c == 0x1b) { + printf("(\\e)"); + } else { + printf("(%02x)", c); + } + } + printf("ESC\\\n"); +} + +void +strreset(void) +{ + memset(&strescseq, 0, sizeof(strescseq)); +} + +void +sendbreak(const Arg *arg) +{ + if (tcsendbreak(cmdfd, 0)) + perror("Error sending break"); +} + +void +tprinter(char *s, size_t len) +{ + if (iofd != -1 && xwrite(iofd, s, len) < 0) { + fprintf(stderr, "Error writing in %s:%s\n", + opt_io, strerror(errno)); + close(iofd); + iofd = -1; + } +} + +// void +// toggleprinter(const Arg *arg) +// { +// term.mode ^= MODE_PRINT; +// } + +// void +// printscreen(const Arg *arg) +// { +// tdump(); +// } + +// void +// printsel(const Arg *arg) +// { +// tdumpsel(); +// } + +void +tdumpsel(void) +{ + char *ptr; + + if ((ptr = getsel())) { + tprinter(ptr, strlen(ptr)); + free(ptr); + } +} + +void +tdumpline(int n) +{ + char buf[UTF_SIZ]; + Glyph *bp, *end; + + bp = &term.line[n][0]; + end = &bp[MIN(tlinelen(n), term.col) - 1]; + if (bp != end || bp->u != ' ') { + for ( ;bp <= end; ++bp) + tprinter(buf, utf8encode(bp->u, buf)); + } + tprinter("\n", 1); +} + +void +tdump(void) +{ + int i; + + for (i = 0; i < term.row; ++i) + tdumpline(i); +} + +void +tputtab(int n) +{ + uint x = term.c.x; + + if (n > 0) { + while (x < term.col && n--) + for (++x; x < term.col && !term.tabs[x]; ++x) + /* nothing */ ; + } else if (n < 0) { + while (x > 0 && n++) + for (--x; x > 0 && !term.tabs[x]; --x) + /* nothing */ ; + } + term.c.x = LIMIT(x, 0, term.col-1); +} + +void +techo(Rune u) +{ + if (ISCONTROL(u)) { /* control code */ + if (u & 0x80) { + u &= 0x7f; + tputc('^'); + tputc('['); + } else if (u != '\n' && u != '\r' && u != '\t') { + u ^= 0x40; + tputc('^'); + } + } + tputc(u); +} + +void +tdeftran(char ascii) +{ + static char cs[] = "0B"; + static int vcs[] = {CS_GRAPHIC0, CS_USA}; + char *p; + + if ((p = strchr(cs, ascii)) == NULL) { + fprintf(stderr, "esc unhandled charset: ESC ( %c\n", ascii); + } else { + term.trantbl[term.icharset] = vcs[p - cs]; + } +} + +void +tdectest(char c) +{ + int x, y; + + if (c == '8') { /* DEC screen alignment test. */ + for (x = 0; x < term.col; ++x) { + for (y = 0; y < term.row; ++y) + tsetchar('E', &term.c.attr, x, y); + } + } +} + +void +tstrsequence(uchar c) +{ + switch (c) { + case 0x90: /* DCS -- Device Control String */ + c = 'P'; + break; + case 0x9f: /* APC -- Application Program Command */ + c = '_'; + break; + case 0x9e: /* PM -- Privacy Message */ + c = '^'; + break; + case 0x9d: /* OSC -- Operating System Command */ + c = ']'; + break; + } + strreset(); + strescseq.type = c; + term.esc |= ESC_STR; +} + +void +tcontrolcode(uchar ascii) +{ + switch (ascii) { + case '\t': /* HT */ + tputtab(1); + return; + case '\b': /* BS */ + tmoveto(term.c.x-1, term.c.y); + return; + case '\r': /* CR */ + tmoveto(0, term.c.y); + return; + case '\f': /* LF */ + case '\v': /* VT */ + case '\n': /* LF */ + /* go to first col if the mode is set */ + tnewline(IS_SET(MODE_CRLF)); + return; + case '\a': /* BEL */ + if (term.esc & ESC_STR_END) { + /* backwards compatibility to xterm */ + strhandle(); + } else { + if (!(xw.state & WIN_FOCUSED)) + xseturgency(1); + if (bellvolume) + XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); + + /* visual bell*/ + if (!bellon) { + bellon = 1; + MODBIT(term.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); + redraw(); + XFlush(xw.dpy); + MODBIT(term.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); + } + } + break; + case '\033': /* ESC */ + csireset(); + term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST); + term.esc |= ESC_START; + return; + case '\016': /* SO (LS1 -- Locking shift 1) */ + case '\017': /* SI (LS0 -- Locking shift 0) */ + term.charset = 1 - (ascii - '\016'); + return; + case '\032': /* SUB */ + tsetchar('?', &term.c.attr, term.c.x, term.c.y); + case '\030': /* CAN */ + csireset(); + break; + case '\005': /* ENQ (IGNORED) */ + case '\000': /* NUL (IGNORED) */ + case '\021': /* XON (IGNORED) */ + case '\023': /* XOFF (IGNORED) */ + case 0177: /* DEL (IGNORED) */ + return; + case 0x80: /* TODO: PAD */ + case 0x81: /* TODO: HOP */ + case 0x82: /* TODO: BPH */ + case 0x83: /* TODO: NBH */ + case 0x84: /* TODO: IND */ + break; + case 0x85: /* NEL -- Next line */ + tnewline(1); /* always go to first col */ + break; + case 0x86: /* TODO: SSA */ + case 0x87: /* TODO: ESA */ + break; + case 0x88: /* HTS -- Horizontal tab stop */ + term.tabs[term.c.x] = 1; + break; + case 0x89: /* TODO: HTJ */ + case 0x8a: /* TODO: VTS */ + case 0x8b: /* TODO: PLD */ + case 0x8c: /* TODO: PLU */ + case 0x8d: /* TODO: RI */ + case 0x8e: /* TODO: SS2 */ + case 0x8f: /* TODO: SS3 */ + case 0x91: /* TODO: PU1 */ + case 0x92: /* TODO: PU2 */ + case 0x93: /* TODO: STS */ + case 0x94: /* TODO: CCH */ + case 0x95: /* TODO: MW */ + case 0x96: /* TODO: SPA */ + case 0x97: /* TODO: EPA */ + case 0x98: /* TODO: SOS */ + case 0x99: /* TODO: SGCI */ + break; + case 0x9a: /* DECID -- Identify Terminal */ + ttywrite(vtiden, sizeof(vtiden) - 1); + break; + case 0x9b: /* TODO: CSI */ + case 0x9c: /* TODO: ST */ + break; + case 0x90: /* DCS -- Device Control String */ + case 0x9d: /* OSC -- Operating System Command */ + case 0x9e: /* PM -- Privacy Message */ + case 0x9f: /* APC -- Application Program Command */ + tstrsequence(ascii); + return; + } + /* only CAN, SUB, \a and C1 chars interrupt a sequence */ + term.esc &= ~(ESC_STR_END|ESC_STR); +} + +/* + * returns 1 when the sequence is finished and it hasn't to read + * more characters for this sequence, otherwise 0 + */ +int +eschandle(uchar ascii) +{ + switch (ascii) { + case '[': + term.esc |= ESC_CSI; + return 0; + case '#': + term.esc |= ESC_TEST; + return 0; + case 'P': /* DCS -- Device Control String */ + case '_': /* APC -- Application Program Command */ + case '^': /* PM -- Privacy Message */ + case ']': /* OSC -- Operating System Command */ + case 'k': /* old title set compatibility */ + tstrsequence(ascii); + return 0; + case 'n': /* LS2 -- Locking shift 2 */ + case 'o': /* LS3 -- Locking shift 3 */ + term.charset = 2 + (ascii - 'n'); + break; + case '(': /* GZD4 -- set primary charset G0 */ + case ')': /* G1D4 -- set secondary charset G1 */ + case '*': /* G2D4 -- set tertiary charset G2 */ + case '+': /* G3D4 -- set quaternary charset G3 */ + term.icharset = ascii - '('; + term.esc |= ESC_ALTCHARSET; + return 0; + case 'D': /* IND -- Linefeed */ + if (term.c.y == term.bot) { + tscrollup(term.top, 1); + } else { + tmoveto(term.c.x, term.c.y+1); + } + break; + case 'E': /* NEL -- Next line */ + tnewline(1); /* always go to first col */ + break; + case 'H': /* HTS -- Horizontal tab stop */ + term.tabs[term.c.x] = 1; + break; + case 'M': /* RI -- Reverse index */ + if (term.c.y == term.top) { + tscrolldown(term.top, 1); + } else { + tmoveto(term.c.x, term.c.y-1); + } + break; + case 'Z': /* DECID -- Identify Terminal */ + ttywrite(vtiden, sizeof(vtiden) - 1); + break; + case 'c': /* RIS -- Reset to inital state */ + treset(); + xresettitle(); + xloadcols(); + break; + case '=': /* DECPAM -- Application keypad */ + term.mode |= MODE_APPKEYPAD; + break; + case '>': /* DECPNM -- Normal keypad */ + term.mode &= ~MODE_APPKEYPAD; + break; + case '7': /* DECSC -- Save Cursor */ + tcursor(CURSOR_SAVE); + break; + case '8': /* DECRC -- Restore Cursor */ + tcursor(CURSOR_LOAD); + break; + case '\\': /* ST -- String Terminator */ + if (term.esc & ESC_STR_END) + strhandle(); + break; + default: + fprintf(stderr, "erresc: unknown sequence ESC 0x%02X '%c'\n", + (uchar) ascii, isprint(ascii)? ascii:'.'); + break; + } + return 1; +} + +void +tputc(Rune u) +{ + char c[UTF_SIZ]; + int control; + int width, len; + Glyph *gp; + + control = ISCONTROL(u); + len = utf8encode(u, c); + if (!control && (width = wcwidth(u)) == -1) { + memcpy(c, "\357\277\275", 4); /* UTF_INVALID */ + width = 1; + } + + if (IS_SET(MODE_PRINT)) + tprinter(c, len); + + /* + * STR sequence must be checked before anything else + * because it uses all following characters until it + * receives a ESC, a SUB, a ST or any other C1 control + * character. + */ + if (term.esc & ESC_STR) { + if (u == '\a' || u == 030 || u == 032 || u == 033 || + ISCONTROLC1(u)) { + term.esc &= ~(ESC_START|ESC_STR); + term.esc |= ESC_STR_END; + } else if (strescseq.len + len < sizeof(strescseq.buf) - 1) { + memmove(&strescseq.buf[strescseq.len], c, len); + strescseq.len += len; + return; + } else { + /* + * Here is a bug in terminals. If the user never sends + * some code to stop the str or esc command, then st + * will stop responding. But this is better than + * silently failing with unknown characters. At least + * then users will report back. + * + * In the case users ever get fixed, here is the code: + */ + /* + * term.esc = 0; + * strhandle(); + */ + return; + } + } + + /* + * Actions of control codes must be performed as soon they arrive + * because they can be embedded inside a control sequence, and + * they must not cause conflicts with sequences. + */ + if (control) { + tcontrolcode(u); + /* + * control codes are not shown ever + */ + return; + } else if (term.esc & ESC_START) { + if (term.esc & ESC_CSI) { + csiescseq.buf[csiescseq.len++] = u; + if (BETWEEN(u, 0x40, 0x7E) + || csiescseq.len >= \ + sizeof(csiescseq.buf)-1) { + term.esc = 0; + csiparse(); + csihandle(); + } + return; + } else if (term.esc & ESC_ALTCHARSET) { + tdeftran(u); + } else if (term.esc & ESC_TEST) { + tdectest(u); + } else { + if (!eschandle(u)) + return; + /* sequence already finished */ + } + term.esc = 0; + /* + * All characters which form part of a sequence are not + * printed + */ + return; + } + if (sel.ob.x != -1 && BETWEEN(term.c.y, sel.ob.y, sel.oe.y)) + selclear(NULL); + + gp = &term.line[term.c.y][term.c.x]; + if (IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) { + gp->mode |= ATTR_WRAP; + tnewline(1); + gp = &term.line[term.c.y][term.c.x]; + } + + if (IS_SET(MODE_INSERT) && term.c.x+width < term.col) + memmove(gp+width, gp, (term.col - term.c.x - width) * sizeof(Glyph)); + + if (term.c.x+width > term.col) { + tnewline(1); + gp = &term.line[term.c.y][term.c.x]; + } + + tsetchar(u, &term.c.attr, term.c.x, term.c.y); + + if (width == 2) { + gp->mode |= ATTR_WIDE; + if (term.c.x+1 < term.col) { + gp[1].u = '\0'; + gp[1].mode = ATTR_WDUMMY; + } + } + if (term.c.x+width < term.col) { + tmoveto(term.c.x+width, term.c.y); + } else { + term.c.state |= CURSOR_WRAPNEXT; + } +} + +void +tresize(int col, int row) +{ + int i; + int minrow = MIN(row, term.row); + int mincol = MIN(col, term.col); + int *bp; + TCursor c; + + if (col < 1 || row < 1) { + fprintf(stderr, + "tresize: error resizing to %dx%d\n", col, row); + return; + } + + /* + * slide screen to keep cursor where we expect it - + * tscrollup would work here, but we can optimize to + * memmove because we're freeing the earlier lines + */ + for (i = 0; i <= term.c.y - row; i++) { + free(term.line[i]); + free(term.alt[i]); + } + /* ensure that both src and dst are not NULL */ + if (i > 0) { + memmove(term.line, term.line + i, row * sizeof(Line)); + memmove(term.alt, term.alt + i, row * sizeof(Line)); + } + for (i += row; i < term.row; i++) { + free(term.line[i]); + free(term.alt[i]); + } + + /* resize to new width */ + term.specbuf = xrealloc(term.specbuf, col * sizeof(XftGlyphFontSpec)); + + /* resize to new height */ + term.line = xrealloc(term.line, row * sizeof(Line)); + term.alt = xrealloc(term.alt, row * sizeof(Line)); + term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty)); + term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs)); + + /* resize each row to new width, zero-pad if needed */ + for (i = 0; i < minrow; i++) { + term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph)); + term.alt[i] = xrealloc(term.alt[i], col * sizeof(Glyph)); + } + + /* allocate any new rows */ + for (/* i == minrow */; i < row; i++) { + term.line[i] = xmalloc(col * sizeof(Glyph)); + term.alt[i] = xmalloc(col * sizeof(Glyph)); + } + if (col > term.col) { + bp = term.tabs + term.col; + + memset(bp, 0, sizeof(*term.tabs) * (col - term.col)); + while (--bp > term.tabs && !*bp) + /* nothing */ ; + for (bp += tabspaces; bp < term.tabs + col; bp += tabspaces) + *bp = 1; + } + /* update terminal size */ + term.col = col; + term.row = row; + /* reset scrolling region */ + tsetscroll(0, row-1); + /* make use of the LIMIT in tmoveto */ + tmoveto(term.c.x, term.c.y); + /* Clearing both screens (it makes dirty all lines) */ + c = term.c; + for (i = 0; i < 2; i++) { + if (mincol < col && 0 < minrow) { + tclearregion(mincol, 0, col - 1, minrow - 1); + } + if (0 < col && minrow < row) { + tclearregion(0, minrow, col - 1, row - 1); + } + tswapscreen(); + tcursor(CURSOR_LOAD); + } + term.c = c; +} + +void +xresize(int col, int row) +{ + xw.tw = MAX(1, col * xw.cw); + xw.th = MAX(1, row * xw.ch); + + XFreePixmap(xw.dpy, xw.buf); + xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, + xw.depth); + XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, xw.w, xw.h); +} + +ushort +sixd_to_16bit(int x) +{ + return x == 0 ? 0 : 0x3737 + 0x2828 * x; +} + +const char* getcolorname(int i) +{ + return colorchart[whichcolortable][i]; +// return (usealtcolors) ? altcolorname[i] : colorname[i]; +} + +int +xloadcolor(int i, const char *name, Color *ncolor) +{ + XRenderColor color = { .alpha = 0xffff }; + + if (!name) { + if (BETWEEN(i, 16, 255)) { /* 256 color */ + if (i < 6*6*6+16) { /* same colors as xterm */ + color.red = sixd_to_16bit( ((i-16)/36)%6 ); + color.green = sixd_to_16bit( ((i-16)/6) %6 ); + color.blue = sixd_to_16bit( ((i-16)/1) %6 ); + } else { /* greyscale */ + color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16)); + color.green = color.blue = color.red; + } + return XftColorAllocValue(xw.dpy, xw.vis, + xw.cmap, &color, ncolor); + } else + name = getcolorname(i); + } + + return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor); +} + +void +xloadcols(void) +{ + int i; + static int loaded; + Color *cp; + + if (loaded) { + for (cp = dc.col; cp < &dc.col[LEN(dc.col)]; ++cp) + XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); + } + + for (i = 0; i < LEN(dc.col); i++) + if (!xloadcolor(i, NULL, &dc.col[i])) { + if (getcolorname(i)) + die("Could not allocate color '%s'\n", getcolorname(i)); + else + die("Could not allocate color %d\n", i); + } + + /* set alpha value of bg color */ + if (USE_ARGB) { + dc.col[defaultbg].color.alpha = (0xffff * alpha) / OPAQUE; //0xcccc; + dc.col[defaultbg].pixel &= 0x00111111; + dc.col[defaultbg].pixel |= alpha << 24; // 0xcc000000; + } + + loaded = 1; +} + +int +xsetcolorname(int x, const char *name) +{ + Color ncolor; + + if (!BETWEEN(x, 0, LEN(dc.col))) + return 1; + + + if (!xloadcolor(x, name, &ncolor)) + return 1; + + XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]); + dc.col[x] = ncolor; + + return 0; +} + +void +xtermclear(int col1, int row1, int col2, int row2) { + XftDrawRect(xw.draw, + &dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg], + borderpx + col1 * xw.cw, + borderpx + row1 * xw.ch, + (col2-col1+1) * xw.cw, + (row2-row1+1) * xw.ch); +} + +/* + * Absolute coordinates. + */ +void +xclear(int x1, int y1, int x2, int y2) +{ + XftDrawRect(xw.draw, + &dc.col[IS_SET(MODE_REVERSE)? defaultfg : defaultbg], + x1, y1, x2-x1, y2-y1); +} + +void +xhints(void) +{ + XClassHint class = {opt_name ? opt_name : termname, + opt_class ? opt_class : termname}; + XWMHints wm = {.flags = InputHint, .input = 1}; + XSizeHints *sizeh = NULL; + + sizeh = XAllocSizeHints(); + + sizeh->flags = PSize | PResizeInc | PBaseSize; + sizeh->height = xw.h; + sizeh->width = xw.w; + sizeh->height_inc = xw.ch; + sizeh->width_inc = xw.cw; + sizeh->base_height = 2 * borderpx; + sizeh->base_width = 2 * borderpx; + if (xw.isfixed) { + sizeh->flags |= PMaxSize | PMinSize; + sizeh->min_width = sizeh->max_width = xw.w; + sizeh->min_height = sizeh->max_height = xw.h; + } + if (xw.gm & (XValue|YValue)) { + sizeh->flags |= USPosition | PWinGravity; + sizeh->x = xw.l; + sizeh->y = xw.t; + sizeh->win_gravity = xgeommasktogravity(xw.gm); + } + + XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm, + &class); + XFree(sizeh); +} + +int +xgeommasktogravity(int mask) +{ + switch (mask & (XNegative|YNegative)) { + case 0: + return NorthWestGravity; + case XNegative: + return NorthEastGravity; + case YNegative: + return SouthWestGravity; + } + + return SouthEastGravity; +} + +int +xloadfont(Font *f, FcPattern *pattern) +{ + FcPattern *match; + FcResult result; + XGlyphInfo extents; + + match = XftFontMatch(xw.dpy, xw.scr, pattern, &result); + if (!match) + return 1; + + if (!(f->match = XftFontOpenPattern(xw.dpy, match))) { + FcPatternDestroy(match); + return 1; + } + + XftTextExtentsUtf8(xw.dpy, f->match, + (const FcChar8 *) ascii_printable, + strlen(ascii_printable), &extents); + + f->set = NULL; + f->pattern = FcPatternDuplicate(pattern); + + f->ascent = f->match->ascent; + f->descent = f->match->descent; + f->lbearing = 0; + f->rbearing = f->match->max_advance_width; + + f->height = f->ascent + f->descent; + f->width = DIVCEIL(extents.xOff, strlen(ascii_printable)); + + return 0; +} + +void +xloadfonts(char *fontstr, double fontsize) +{ + FcPattern *pattern; + double fontval; + float ceilf(float); + + if (fontstr[0] == '-') { + pattern = XftXlfdParse(fontstr, False, False); + } else { + pattern = FcNameParse((FcChar8 *)fontstr); + } + + if (!pattern) + die("st: can't open font %s\n", fontstr); + + if (fontsize > 1) { + FcPatternDel(pattern, FC_PIXEL_SIZE); + FcPatternDel(pattern, FC_SIZE); + FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize); + usedfontsize = fontsize; + } else { + if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) == + FcResultMatch) { + usedfontsize = fontval; + } else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) == + FcResultMatch) { + usedfontsize = -1; + } else { + /* + * Default font size is 12, if none given. This is to + * have a known usedfontsize value. + */ + FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12); + usedfontsize = 12; + } + defaultfontsize = usedfontsize; + } + + if (xloadfont(&dc.font, pattern)) + die("st: can't open font %s\n", fontstr); + + if (usedfontsize < 0) { + FcPatternGetDouble(dc.font.match->pattern, + FC_PIXEL_SIZE, 0, &fontval); + usedfontsize = fontval; + if (fontsize == 0) + defaultfontsize = fontval; + } + + /* Setting character width and height. */ + xw.cw = ceilf(dc.font.width * cwscale); + xw.ch = ceilf(dc.font.height * chscale); + + FcPatternDel(pattern, FC_SLANT); + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); + if (xloadfont(&dc.ifont, pattern)) + die("st: can't open font %s\n", fontstr); + + FcPatternDel(pattern, FC_WEIGHT); + FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); + if (xloadfont(&dc.ibfont, pattern)) + die("st: can't open font %s\n", fontstr); + + FcPatternDel(pattern, FC_SLANT); + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN); + if (xloadfont(&dc.bfont, pattern)) + die("st: can't open font %s\n", fontstr); + + FcPatternDestroy(pattern); +} + +void +xunloadfont(Font *f) +{ + XftFontClose(xw.dpy, f->match); + FcPatternDestroy(f->pattern); + if (f->set) + FcFontSetDestroy(f->set); +} + +void +xunloadfonts(void) +{ + /* Free the loaded fonts in the font cache. */ + while (frclen > 0) + XftFontClose(xw.dpy, frc[--frclen].font); + + xunloadfont(&dc.font); + xunloadfont(&dc.bfont); + xunloadfont(&dc.ifont); + xunloadfont(&dc.ibfont); +} + +void +xzoom(const Arg *arg) +{ + Arg larg; + + larg.f = usedfontsize + arg->f; + xzoomabs(&larg); +} + +void +xzoomabs(const Arg *arg) +{ + xunloadfonts(); + xloadfonts(usedfont, arg->f); + cresize(0, 0); + ttyresize(); + redraw(); + xhints(); +} + +void +xzoomreset(const Arg *arg) +{ + Arg larg; + + if (defaultfontsize > 0) { + larg.f = defaultfontsize; + xzoomabs(&larg); + } +} + +void +xinit(void) +{ + XGCValues gcvalues; + Cursor cursor; + Window parent; + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; + + if (!(xw.dpy = XOpenDisplay(NULL))) + die("Can't open display\n"); + xw.scr = XDefaultScreen(xw.dpy); + xw.depth = (USE_ARGB) ? 32: XDefaultDepth(xw.dpy, xw.scr); + if (! USE_ARGB) + xw.vis = XDefaultVisual(xw.dpy, xw.scr); + else { + XVisualInfo *vis; + XRenderPictFormat *fmt; + int nvi; + int i; + + XVisualInfo tpl = { + .screen = xw.scr, + .depth = 32, + .class = TrueColor + }; + + vis = XGetVisualInfo(xw.dpy, VisualScreenMask | VisualDepthMask | VisualClassMask, &tpl, &nvi); + xw.vis = NULL; + for(i = 0; i < nvi; i ++) { + fmt = XRenderFindVisualFormat(xw.dpy, vis[i].visual); + if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { + xw.vis = vis[i].visual; + break; + } + } + + XFree(vis); + + if (! xw.vis) { + fprintf(stderr, "Couldn't find ARGB visual.\n"); + exit(1); + } + } + + /* font */ + if (!FcInit()) + die("Could not init fontconfig.\n"); + + usedfont = (opt_font == NULL)? font : opt_font; + xloadfonts(usedfont, 0); + + /* colors */ + if (! USE_ARGB) + xw.cmap = XDefaultColormap(xw.dpy, xw.scr); + else + xw.cmap = XCreateColormap(xw.dpy, XRootWindow(xw.dpy, xw.scr), xw.vis, None); + xloadcols(); + + /* adjust fixed window geometry */ + xw.w = 2 * borderpx + term.col * xw.cw; + xw.h = 2 * borderpx + term.row * xw.ch; + if (xw.gm & XNegative) + xw.l += DisplayWidth(xw.dpy, xw.scr) - xw.w - 2; + if (xw.gm & YNegative) + xw.t += DisplayHeight(xw.dpy, xw.scr) - xw.h - 2; + + /* Events */ + xw.attrs.background_pixel = dc.col[defaultbg].pixel; + xw.attrs.border_pixel = dc.col[defaultbg].pixel; + xw.attrs.bit_gravity = NorthWestGravity; + xw.attrs.event_mask = FocusChangeMask | KeyPressMask + | ExposureMask | VisibilityChangeMask | StructureNotifyMask + | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask; + xw.attrs.colormap = xw.cmap; + + if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) + parent = XRootWindow(xw.dpy, xw.scr); + xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, + xw.w, xw.h, 0, xw.depth, InputOutput, + xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity + | CWEventMask | CWColormap, &xw.attrs); + + memset(&gcvalues, 0, sizeof(gcvalues)); + gcvalues.graphics_exposures = False; + xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, xw.depth); + dc.gc = XCreateGC(xw.dpy, + (USE_ARGB)? xw.buf: parent, + GCGraphicsExposures, + &gcvalues); + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, xw.w, xw.h); + + /* Xft rendering context */ + xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); + + /* input methods */ + if ((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im=local"); + if ((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im="); + if ((xw.xim = XOpenIM(xw.dpy, + NULL, NULL, NULL)) == NULL) { + die("XOpenIM failed. Could not open input" + " device.\n"); + } + } + } + xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing + | XIMStatusNothing, XNClientWindow, xw.win, + XNFocusWindow, xw.win, NULL); + if (xw.xic == NULL) + die("XCreateIC failed. Could not obtain input method.\n"); + + /* white cursor, black outline */ + cursor = XCreateFontCursor(xw.dpy, mouseshape); + XDefineCursor(xw.dpy, xw.win, cursor); + + if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousefg), &xmousefg) == 0) { + xmousefg.red = 0xffff; + xmousefg.green = 0xffff; + xmousefg.blue = 0xffff; + } + + if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousebg), &xmousebg) == 0) { + xmousebg.red = 0x0000; + xmousebg.green = 0x0000; + xmousebg.blue = 0x0000; + } + + XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg); + + xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); + xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); + xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); + XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); + + xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); + XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32, + PropModeReplace, (uchar *)&thispid, 1); + + xresettitle(); + XMapWindow(xw.dpy, xw.win); + xhints(); + XSync(xw.dpy, False); +} + +int +xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x, int y) +{ + float winx = borderpx + x * xw.cw, winy = borderpx + y * xw.ch, xp, yp; + ushort mode, prevmode = USHRT_MAX; + Font *font = &dc.font; + int frcflags = FRC_NORMAL; + float runewidth = xw.cw; + Rune rune; + FT_UInt glyphidx; + FcResult fcres; + FcPattern *fcpattern, *fontpattern; + FcFontSet *fcsets[] = { NULL }; + FcCharSet *fccharset; + int i, f, numspecs = 0; + + for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) { + /* Fetch rune and mode for current glyph. */ + rune = glyphs[i].u; + mode = glyphs[i].mode; + + /* Skip dummy wide-character spacing. */ + if (mode == ATTR_WDUMMY) + continue; + + /* Determine font for glyph if different from previous glyph. */ + if (prevmode != mode) { + prevmode = mode; + font = &dc.font; + frcflags = FRC_NORMAL; + runewidth = xw.cw * ((mode & ATTR_WIDE) ? 2.0f : 1.0f); + if ((mode & ATTR_ITALIC) && (mode & ATTR_BOLD)) { + font = &dc.ibfont; + frcflags = FRC_ITALICBOLD; + } else if (mode & ATTR_ITALIC) { + font = &dc.ifont; + frcflags = FRC_ITALIC; + } else if (mode & ATTR_BOLD) { + font = &dc.bfont; + frcflags = FRC_BOLD; + } + yp = winy + font->ascent; + } + + /* Lookup character index with default font. */ + glyphidx = XftCharIndex(xw.dpy, font->match, rune); + if (glyphidx) { + specs[numspecs].font = font->match; + specs[numspecs].glyph = glyphidx; + specs[numspecs].x = (short)xp; + specs[numspecs].y = (short)yp; + xp += runewidth; + numspecs++; + continue; + } + + /* Fallback on font cache, search the font cache for match. */ + for (f = 0; f < frclen; f++) { + glyphidx = XftCharIndex(xw.dpy, frc[f].font, rune); + /* Everything correct. */ + if (glyphidx && frc[f].flags == frcflags) + break; + /* We got a default font for a not found glyph. */ + if (!glyphidx && frc[f].flags == frcflags + && frc[f].unicodep == rune) { + break; + } + } + + /* Nothing was found. Use fontconfig to find matching font. */ + if (f >= frclen) { + if (!font->set) + font->set = FcFontSort(0, font->pattern, + 1, 0, &fcres); + fcsets[0] = font->set; + + /* + * Nothing was found in the cache. Now use + * some dozen of Fontconfig calls to get the + * font for one single character. + * + * Xft and fontconfig are design failures. + */ + fcpattern = FcPatternDuplicate(font->pattern); + fccharset = FcCharSetCreate(); + + FcCharSetAddChar(fccharset, rune); + FcPatternAddCharSet(fcpattern, FC_CHARSET, + fccharset); + FcPatternAddBool(fcpattern, FC_SCALABLE, 1); + + FcConfigSubstitute(0, fcpattern, + FcMatchPattern); + FcDefaultSubstitute(fcpattern); + + fontpattern = FcFontSetMatch(0, fcsets, 1, + fcpattern, &fcres); + + /* + * Overwrite or create the new cache entry. + */ + if (frclen >= LEN(frc)) { + frclen = LEN(frc) - 1; + XftFontClose(xw.dpy, frc[frclen].font); + frc[frclen].unicodep = 0; + } + + frc[frclen].font = XftFontOpenPattern(xw.dpy, + fontpattern); + frc[frclen].flags = frcflags; + frc[frclen].unicodep = rune; + + glyphidx = XftCharIndex(xw.dpy, frc[frclen].font, rune); + + f = frclen; + frclen++; + + FcPatternDestroy(fcpattern); + FcCharSetDestroy(fccharset); + } + + specs[numspecs].font = frc[f].font; + specs[numspecs].glyph = glyphidx; + specs[numspecs].x = (short)xp; + specs[numspecs].y = (short)yp; + xp += runewidth; + numspecs++; + } + + return numspecs; +} + +void +xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y) +{ + int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1); + int winx = borderpx + x * xw.cw, winy = borderpx + y * xw.ch, + width = charlen * xw.cw; + Color *fg, *bg, *temp, revfg, revbg, truefg, truebg; + XRenderColor colfg, colbg; + XRectangle r; + + /* Determine foreground and background colors based on mode. */ + if (base.fg == defaultfg) { + if (base.mode & ATTR_ITALIC) + base.fg = defaultitalic; + else if ((base.mode & ATTR_ITALIC) && (base.mode & ATTR_BOLD)) + base.fg = defaultitalic; + else if (base.mode & ATTR_UNDERLINE) + base.fg = defaultunderline; + } + + if (IS_TRUECOL(base.fg)) { + colfg.alpha = 0xffff; + colfg.red = TRUERED(base.fg); + colfg.green = TRUEGREEN(base.fg); + colfg.blue = TRUEBLUE(base.fg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &truefg); + fg = &truefg; + } else { + fg = &dc.col[base.fg]; + } + + if (IS_TRUECOL(base.bg)) { + colbg.alpha = 0xffff; + colbg.green = TRUEGREEN(base.bg); + colbg.red = TRUERED(base.bg); + colbg.blue = TRUEBLUE(base.bg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &truebg); + bg = &truebg; + } else { + bg = &dc.col[base.bg]; + } + + /* Change basic system colors [0-7] to bright system colors [8-15] */ + if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7)) + fg = &dc.col[base.fg]; + + if (IS_SET(MODE_REVERSE)) { + if (fg == &dc.col[defaultfg]) { + fg = &dc.col[defaultbg]; + } else { + colfg.red = ~fg->color.red; + colfg.green = ~fg->color.green; + colfg.blue = ~fg->color.blue; + colfg.alpha = fg->color.alpha; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, + &revfg); + fg = &revfg; + } + + if (bg == &dc.col[defaultbg]) { + bg = &dc.col[defaultfg]; + } else { + colbg.red = ~bg->color.red; + colbg.green = ~bg->color.green; + colbg.blue = ~bg->color.blue; + colbg.alpha = bg->color.alpha; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, + &revbg); + bg = &revbg; + } + } + + if (base.mode & ATTR_REVERSE) { + temp = fg; + fg = bg; + bg = temp; + } + + if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) { + colfg.red = fg->color.red / 2; + colfg.green = fg->color.green / 2; + colfg.blue = fg->color.blue / 2; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg); + fg = &revfg; + } + + if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK) + fg = bg; + + if (base.mode & ATTR_INVISIBLE) + fg = bg; + + /* Intelligent cleaning up of the borders. */ + if (x == 0) { + xclear(0, (y == 0)? 0 : winy, borderpx, + winy + xw.ch + ((y >= term.row-1)? xw.h : 0)); + } + if (x + charlen >= term.col) { + xclear(winx + width, (y == 0)? 0 : winy, xw.w, + ((y >= term.row-1)? xw.h : (winy + xw.ch))); + } + if (y == 0) + xclear(winx, 0, winx + width, borderpx); + if (y == term.row-1) + xclear(winx, winy + xw.ch, winx + width, xw.h); + + /* Clean up the region we want to draw to. */ + XftDrawRect(xw.draw, bg, winx, winy, width, xw.ch); + + /* Set the clip region because Xft is sometimes dirty. */ + r.x = 0; + r.y = 0; + r.height = xw.ch; + r.width = width; + XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); + + /* Render the glyphs. */ + XftDrawGlyphFontSpec(xw.draw, fg, specs, len); + + /* Render underline and strikethrough. */ + if (base.mode & ATTR_UNDERLINE) { + XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, + width, 1); + } + + if (base.mode & ATTR_STRUCK) { + XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3, + width, 1); + } + + /* Reset clip to none. */ + XftDrawSetClip(xw.draw, 0); +} + +void +xdrawglyph(Glyph g, int x, int y) +{ + int numspecs; + XftGlyphFontSpec spec; + + numspecs = xmakeglyphfontspecs(&spec, &g, 1, x, y); + xdrawglyphfontspecs(&spec, g, numspecs, x, y); +} + +void +xdrawcursor(void) +{ + static int oldx = 0, oldy = 0; + int curx; + Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}, og; + int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); + Color drawcol; + + LIMIT(oldx, 0, term.col-1); + LIMIT(oldy, 0, term.row-1); + + curx = term.c.x; + + /* adjust position if in dummy */ + if (term.line[oldy][oldx].mode & ATTR_WDUMMY) + oldx--; + if (term.line[term.c.y][curx].mode & ATTR_WDUMMY) + curx--; + + /* remove the old cursor */ + og = term.line[oldy][oldx]; + if (ena_sel && selected(oldx, oldy)) + og.mode ^= ATTR_REVERSE; + xdrawglyph(og, oldx, oldy); + + g.u = term.line[term.c.y][term.c.x].u; + + /* + * Select the right color for the right mode. + */ + if (IS_SET(MODE_REVERSE)) { + g.mode |= ATTR_REVERSE; + g.bg = defaultfg; + if (ena_sel && selected(term.c.x, term.c.y)) { + drawcol = dc.col[defaultcs]; + g.fg = defaultrcs; + } else { + drawcol = dc.col[defaultrcs]; + g.fg = defaultcs; + } + } else { + if (ena_sel && selected(term.c.x, term.c.y)) { + drawcol = dc.col[defaultrcs]; + g.fg = defaultfg; + g.bg = defaultrcs; + } else { + drawcol = dc.col[defaultcs]; + } + } + + if (IS_SET(MODE_HIDE)) + return; + + /* draw the new one */ + if (xw.state & WIN_FOCUSED) { + switch (xw.cursor) { + /* truck extensions - don't work + case 8: + utf8decode("䷀", &g.u, UTF_SIZ); + case 9: + utf8decode("䷬", &g.u, UTF_SIZ); + case 10: + utf8decode("䷑", &g.u, UTF_SIZ); + case 11: + utf8decode("䷼", &g.u, UTF_SIZ); + case 12: + utf8decode("░", &g.u, UTF_SIZ); + case 13: + utf8decode("▒", &g.u, UTF_SIZ); + case 14: + utf8decode("▓", &g.u, UTF_SIZ); + case 15: + utf8decode("▣", &g.u, UTF_SIZ); */ + case 7: /* st extension: snowman */ + utf8decode("▒", &g.u, UTF_SIZ); + // utf8decode("☃", &g.u, UTF_SIZ); + case 0: /* Blinking Block */ + case 1: /* Blinking Block (Default) */ + case 2: /* Steady Block */ + g.mode |= term.line[term.c.y][curx].mode & ATTR_WIDE; + xdrawglyph(g, term.c.x, term.c.y); + break; + case 3: /* Blinking Underline */ + case 4: /* Steady Underline */ + XftDrawRect(xw.draw, &drawcol, + borderpx + curx * xw.cw, + borderpx + (term.c.y + 1) * xw.ch - \ + cursorthickness, + xw.cw, cursorthickness); + break; + case 5: /* Blinking bar */ + case 6: /* Steady bar */ + XftDrawRect(xw.draw, &drawcol, + borderpx + curx * xw.cw, + borderpx + term.c.y * xw.ch, + cursorthickness, xw.ch); + break; + } + } else { + XftDrawRect(xw.draw, &drawcol, + borderpx + curx * xw.cw, + borderpx + term.c.y * xw.ch, + xw.cw - 1, 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + curx * xw.cw, + borderpx + term.c.y * xw.ch, + 1, xw.ch - 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + (curx + 1) * xw.cw - 1, + borderpx + term.c.y * xw.ch, + 1, xw.ch - 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + curx * xw.cw, + borderpx + (term.c.y + 1) * xw.ch - 1, + xw.cw, 1); + } + oldx = curx, oldy = term.c.y; +} + + +void +xsettitle(char *p) +{ + XTextProperty prop; + + Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, + &prop); + XSetWMName(xw.dpy, xw.win, &prop); + XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname); + XFree(prop.value); +} + +void +xresettitle(void) +{ + xsettitle(opt_title ? opt_title : "st"); +} + +void xcolor2title(void){ + char *cs; + size_t lencs; + + lencs = (size_t)snprintf(NULL,0,"new color %d",whichcolortable); + cs = malloc(lencs); + sprintf(cs,"colorscheme %s",schemenames[whichcolortable]); + xsettitle(cs); + free(cs); +} + +void +redraw(void) +{ + tfulldirt(); + draw(); +} + +void +draw(void) +{ + drawregion(0, 0, term.col, term.row); + XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, xw.w, + xw.h, 0, 0); + XSetForeground(xw.dpy, dc.gc, + dc.col[IS_SET(MODE_REVERSE)? + defaultfg : defaultbg].pixel); +} + +void +drawregion(int x1, int y1, int x2, int y2) +{ + int i, x, y, ox, numspecs; + Glyph base, new; + XftGlyphFontSpec *specs; + int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); + + if (!(xw.state & WIN_VISIBLE)) + return; + + for (y = y1; y < y2; y++) { + if (!term.dirty[y]) + continue; + + term.dirty[y] = 0; + + specs = term.specbuf; + numspecs = xmakeglyphfontspecs(specs, &term.line[y][x1], x2 - x1, x1, y); + + i = ox = 0; + for (x = x1; x < x2 && i < numspecs; x++) { + new = term.line[y][x]; + if (new.mode == ATTR_WDUMMY) + continue; + if (ena_sel && selected(x, y)) + new.mode ^= ATTR_REVERSE; + if (i > 0 && ATTRCMP(base, new)) { + xdrawglyphfontspecs(specs, base, i, ox, y); + specs += i; + numspecs -= i; + i = 0; + } + if (i == 0) { + ox = x; + base = new; + } + i++; + } + if (i > 0) + xdrawglyphfontspecs(specs, base, i, ox, y); + } + xdrawcursor(); +} + +void +expose(XEvent *ev) +{ + redraw(); +} + +void +visibility(XEvent *ev) +{ + XVisibilityEvent *e = &ev->xvisibility; + + MODBIT(xw.state, e->state != VisibilityFullyObscured, WIN_VISIBLE); +} + +void +unmap(XEvent *ev) +{ + xw.state &= ~WIN_VISIBLE; +} + +void +xsetpointermotion(int set) +{ + MODBIT(xw.attrs.event_mask, set, PointerMotionMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); +} + +void +xseturgency(int add) +{ + XWMHints *h = XGetWMHints(xw.dpy, xw.win); + + MODBIT(h->flags, add, XUrgencyHint); + XSetWMHints(xw.dpy, xw.win, h); + XFree(h); +} + +void +focus(XEvent *ev) +{ + XFocusChangeEvent *e = &ev->xfocus; + + if (e->mode == NotifyGrab) + return; + + if (ev->type == FocusIn) { + XSetICFocus(xw.xic); + xw.state |= WIN_FOCUSED; + xseturgency(0); + if (IS_SET(MODE_FOCUS)) + ttywrite("\033[I", 3); + } else { + XUnsetICFocus(xw.xic); + xw.state &= ~WIN_FOCUSED; + if (IS_SET(MODE_FOCUS)) + ttywrite("\033[O", 3); + } +} + +int +match(uint mask, uint state) +{ + return mask == XK_ANY_MOD || mask == (state & ~ignoremod); +} + +void +numlock(const Arg *dummy) +{ + term.numlock ^= 1; +} + +void +swapcolors(const Arg *dummy) +{ + usealtcolors = !usealtcolors; + whichcolortable = whichcolortable +1; + if ( whichcolortable >= sizeof(colorchart)/sizeof(colorchart[0]) ) { + whichcolortable = 0; + } + xcolor2title(); + xloadcols(); + redraw(); +} + +char* +kmap(KeySym k, uint state) +{ + Key *kp; + int i; + + /* Check for mapped keys out of X11 function keys. */ + for (i = 0; i < LEN(mappedkeys); i++) { + if (mappedkeys[i] == k) + break; + } + if (i == LEN(mappedkeys)) { + if ((k & 0xFFFF) < 0xFD00) + return NULL; + } + + for (kp = key; kp < key + LEN(key); kp++) { + if (kp->k != k) + continue; + + if (!match(kp->mask, state)) + continue; + + if (IS_SET(MODE_APPKEYPAD) ? kp->appkey < 0 : kp->appkey > 0) + continue; + if (term.numlock && kp->appkey == 2) + continue; + + if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0) + continue; + + if (IS_SET(MODE_CRLF) ? kp->crlf < 0 : kp->crlf > 0) + continue; + + return kp->s; + } + + return NULL; +} + +void +kpress(XEvent *ev) +{ + XKeyEvent *e = &ev->xkey; + KeySym ksym; + char buf[32], *customkey; + int len; + Rune c; + Status status; + Shortcut *bp; + + if (IS_SET(MODE_KBDLOCK)) + return; + + len = XmbLookupString(xw.xic, e, buf, sizeof buf, &ksym, &status); + /* 1. shortcuts */ + for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { + if (ksym == bp->keysym && match(bp->mod, e->state)) { + bp->func(&(bp->arg)); + return; + } + } + + /* 2. custom keys from config.h */ + if ((customkey = kmap(ksym, e->state))) { + ttysend(customkey, strlen(customkey)); + return; + } + + /* 3. composed string from input method */ + if (len == 0) + return; + if (len == 1 && e->state & Mod1Mask) { + if (IS_SET(MODE_8BIT)) { + if (*buf < 0177) { + c = *buf | 0x80; + len = utf8encode(c, buf); + } + } else { + buf[1] = buf[0]; + buf[0] = '\033'; + len = 2; + } + } + ttysend(buf, len); +} + + +void +cmessage(XEvent *e) +{ + /* + * See xembed specs + * http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html + */ + if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) { + if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) { + xw.state |= WIN_FOCUSED; + xseturgency(0); + } else if (e->xclient.data.l[1] == XEMBED_FOCUS_OUT) { + xw.state &= ~WIN_FOCUSED; + } + } else if (e->xclient.data.l[0] == xw.wmdeletewin) { + /* Send SIGHUP to shell */ + kill(pid, SIGHUP); + exit(0); + } +} + +void +cresize(int width, int height) +{ + int col, row; + + if (width != 0) + xw.w = width; + if (height != 0) + xw.h = height; + + col = (xw.w - 2 * borderpx) / xw.cw; + row = (xw.h - 2 * borderpx) / xw.ch; + + tresize(col, row); + xresize(col, row); +} + +void +resize(XEvent *e) +{ + if (e->xconfigure.width == xw.w && e->xconfigure.height == xw.h) + return; + + cresize(e->xconfigure.width, e->xconfigure.height); + ttyresize(); +} + +void +run(void) +{ + XEvent ev; + int w = xw.w, h = xw.h; + fd_set rfd; + int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0; + struct timespec drawtimeout, *tv = NULL, now, last, lastblink; + long deltatime; + + /* Waiting for window mapping */ + do { + XNextEvent(xw.dpy, &ev); + /* + * This XFilterEvent call is required because of XOpenIM. It + * does filter out the key event and some client message for + * the input method too. + */ + if (XFilterEvent(&ev, None)) + continue; + if (ev.type == ConfigureNotify) { + w = ev.xconfigure.width; + h = ev.xconfigure.height; + } + } while (ev.type != MapNotify); + + cresize(w, h); + ttynew(); + ttyresize(); + + clock_gettime(CLOCK_MONOTONIC, &last); + lastblink = last; + + for (xev = actionfps;;) { + FD_ZERO(&rfd); + FD_SET(cmdfd, &rfd); + FD_SET(xfd, &rfd); + + if (pselect(MAX(xfd, cmdfd)+1, &rfd, NULL, NULL, tv, NULL) < 0) { + if (errno == EINTR) + continue; + die("select failed: %s\n", strerror(errno)); + } + if (FD_ISSET(cmdfd, &rfd)) { + ttyread(); + if (blinktimeout) { + blinkset = tattrset(ATTR_BLINK); + if (!blinkset) + MODBIT(term.mode, 0, MODE_BLINK); + } + } + + if (FD_ISSET(xfd, &rfd)) + xev = actionfps; + + clock_gettime(CLOCK_MONOTONIC, &now); + drawtimeout.tv_sec = 0; + drawtimeout.tv_nsec = (1000 * 1E6)/ xfps; + tv = &drawtimeout; + + dodraw = 0; + if (blinktimeout && TIMEDIFF(now, lastblink) > blinktimeout) { + tsetdirtattr(ATTR_BLINK); + term.mode ^= MODE_BLINK; + lastblink = now; + dodraw = 1; + } + deltatime = TIMEDIFF(now, last); + if (deltatime > 1000 / (xev ? xfps : actionfps)) { + dodraw = 1; + last = now; + } + + if (dodraw) { + while (XPending(xw.dpy)) { + XNextEvent(xw.dpy, &ev); + if (XFilterEvent(&ev, None)) + continue; + if (handler[ev.type]) + (handler[ev.type])(&ev); + } + + if (bellon) { + bellon = 0; + redraw(); + } + else draw(); + + XFlush(xw.dpy); + + if (xev && !FD_ISSET(xfd, &rfd)) + xev--; + if (!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { + if (blinkset) { + if (TIMEDIFF(now, lastblink) \ + > blinktimeout) { + drawtimeout.tv_nsec = 1000; + } else { + drawtimeout.tv_nsec = (1E6 * \ + (blinktimeout - \ + TIMEDIFF(now, + lastblink))); + } + drawtimeout.tv_sec = \ + drawtimeout.tv_nsec / 1E9; + drawtimeout.tv_nsec %= (long)1E9; + } else { + tv = NULL; + } + } + } + } +} + +void +usage(void) +{ + die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid]" + " [[-e] command [args ...]]\n" + " %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid] -l line" + " [stty_args ...]\n", argv0, argv0); +} + +int +main(int argc, char *argv[]) +{ + uint cols = 80, rows = 24; + + xw.l = xw.t = 0; + xw.isfixed = False; + xw.cursor = cursorshape; + + ARGBEGIN { + case 'a': + allowaltscreen = 0; + break; + case 'c': + opt_class = EARGF(usage()); + break; + case 'e': + if (argc > 0) + --argc, ++argv; + goto run; + case 'f': + opt_font = EARGF(usage()); + break; + case 'g': + xw.gm = XParseGeometry(EARGF(usage()), + &xw.l, &xw.t, &cols, &rows); + break; + case 'i': + xw.isfixed = 1; + break; + case 'o': + opt_io = EARGF(usage()); + break; + case 'l': + opt_line = EARGF(usage()); + break; + case 'n': + opt_name = EARGF(usage()); + break; + case 't': + case 'T': + opt_title = EARGF(usage()); + break; + case 'w': + opt_embed = EARGF(usage()); + break; + case 'v': + die("%s " VERSION " (c) 2010-2016 st engineers\n", argv0); + break; + default: + usage(); + } ARGEND; + +run: + if (argc > 0) { + /* eat all remaining arguments */ + opt_cmd = argv; + if (!opt_title && !opt_line) + opt_title = basename(xstrdup(argv[0])); + } + setlocale(LC_CTYPE, ""); + XSetLocaleModifiers(""); + tnew(MAX(cols, 1), MAX(rows, 1)); + xinit(); + selinit(); + run(); + + return 0; +} + diff --git a/old_work/st.info b/old_work/st.info new file mode 100644 index 0000000..d979946 --- /dev/null +++ b/old_work/st.info @@ -0,0 +1,213 @@ +st| simpleterm, + acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + am, + bce, + bel=^G, + blink=\E[5m, + bold=\E[1m, + cbt=\E[Z, + cvvis=\E[?25h, + civis=\E[?25l, + clear=\E[H\E[2J, + cnorm=\E[?12l\E[?25h, + colors#8, + cols#80, + cr=^M, + csr=\E[%i%p1%d;%p2%dr, + cub=\E[%p1%dD, + cub1=^H, + cud1=^J, + cud=\E[%p1%dB, + cuf1=\E[C, + cuf=\E[%p1%dC, + cup=\E[%i%p1%d;%p2%dH, + cuu1=\E[A, + cuu=\E[%p1%dA, + dch=\E[%p1%dP, + dch1=\E[P, + dl=\E[%p1%dM, + dl1=\E[M, + ech=\E[%p1%dX, + ed=\E[J, + el=\E[K, + el1=\E[1K, + enacs=\E)0, + flash=\E[?5h$<80/>\E[?5l, + fsl=^G, + home=\E[H, + hpa=\E[%i%p1%dG, + hs, + ht=^I, + hts=\EH, + ich=\E[%p1%d@, + il1=\E[L, + il=\E[%p1%dL, + ind=^J, + indn=\E[%p1%dS, + invis=\E[8m, + is2=\E[4l\E>\E[?1034l, + it#8, + kel=\E[1;2F, + ked=\E[1;5F, + ka1=\E[1~, + ka3=\E[5~, + kc1=\E[4~, + kc3=\E[6~, + kbs=\010, + kcbt=\E[Z, + kb2=\EOu, + kcub1=\EOD, + kcud1=\EOB, + kcuf1=\EOC, + kcuu1=\EOA, + kDC=\E[3;2~, + kent=\EOM, + kEND=\E[1;2F, + kIC=\E[2;2~, + kNXT=\E[6;2~, + kPRV=\E[5;2~, + kHOM=\E[1;2H, + kLFT=\E[1;2D, + kRIT=\E[1;2C, + kind=\E[1;2B, + kri=\E[1;2A, + kclr=\E[3;5~, + kdl1=\E[3;2~, + kdch1=\177~, + kich1=\E[2~, + kend=\E[4~, + kf1=\EOP, + kf2=\EOQ, + kf3=\EOR, + kf4=\EOS, + kf5=\E[15~, + kf6=\E[17~, + kf7=\E[18~, + kf8=\E[19~, + kf9=\E[20~, + kf10=\E[21~, + kf11=\E[23~, + kf12=\E[24~, + kf13=\E[1;2P, + kf14=\E[1;2Q, + kf15=\E[1;2R, + kf16=\E[1;2S, + kf17=\E[15;2~, + kf18=\E[17;2~, + kf19=\E[18;2~, + kf20=\E[19;2~, + kf21=\E[20;2~, + kf22=\E[21;2~, + kf23=\E[23;2~, + kf24=\E[24;2~, + kf25=\E[1;5P, + kf26=\E[1;5Q, + kf27=\E[1;5R, + kf28=\E[1;5S, + kf29=\E[15;5~, + kf30=\E[17;5~, + kf31=\E[18;5~, + kf32=\E[19;5~, + kf33=\E[20;5~, + kf34=\E[21;5~, + kf35=\E[23;5~, + kf36=\E[24;5~, + kf37=\E[1;6P, + kf38=\E[1;6Q, + kf39=\E[1;6R, + kf40=\E[1;6S, + kf41=\E[15;6~, + kf42=\E[17;6~, + kf43=\E[18;6~, + kf44=\E[19;6~, + kf45=\E[20;6~, + kf46=\E[21;6~, + kf47=\E[23;6~, + kf48=\E[24;6~, + kf49=\E[1;3P, + kf50=\E[1;3Q, + kf51=\E[1;3R, + kf52=\E[1;3S, + kf53=\E[15;3~, + kf54=\E[17;3~, + kf55=\E[18;3~, + kf56=\E[19;3~, + kf57=\E[20;3~, + kf58=\E[21;3~, + kf59=\E[23;3~, + kf60=\E[24;3~, + kf61=\E[1;4P, + kf62=\E[1;4Q, + kf63=\E[1;4R, + khome=\E[1~, + kil1=\E[2;5~, + krmir=\E[2;2~, + kich1=\E[2~, + knp=\E[6~, + kmous=\E[M, + kpp=\E[5~, + lines#24, + mir, + msgr, + ncv#3, + npc, + op=\E[39;49m, + pairs#64, + mc0=\E[i, + mc4=\E[4i, + mc5=\E[5i, + rc=\E8, + rev=\E[7m, + ri=\EM, + ritm=\E[23m, + rmacs=\E(B, + rmcup=\E[?1049l, + rmir=\E[4l, + rmkx=\E[?1l\E>, + rmso=\E[27m, + rmul=\E[24m, + rs1=\Ec, + rs2=\E[4l\E>\E[?1034l, + sc=\E7, + setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, + setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + sgr0=\E[0m, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sitm=\E[3m, + smacs=\E(0, + smcup=\E[?1049h, + smir=\E[4h, + smkx=\E[?1h\E=, + smso=\E[7m, + smul=\E[4m, + tbc=\E[3g, + tsl=\E]0;, + xenl, + vpa=\E[%i%p1%dd, + + +st-256color| simpleterm with 256 colors, + use=st, + colors#256, + pairs#32767, +# Nicked from xterm-256color + setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, + setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, + +st-meta| simpleterm with meta key, + use=st, + km, + rmm=\E[?1034l, + smm=\E[?1034h, + rs2=\E[4l\E>\E[?1034h, + is2=\E[4l\E>\E[?1034h, + +st-meta-256color| simpleterm with meta key and 256 colors, + use=st-256color, + km, + rmm=\E[?1034l, + smm=\E[?1034h, + rs2=\E[4l\E>\E[?1034h, + is2=\E[4l\E>\E[?1034h, diff --git a/xrdb b/old_work/xrdb similarity index 100% rename from xrdb rename to old_work/xrdb diff --git a/xrdb2st.py b/old_work/xrdb2st.py similarity index 100% rename from xrdb2st.py rename to old_work/xrdb2st.py diff --git a/st-0.8.4-patches/st-alpha-0.8.2.diff b/st-0.8.4-patches/st-alpha-0.8.2.diff new file mode 100644 index 0000000..dad6615 --- /dev/null +++ b/st-0.8.4-patches/st-alpha-0.8.2.diff @@ -0,0 +1,163 @@ +diff --git a/config.def.h b/config.def.h +index 0e01717..e116631 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -82,6 +82,9 @@ char *termname = "st-256color"; + */ + unsigned int tabspaces = 8; + ++/* bg opacity */ ++float alpha = 0.8; ++ + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { + /* 8 normal colors */ +@@ -109,6 +112,7 @@ static const char *colorname[] = { + /* more colors can be added after 255 to use with DefaultXX */ + "#cccccc", + "#555555", ++ "black", + }; + + +@@ -117,7 +121,7 @@ static const char *colorname[] = { + * foreground, background, cursor, reverse cursor + */ + unsigned int defaultfg = 7; +-unsigned int defaultbg = 0; ++unsigned int defaultbg = 258; + static unsigned int defaultcs = 256; + static unsigned int defaultrcs = 257; + +diff --git a/config.mk b/config.mk +index 0cbb002..1d2f0e2 100644 +--- a/config.mk ++++ b/config.mk +@@ -16,7 +16,7 @@ PKG_CONFIG = pkg-config + INCS = -I$(X11INC) \ + `$(PKG_CONFIG) --cflags fontconfig` \ + `$(PKG_CONFIG) --cflags freetype2` +-LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ ++LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\ + `$(PKG_CONFIG) --libs fontconfig` \ + `$(PKG_CONFIG) --libs freetype2` + +diff --git a/st.h b/st.h +index 38c61c4..b7634ab 100644 +--- a/st.h ++++ b/st.h +@@ -120,3 +120,4 @@ extern char *termname; + extern unsigned int tabspaces; + extern unsigned int defaultfg; + extern unsigned int defaultbg; ++extern float alpha; +diff --git a/x.c b/x.c +index 0422421..588dec3 100644 +--- a/x.c ++++ b/x.c +@@ -98,6 +98,7 @@ typedef struct { + XSetWindowAttributes attrs; + int scr; + int isfixed; /* is fixed geometry? */ ++ int depth; /* bit depth */ + int l, t; /* left and top offset */ + int gm; /* geometry mask */ + } XWindow; +@@ -229,6 +230,7 @@ static char *usedfont = NULL; + static double usedfontsize = 0; + static double defaultfontsize = 0; + ++static char *opt_alpha = NULL; + static char *opt_class = NULL; + static char **opt_cmd = NULL; + static char *opt_embed = NULL; +@@ -688,7 +690,7 @@ xresize(int col, int row) + + XFreePixmap(xw.dpy, xw.buf); + xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.depth); + XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, win.w, win.h); + +@@ -748,6 +750,13 @@ xloadcols(void) + else + die("could not allocate color %d\n", i); + } ++ ++ /* set alpha value of bg color */ ++ if (opt_alpha) ++ alpha = strtof(opt_alpha, NULL); ++ dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha); ++ dc.col[defaultbg].pixel &= 0x00FFFFFF; ++ dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24; + loaded = 1; + } + +@@ -1004,11 +1013,23 @@ xinit(int cols, int rows) + Window parent; + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; ++ XWindowAttributes attr; ++ XVisualInfo vis; + + if (!(xw.dpy = XOpenDisplay(NULL))) + die("can't open display\n"); + xw.scr = XDefaultScreen(xw.dpy); +- xw.vis = XDefaultVisual(xw.dpy, xw.scr); ++ ++ if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) { ++ parent = XRootWindow(xw.dpy, xw.scr); ++ xw.depth = 32; ++ } else { ++ XGetWindowAttributes(xw.dpy, parent, &attr); ++ xw.depth = attr.depth; ++ } ++ ++ XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis); ++ xw.vis = vis.visual; + + /* font */ + if (!FcInit()) +@@ -1018,7 +1039,7 @@ xinit(int cols, int rows) + xloadfonts(usedfont, 0); + + /* colors */ +- xw.cmap = XDefaultColormap(xw.dpy, xw.scr); ++ xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None); + xloadcols(); + + /* adjust fixed window geometry */ +@@ -1038,19 +1059,15 @@ xinit(int cols, int rows) + | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask; + xw.attrs.colormap = xw.cmap; + +- if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) +- parent = XRootWindow(xw.dpy, xw.scr); + xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, +- win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput, ++ win.w, win.h, 0, xw.depth, InputOutput, + xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity + | CWEventMask | CWColormap, &xw.attrs); + + memset(&gcvalues, 0, sizeof(gcvalues)); + gcvalues.graphics_exposures = False; +- dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, +- &gcvalues); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth); ++ dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues); + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); + +@@ -1894,6 +1911,9 @@ main(int argc, char *argv[]) + case 'a': + allowaltscreen = 0; + break; ++ case 'A': ++ opt_alpha = EARGF(usage()); ++ break; + case 'c': + opt_class = EARGF(usage()); + break; diff --git a/st-0.8.4-patches/st-alpha-20190116-3be4cf1.diff b/st-0.8.4-patches/st-alpha-20190116-3be4cf1.diff new file mode 100644 index 0000000..96aadbb --- /dev/null +++ b/st-0.8.4-patches/st-alpha-20190116-3be4cf1.diff @@ -0,0 +1,200 @@ +diff --git a/config.def.h b/config.def.h +index 0e01717..007fbd4 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -82,6 +82,9 @@ char *termname = "st-256color"; + */ + unsigned int tabspaces = 8; + ++/* bg opacity */ ++unsigned int alpha = 0xcc; ++ + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { + /* 8 normal colors */ +@@ -109,6 +112,7 @@ static const char *colorname[] = { + /* more colors can be added after 255 to use with DefaultXX */ + "#cccccc", + "#555555", ++ "black", + }; + + +@@ -117,7 +121,7 @@ static const char *colorname[] = { + * foreground, background, cursor, reverse cursor + */ + unsigned int defaultfg = 7; +-unsigned int defaultbg = 0; ++unsigned int defaultbg = 257; + static unsigned int defaultcs = 256; + static unsigned int defaultrcs = 257; + +diff --git a/config.mk b/config.mk +index 5059632..1844c14 100644 +--- a/config.mk ++++ b/config.mk +@@ -13,10 +13,10 @@ X11LIB = /usr/X11R6/lib + PKG_CONFIG = pkg-config + + # includes and libs +-INCS = -I$(X11INC) \ ++INCS = -I. -I/usr/include -I${X11INC} \ + `$(PKG_CONFIG) --cflags fontconfig` \ + `$(PKG_CONFIG) --cflags freetype2` +-LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ ++LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXft -lXrender\ + `$(PKG_CONFIG) --libs fontconfig` \ + `$(PKG_CONFIG) --libs freetype2` + +diff --git a/st.h b/st.h +index 38c61c4..935a9d3 100644 +--- a/st.h ++++ b/st.h +@@ -118,5 +118,6 @@ extern char *worddelimiters; + extern int allowaltscreen; + extern char *termname; + extern unsigned int tabspaces; ++extern unsigned int alpha; + extern unsigned int defaultfg; + extern unsigned int defaultbg; +diff --git a/x.c b/x.c +index 0422421..441bada 100644 +--- a/x.c ++++ b/x.c +@@ -48,6 +48,10 @@ typedef struct { + #define XK_NO_MOD 0 + #define XK_SWITCH_MOD (1<<13) + ++/* alpha */ ++#define OPAQUE 0Xff ++#define USE_ARGB (alpha != OPAQUE && opt_embed == NULL) ++ + /* function definitions used in config.h */ + static void clipcopy(const Arg *); + static void clippaste(const Arg *); +@@ -98,6 +102,7 @@ typedef struct { + XSetWindowAttributes attrs; + int scr; + int isfixed; /* is fixed geometry? */ ++ int depth; /* bit depth */ + int l, t; /* left and top offset */ + int gm; /* geometry mask */ + } XWindow; +@@ -688,7 +693,7 @@ xresize(int col, int row) + + XFreePixmap(xw.dpy, xw.buf); + xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.depth); + XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, win.w, win.h); + +@@ -748,6 +753,14 @@ xloadcols(void) + else + die("could not allocate color %d\n", i); + } ++ ++ /* set alpha value of bg color */ ++ if (USE_ARGB) { ++ dc.col[defaultbg].color.alpha = alpha << 8; ++ dc.col[defaultbg].color.red = ((dc.col[defaultbg].color.red >> 8) * alpha / 255) << 8; ++ dc.col[defaultbg].color.green = ((dc.col[defaultbg].color.green >> 8) * alpha / 255) << 8; ++ dc.col[defaultbg].color.blue = ((dc.col[defaultbg].color.blue >> 8) * alpha / 255) << 8; ++ } + loaded = 1; + } + +@@ -769,6 +782,17 @@ xsetcolorname(int x, const char *name) + return 0; + } + ++void ++xtermclear(int col1, int row1, int col2, int row2) ++{ ++ XftDrawRect(xw.draw, ++ &dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg], ++ borderpx + col1 * win.cw, ++ borderpx + row1 * win.ch, ++ (col2-col1+1) * win.cw, ++ (row2-row1+1) * win.ch); ++} ++ + /* + * Absolute coordinates. + */ +@@ -1008,7 +1032,40 @@ xinit(int cols, int rows) + if (!(xw.dpy = XOpenDisplay(NULL))) + die("can't open display\n"); + xw.scr = XDefaultScreen(xw.dpy); +- xw.vis = XDefaultVisual(xw.dpy, xw.scr); ++ xw.depth = (USE_ARGB) ? 32: XDefaultDepth(xw.dpy, xw.scr); ++ if (!USE_ARGB) ++ xw.vis = XDefaultVisual(xw.dpy, xw.scr); ++ else { ++ XVisualInfo *vis; ++ XRenderPictFormat *fmt; ++ int nvi; ++ int i; ++ ++ XVisualInfo tpl = { ++ .screen = xw.scr, ++ .depth = 32, ++ .class = TrueColor ++ }; ++ ++ vis = XGetVisualInfo(xw.dpy, ++ VisualScreenMask | VisualDepthMask | VisualClassMask, ++ &tpl, &nvi); ++ xw.vis = NULL; ++ for (i = 0; i < nvi; i++) { ++ fmt = XRenderFindVisualFormat(xw.dpy, vis[i].visual); ++ if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { ++ xw.vis = vis[i].visual; ++ break; ++ } ++ } ++ ++ XFree(vis); ++ ++ if (!xw.vis) { ++ fprintf(stderr, "Couldn't find ARGB visual.\n"); ++ exit(1); ++ } ++ } + + /* font */ + if (!FcInit()) +@@ -1018,7 +1075,11 @@ xinit(int cols, int rows) + xloadfonts(usedfont, 0); + + /* colors */ +- xw.cmap = XDefaultColormap(xw.dpy, xw.scr); ++ if (!USE_ARGB) ++ xw.cmap = XDefaultColormap(xw.dpy, xw.scr); ++ else ++ xw.cmap = XCreateColormap(xw.dpy, XRootWindow(xw.dpy, xw.scr), ++ xw.vis, None); + xloadcols(); + + /* adjust fixed window geometry */ +@@ -1041,16 +1102,15 @@ xinit(int cols, int rows) + if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) + parent = XRootWindow(xw.dpy, xw.scr); + xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, +- win.w, win.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput, ++ win.w, win.h, 0, xw.depth, InputOutput, + xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity + | CWEventMask | CWColormap, &xw.attrs); + + memset(&gcvalues, 0, sizeof(gcvalues)); + gcvalues.graphics_exposures = False; +- dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, +- &gcvalues); +- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, +- DefaultDepth(xw.dpy, xw.scr)); ++ xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth); ++ dc.gc = XCreateGC(xw.dpy, (USE_ARGB) ? xw.buf: parent, ++ GCGraphicsExposures, &gcvalues); + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); + diff --git a/st-0.8.4-patches/st-appsync-20200618-b27a383.diff b/st-0.8.4-patches/st-appsync-20200618-b27a383.diff new file mode 100644 index 0000000..4736325 --- /dev/null +++ b/st-0.8.4-patches/st-appsync-20200618-b27a383.diff @@ -0,0 +1,259 @@ +From 8c9c920325fa10440a96736ba58ec647a0365e22 Mon Sep 17 00:00:00 2001 +From: "Avi Halachmi (:avih)" +Date: Sat, 18 Apr 2020 13:56:11 +0300 +Subject: [PATCH] application-sync: support Synchronized-Updates + +See https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec + +In a nutshell: allow an application to suspend drawing until it has +completed some output - so that the terminal will not flicker/tear by +rendering partial content. If the end-of-suspension sequence doesn't +arrive, the terminal bails out after a timeout (default: 200 ms). + +The feature is supported and pioneered by iTerm2. There are probably +very few other terminals or applications which support this feature +currently. + +One notable application which does support it is tmux (master as of +2020-04-18) - where cursor flicker is completely avoided when a pane +has new content. E.g. run in one pane: `while :; do cat x.c; done' +while the cursor is at another pane. + +The terminfo string `Sync' added to `st.info' is also a tmux extension +which tmux detects automatically when `st.info` is installed. + +Notes: + +- Draw-suspension begins on BSU sequence (Begin-Synchronized-Update), + and ends on ESU sequence (End-Synchronized-Update). + +- BSU, ESU are "\033P=1s\033\\", "\033P=2s\033\\" respectively (DCS). + +- SU doesn't support nesting - BSU begins or extends, ESU always ends. + +- ESU without BSU is ignored. + +- BSU after BSU extends (resets the timeout), so an application could + send BSU in a loop and keep drawing suspended - exactly like it can + not-draw anything in a loop. But as soon as it exits/aborted then + drawing is resumed according to the timeout even without ESU. + +- This implementation focuses on ESU and doesn't really care about BSU + in the sense that it tries hard to draw exactly once ESU arrives (if + it's not too soon after the last draw - according to minlatency), + and doesn't try to draw the content just up-to BSU. These two sides + complement eachother - not-drawing on BSU increases the chance that + ESU is not too soon after the last draw. This approach was chosen + because the application's main focus is that ESU indicates to the + terminal that the content is now ready - and that's when we try to + draw. +--- + config.def.h | 6 ++++++ + st.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- + st.info | 1 + + x.c | 22 +++++++++++++++++++--- + 4 files changed, 72 insertions(+), 5 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 6f05dce..80d768e 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -56,6 +56,12 @@ int allowwindowops = 0; + static double minlatency = 8; + static double maxlatency = 33; + ++/* ++ * Synchronized-Update timeout in ms ++ * https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec ++ */ ++static uint su_timeout = 200; ++ + /* + * blinking timeout (set to 0 to disable blinking) for the terminal blinking + * attribute. +diff --git a/st.c b/st.c +index 76b7e0d..0582e77 100644 +--- a/st.c ++++ b/st.c +@@ -231,6 +231,33 @@ static uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8}; + static Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000}; + static Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF}; + ++#include ++static int su = 0; ++struct timespec sutv; ++ ++static void ++tsync_begin() ++{ ++ clock_gettime(CLOCK_MONOTONIC, &sutv); ++ su = 1; ++} ++ ++static void ++tsync_end() ++{ ++ su = 0; ++} ++ ++int ++tinsync(uint timeout) ++{ ++ struct timespec now; ++ if (su && !clock_gettime(CLOCK_MONOTONIC, &now) ++ && TIMEDIFF(now, sutv) >= timeout) ++ su = 0; ++ return su; ++} ++ + ssize_t + xwrite(int fd, const char *s, size_t len) + { +@@ -818,6 +845,9 @@ ttynew(char *line, char *cmd, char *out, char **args) + return cmdfd; + } + ++static int twrite_aborted = 0; ++int ttyread_pending() { return twrite_aborted; } ++ + size_t + ttyread(void) + { +@@ -826,7 +856,7 @@ ttyread(void) + int ret, written; + + /* append read bytes to unprocessed bytes */ +- ret = read(cmdfd, buf+buflen, LEN(buf)-buflen); ++ ret = twrite_aborted ? 1 : read(cmdfd, buf+buflen, LEN(buf)-buflen); + + switch (ret) { + case 0: +@@ -834,7 +864,7 @@ ttyread(void) + case -1: + die("couldn't read from shell: %s\n", strerror(errno)); + default: +- buflen += ret; ++ buflen += twrite_aborted ? 0 : ret; + written = twrite(buf, buflen, 0); + buflen -= written; + /* keep any incomplete UTF-8 byte sequence for the next call */ +@@ -994,6 +1024,7 @@ tsetdirtattr(int attr) + void + tfulldirt(void) + { ++ tsync_end(); + tsetdirt(0, term.row-1); + } + +@@ -1895,6 +1926,12 @@ strhandle(void) + xsettitle(strescseq.args[0]); + return; + case 'P': /* DCS -- Device Control String */ ++ /* https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec */ ++ if (strstr(strescseq.buf, "=1s") == strescseq.buf) ++ tsync_begin(); /* BSU */ ++ else if (strstr(strescseq.buf, "=2s") == strescseq.buf) ++ tsync_end(); /* ESU */ ++ return; + case '_': /* APC -- Application Program Command */ + case '^': /* PM -- Privacy Message */ + return; +@@ -2436,6 +2473,9 @@ twrite(const char *buf, int buflen, int show_ctrl) + Rune u; + int n; + ++ int su0 = su; ++ twrite_aborted = 0; ++ + for (n = 0; n < buflen; n += charsize) { + if (IS_SET(MODE_UTF8)) { + /* process a complete utf8 char */ +@@ -2446,6 +2486,10 @@ twrite(const char *buf, int buflen, int show_ctrl) + u = buf[n] & 0xFF; + charsize = 1; + } ++ if (su0 && !su) { ++ twrite_aborted = 1; ++ break; // ESU - allow rendering before a new BSU ++ } + if (show_ctrl && ISCONTROL(u)) { + if (u & 0x80) { + u &= 0x7f; +diff --git a/st.info b/st.info +index 8201ad6..b32b446 100644 +--- a/st.info ++++ b/st.info +@@ -191,6 +191,7 @@ st-mono| simpleterm monocolor, + Ms=\E]52;%p1%s;%p2%s\007, + Se=\E[2 q, + Ss=\E[%p1%d q, ++ Sync=\EP=%p1%ds\E\\, + + st| simpleterm, + use=st-mono, +diff --git a/x.c b/x.c +index 210f184..27ff4e2 100644 +--- a/x.c ++++ b/x.c +@@ -1861,6 +1861,9 @@ resize(XEvent *e) + cresize(e->xconfigure.width, e->xconfigure.height); + } + ++int tinsync(uint); ++int ttyread_pending(); ++ + void + run(void) + { +@@ -1895,7 +1898,7 @@ run(void) + FD_SET(ttyfd, &rfd); + FD_SET(xfd, &rfd); + +- if (XPending(xw.dpy)) ++ if (XPending(xw.dpy) || ttyread_pending()) + timeout = 0; /* existing events might not set xfd */ + + seltv.tv_sec = timeout / 1E3; +@@ -1909,7 +1912,8 @@ run(void) + } + clock_gettime(CLOCK_MONOTONIC, &now); + +- if (FD_ISSET(ttyfd, &rfd)) ++ int ttyin = FD_ISSET(ttyfd, &rfd) || ttyread_pending(); ++ if (ttyin) + ttyread(); + + xev = 0; +@@ -1933,7 +1937,7 @@ run(void) + * maximum latency intervals during `cat huge.txt`, and perfect + * sync with periodic updates from animations/key-repeats/etc. + */ +- if (FD_ISSET(ttyfd, &rfd) || xev) { ++ if (ttyin || xev) { + if (!drawing) { + trigger = now; + drawing = 1; +@@ -1944,6 +1948,18 @@ run(void) + continue; /* we have time, try to find idle */ + } + ++ if (tinsync(su_timeout)) { ++ /* ++ * on synchronized-update draw-suspension: don't reset ++ * drawing so that we draw ASAP once we can (just after ++ * ESU). it won't be too soon because we already can ++ * draw now but we skip. we set timeout > 0 to draw on ++ * SU-timeout even without new content. ++ */ ++ timeout = minlatency; ++ continue; ++ } ++ + /* idle detected or maxlatency exhausted -> draw */ + timeout = -1; + if (blinktimeout && tattrset(ATTR_BLINK)) { + +base-commit: b27a383a3acc7decf00e6e889fca265430b5d329 +-- +2.17.1 + diff --git a/st-0.8.4-patches/st-blinking_cursor-20200531-a2a7044.diff b/st-0.8.4-patches/st-blinking_cursor-20200531-a2a7044.diff new file mode 100644 index 0000000..d544f74 --- /dev/null +++ b/st-0.8.4-patches/st-blinking_cursor-20200531-a2a7044.diff @@ -0,0 +1,150 @@ +From bff176133618854676bbdc74c0099f184d3da365 Mon Sep 17 00:00:00 2001 +From: Steve Ward +Date: Sun, 31 May 2020 22:48:25 -0400 +Subject: [PATCH] Allow blinking cursor + +--- + config.def.h | 19 +++++++++++++------ + x.c | 42 ++++++++++++++++++++++++++++++++---------- + 2 files changed, 45 insertions(+), 16 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 6f05dce..3dbe915 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -133,13 +133,20 @@ static unsigned int defaultcs = 256; + static unsigned int defaultrcs = 257; + + /* +- * Default shape of cursor +- * 2: Block ("█") +- * 4: Underline ("_") +- * 6: Bar ("|") +- * 7: Snowman ("☃") ++ * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 ++ * Default style of cursor ++ * 0: Blinking block ++ * 1: Blinking block (default) ++ * 2: Steady block ("█") ++ * 3: Blinking underline ++ * 4: Steady underline ("_") ++ * 5: Blinking bar ++ * 6: Steady bar ("|") ++ * 7: Blinking st cursor ++ * 8: Steady st cursor + */ +-static unsigned int cursorshape = 2; ++static unsigned int cursorstyle = 1; ++static Rune stcursor = 0x2603; /* snowman (U+2603) */ + + /* + * Default columns and rows numbers +diff --git a/x.c b/x.c +index 210f184..bd80a5e 100644 +--- a/x.c ++++ b/x.c +@@ -253,6 +253,7 @@ static char *opt_name = NULL; + static char *opt_title = NULL; + + static int oldbutton = 3; /* button event on startup: 3 = release */ ++static int cursorblinks = 0; + + void + clipcopy(const Arg *dummy) +@@ -1526,16 +1527,19 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) + /* draw the new one */ + if (IS_SET(MODE_FOCUSED)) { + switch (win.cursor) { +- case 7: /* st extension */ +- g.u = 0x2603; /* snowman (U+2603) */ ++ case 0: /* Blinking block */ ++ case 1: /* Blinking block (default) */ ++ if (IS_SET(MODE_BLINK)) ++ break; + /* FALLTHROUGH */ +- case 0: /* Blinking Block */ +- case 1: /* Blinking Block (Default) */ +- case 2: /* Steady Block */ ++ case 2: /* Steady block */ + xdrawglyph(g, cx, cy); + break; +- case 3: /* Blinking Underline */ +- case 4: /* Steady Underline */ ++ case 3: /* Blinking underline */ ++ if (IS_SET(MODE_BLINK)) ++ break; ++ /* FALLTHROUGH */ ++ case 4: /* Steady underline */ + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + (cy + 1) * win.ch - \ +@@ -1543,12 +1547,23 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) + win.cw, cursorthickness); + break; + case 5: /* Blinking bar */ ++ if (IS_SET(MODE_BLINK)) ++ break; ++ /* FALLTHROUGH */ + case 6: /* Steady bar */ + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + cy * win.ch, + cursorthickness, win.ch); + break; ++ case 7: /* Blinking st cursor */ ++ if (IS_SET(MODE_BLINK)) ++ break; ++ /* FALLTHROUGH */ ++ case 8: /* Steady st cursor */ ++ g.u = stcursor; ++ xdrawglyph(g, cx, cy); ++ break; + } + } else { + XftDrawRect(xw.draw, &drawcol, +@@ -1690,9 +1705,12 @@ xsetmode(int set, unsigned int flags) + int + xsetcursor(int cursor) + { +- if (!BETWEEN(cursor, 0, 7)) /* 7: st extension */ ++ if (!BETWEEN(cursor, 0, 8)) /* 7-8: st extensions */ + return 1; + win.cursor = cursor; ++ cursorblinks = win.cursor == 0 || win.cursor == 1 || ++ win.cursor == 3 || win.cursor == 5 || ++ win.cursor == 7; + return 0; + } + +@@ -1936,6 +1954,10 @@ run(void) + if (FD_ISSET(ttyfd, &rfd) || xev) { + if (!drawing) { + trigger = now; ++ if (IS_SET(MODE_BLINK)) { ++ win.mode ^= MODE_BLINK; ++ } ++ lastblink = now; + drawing = 1; + } + timeout = (maxlatency - TIMEDIFF(now, trigger)) \ +@@ -1946,7 +1968,7 @@ run(void) + + /* idle detected or maxlatency exhausted -> draw */ + timeout = -1; +- if (blinktimeout && tattrset(ATTR_BLINK)) { ++ if (blinktimeout && (cursorblinks || tattrset(ATTR_BLINK))) { + timeout = blinktimeout - TIMEDIFF(now, lastblink); + if (timeout <= 0) { + if (-timeout > blinktimeout) /* start visible */ +@@ -1982,7 +2004,7 @@ main(int argc, char *argv[]) + { + xw.l = xw.t = 0; + xw.isfixed = False; +- xsetcursor(cursorshape); ++ xsetcursor(cursorstyle); + + ARGBEGIN { + case 'a': +-- +2.20.1 + diff --git a/st-0.8.4-patches/st-boxdraw_v2-0.8.3.diff b/st-0.8.4-patches/st-boxdraw_v2-0.8.3.diff new file mode 100644 index 0000000..04a868c --- /dev/null +++ b/st-0.8.4-patches/st-boxdraw_v2-0.8.3.diff @@ -0,0 +1,600 @@ +From 3f3b80b9966c60086f4ed80ce4de0cbf03468d36 Mon Sep 17 00:00:00 2001 +From: "Avi Halachmi (:avih)" +Date: Wed, 26 Dec 2018 14:51:45 +0200 +Subject: [PATCH] boxdraw_v2: custom render lines/blocks/braille for perfect + alignment + +It seems impossible to ensure that blocks and line drawing glyphs +align without visible gaps for all combinations of arbitrary font, +size and width/height scale factor. + +This commit adds options to render most of the lines/blocks and +braille codepoints without using the font such that they align +perfectly regardless of font, size or other configuration values. + +Supported codepoints are U+2500 - U+259F except dashes/diagonals, +and U28XX. + +The lines/blocks data is stored as 16-bit values at boxdraw_data.h + +boxdraw/braille are independent, disabled by default at config[.def].h +--- + Makefile | 3 +- + boxdraw.c | 194 ++++++++++++++++++++++++++++++++++++++++++++ + boxdraw_data.h | 214 +++++++++++++++++++++++++++++++++++++++++++++++++ + config.def.h | 12 +++ + st.c | 3 + + st.h | 10 +++ + x.c | 21 +++-- + 7 files changed, 451 insertions(+), 6 deletions(-) + create mode 100644 boxdraw.c + create mode 100644 boxdraw_data.h + +diff --git a/Makefile b/Makefile +index 470ac86..6dfa212 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,7 +4,7 @@ + + include config.mk + +-SRC = st.c x.c ++SRC = st.c x.c boxdraw.c + OBJ = $(SRC:.c=.o) + + all: options st +@@ -23,6 +23,7 @@ config.h: + + st.o: config.h st.h win.h + x.o: arg.h config.h st.h win.h ++boxdraw.o: config.h st.h boxdraw_data.h + + $(OBJ): config.h config.mk + +diff --git a/boxdraw.c b/boxdraw.c +new file mode 100644 +index 0000000..28a92d0 +--- /dev/null ++++ b/boxdraw.c +@@ -0,0 +1,194 @@ ++/* ++ * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih ++ * MIT/X Consortium License ++ */ ++ ++#include ++#include "st.h" ++#include "boxdraw_data.h" ++ ++/* Rounded non-negative integers division of n / d */ ++#define DIV(n, d) (((n) + (d) / 2) / (d)) ++ ++static Display *xdpy; ++static Colormap xcmap; ++static XftDraw *xd; ++static Visual *xvis; ++ ++static void drawbox(int, int, int, int, XftColor *, XftColor *, ushort); ++static void drawboxlines(int, int, int, int, XftColor *, ushort); ++ ++/* public API */ ++ ++void ++boxdraw_xinit(Display *dpy, Colormap cmap, XftDraw *draw, Visual *vis) ++{ ++ xdpy = dpy; xcmap = cmap; xd = draw, xvis = vis; ++} ++ ++int ++isboxdraw(Rune u) ++{ ++ Rune block = u & ~0xff; ++ return (boxdraw && block == 0x2500 && boxdata[(uint8_t)u]) || ++ (boxdraw_braille && block == 0x2800); ++} ++ ++/* the "index" is actually the entire shape data encoded as ushort */ ++ushort ++boxdrawindex(const Glyph *g) ++{ ++ if (boxdraw_braille && (g->u & ~0xff) == 0x2800) ++ return BRL | (uint8_t)g->u; ++ if (boxdraw_bold && (g->mode & ATTR_BOLD)) ++ return BDB | boxdata[(uint8_t)g->u]; ++ return boxdata[(uint8_t)g->u]; ++} ++ ++void ++drawboxes(int x, int y, int cw, int ch, XftColor *fg, XftColor *bg, ++ const XftGlyphFontSpec *specs, int len) ++{ ++ for ( ; len-- > 0; x += cw, specs++) ++ drawbox(x, y, cw, ch, fg, bg, (ushort)specs->glyph); ++} ++ ++/* implementation */ ++ ++void ++drawbox(int x, int y, int w, int h, XftColor *fg, XftColor *bg, ushort bd) ++{ ++ ushort cat = bd & ~(BDB | 0xff); /* mask out bold and data */ ++ if (bd & (BDL | BDA)) { ++ /* lines (light/double/heavy/arcs) */ ++ drawboxlines(x, y, w, h, fg, bd); ++ ++ } else if (cat == BBD) { ++ /* lower (8-X)/8 block */ ++ int d = DIV((uint8_t)bd * h, 8); ++ XftDrawRect(xd, fg, x, y + d, w, h - d); ++ ++ } else if (cat == BBU) { ++ /* upper X/8 block */ ++ XftDrawRect(xd, fg, x, y, w, DIV((uint8_t)bd * h, 8)); ++ ++ } else if (cat == BBL) { ++ /* left X/8 block */ ++ XftDrawRect(xd, fg, x, y, DIV((uint8_t)bd * w, 8), h); ++ ++ } else if (cat == BBR) { ++ /* right (8-X)/8 block */ ++ int d = DIV((uint8_t)bd * w, 8); ++ XftDrawRect(xd, fg, x + d, y, w - d, h); ++ ++ } else if (cat == BBQ) { ++ /* Quadrants */ ++ int w2 = DIV(w, 2), h2 = DIV(h, 2); ++ if (bd & TL) ++ XftDrawRect(xd, fg, x, y, w2, h2); ++ if (bd & TR) ++ XftDrawRect(xd, fg, x + w2, y, w - w2, h2); ++ if (bd & BL) ++ XftDrawRect(xd, fg, x, y + h2, w2, h - h2); ++ if (bd & BR) ++ XftDrawRect(xd, fg, x + w2, y + h2, w - w2, h - h2); ++ ++ } else if (bd & BBS) { ++ /* Shades - data is 1/2/3 for 25%/50%/75% alpha, respectively */ ++ int d = (uint8_t)bd; ++ XftColor xfc; ++ XRenderColor xrc = { .alpha = 0xffff }; ++ ++ xrc.red = DIV(fg->color.red * d + bg->color.red * (4 - d), 4); ++ xrc.green = DIV(fg->color.green * d + bg->color.green * (4 - d), 4); ++ xrc.blue = DIV(fg->color.blue * d + bg->color.blue * (4 - d), 4); ++ ++ XftColorAllocValue(xdpy, xvis, xcmap, &xrc, &xfc); ++ XftDrawRect(xd, &xfc, x, y, w, h); ++ XftColorFree(xdpy, xvis, xcmap, &xfc); ++ ++ } else if (cat == BRL) { ++ /* braille, each data bit corresponds to one dot at 2x4 grid */ ++ int w1 = DIV(w, 2); ++ int h1 = DIV(h, 4), h2 = DIV(h, 2), h3 = DIV(3 * h, 4); ++ ++ if (bd & 1) XftDrawRect(xd, fg, x, y, w1, h1); ++ if (bd & 2) XftDrawRect(xd, fg, x, y + h1, w1, h2 - h1); ++ if (bd & 4) XftDrawRect(xd, fg, x, y + h2, w1, h3 - h2); ++ if (bd & 8) XftDrawRect(xd, fg, x + w1, y, w - w1, h1); ++ if (bd & 16) XftDrawRect(xd, fg, x + w1, y + h1, w - w1, h2 - h1); ++ if (bd & 32) XftDrawRect(xd, fg, x + w1, y + h2, w - w1, h3 - h2); ++ if (bd & 64) XftDrawRect(xd, fg, x, y + h3, w1, h - h3); ++ if (bd & 128) XftDrawRect(xd, fg, x + w1, y + h3, w - w1, h - h3); ++ ++ } ++} ++ ++void ++drawboxlines(int x, int y, int w, int h, XftColor *fg, ushort bd) ++{ ++ /* s: stem thickness. width/8 roughly matches underscore thickness. */ ++ /* We draw bold as 1.5 * normal-stem and at least 1px thicker. */ ++ /* doubles draw at least 3px, even when w or h < 3. bold needs 6px. */ ++ int mwh = MIN(w, h); ++ int base_s = MAX(1, DIV(mwh, 8)); ++ int bold = (bd & BDB) && mwh >= 6; /* possibly ignore boldness */ ++ int s = bold ? MAX(base_s + 1, DIV(3 * base_s, 2)) : base_s; ++ int w2 = DIV(w - s, 2), h2 = DIV(h - s, 2); ++ /* the s-by-s square (x + w2, y + h2, s, s) is the center texel. */ ++ /* The base length (per direction till edge) includes this square. */ ++ ++ int light = bd & (LL | LU | LR | LD); ++ int double_ = bd & (DL | DU | DR | DD); ++ ++ if (light) { ++ /* d: additional (negative) length to not-draw the center */ ++ /* texel - at arcs and avoid drawing inside (some) doubles */ ++ int arc = bd & BDA; ++ int multi_light = light & (light - 1); ++ int multi_double = double_ & (double_ - 1); ++ /* light crosses double only at DH+LV, DV+LH (ref. shapes) */ ++ int d = arc || (multi_double && !multi_light) ? -s : 0; ++ ++ if (bd & LL) ++ XftDrawRect(xd, fg, x, y + h2, w2 + s + d, s); ++ if (bd & LU) ++ XftDrawRect(xd, fg, x + w2, y, s, h2 + s + d); ++ if (bd & LR) ++ XftDrawRect(xd, fg, x + w2 - d, y + h2, w - w2 + d, s); ++ if (bd & LD) ++ XftDrawRect(xd, fg, x + w2, y + h2 - d, s, h - h2 + d); ++ } ++ ++ /* double lines - also align with light to form heavy when combined */ ++ if (double_) { ++ /* ++ * going clockwise, for each double-ray: p is additional length ++ * to the single-ray nearer to the previous direction, and n to ++ * the next. p and n adjust from the base length to lengths ++ * which consider other doubles - shorter to avoid intersections ++ * (p, n), or longer to draw the far-corner texel (n). ++ */ ++ int dl = bd & DL, du = bd & DU, dr = bd & DR, dd = bd & DD; ++ if (dl) { ++ int p = dd ? -s : 0, n = du ? -s : dd ? s : 0; ++ XftDrawRect(xd, fg, x, y + h2 + s, w2 + s + p, s); ++ XftDrawRect(xd, fg, x, y + h2 - s, w2 + s + n, s); ++ } ++ if (du) { ++ int p = dl ? -s : 0, n = dr ? -s : dl ? s : 0; ++ XftDrawRect(xd, fg, x + w2 - s, y, s, h2 + s + p); ++ XftDrawRect(xd, fg, x + w2 + s, y, s, h2 + s + n); ++ } ++ if (dr) { ++ int p = du ? -s : 0, n = dd ? -s : du ? s : 0; ++ XftDrawRect(xd, fg, x + w2 - p, y + h2 - s, w - w2 + p, s); ++ XftDrawRect(xd, fg, x + w2 - n, y + h2 + s, w - w2 + n, s); ++ } ++ if (dd) { ++ int p = dr ? -s : 0, n = dl ? -s : dr ? s : 0; ++ XftDrawRect(xd, fg, x + w2 + s, y + h2 - p, s, h - h2 + p); ++ XftDrawRect(xd, fg, x + w2 - s, y + h2 - n, s, h - h2 + n); ++ } ++ } ++} +diff --git a/boxdraw_data.h b/boxdraw_data.h +new file mode 100644 +index 0000000..7890500 +--- /dev/null ++++ b/boxdraw_data.h +@@ -0,0 +1,214 @@ ++/* ++ * Copyright 2018 Avi Halachmi (:avih) avihpit@yahoo.com https://github.com/avih ++ * MIT/X Consortium License ++ */ ++ ++/* ++ * U+25XX codepoints data ++ * ++ * References: ++ * http://www.unicode.org/charts/PDF/U2500.pdf ++ * http://www.unicode.org/charts/PDF/U2580.pdf ++ * ++ * Test page: ++ * https://github.com/GNOME/vte/blob/master/doc/boxes.txt ++ */ ++ ++/* Each shape is encoded as 16-bits. Higher bits are category, lower are data */ ++/* Categories (mutually exclusive except BDB): */ ++/* For convenience, BDL/BDA/BBS/BDB are 1 bit each, the rest are enums */ ++#define BDL (1<<8) /* Box Draw Lines (light/double/heavy) */ ++#define BDA (1<<9) /* Box Draw Arc (light) */ ++ ++#define BBD (1<<10) /* Box Block Down (lower) X/8 */ ++#define BBL (2<<10) /* Box Block Left X/8 */ ++#define BBU (3<<10) /* Box Block Upper X/8 */ ++#define BBR (4<<10) /* Box Block Right X/8 */ ++#define BBQ (5<<10) /* Box Block Quadrants */ ++#define BRL (6<<10) /* Box Braille (data is lower byte of U28XX) */ ++ ++#define BBS (1<<14) /* Box Block Shades */ ++#define BDB (1<<15) /* Box Draw is Bold */ ++ ++/* (BDL/BDA) Light/Double/Heavy x Left/Up/Right/Down/Horizontal/Vertical */ ++/* Heavy is light+double (literally drawing light+double align to form heavy) */ ++#define LL (1<<0) ++#define LU (1<<1) ++#define LR (1<<2) ++#define LD (1<<3) ++#define LH (LL+LR) ++#define LV (LU+LD) ++ ++#define DL (1<<4) ++#define DU (1<<5) ++#define DR (1<<6) ++#define DD (1<<7) ++#define DH (DL+DR) ++#define DV (DU+DD) ++ ++#define HL (LL+DL) ++#define HU (LU+DU) ++#define HR (LR+DR) ++#define HD (LD+DD) ++#define HH (HL+HR) ++#define HV (HU+HD) ++ ++/* (BBQ) Quadrants Top/Bottom x Left/Right */ ++#define TL (1<<0) ++#define TR (1<<1) ++#define BL (1<<2) ++#define BR (1<<3) ++ ++/* Data for U+2500 - U+259F except dashes/diagonals */ ++static const unsigned short boxdata[256] = { ++ /* light lines */ ++ [0x00] = BDL + LH, /* light horizontal */ ++ [0x02] = BDL + LV, /* light vertical */ ++ [0x0c] = BDL + LD + LR, /* light down and right */ ++ [0x10] = BDL + LD + LL, /* light down and left */ ++ [0x14] = BDL + LU + LR, /* light up and right */ ++ [0x18] = BDL + LU + LL, /* light up and left */ ++ [0x1c] = BDL + LV + LR, /* light vertical and right */ ++ [0x24] = BDL + LV + LL, /* light vertical and left */ ++ [0x2c] = BDL + LH + LD, /* light horizontal and down */ ++ [0x34] = BDL + LH + LU, /* light horizontal and up */ ++ [0x3c] = BDL + LV + LH, /* light vertical and horizontal */ ++ [0x74] = BDL + LL, /* light left */ ++ [0x75] = BDL + LU, /* light up */ ++ [0x76] = BDL + LR, /* light right */ ++ [0x77] = BDL + LD, /* light down */ ++ ++ /* heavy [+light] lines */ ++ [0x01] = BDL + HH, ++ [0x03] = BDL + HV, ++ [0x0d] = BDL + HR + LD, ++ [0x0e] = BDL + HD + LR, ++ [0x0f] = BDL + HD + HR, ++ [0x11] = BDL + HL + LD, ++ [0x12] = BDL + HD + LL, ++ [0x13] = BDL + HD + HL, ++ [0x15] = BDL + HR + LU, ++ [0x16] = BDL + HU + LR, ++ [0x17] = BDL + HU + HR, ++ [0x19] = BDL + HL + LU, ++ [0x1a] = BDL + HU + LL, ++ [0x1b] = BDL + HU + HL, ++ [0x1d] = BDL + HR + LV, ++ [0x1e] = BDL + HU + LD + LR, ++ [0x1f] = BDL + HD + LR + LU, ++ [0x20] = BDL + HV + LR, ++ [0x21] = BDL + HU + HR + LD, ++ [0x22] = BDL + HD + HR + LU, ++ [0x23] = BDL + HV + HR, ++ [0x25] = BDL + HL + LV, ++ [0x26] = BDL + HU + LD + LL, ++ [0x27] = BDL + HD + LU + LL, ++ [0x28] = BDL + HV + LL, ++ [0x29] = BDL + HU + HL + LD, ++ [0x2a] = BDL + HD + HL + LU, ++ [0x2b] = BDL + HV + HL, ++ [0x2d] = BDL + HL + LD + LR, ++ [0x2e] = BDL + HR + LL + LD, ++ [0x2f] = BDL + HH + LD, ++ [0x30] = BDL + HD + LH, ++ [0x31] = BDL + HD + HL + LR, ++ [0x32] = BDL + HR + HD + LL, ++ [0x33] = BDL + HH + HD, ++ [0x35] = BDL + HL + LU + LR, ++ [0x36] = BDL + HR + LU + LL, ++ [0x37] = BDL + HH + LU, ++ [0x38] = BDL + HU + LH, ++ [0x39] = BDL + HU + HL + LR, ++ [0x3a] = BDL + HU + HR + LL, ++ [0x3b] = BDL + HH + HU, ++ [0x3d] = BDL + HL + LV + LR, ++ [0x3e] = BDL + HR + LV + LL, ++ [0x3f] = BDL + HH + LV, ++ [0x40] = BDL + HU + LH + LD, ++ [0x41] = BDL + HD + LH + LU, ++ [0x42] = BDL + HV + LH, ++ [0x43] = BDL + HU + HL + LD + LR, ++ [0x44] = BDL + HU + HR + LD + LL, ++ [0x45] = BDL + HD + HL + LU + LR, ++ [0x46] = BDL + HD + HR + LU + LL, ++ [0x47] = BDL + HH + HU + LD, ++ [0x48] = BDL + HH + HD + LU, ++ [0x49] = BDL + HV + HL + LR, ++ [0x4a] = BDL + HV + HR + LL, ++ [0x4b] = BDL + HV + HH, ++ [0x78] = BDL + HL, ++ [0x79] = BDL + HU, ++ [0x7a] = BDL + HR, ++ [0x7b] = BDL + HD, ++ [0x7c] = BDL + HR + LL, ++ [0x7d] = BDL + HD + LU, ++ [0x7e] = BDL + HL + LR, ++ [0x7f] = BDL + HU + LD, ++ ++ /* double [+light] lines */ ++ [0x50] = BDL + DH, ++ [0x51] = BDL + DV, ++ [0x52] = BDL + DR + LD, ++ [0x53] = BDL + DD + LR, ++ [0x54] = BDL + DR + DD, ++ [0x55] = BDL + DL + LD, ++ [0x56] = BDL + DD + LL, ++ [0x57] = BDL + DL + DD, ++ [0x58] = BDL + DR + LU, ++ [0x59] = BDL + DU + LR, ++ [0x5a] = BDL + DU + DR, ++ [0x5b] = BDL + DL + LU, ++ [0x5c] = BDL + DU + LL, ++ [0x5d] = BDL + DL + DU, ++ [0x5e] = BDL + DR + LV, ++ [0x5f] = BDL + DV + LR, ++ [0x60] = BDL + DV + DR, ++ [0x61] = BDL + DL + LV, ++ [0x62] = BDL + DV + LL, ++ [0x63] = BDL + DV + DL, ++ [0x64] = BDL + DH + LD, ++ [0x65] = BDL + DD + LH, ++ [0x66] = BDL + DD + DH, ++ [0x67] = BDL + DH + LU, ++ [0x68] = BDL + DU + LH, ++ [0x69] = BDL + DH + DU, ++ [0x6a] = BDL + DH + LV, ++ [0x6b] = BDL + DV + LH, ++ [0x6c] = BDL + DH + DV, ++ ++ /* (light) arcs */ ++ [0x6d] = BDA + LD + LR, ++ [0x6e] = BDA + LD + LL, ++ [0x6f] = BDA + LU + LL, ++ [0x70] = BDA + LU + LR, ++ ++ /* Lower (Down) X/8 block (data is 8 - X) */ ++ [0x81] = BBD + 7, [0x82] = BBD + 6, [0x83] = BBD + 5, [0x84] = BBD + 4, ++ [0x85] = BBD + 3, [0x86] = BBD + 2, [0x87] = BBD + 1, [0x88] = BBD + 0, ++ ++ /* Left X/8 block (data is X) */ ++ [0x89] = BBL + 7, [0x8a] = BBL + 6, [0x8b] = BBL + 5, [0x8c] = BBL + 4, ++ [0x8d] = BBL + 3, [0x8e] = BBL + 2, [0x8f] = BBL + 1, ++ ++ /* upper 1/2 (4/8), 1/8 block (X), right 1/2, 1/8 block (8-X) */ ++ [0x80] = BBU + 4, [0x94] = BBU + 1, ++ [0x90] = BBR + 4, [0x95] = BBR + 7, ++ ++ /* Quadrants */ ++ [0x96] = BBQ + BL, ++ [0x97] = BBQ + BR, ++ [0x98] = BBQ + TL, ++ [0x99] = BBQ + TL + BL + BR, ++ [0x9a] = BBQ + TL + BR, ++ [0x9b] = BBQ + TL + TR + BL, ++ [0x9c] = BBQ + TL + TR + BR, ++ [0x9d] = BBQ + TR, ++ [0x9e] = BBQ + BL + TR, ++ [0x9f] = BBQ + BL + TR + BR, ++ ++ /* Shades, data is an alpha value in 25% units (1/4, 1/2, 3/4) */ ++ [0x91] = BBS + 1, [0x92] = BBS + 2, [0x93] = BBS + 3, ++ ++ /* U+2504 - U+250B, U+254C - U+254F: unsupported (dashes) */ ++ /* U+2571 - U+2573: unsupported (diagonals) */ ++}; +diff --git a/config.def.h b/config.def.h +index 0895a1f..bf6718b 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -58,6 +58,18 @@ static unsigned int blinktimeout = 800; + */ + static unsigned int cursorthickness = 2; + ++/* ++ * 1: render most of the lines/blocks characters without using the font for ++ * perfect alignment between cells (U2500 - U259F except dashes/diagonals). ++ * Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored. ++ * 0: disable (render all U25XX glyphs normally from the font). ++ */ ++const int boxdraw = 0; ++const int boxdraw_bold = 0; ++ ++/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ ++const int boxdraw_braille = 0; ++ + /* + * bell volume. It must be a value between -100 and 100. Use 0 for disabling + * it +diff --git a/st.c b/st.c +index 0ce6ac2..c035e19 100644 +--- a/st.c ++++ b/st.c +@@ -1230,6 +1230,9 @@ tsetchar(Rune u, Glyph *attr, int x, int y) + term.dirty[y] = 1; + term.line[y][x] = *attr; + term.line[y][x].u = u; ++ ++ if (isboxdraw(u)) ++ term.line[y][x].mode |= ATTR_BOXDRAW; + } + + void +diff --git a/st.h b/st.h +index d978458..a6c382a 100644 +--- a/st.h ++++ b/st.h +@@ -33,6 +33,7 @@ enum glyph_attribute { + ATTR_WRAP = 1 << 8, + ATTR_WIDE = 1 << 9, + ATTR_WDUMMY = 1 << 10, ++ ATTR_BOXDRAW = 1 << 11, + ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, + }; + +@@ -111,6 +112,14 @@ void *xmalloc(size_t); + void *xrealloc(void *, size_t); + char *xstrdup(char *); + ++int isboxdraw(Rune); ++ushort boxdrawindex(const Glyph *); ++#ifdef XFT_VERSION ++/* only exposed to x.c, otherwise we'll need Xft.h for the types */ ++void boxdraw_xinit(Display *, Colormap, XftDraw *, Visual *); ++void drawboxes(int, int, int, int, XftColor *, XftColor *, const XftGlyphFontSpec *, int); ++#endif ++ + /* config.h globals */ + extern char *utmp; + extern char *scroll; +@@ -122,3 +131,4 @@ extern char *termname; + extern unsigned int tabspaces; + extern unsigned int defaultfg; + extern unsigned int defaultbg; ++extern const int boxdraw, boxdraw_bold, boxdraw_braille; +diff --git a/x.c b/x.c +index e5f1737..6f7ea2c 100644 +--- a/x.c ++++ b/x.c +@@ -1205,6 +1205,8 @@ xinit(int cols, int rows) + xsel.xtarget = XInternAtom(xw.dpy, "UTF8_STRING", 0); + if (xsel.xtarget == None) + xsel.xtarget = XA_STRING; ++ ++ boxdraw_xinit(xw.dpy, xw.cmap, xw.draw, xw.vis); + } + + int +@@ -1251,8 +1253,13 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x + yp = winy + font->ascent; + } + +- /* Lookup character index with default font. */ +- glyphidx = XftCharIndex(xw.dpy, font->match, rune); ++ if (mode & ATTR_BOXDRAW) { ++ /* minor shoehorning: boxdraw uses only this ushort */ ++ glyphidx = boxdrawindex(&glyphs[i]); ++ } else { ++ /* Lookup character index with default font. */ ++ glyphidx = XftCharIndex(xw.dpy, font->match, rune); ++ } + if (glyphidx) { + specs[numspecs].font = font->match; + specs[numspecs].glyph = glyphidx; +@@ -1456,8 +1463,12 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i + r.width = width; + XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); + +- /* Render the glyphs. */ +- XftDrawGlyphFontSpec(xw.draw, fg, specs, len); ++ if (base.mode & ATTR_BOXDRAW) { ++ drawboxes(winx, winy, width / len, win.ch, fg, bg, specs, len); ++ } else { ++ /* Render the glyphs. */ ++ XftDrawGlyphFontSpec(xw.draw, fg, specs, len); ++ } + + /* Render underline and strikethrough. */ + if (base.mode & ATTR_UNDERLINE) { +@@ -1500,7 +1511,7 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) + /* + * Select the right color for the right mode. + */ +- g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE; ++ g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE|ATTR_BOXDRAW; + + if (IS_SET(MODE_REVERSE)) { + g.mode |= ATTR_REVERSE; + +base-commit: 43a395ae91f7d67ce694e65edeaa7bbc720dd027 +-- +2.20.1 + diff --git a/st-0.8.4-patches/st-clipboard-0.8.3.diff b/st-0.8.4-patches/st-clipboard-0.8.3.diff new file mode 100644 index 0000000..c1e0e9e --- /dev/null +++ b/st-0.8.4-patches/st-clipboard-0.8.3.diff @@ -0,0 +1,12 @@ +diff --git a/x.c b/x.c +index e5f1737..5cabd60 100644 +--- a/x.c ++++ b/x.c +@@ -673,6 +673,7 @@ setsel(char *str, Time t) + XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); + if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) + selclear(); ++ clipcopy(NULL); + } + + void diff --git a/st-0.8.4-patches/st-colors-at-launch-0.8.4.diff b/st-0.8.4-patches/st-colors-at-launch-0.8.4.diff new file mode 100644 index 0000000..3b643da --- /dev/null +++ b/st-0.8.4-patches/st-colors-at-launch-0.8.4.diff @@ -0,0 +1,38 @@ +From 268d767b16d21f6f936bd5e3dfcd4f0187a8e979 Mon Sep 17 00:00:00 2001 +From: MLquest8 +Date: Sun, 12 Jul 2020 09:47:25 +0400 +Subject: [PATCH] allow to alocate colors as launch options. Example: -C + "#color@num" + +--- + x.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/x.c b/x.c +index 210f184..a07e358 100644 +--- a/x.c ++++ b/x.c +@@ -1980,6 +1980,8 @@ usage(void) + int + main(int argc, char *argv[]) + { ++ int i; ++ char *colval; + xw.l = xw.t = 0; + xw.isfixed = False; + xsetcursor(cursorshape); +@@ -2024,6 +2026,11 @@ main(int argc, char *argv[]) + case 'v': + die("%s " VERSION "\n", argv0); + break; ++ case 'C': ++ colval = strtok(EARGF(usage()), "@"); ++ i = atoi(strtok(NULL, "@")); ++ colorname[i] = colval; ++ break; + default: + usage(); + } ARGEND; +-- +2.26.2 + diff --git a/st-0.8.4-patches/st-cyclefonts-0.8.4.diff b/st-0.8.4-patches/st-cyclefonts-0.8.4.diff new file mode 100644 index 0000000..c62847b --- /dev/null +++ b/st-0.8.4-patches/st-cyclefonts-0.8.4.diff @@ -0,0 +1,82 @@ +From 9262cecf21a3a2fcf5f5c0f7dcc872fdc5435ca1 Mon Sep 17 00:00:00 2001 +From: Miles Alan +Date: Mon, 7 Dec 2020 21:16:37 -0600 +Subject: [PATCH] cyclefont: Add keybinding to cycle between multiple different + fonts + +--- + config.def.h | 8 +++++++- + x.c | 17 +++++++++++++++-- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 6f05dce..5cd506c 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -5,7 +5,12 @@ + * + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; ++static char *fonts[] = { ++ "Liberation Mono:pixelsize=12:antialias=true:autohint=true", ++ "tewi:pixelsize=12:antialias=true:autohint=true" ++}; ++static int fonts_current = 0; ++ + static int borderpx = 2; + + /* +@@ -199,6 +204,7 @@ static Shortcut shortcuts[] = { + { TERMMOD, XK_Y, selpaste, {.i = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, ++ { TERMMOD, XK_S, cyclefonts, {} }, + }; + + /* +diff --git a/x.c b/x.c +index 210f184..88cb8e7 100644 +--- a/x.c ++++ b/x.c +@@ -59,6 +59,7 @@ static void zoom(const Arg *); + static void zoomabs(const Arg *); + static void zoomreset(const Arg *); + static void ttysend(const Arg *); ++static void cyclefonts(const Arg *); + + /* config.h for applying patches and the configuration. */ + #include "config.h" +@@ -949,6 +950,18 @@ xloadfont(Font *f, FcPattern *pattern) + return 0; + } + ++void ++cyclefonts(const Arg *dummy) ++{ ++ fonts_current++; ++ if (fonts_current > (sizeof fonts / sizeof fonts[0]) - 1) { ++ fonts_current = 0; ++ } ++ usedfont = fonts[fonts_current]; ++ xloadfonts(fonts[fonts_current], 0); ++ redraw(); ++} ++ + void + xloadfonts(char *fontstr, double fontsize) + { +@@ -1113,8 +1126,8 @@ xinit(int cols, int rows) + if (!FcInit()) + die("could not init fontconfig.\n"); + +- usedfont = (opt_font == NULL)? font : opt_font; +- xloadfonts(usedfont, 0); ++ usedfont = fonts[fonts_current]; ++ xloadfonts(fonts[fonts_current], 0); + + /* colors */ + xw.cmap = XDefaultColormap(xw.dpy, xw.scr); +-- +2.26.2 + diff --git a/st-0.8.4-patches/st-font2-20190416-ba72400.diff b/st-0.8.4-patches/st-font2-20190416-ba72400.diff new file mode 100644 index 0000000..c7a2950 --- /dev/null +++ b/st-0.8.4-patches/st-font2-20190416-ba72400.diff @@ -0,0 +1,167 @@ +From ba724004c6a368e452114f7dc147a9978fe0f3b4 Mon Sep 17 00:00:00 2001 +From: Kirill Bugaev +Date: Tue, 16 Apr 2019 04:31:30 +0800 +Subject: [PATCH] This patch allows to add spare font besides default. Some + glyphs can be not present in default font. For this glyphs st uses + font-config and try to find them in font cache first. This patch append fonts + defined in font2 variable to the beginning of font cache. So they will be + used first for glyphs that absent in default font. + +--- + config.def.h | 6 +++ + x.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 107 insertions(+) + +diff --git a/config.def.h b/config.def.h +index 482901e..676719e 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -6,6 +6,12 @@ + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ + static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; ++/* Spare fonts */ ++static char *font2[] = { ++/* "Inconsolata for Powerline:pixelsize=12:antialias=true:autohint=true", */ ++/* "Hack Nerd Font Mono:pixelsize=11:antialias=true:autohint=true", */ ++}; ++ + static int borderpx = 2; + + /* +diff --git a/x.c b/x.c +index 5828a3b..d37e59d 100644 +--- a/x.c ++++ b/x.c +@@ -149,6 +149,8 @@ static void xhints(void); + static int xloadcolor(int, const char *, Color *); + static int xloadfont(Font *, FcPattern *); + static void xloadfonts(char *, double); ++static int xloadsparefont(FcPattern *, int); ++static void xloadsparefonts(void); + static void xunloadfont(Font *); + static void xunloadfonts(void); + static void xsetenv(void); +@@ -296,6 +298,7 @@ zoomabs(const Arg *arg) + { + xunloadfonts(); + xloadfonts(usedfont, arg->f); ++ xloadsparefonts(); + cresize(0, 0); + redraw(); + xhints(); +@@ -977,6 +980,101 @@ xloadfonts(char *fontstr, double fontsize) + FcPatternDestroy(pattern); + } + ++int ++xloadsparefont(FcPattern *pattern, int flags) ++{ ++ FcPattern *match; ++ FcResult result; ++ ++ match = FcFontMatch(NULL, pattern, &result); ++ if (!match) { ++ return 1; ++ } ++ ++ if (!(frc[frclen].font = XftFontOpenPattern(xw.dpy, match))) { ++ FcPatternDestroy(match); ++ return 1; ++ } ++ ++ frc[frclen].flags = flags; ++ /* Believe U+0000 glyph will present in each default font */ ++ frc[frclen].unicodep = 0; ++ frclen++; ++ ++ return 0; ++} ++ ++void ++xloadsparefonts(void) ++{ ++ FcPattern *pattern; ++ double sizeshift, fontval; ++ int fc; ++ char **fp; ++ ++ if (frclen != 0) ++ die("can't embed spare fonts. cache isn't empty"); ++ ++ /* Calculate count of spare fonts */ ++ fc = sizeof(font2) / sizeof(*font2); ++ if (fc == 0) ++ return; ++ ++ /* Allocate memory for cache entries. */ ++ if (frccap < 4 * fc) { ++ frccap += 4 * fc - frccap; ++ frc = xrealloc(frc, frccap * sizeof(Fontcache)); ++ } ++ ++ for (fp = font2; fp - font2 < fc; ++fp) { ++ ++ if (**fp == '-') ++ pattern = XftXlfdParse(*fp, False, False); ++ else ++ pattern = FcNameParse((FcChar8 *)*fp); ++ ++ if (!pattern) ++ die("can't open spare font %s\n", *fp); ++ ++ if (defaultfontsize > 0) { ++ sizeshift = usedfontsize - defaultfontsize; ++ if (sizeshift != 0 && ++ FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) == ++ FcResultMatch) { ++ fontval += sizeshift; ++ FcPatternDel(pattern, FC_PIXEL_SIZE); ++ FcPatternDel(pattern, FC_SIZE); ++ FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontval); ++ } ++ } ++ ++ FcPatternAddBool(pattern, FC_SCALABLE, 1); ++ ++ FcConfigSubstitute(NULL, pattern, FcMatchPattern); ++ XftDefaultSubstitute(xw.dpy, xw.scr, pattern); ++ ++ if (xloadsparefont(pattern, FRC_NORMAL)) ++ die("can't open spare font %s\n", *fp); ++ ++ FcPatternDel(pattern, FC_SLANT); ++ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); ++ if (xloadsparefont(pattern, FRC_ITALIC)) ++ die("can't open spare font %s\n", *fp); ++ ++ FcPatternDel(pattern, FC_WEIGHT); ++ FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); ++ if (xloadsparefont(pattern, FRC_ITALICBOLD)) ++ die("can't open spare font %s\n", *fp); ++ ++ FcPatternDel(pattern, FC_SLANT); ++ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN); ++ if (xloadsparefont(pattern, FRC_BOLD)) ++ die("can't open spare font %s\n", *fp); ++ ++ FcPatternDestroy(pattern); ++ } ++} ++ + void + xunloadfont(Font *f) + { +@@ -1057,6 +1155,9 @@ xinit(int cols, int rows) + usedfont = (opt_font == NULL)? font : opt_font; + xloadfonts(usedfont, 0); + ++ /* spare fonts */ ++ xloadsparefonts(); ++ + /* colors */ + xw.cmap = XDefaultColormap(xw.dpy, xw.scr); + xloadcols(); +-- +2.21.0 + diff --git a/st-0.8.4-patches/st-hidecursor-0.8.3.diff b/st-0.8.4-patches/st-hidecursor-0.8.3.diff new file mode 100644 index 0000000..4895a66 --- /dev/null +++ b/st-0.8.4-patches/st-hidecursor-0.8.3.diff @@ -0,0 +1,88 @@ +diff --git a/x.c b/x.c +index e5f1737..7e759b0 100644 +--- a/x.c ++++ b/x.c +@@ -103,6 +103,11 @@ typedef struct { + Draw draw; + Visual *vis; + XSetWindowAttributes attrs; ++ /* Here, we use the term *pointer* to differentiate the cursor ++ * one sees when hovering the mouse over the terminal from, e.g., ++ * a green rectangle where text would be entered. */ ++ Cursor vpointer, bpointer; /* visible and hidden pointers */ ++ int pointerisvisible; + int scr; + int isfixed; /* is fixed geometry? */ + int l, t; /* left and top offset */ +@@ -698,6 +703,13 @@ brelease(XEvent *e) + void + bmotion(XEvent *e) + { ++ if (!xw.pointerisvisible) { ++ XDefineCursor(xw.dpy, xw.win, xw.vpointer); ++ xw.pointerisvisible = 1; ++ if (!IS_SET(MODE_MOUSEMANY)) ++ xsetpointermotion(0); ++ } ++ + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { + mousereport(e); + return; +@@ -1099,10 +1111,10 @@ void + xinit(int cols, int rows) + { + XGCValues gcvalues; +- Cursor cursor; + Window parent; + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; ++ Pixmap blankpm; + + if (!(xw.dpy = XOpenDisplay(NULL))) + die("can't open display\n"); +@@ -1166,8 +1178,9 @@ xinit(int cols, int rows) + } + + /* white cursor, black outline */ +- cursor = XCreateFontCursor(xw.dpy, mouseshape); +- XDefineCursor(xw.dpy, xw.win, cursor); ++ xw.pointerisvisible = 1; ++ xw.vpointer = XCreateFontCursor(xw.dpy, mouseshape); ++ XDefineCursor(xw.dpy, xw.win, xw.vpointer); + + if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) { + xmousefg.red = 0xffff; +@@ -1181,7 +1194,10 @@ xinit(int cols, int rows) + xmousebg.blue = 0x0000; + } + +- XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg); ++ XRecolorCursor(xw.dpy, xw.vpointer, &xmousefg, &xmousebg); ++ blankpm = XCreateBitmapFromData(xw.dpy, xw.win, &(char){0}, 1, 1); ++ xw.bpointer = XCreatePixmapCursor(xw.dpy, blankpm, blankpm, ++ &xmousefg, &xmousebg, 0, 0); + + xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); + xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); +@@ -1673,6 +1689,8 @@ unmap(XEvent *ev) + void + xsetpointermotion(int set) + { ++ if (!set && !xw.pointerisvisible) ++ return; + MODBIT(xw.attrs.event_mask, set, PointerMotionMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); + } +@@ -1793,6 +1811,12 @@ kpress(XEvent *ev) + Status status; + Shortcut *bp; + ++ if (xw.pointerisvisible) { ++ XDefineCursor(xw.dpy, xw.win, xw.bpointer); ++ xsetpointermotion(1); ++ xw.pointerisvisible = 0; ++ } ++ + if (IS_SET(MODE_KBDLOCK)) + return; + diff --git a/st-0.8.4-patches/st-nordtheme-0.8.2.diff b/st-0.8.4-patches/st-nordtheme-0.8.2.diff new file mode 100644 index 0000000..01e9231 --- /dev/null +++ b/st-0.8.4-patches/st-nordtheme-0.8.2.diff @@ -0,0 +1,100 @@ +From 3e8f83d40c6fdd89653ef547aa16cffe1f3c1793 Mon Sep 17 00:00:00 2001 +From: aleks +Date: Sun, 4 Aug 2019 13:23:10 +0200 +Subject: [PATCH] Apply nord-theme + +*"Inspired by the beauty of the arctic, the colors reflect the cold, yet +harmonious world of ice and the colorfulness of the Aurora Borealis."* - [Nord +Theme](https://www.nordtheme.com/) + +There are also many [ports](https://www.nordtheme.com/ports) for other programs +like [vim](https://www.nordtheme.com/ports/vim) and +[tmux](https://www.nordtheme.com/ports/tmux) to make the overall appearance +coherent. I would recommend to use it in combination with the arc-theme for gtk +(fits perfectly). + +The default behaviour of st is to reverse the fore- and background colors of +each selected cell. If you want that the selection-colors are not reveresed but +instead have fixed fore- and background colors apply on top of this patch the +[selectioncolors](../selectioncolors/)-patch. Then set the following settings +in your config.h: + +static unsigned int defaultcs = 257; +static unsigned int defaultrcs = 257; +unsigned int selectionfg = 257; +unsigned int selectionbg = 0; +--- + config.def.h | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 0e01717..fb504d4 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -85,30 +85,30 @@ unsigned int tabspaces = 8; + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { + /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", ++ "#3b4252", /* black */ ++ "#bf616a", /* red */ ++ "#a3be8c", /* green */ ++ "#ebcb8b", /* yellow */ ++ "#81a1c1", /* blue */ ++ "#b48ead", /* magenta */ ++ "#88c0d0", /* cyan */ ++ "#e5e9f0", /* white */ + + /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", ++ "#4c566a", /* black */ ++ "#bf616a", /* red */ ++ "#a3be8c", /* green */ ++ "#ebcb8b", /* yellow */ ++ "#81a1c1", /* blue */ ++ "#b48ead", /* magenta */ ++ "#8fbcbb", /* cyan */ ++ "#eceff4", /* white */ + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", +- "#555555", ++ "#2e3440", /* background */ ++ "#d8dee9", /* foreground */ + }; + + +@@ -116,10 +116,10 @@ static const char *colorname[] = { + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +-unsigned int defaultfg = 7; +-unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; +-static unsigned int defaultrcs = 257; ++unsigned int defaultfg = 257; ++unsigned int defaultbg = 256; ++static unsigned int defaultcs = 257; ++static unsigned int defaultrcs = 256; + + /* + * Default shape of cursor +-- +2.22.0 + diff --git a/st-0.8.4-patches/st-osc_10_11_12-20200418-66520e1.diff b/st-0.8.4-patches/st-osc_10_11_12-20200418-66520e1.diff new file mode 100644 index 0000000..5a4e341 --- /dev/null +++ b/st-0.8.4-patches/st-osc_10_11_12-20200418-66520e1.diff @@ -0,0 +1,72 @@ +From 66520e1c3b0a6f30ce1cde033a1aec04e5a0f1a2 Mon Sep 17 00:00:00 2001 +From: Christian Tenllado +Date: Sat, 18 Apr 2020 09:26:46 +0200 +Subject: [PATCH] OSC 10/11/12 fg, bg and cursor colors + +Support for OSC escape sequences 10, 11 and 12 to modify the bg, fg and +cursor colors. I selected entries in the colorname table after the 255 +position for defaultfg, defaultbg and defaultcs +--- + config.def.h | 4 ++-- + st.c | 17 ++++++++++++++--- + st.h | 1 + + 3 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 546edda..7d20fdf 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -118,8 +118,8 @@ static const char *colorname[] = { + */ + unsigned int defaultfg = 7; + unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; +-static unsigned int defaultrcs = 257; ++unsigned int defaultcs = 256; ++unsigned int defaultrcs = 257; + + /* + * Default shape of cursor +diff --git a/st.c b/st.c +index 3e48410..ec7970c 100644 +--- a/st.c ++++ b/st.c +@@ -1862,12 +1862,23 @@ strhandle(void) + } + return; + case 4: /* color set */ +- if (narg < 3) ++ case 10: /* foreground set */ ++ case 11: /* background set */ ++ case 12: /* cursor color */ ++ if ((par == 4 && narg < 3) || narg < 2) + break; +- p = strescseq.args[2]; ++ p = strescseq.args[((par == 4) ? 2 : 1)]; + /* FALLTHROUGH */ + case 104: /* color reset, here p = NULL */ +- j = (narg > 1) ? atoi(strescseq.args[1]) : -1; ++ if (par == 10) ++ j = defaultfg; ++ else if (par == 11) ++ j = defaultbg; ++ else if (par == 12) ++ j = defaultcs; ++ else ++ j = (narg > 1) ? atoi(strescseq.args[1]) : -1; ++ + if (xsetcolorname(j, p)) { + if (par == 104 && narg <= 1) + return; /* color reset without parameter */ +diff --git a/st.h b/st.h +index a1928ca..bd79875 100644 +--- a/st.h ++++ b/st.h +@@ -121,3 +121,4 @@ extern char *termname; + extern unsigned int tabspaces; + extern unsigned int defaultfg; + extern unsigned int defaultbg; ++extern unsigned int defaultcs; +-- +2.20.1 + diff --git a/st-0.8.4-patches/st-solarized-both-0.8.4.diff b/st-0.8.4-patches/st-solarized-both-0.8.4.diff new file mode 100644 index 0000000..ea64f22 --- /dev/null +++ b/st-0.8.4-patches/st-solarized-both-0.8.4.diff @@ -0,0 +1,192 @@ +diff --git a/config.def.h b/config.def.h +index 6f05dce..f68cd06 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -95,42 +95,54 @@ unsigned int tabspaces = 8; + + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { +- /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", +- +- /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", +- +- [255] = 0, +- +- /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", +- "#555555", ++ /* solarized dark */ ++ "#073642", /* 0: black */ ++ "#dc322f", /* 1: red */ ++ "#859900", /* 2: green */ ++ "#b58900", /* 3: yellow */ ++ "#268bd2", /* 4: blue */ ++ "#d33682", /* 5: magenta */ ++ "#2aa198", /* 6: cyan */ ++ "#eee8d5", /* 7: white */ ++ "#002b36", /* 8: brblack */ ++ "#cb4b16", /* 9: brred */ ++ "#586e75", /* 10: brgreen */ ++ "#657b83", /* 11: bryellow */ ++ "#839496", /* 12: brblue */ ++ "#6c71c4", /* 13: brmagenta*/ ++ "#93a1a1", /* 14: brcyan */ ++ "#fdf6e3", /* 15: brwhite */ + }; + ++/* Terminal colors for alternate (light) palette */ ++static const char *altcolorname[] = { ++ /* solarized light */ ++ "#eee8d5", /* 0: black */ ++ "#dc322f", /* 1: red */ ++ "#859900", /* 2: green */ ++ "#b58900", /* 3: yellow */ ++ "#268bd2", /* 4: blue */ ++ "#d33682", /* 5: magenta */ ++ "#2aa198", /* 6: cyan */ ++ "#073642", /* 7: white */ ++ "#fdf6e3", /* 8: brblack */ ++ "#cb4b16", /* 9: brred */ ++ "#93a1a1", /* 10: brgreen */ ++ "#839496", /* 11: bryellow */ ++ "#657b83", /* 12: brblue */ ++ "#6c71c4", /* 13: brmagenta*/ ++ "#586e75", /* 14: brcyan */ ++ "#002b36", /* 15: brwhite */ ++}; + + /* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +-unsigned int defaultfg = 7; +-unsigned int defaultbg = 0; +-static unsigned int defaultcs = 256; +-static unsigned int defaultrcs = 257; ++unsigned int defaultfg = 12; ++unsigned int defaultbg = 8; ++static unsigned int defaultcs = 14; ++static unsigned int defaultrcs = 15; + + /* + * Default shape of cursor +@@ -199,6 +211,7 @@ static Shortcut shortcuts[] = { + { TERMMOD, XK_Y, selpaste, {.i = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, ++ { XK_ANY_MOD, XK_F6, swapcolors, {.i = 0} }, + }; + + /* +diff --git a/st.h b/st.h +index 3d351b6..03f5206 100644 +--- a/st.h ++++ b/st.h +@@ -120,6 +120,7 @@ extern wchar_t *worddelimiters; + extern int allowaltscreen; + extern int allowwindowops; + extern char *termname; ++extern int usealtcolors; + extern unsigned int tabspaces; + extern unsigned int defaultfg; + extern unsigned int defaultbg; +diff --git a/x.c b/x.c +index 210f184..d94c42b 100644 +--- a/x.c ++++ b/x.c +@@ -55,6 +55,7 @@ static void clipcopy(const Arg *); + static void clippaste(const Arg *); + static void numlock(const Arg *); + static void selpaste(const Arg *); ++static void swapcolors(const Arg *); + static void zoom(const Arg *); + static void zoomabs(const Arg *); + static void zoomreset(const Arg *); +@@ -254,6 +255,8 @@ static char *opt_title = NULL; + + static int oldbutton = 3; /* button event on startup: 3 = release */ + ++int usealtcolors = 0; /* 1 to use alternate palette */ ++ + void + clipcopy(const Arg *dummy) + { +@@ -292,6 +295,14 @@ numlock(const Arg *dummy) + win.mode ^= MODE_NUMLOCK; + } + ++void ++swapcolors(const Arg *dummy) ++{ ++ usealtcolors = !usealtcolors; ++ xloadcols(); ++ redraw(); ++} ++ + void + zoom(const Arg *arg) + { +@@ -748,6 +759,11 @@ sixd_to_16bit(int x) + return x == 0 ? 0 : 0x3737 + 0x2828 * x; + } + ++const char* getcolorname(int i) ++{ ++ return (usealtcolors) ? altcolorname[i] : colorname[i]; ++} ++ + int + xloadcolor(int i, const char *name, Color *ncolor) + { +@@ -766,7 +782,7 @@ xloadcolor(int i, const char *name, Color *ncolor) + return XftColorAllocValue(xw.dpy, xw.vis, + xw.cmap, &color, ncolor); + } else +- name = colorname[i]; ++ name = getcolorname(i); + } + + return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor); +@@ -789,8 +805,8 @@ xloadcols(void) + + for (i = 0; i < dc.collen; i++) + if (!xloadcolor(i, NULL, &dc.col[i])) { +- if (colorname[i]) +- die("could not allocate color '%s'\n", colorname[i]); ++ if (getcolorname(i)) ++ die("could not allocate color '%s'\n", getcolorname(i)); + else + die("could not allocate color %d\n", i); + } +@@ -1169,13 +1185,13 @@ xinit(int cols, int rows) + cursor = XCreateFontCursor(xw.dpy, mouseshape); + XDefineCursor(xw.dpy, xw.win, cursor); + +- if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) { ++ if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousefg), &xmousefg) == 0) { + xmousefg.red = 0xffff; + xmousefg.green = 0xffff; + xmousefg.blue = 0xffff; + } + +- if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) { ++ if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousebg), &xmousebg) == 0) { + xmousebg.red = 0x0000; + xmousebg.green = 0x0000; + xmousebg.blue = 0x0000; diff --git a/st-0.8.4-patches/st-themed_cursor-0.8.1.diff b/st-0.8.4-patches/st-themed_cursor-0.8.1.diff new file mode 100644 index 0000000..ee89ecc --- /dev/null +++ b/st-0.8.4-patches/st-themed_cursor-0.8.1.diff @@ -0,0 +1,68 @@ +diff --git a/config.def.h b/config.def.h +index 82b1b09..ffd6cde 100644 ++++ b/config.def.h +@@ -138,11 +138,10 @@ static unsigned int cols = 80; + static unsigned int rows = 24; + + /* +- * Default colour and shape of the mouse cursor ++ * Default shape of the mouse cursor + */ +-static unsigned int mouseshape = XC_xterm; +-static unsigned int mousefg = 7; +-static unsigned int mousebg = 0; ++ ++static char* mouseshape = "xterm"; + + /* + * Color used to display font attributes when fontconfig selected a font which +diff --git a/config.mk b/config.mk +index 039c42c..a0cb4fd 100644 +--- a/config.mk ++++ b/config.mk +@@ -14,7 +14,7 @@ X11LIB = /usr/X11R6/lib + INCS = -I$(X11INC) \ + `pkg-config --cflags fontconfig` \ + `pkg-config --cflags freetype2` +-LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ ++LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXcursor \ + `pkg-config --libs fontconfig` \ + `pkg-config --libs freetype2` + +diff --git a/x.c b/x.c +index c343ba2..5a7461e 100644 +--- a/x.c ++++ b/x.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + static char *argv0; + #include "arg.h" +@@ -1076,23 +1079,9 @@ xinit(int cols, int rows) + die("XCreateIC failed. Could not obtain input method.\n"); + + /* white cursor, black outline */ +- cursor = XCreateFontCursor(xw.dpy, mouseshape); ++ cursor = XcursorLibraryLoadCursor(xw.dpy, mouseshape); + XDefineCursor(xw.dpy, xw.win, cursor); + +- if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) { +- xmousefg.red = 0xffff; +- xmousefg.green = 0xffff; +- xmousefg.blue = 0xffff; +- } +- +- if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) { +- xmousebg.red = 0x0000; +- xmousebg.green = 0x0000; +- xmousebg.blue = 0x0000; +- } +- +- XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg); +- + xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); + xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); + xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); diff --git a/st-0.8.4-patches/st-visualbell2-enhanced-2020-05-13-045a0fa.diff b/st-0.8.4-patches/st-visualbell2-enhanced-2020-05-13-045a0fa.diff new file mode 100644 index 0000000..e7eb7e3 --- /dev/null +++ b/st-0.8.4-patches/st-visualbell2-enhanced-2020-05-13-045a0fa.diff @@ -0,0 +1,93 @@ +From d6a060dfeeef28548e6c6b1fcb92c73c4884cd6c Mon Sep 17 00:00:00 2001 +From: "Avi Halachmi (:avih)" +Date: Tue, 12 May 2020 11:40:19 +0300 +Subject: [PATCH] visual bell: add circle rendering mode + +This commit experiments with alternative rendering of visual bell, +and as such it's extensively/excessively configurable. + +It renders an overlay of a circle with configurable colors (base, +outline), position and size. Defaults to the center of the window. + +Size can be relative to window or chars width, and allows for instance +to place it at the middle/side of a top/bottom tmux status-bar with +exact char height to make it look like a flashing LED at the bar, etc. +--- + config.def.h | 11 +++++++++++ + x.c | 21 ++++++++++++++++++++- + 2 files changed, 31 insertions(+), 1 deletion(-) + +diff --git a/config.def.h b/config.def.h +index fe07204..927dfea 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -77,6 +77,17 @@ static int vbelltimeout = 150; + // #define VBCELL 1 /* all cells - whole screen */ + // #define VBCELL y==bottom && x>right-2 /* bottom-right */ + ++static int vbellmode = 1; ++/* vbellmode: 0: invert cells. 1: draw a circle with these parameters: ++ * - base and outline colors (colorname index - see below) ++ * - radius: relative to window width, or if negative: relative to cell-width ++ * - position: relative to window width/height (0 and 1 are at the edges) */ ++static int vbellcolor = 3; ++static int vbellcolor_outline = 1; ++static float vbellradius = 0.03; ++static float vbellx = 0.5; ++static float vbelly = 0.5; ++ + /* default TERM value */ + char *termname = "st-256color"; + +diff --git a/x.c b/x.c +index 44d5a8d..189aa1c 100644 +--- a/x.c ++++ b/x.c +@@ -1600,7 +1600,7 @@ static int + isvbellcell(int x, int y) + { + int right = win.tw / win.cw - 1, bottom = win.th / win.ch - 1; +- return VBCELL; /* logic condition defined at config.h */ ++ return vbellmode == 0 && (VBCELL); /* logic defined at config.h */ + } + + static void +@@ -1613,6 +1613,22 @@ vbellbegin() { + XFlush(xw.dpy); + } + ++static void ++xfillcircle(int x, int y, int r, uint color_ix) ++{ ++ XSetForeground(xw.dpy, dc.gc, dc.col[color_ix].pixel); ++ XFillArc(xw.dpy, xw.buf, dc.gc, x - r, y - r, r * 2, r * 2, 0, 360*64); ++} ++ ++static void ++xdrawvbell() { ++ int r = round(vbellradius * (vbellradius > 0 ? win.w : -win.cw)); ++ int x = borderpx + r + vbellx * (win.tw - 2 * r); ++ int y = borderpx + r + vbelly * (win.th - 2 * r); ++ xfillcircle(x, y, r, vbellcolor_outline); ++ xfillcircle(x, y, r / 1.2, vbellcolor); /* 1.2 - an artistic choice */ ++} ++ + int + xstartdraw(void) + { +@@ -1655,6 +1671,9 @@ xdrawline(Line line, int x1, int y1, int x2) + void + xfinishdraw(void) + { ++ if (vbellset && vbellmode == 1) ++ xdrawvbell(); ++ + XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, + win.h, 0, 0); + XSetForeground(xw.dpy, dc.gc, + +base-commit: 045a0fab4f80b57f4a982ae6bc5f33fe21d66111 +prerequisite-patch-id: d5f30ab22e0caa901341e31c40606787c3921821 +-- +2.17.1 + diff --git a/st-0.8.4-patches/st-xresources-20200604-9ba7ecf.diff b/st-0.8.4-patches/st-xresources-20200604-9ba7ecf.diff new file mode 100644 index 0000000..78ba00a --- /dev/null +++ b/st-0.8.4-patches/st-xresources-20200604-9ba7ecf.diff @@ -0,0 +1,184 @@ +From 2752a599ee01305a435729bfacf43b1dde7cf0ef Mon Sep 17 00:00:00 2001 +From: Benji Encalada Mora +Date: Thu, 4 Jun 2020 00:41:10 -0500 +Subject: [PATCH] fix: replace xfps and actionfps variables + +--- + config.def.h | 36 ++++++++++++++++++++++++ + x.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 110 insertions(+), 4 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 6f05dce..9b99782 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -168,6 +168,42 @@ static unsigned int defaultattr = 11; + */ + static uint forcemousemod = ShiftMask; + ++/* ++ * Xresources preferences to load at startup ++ */ ++ResourcePref resources[] = { ++ { "font", STRING, &font }, ++ { "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[256] }, ++ { "foreground", STRING, &colorname[257] }, ++ { "cursorColor", STRING, &colorname[258] }, ++ { "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 }, ++}; ++ + /* + * Internal mouse shortcuts. + * Beware that overloading Button1 will disable the selection. +diff --git a/x.c b/x.c +index 210f184..76f167f 100644 +--- a/x.c ++++ b/x.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + char *argv0; + #include "arg.h" +@@ -45,6 +46,19 @@ typedef struct { + signed char appcursor; /* application cursor */ + } Key; + ++/* Xresources preferences */ ++enum resource_type { ++ STRING = 0, ++ INTEGER = 1, ++ FLOAT = 2 ++}; ++ ++typedef struct { ++ char *name; ++ enum resource_type type; ++ void *dst; ++} ResourcePref; ++ + /* X modifiers */ + #define XK_ANY_MOD UINT_MAX + #define XK_NO_MOD 0 +@@ -828,8 +842,8 @@ xclear(int x1, int y1, int x2, int y2) + void + xhints(void) + { +- XClassHint class = {opt_name ? opt_name : termname, +- opt_class ? opt_class : termname}; ++ XClassHint class = {opt_name ? opt_name : "st", ++ opt_class ? opt_class : "St"}; + XWMHints wm = {.flags = InputHint, .input = 1}; + XSizeHints *sizeh; + +@@ -1104,8 +1118,6 @@ xinit(int cols, int rows) + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; + +- if (!(xw.dpy = XOpenDisplay(NULL))) +- die("can't open display\n"); + xw.scr = XDefaultScreen(xw.dpy); + xw.vis = XDefaultVisual(xw.dpy, xw.scr); + +@@ -1964,6 +1976,59 @@ run(void) + } + } + ++int ++resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) ++{ ++ char **sdst = dst; ++ int *idst = dst; ++ float *fdst = dst; ++ ++ char fullname[256]; ++ char fullclass[256]; ++ char *type; ++ XrmValue ret; ++ ++ snprintf(fullname, sizeof(fullname), "%s.%s", ++ opt_name ? opt_name : "st", name); ++ snprintf(fullclass, sizeof(fullclass), "%s.%s", ++ opt_class ? opt_class : "St", name); ++ fullname[sizeof(fullname) - 1] = fullclass[sizeof(fullclass) - 1] = '\0'; ++ ++ XrmGetResource(db, fullname, fullclass, &type, &ret); ++ if (ret.addr == NULL || strncmp("String", type, 64)) ++ return 1; ++ ++ switch (rtype) { ++ case STRING: ++ *sdst = ret.addr; ++ break; ++ case INTEGER: ++ *idst = strtoul(ret.addr, NULL, 10); ++ break; ++ case FLOAT: ++ *fdst = strtof(ret.addr, NULL); ++ break; ++ } ++ return 0; ++} ++ ++void ++config_init(void) ++{ ++ char *resm; ++ XrmDatabase db; ++ ResourcePref *p; ++ ++ XrmInitialize(); ++ resm = XResourceManagerString(xw.dpy); ++ if (!resm) ++ return; ++ ++ db = XrmGetStringDatabase(resm); ++ for (p = resources; p < resources + LEN(resources); p++) ++ resource_load(db, p->name, p->type, p->dst); ++} ++ + void + usage(void) + { +@@ -2037,6 +2102,11 @@ run: + + setlocale(LC_CTYPE, ""); + XSetLocaleModifiers(""); ++ ++ if(!(xw.dpy = XOpenDisplay(NULL))) ++ die("Can't open display\n"); ++ ++ config_init(); + cols = MAX(cols, 1); + rows = MAX(rows, 1); + tnew(cols, rows); +-- +2.26.2 + diff --git a/st-scripts/foot-to-st.py b/st-scripts/foot-to-st.py new file mode 100644 index 0000000..60ddd26 --- /dev/null +++ b/st-scripts/foot-to-st.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +#coding:utf-8 +""" + Purpose: foot conf to st-color-at-start + Created: 04.01.2021 +""" + +import argparse + +def main(args): + """open foot file, parse, and dump st script""" + with open(args.filename) as fh: + lines = fh.readlines() + mode = None + colors = list(range(0, 16)) + for ii in lines: + i = ii.rstrip() + if i[0:4] == '[cur': + mode = 'cursor' + elif i[0:4] == '[col': + mode = 'colors' + else: + if mode == 'cursor' and i[0:5] == 'color' : + x = i.split('=') + color256, color257 = x[1].split(' ') + elif mode == 'colors': + if i[0:4] == 'fore': + color258 = i.split('=')[1] + elif i[0:4] == 'back': + color259 = i.split('=')[1] + elif i[0:4] == 'regu': + index = int(i[7]) + col = i.split('=')[1] + colors[index] = f'{col}' + elif i[0:4] == 'brig': + index = int(i[6]) + 8 + col = i.split('=')[1] + colors[index] = f'{col}' + + print(f"""-C #{colors[0]}@0 \ +-C #{colors[1]}@1 \ +-C #{colors[2]}@2 \ +-C #{colors[3]}@3 \ +-C #{colors[4]}@4 \ +-C #{colors[5]}@5 \ +-C #{colors[6]}@6 \ +-C #{colors[7]}@7 \ +-C #{colors[8]}@8 \ +-C #{colors[9]}@9 \ +-C #{colors[10]}@10 \ +-C #{colors[11]}@11 \ +-C #{colors[12]}@12 \ +-C #{colors[13]}@13 \ +-C #{colors[14]}@14 \ +-C #{colors[15]}@15 \ +-C #{color256}@256 \ +-C #{color257}@257 \ +-C #{color258}@258 \ +-C #{color259}@259 +""") + + + + + + + +if __name__ == '__main__': + ap = argparse.ArgumentParser() + ap.add_argument('-f','--filename',type=str,required=True) + main(ap.parse_args()) diff --git a/st-scripts/menu-st-footcolorpic.sh b/st-scripts/menu-st-footcolorpic.sh new file mode 100755 index 0000000..866bdd6 --- /dev/null +++ b/st-scripts/menu-st-footcolorpic.sh @@ -0,0 +1,10 @@ +#!/bin/sh +F=$(fc-list :mono: : family | sort -R | \ + rofi -no-disable-history -dmenu -i ) +C=$(ls ~/.config/stcolors/ | sort -R |rofi -dmenu ) +S=$(seq 26 -2 10 | sed s/26/18/ | rofi -dmenu ) +COLS=$(cat ~/.config/stcolors/${C}) +echo ${COLS} +set -x +st-colordefaults ${COLS} -f "${F}-${S}" + diff --git a/st-scripts/stcolors/autumn b/st-scripts/stcolors/autumn new file mode 100644 index 0000000..3ade1ff --- /dev/null +++ b/st-scripts/stcolors/autumn @@ -0,0 +1,2 @@ +-C #272727@0 -C #2FCC93@1 -C #3EA24F@2 -C #7BBA4D@3 -C #92893D@4 -C #A65841@5 -C #B1B360@6 -C #B3B3B3@7 -C #333333@8 -C #7EEEC6@9 -C #8AF69C@10 -C #A8F470@11 -C #EAD41F@12 -C #842E15@13 -C #4D4E21@14 -C #D2D2D2@15 -C #5B5B5B@256 -C #242424@257 -C #5B5B5B@258 -C #1B1B1B@259 + diff --git a/st-scripts/stcolors/blizzard-orb b/st-scripts/stcolors/blizzard-orb new file mode 100644 index 0000000..eeaab2f --- /dev/null +++ b/st-scripts/stcolors/blizzard-orb @@ -0,0 +1,2 @@ +-C #000000@0 -C #6688AA@1 -C #94B6CC@2 -C #4C6E84@3 -C #6688AA@4 -C #94B6CC@5 -C #4C6E84@6 -C #87875F@7 -C #000000@8 -C #6688AA@9 -C #94B6CC@10 -C #4C6E84@11 -C #6688AA@12 -C #94B6CC@13 -C #4C6E84@14 -C #87875F@15 -C #94B6CC@256 -C #15374d@257 -C #111111@258 -C #FCFCFC@259 + diff --git a/st-scripts/stcolors/bloodmoon b/st-scripts/stcolors/bloodmoon new file mode 100644 index 0000000..0d0abd6 --- /dev/null +++ b/st-scripts/stcolors/bloodmoon @@ -0,0 +1,2 @@ +-C #202020@0 -C #b91e2e@1 -C #81957c@2 -C #f9bb80@3 -C #356579@4 -C #2d2031@5 -C #0b3452@6 -C #909090@7 -C #606060@8 -C #d14548@9 -C #a7b79a@10 -C #fae3a0@11 -C #7491a1@12 -C #87314e@13 -C #0f829d@14 -C #fff0f0@15 -C #d2c5bc@256 -C #53463d@257 -C #d2c5bc@258 -C #2a0d0d@259 + diff --git a/st-scripts/stcolors/bluepanels b/st-scripts/stcolors/bluepanels new file mode 100644 index 0000000..c7b13e4 --- /dev/null +++ b/st-scripts/stcolors/bluepanels @@ -0,0 +1,2 @@ +-C #191927@0 -C #282f5e@1 -C #2b4593@2 -C #344276@3 -C #4e3a4f@4 -C #61372f@5 -C #6b484c@6 -C #744537@7 -C #905749@8 -C #94431c@9 -C #9f582a@10 -C #a38687@11 -C #e1750f@12 -C #eaaf25@13 -C #fa8e08@14 -C #fca806@15 -C #d3d3d3@256 -C #545454@257 -C #d3d3d3@258 -C #02022d@259 + diff --git a/st-scripts/stcolors/brightly b/st-scripts/stcolors/brightly new file mode 100644 index 0000000..c61c4e5 --- /dev/null +++ b/st-scripts/stcolors/brightly @@ -0,0 +1,2 @@ +-C #3E3E3E@0 -C #966575@1 -C #659675@2 -C #968665@3 -C #657596@4 -C #756596@5 -C #658E96@6 -C #D0D0D0@7 -C #5D5D5D@8 -C #6E4A56@9 -C #486B53@10 -C #89754E@11 -C #5F7AB1@12 -C #807793@13 -C #126A7B@14 -C #F6F6F6@15 -C #3E3E3E@256 -C #414141@257 -C #3E3E3E@258 -C #F0E9DC@259 + diff --git a/st-scripts/stcolors/cheezecake b/st-scripts/stcolors/cheezecake new file mode 100644 index 0000000..833793f --- /dev/null +++ b/st-scripts/stcolors/cheezecake @@ -0,0 +1,2 @@ +-C #404040@0 -C #B9454B@1 -C #BD8D46@2 -C #F6E497@3 -C #F595A7@4 -C #D28E2A@5 -C #EBCD4F@6 -C #FCFAE1@7 -C #262626@8 -C #E75252@9 -C #DEA552@10 -C #D1C180@11 -C #D1A5AD@12 -C #B47A24@13 -C #B9A659@14 -C #F3F2E7@15 -C #F595A7@256 -C #761628@257 -C #FCFAE1@258 -C #404040@259 + diff --git a/st-scripts/stcolors/cinderdontneedcontrast b/st-scripts/stcolors/cinderdontneedcontrast new file mode 100644 index 0000000..0defb0d --- /dev/null +++ b/st-scripts/stcolors/cinderdontneedcontrast @@ -0,0 +1,2 @@ +-C #110E0B@0 -C #BE5224@1 -C #8D3D1B@2 -C #754029@3 -C #84533E@4 -C #A67864@5 -C #C6AFA3@6 -C #E8E1DE@7 -C #1B1714@8 -C #A3461F@9 -C #5F2912@10 -C #4C2A1B@11 -C #643F2F@12 -C #835F4F@13 -C #9F8C83@14 -C #D7C9C3@15 -C #D7C9C3@256 -C #584a44@257 -C #D7C9C3@258 -C #110E0B@259 + diff --git a/st-scripts/stcolors/coolbeans b/st-scripts/stcolors/coolbeans new file mode 100644 index 0000000..025d133 --- /dev/null +++ b/st-scripts/stcolors/coolbeans @@ -0,0 +1,2 @@ +-C #24262B@0 -C #843C56@1 -C #83A86F@2 -C #A87458@3 -C #4A6AA3@4 -C #66518A@5 -C #4AA36A@6 -C #BCCAE2@7 -C #4A6D55@8 -C #AB4E70@9 -C #A3D18A@10 -C #D3926F@11 -C #6B8BC3@12 -C #9375C7@13 -C #5DCC85@14 -C #DCE9FF@15 -C #BCCAE2@256 -C #3d4b63@257 -C #BCCAE2@258 -C #24262B@259 + diff --git a/st-scripts/stcolors/derp b/st-scripts/stcolors/derp new file mode 100644 index 0000000..d1fd5bc --- /dev/null +++ b/st-scripts/stcolors/derp @@ -0,0 +1,2 @@ +-C #111111@0 -C #d36265@1 -C #aece91@2 -C #e7e18c@3 -C #5297cf@4 -C #963c59@5 -C #5e7175@6 -C #bebebe@7 -C #666666@8 -C #ef8171@9 -C #cfefb3@10 -C #fff796@11 -C #74b8ef@12 -C #b85e7b@13 -C #a3babf@14 -C #ffffff@15 -C #AA8800@256 -C #ffffff@257 -C #ffffff@258 -C #003030@259 + diff --git a/st-scripts/stcolors/doomidarkocean2 b/st-scripts/stcolors/doomidarkocean2 new file mode 100644 index 0000000..8581802 --- /dev/null +++ b/st-scripts/stcolors/doomidarkocean2 @@ -0,0 +1,2 @@ +-C #000000@0 -C #571dc2@1 -C #14db49@2 -C #403d70@3 -C #385a70@4 -C #384894@5 -C #4f3a5e@6 -C #999999@7 -C #38372c@8 -C #7c54b0@9 -C #a2e655@10 -C #9c6f59@11 -C #323f5c@12 -C #5e6c99@13 -C #667d77@14 -C #ffffff@15 -C #ffffff@256 -C #808080@257 -C #ffffff@258 -C #081f1f@259 + diff --git a/st-scripts/stcolors/flowerz b/st-scripts/stcolors/flowerz new file mode 100644 index 0000000..b34e365 --- /dev/null +++ b/st-scripts/stcolors/flowerz @@ -0,0 +1,2 @@ +-C #170E21@0 -C #9C5C5A@1 -C #95AB56@2 -C #C1D155@3 -C #483F5C@4 -C #924E65@5 -C #AEAAA9@6 -C #E0EDE6@7 -C #242120@8 -C #CEAEAD@9 -C #B2BAAA@10 -C #C1D155@11 -C #9D92AA@12 -C #C9A7B2@13 -C #C7CDC1@14 -C #E6F2E6@15 -C #E0EDE6@256 -C #616e67@257 -C #E0EDE6@258 -C #170E21@259 + diff --git a/st-scripts/stcolors/jeenz b/st-scripts/stcolors/jeenz new file mode 100644 index 0000000..269bbf6 --- /dev/null +++ b/st-scripts/stcolors/jeenz @@ -0,0 +1,2 @@ +-C #081A1A@0 -C #905050@1 -C #507050@2 -C #A08050@3 -C #506070@4 -C #605070@5 -C #706050@6 -C #D0DADA@7 -C #182A2A@8 -C #C26D6D@9 -C #74A374@10 -C #D4A96A@11 -C #748CA3@12 -C #A286BD@13 -C #A38C74@14 -C #DAE0E0@15 -C #D0DADA@256 -C #515b5b@257 -C #D0DADA@258 -C #0A0D0D@259 + diff --git a/st-scripts/stcolors/jmbi-greenbg b/st-scripts/stcolors/jmbi-greenbg new file mode 100644 index 0000000..6e561d4 --- /dev/null +++ b/st-scripts/stcolors/jmbi-greenbg @@ -0,0 +1,2 @@ +-C #5a7260@0 -C #8f423c@1 -C #bbbb88@2 -C #f9d25b@3 -C #e0ba69@4 -C #709289@5 -C #d13516@6 -C #efe2e0@7 -C #8da691@8 -C #eeaa88@9 -C #ccc68d@10 -C #eedd99@11 -C #c9b957@12 -C #ffcbab@13 -C #c25431@14 -C #f9f1ed@15 -C #ffffff@256 -C #808080@257 -C #ffffff@258 -C #061f03@259 + diff --git a/st-scripts/stcolors/leatherface b/st-scripts/stcolors/leatherface new file mode 100644 index 0000000..b6669e0 --- /dev/null +++ b/st-scripts/stcolors/leatherface @@ -0,0 +1,2 @@ +-C #222222@0 -C #997373@1 -C #999973@2 -C #997E63@3 -C #738099@4 -C #857399@5 -C #7A9998@6 -C #B3B3B3@7 -C #331C1C@8 -C #995454@9 -C #999954@10 -C #CC9E70@11 -C #7090CC@12 -C #A685CC@13 -C #8FCCCA@14 -C #CCCCCC@15 -C #E6D4C3@256 -C #675544@257 -C #E6D4C3@258 -C #282222@259 + diff --git a/st-scripts/stcolors/lightsnapple b/st-scripts/stcolors/lightsnapple new file mode 100644 index 0000000..345ebb5 --- /dev/null +++ b/st-scripts/stcolors/lightsnapple @@ -0,0 +1,2 @@ +-C #1B0B10@0 -C #82354F@1 -C #803466@2 -C #4F3480@3 -C #346580@4 -C #348068@5 -C #6E804D@6 -C #B3A49A@7 -C #241016@8 -C #B33E65@9 -C #B33E8C@10 -C #673EB3@11 -C #3E8AB3@12 -C #3EB38C@13 -C #9AB36B@14 -C #CCBBB0@15 -C #1B0B10@256 -C #64746f@257 -C #1B0B10@258 -C #CCBBB0@259 + diff --git a/st-scripts/stcolors/mostly-awful b/st-scripts/stcolors/mostly-awful new file mode 100644 index 0000000..c47346f --- /dev/null +++ b/st-scripts/stcolors/mostly-awful @@ -0,0 +1,2 @@ +-C #151413@0 -C #A3847A@1 -C #A2A37A@2 -C #A3947A@3 -C #7988A2@4 -C #A37A91@5 -C #7AA39D@6 -C #E0DBD3@7 -C #2F2D2B@8 -C #BF451E@9 -C #DFE340@10 -C #F9B43C@11 -C #3572DE@12 -C #B52074@13 -C #41F8DD@14 -C #EFEAE1@15 -C #E0DBD3@256 -C #615c54@257 -C #E0DBD3@258 -C #191817@259 + diff --git a/st-scripts/stcolors/n-vert b/st-scripts/stcolors/n-vert new file mode 100644 index 0000000..89e5497 --- /dev/null +++ b/st-scripts/stcolors/n-vert @@ -0,0 +1,2 @@ +-C #101215@0 -C #EE3366@1 -C #AAEE66@2 -C #DDEE77@3 -C #4477EE@4 -C #6655EE@5 -C #44DDEE@6 -C #FEEEEE@7 -C #101215@8 -C #EE3366@9 -C #AAEE66@10 -C #DDEE77@11 -C #4477EE@12 -C #6655EE@13 -C #44DDEE@14 -C #FFFFFF@15 -C #AAEE66@256 -C #2b6f19@257 -C #AAEE66@258 -C #101215@259 + diff --git a/st-scripts/stcolors/navy-and-ivory b/st-scripts/stcolors/navy-and-ivory new file mode 100644 index 0000000..add93a3 --- /dev/null +++ b/st-scripts/stcolors/navy-and-ivory @@ -0,0 +1,2 @@ +-C #032c36@0 -C #c2454e@1 -C #7cbf9e@2 -C #8a7a63@3 -C #2e3340@4 -C #ff5879@5 -C #44b5b1@6 -C #f2f1b9@7 -C #065f73@8 -C #ef5847@9 -C #a2d9b1@10 -C #beb090@11 -C #61778d@12 -C #ff99a1@13 -C #9ed9d8@14 -C #f6f6c9@15 -C #e8dfd6@256 -C #696057@257 -C #e8dfd6@258 -C #021b21@259 + diff --git a/st-scripts/stcolors/omgbeckylookatthatbruiseitissobright b/st-scripts/stcolors/omgbeckylookatthatbruiseitissobright new file mode 100644 index 0000000..37e2da1 --- /dev/null +++ b/st-scripts/stcolors/omgbeckylookatthatbruiseitissobright @@ -0,0 +1,2 @@ +-C #3C3E3C@0 -C #AC4C64@1 -C #5ACC77@2 -C #AC8B4C@3 -C #5A77CC@4 -C #A14CAC@5 -C #5AB3CC@6 -C #EFF3F0@7 -C #545855@8 -C #AC4C64@9 -C #4CAC64@10 -C #AB894B@11 -C #4C64AC@12 -C #A04BAB@13 -C #4B96AB@14 -C #F2F6F3@15 -C #545855@256 -C #2b272a@257 -C #545855@258 -C #F0F4F5@259 + diff --git a/st-scripts/stcolors/petals-dark-as-fuck b/st-scripts/stcolors/petals-dark-as-fuck new file mode 100644 index 0000000..379e400 --- /dev/null +++ b/st-scripts/stcolors/petals-dark-as-fuck @@ -0,0 +1,2 @@ +-C #020002@0 -C #B52F6A@1 -C #6C60AA@2 -C #A68189@3 -C #AC428A@4 -C #610064@5 -C #252B4F@6 -C #FEEECA@7 -C #220211@8 -C #FF7C87@9 -C #AA96DD@10 -C #FF9D80@11 -C #A94F8F@12 -C #B080B2@13 -C #9295A7@14 -C #FFFCE9@15 -C #FFFCE9@256 -C #807d6a@257 -C #FFFCE9@258 -C #020002@259 + diff --git a/st-scripts/stcolors/plastic-toys b/st-scripts/stcolors/plastic-toys new file mode 100644 index 0000000..ac47d80 --- /dev/null +++ b/st-scripts/stcolors/plastic-toys @@ -0,0 +1,2 @@ +-C #222222@0 -C #EB0000@1 -C #AAEB00@2 -C #EEBB00@3 -C #00AAEB@4 -C #EBAAEB@5 -C #00EBEB@6 -C #EBEBEB@7 -C #111111@8 -C #AB0000@9 -C #66AA00@10 -C #AA7700@11 -C #0066AA@12 -C #AA66AA@13 -C #00AAAA@14 -C #FAFAFA@15 -C #EBEBEB@256 -C #6c6c6c@257 -C #EBEBEB@258 -C #222222@259 + diff --git a/st-scripts/stcolors/purpariso b/st-scripts/stcolors/purpariso new file mode 100644 index 0000000..12bbd52 --- /dev/null +++ b/st-scripts/stcolors/purpariso @@ -0,0 +1,2 @@ +-C #2f1e2e@0 -C #a63d34@1 -C #33825f@2 -C #ba8f12@3 -C #0486b0@4 -C #5c4175@5 -C #3f8885@6 -C #6d6a68@7 -C #7b5376@8 -C #ef6155@9 -C #48b685@10 -C #fec418@11 -C #06b6ef@12 -C #815ba4@13 -C #5bc4bf@14 -C #e7e9db@15 -C #421f1c@256 -C #3a9e9b@257 -C #a39e9b@258 -C #2f1e2e@259 + diff --git a/st-scripts/stcolors/rosewould b/st-scripts/stcolors/rosewould new file mode 100644 index 0000000..021090e --- /dev/null +++ b/st-scripts/stcolors/rosewould @@ -0,0 +1,2 @@ +-C #27231F@0 -C #C8BBA0@1 -C #DBCBAF@2 -C #BBA883@3 -C #B08D94@4 -C #8A6E74@5 -C #855D65@6 -C #FAE3BB@7 -C #201E19@8 -C #B0935A@9 -C #8A6A31@10 -C #856324@11 -C #B05264@12 -C #8A3243@13 -C #852437@14 -C #FABCC8@15 -C #FAE3BB@256 -C #7b643c@257 -C #FAE3BB@258 -C #27231F@259 + diff --git a/st-scripts/stcolors/sea-fox b/st-scripts/stcolors/sea-fox new file mode 100644 index 0000000..c260bdd --- /dev/null +++ b/st-scripts/stcolors/sea-fox @@ -0,0 +1,2 @@ +-C #212121@0 -C #B54C4C@1 -C #B5884C@2 -C #B5B54C@3 -C #B54C77@4 -C #4CB597@5 -C #4CA7B5@6 -C #A7B3B5@7 -C #3E3E3E@8 -C #D73333@9 -C #EDA039@10 -C #ECEC3A@11 -C #E03178@12 -C #21D9A4@13 -C #36CFE7@14 -C #E8F9FC@15 -C #B6B64C@256 -C #373733@257 -C #B6B64C@258 -C #212121@259 + diff --git a/st-scripts/stcolors/sour-candy b/st-scripts/stcolors/sour-candy new file mode 100644 index 0000000..5906b52 --- /dev/null +++ b/st-scripts/stcolors/sour-candy @@ -0,0 +1,2 @@ +-C #231D20@0 -C #C81C61@1 -C #1CA6C8@2 -C #1CC872@3 -C #C8681C@4 -C #C81CA3@5 -C #B1C81C@6 -C #C7C8BE@7 -C #1D171A@8 -C #DB0057@9 -C #22C8F1@10 -C #21E884@11 -C #E57720@12 -C #DF1FB5@13 -C #D0EB21@14 -C #ECEDE1@15 -C #47C8BE@256 -C #c8493f@257 -C #C7C8BE@258 -C #231D20@259 + diff --git a/st-scripts/stcolors/sourceror b/st-scripts/stcolors/sourceror new file mode 100644 index 0000000..5dab692 --- /dev/null +++ b/st-scripts/stcolors/sourceror @@ -0,0 +1,2 @@ +-C #111111@0 -C #AA4450@1 -C #719611@2 -C #CC8800@3 -C #6688AA@4 -C #8F6F8F@5 -C #528B8B@6 -C #D3D3D3@7 -C #181818@8 -C #FF6A6A@9 -C #B1D631@10 -C #FF9800@11 -C #90B0D1@12 -C #8181A6@13 -C #87CEEB@14 -C #C1CDC1@15 -C #C2C2B0@256 -C #434331@257 -C #C2C2B0@258 -C #222222@259 + diff --git a/st-scripts/stcolors/tango b/st-scripts/stcolors/tango new file mode 100644 index 0000000..7aa8102 --- /dev/null +++ b/st-scripts/stcolors/tango @@ -0,0 +1,2 @@ +-C #2e3436@0 -C #cc0000@1 -C #4e9a06@2 -C #c4a000@3 -C #3465a4@4 -C #75507b@5 -C #06989a@6 -C #d3d7cf@7 -C #555753@8 -C #ef2929@9 -C #8ae234@10 -C #fce94f@11 -C #729fcf@12 -C #ad7fa8@13 -C #34e2e2@14 -C #eeeeec@15 -C #00D030@256 -C #babdb6@257 -C #babdb6@258 -C #000010@259 + diff --git a/st-scripts/stcolors/visibone b/st-scripts/stcolors/visibone new file mode 100644 index 0000000..f0adcaf --- /dev/null +++ b/st-scripts/stcolors/visibone @@ -0,0 +1,2 @@ +-C #666666@0 -C #cc6666@1 -C #66cc99@2 -C #cc9966@3 -C #6699cc@4 -C #cc6699@5 -C #66cccc@6 -C #cccccc@7 -C #999999@8 -C #ff9999@9 -C #99ffcc@10 -C #ffcc99@11 -C #99ccff@12 -C #ff99cc@13 -C #99ffff@14 -C #ffffff@15 -C #ee88bb@256 -C #4477aa@257 -C #ffffff@258 -C #010101@259 + diff --git a/st-scripts/stcolors/woodlands b/st-scripts/stcolors/woodlands new file mode 100644 index 0000000..d840c8b --- /dev/null +++ b/st-scripts/stcolors/woodlands @@ -0,0 +1,2 @@ +-C #2B1D1D@0 -C #45352E@1 -C #5E513F@2 -C #787250@3 -C #8B9161@4 -C #93AB72@5 -C #97C484@6 -C #96DE95@7 -C #5E4949@8 -C #78685D@9 -C #918370@10 -C #ABA584@11 -C #BFC497@12 -C #C9DEAB@13 -C #A5C497@14 -C #ACDEAB@15 -C #3C3C3C@256 -C #434343@257 -C #ACACAC@258 -C #121212@259 + diff --git a/st.1 b/st.1 index 1e3f1d4..39120b4 100644 --- a/st.1 +++ b/st.1 @@ -96,18 +96,18 @@ use a tty .I line instead of a pseudo terminal. .I line -should be a (pseudo-)serial device (e.g. /dev/ttySO on Linux for serial port +should be a (pseudo-)serial device (e.g. /dev/ttyS0 on Linux for serial port 0). When this flag is given remaining arguments are used as flags for .BR stty(1). By default st initializes the serial line to 8 bits, no parity, 1 stop bit and a 38400 baud rate. The speed is set by appending it as last argument -(e.g. 'st -l 115200'). Arguments before the last one are +(e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are .BR stty(1) flags. If you want to set odd parity on 115200 baud use for example 'st -l -parenb parodd 115200'. Set the number of bits by using for example 'st -l cs7 -115200'. See +/dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for +example 'st -l /dev/ttyS0 cs7 115200'. See .BR stty(1) for more arguments and cases. .TP @@ -120,7 +120,7 @@ st executes instead of the shell. If this is used it .B must be the last option on the command line, as in xterm / rxvt. -This option is only intended for compability, +This option is only intended for compatibility, and all the remaining arguments are used as a command even without it. .SH SHORTCUTS @@ -142,25 +142,22 @@ Print the full screen to the Print the selection to the .I iofile. .TP -.B Alt-Shift-Page Up +.B Ctrl-Shift-Page Up Increase font size. .TP -.B Alt-Shift-Page Down +.B Ctrl-Shift-Page Down Decrease font size. .TP -.B Alt-Shift-Home +.B Ctrl-Shift-Home Reset to default font size. .TP -.B Shift-Insert +.B Ctrl-Shift-y Paste from primary selection (middle mouse button). .TP -.B Alt-Shift-Insert -Paste from clipboard selection. -.TP -.B Alt-Shift-c +.B Ctrl-Shift-c Copy the selected text to the clipboard selection. .TP -.B Alt-Shift-v +.B Ctrl-Shift-v Paste from the clipboard selection. .SH CUSTOMIZATION .B st @@ -173,7 +170,8 @@ See the LICENSE file for the terms of redistribution. .SH SEE ALSO .BR tabbed (1), .BR utmp (1), -.BR stty (1) +.BR stty (1), +.BR scroll (1) .SH BUGS See the TODO file in the distribution. diff --git a/st.c b/st.c index a31527b..211bc6f 100644 --- a/st.c +++ b/st.c @@ -3,40 +3,22 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include -#include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include "arg.h" - -char *argv0; - -#define Glyph Glyph_ -#define Font Font_ +#include "st.h" +#include "win.h" #if defined(__linux) #include @@ -46,11 +28,6 @@ char *argv0; #include #endif - -/* XEMBED messages */ -#define XEMBED_FOCUS_IN 4 -#define XEMBED_FOCUS_OUT 5 - /* Arbitrary sizes */ #define UTF_INVALID 0xFFFD #define UTF_SIZ 4 @@ -58,53 +35,22 @@ char *argv0; #define ESC_ARG_SIZ 16 #define STR_BUF_SIZ ESC_BUF_SIZ #define STR_ARG_SIZ ESC_ARG_SIZ -#define XK_ANY_MOD UINT_MAX -#define XK_NO_MOD 0 -#define XK_SWITCH_MOD (1<<13) -#define OPAQUE 0Xff /* macros */ -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) < (b) ? (b) : (a)) -#define LEN(a) (sizeof(a) / sizeof(a)[0]) -#define DEFAULT(a, b) (a) = (a) ? (a) : (b) -#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) -#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) -#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') +#define IS_SET(flag) ((term.mode & (flag)) != 0) +#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f) #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) -#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) -#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) -#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ - (a).bg != (b).bg) -#define IS_SET(flag) ((term.mode & (flag)) != 0) -#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \ - (t1.tv_nsec-t2.tv_nsec)/1E6) -#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) +#define ISDELIM(u) (u && wcschr(worddelimiters, u)) -#define USE_ARGB (alpha != OPAQUE && opt_embed == NULL) - -#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) -#define IS_TRUECOL(x) (1 << 24 & (x)) -#define TRUERED(x) (((x) & 0xff0000) >> 8) -#define TRUEGREEN(x) (((x) & 0xff00)) -#define TRUEBLUE(x) (((x) & 0xff) << 8) - - -enum glyph_attribute { - ATTR_NULL = 0, - ATTR_BOLD = 1 << 0, - ATTR_FAINT = 1 << 1, - ATTR_ITALIC = 1 << 2, - ATTR_UNDERLINE = 1 << 3, - ATTR_BLINK = 1 << 4, - ATTR_REVERSE = 1 << 5, - ATTR_INVISIBLE = 1 << 6, - ATTR_STRUCK = 1 << 7, - ATTR_WRAP = 1 << 8, - ATTR_WIDE = 1 << 9, - ATTR_WDUMMY = 1 << 10, - ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, +enum term_mode { + MODE_WRAP = 1 << 0, + MODE_INSERT = 1 << 1, + MODE_ALTSCREEN = 1 << 2, + MODE_CRLF = 1 << 3, + MODE_ECHO = 1 << 4, + MODE_PRINT = 1 << 5, + MODE_UTF8 = 1 << 6, }; enum cursor_movement { @@ -118,32 +64,6 @@ enum cursor_state { CURSOR_ORIGIN = 2 }; -enum term_mode { - MODE_WRAP = 1 << 0, - MODE_INSERT = 1 << 1, - MODE_APPKEYPAD = 1 << 2, - MODE_ALTSCREEN = 1 << 3, - MODE_CRLF = 1 << 4, - MODE_MOUSEBTN = 1 << 5, - MODE_MOUSEMOTION = 1 << 6, - MODE_REVERSE = 1 << 7, - MODE_KBDLOCK = 1 << 8, - MODE_HIDE = 1 << 9, - MODE_ECHO = 1 << 10, - MODE_APPCURSOR = 1 << 11, - MODE_MOUSESGR = 1 << 12, - MODE_8BIT = 1 << 13, - MODE_BLINK = 1 << 14, - MODE_FBLINK = 1 << 15, - MODE_FOCUS = 1 << 16, - MODE_MOUSEX10 = 1 << 17, - MODE_MOUSEMANY = 1 << 18, - MODE_BRCKTPASTE = 1 << 19, - MODE_PRINT = 1 << 20, - MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ - |MODE_MOUSEMANY, -}; - enum charset { CS_GRAPHIC0, CS_GRAPHIC1, @@ -161,48 +81,9 @@ enum escape_state { ESC_ALTCHARSET = 8, ESC_STR_END = 16, /* a final string was encountered */ ESC_TEST = 32, /* Enter in test mode */ + ESC_UTF8 = 64, }; -enum window_state { - WIN_VISIBLE = 1, - WIN_FOCUSED = 2 -}; - -enum selection_mode { - SEL_IDLE = 0, - SEL_EMPTY = 1, - SEL_READY = 2 -}; - -enum selection_type { - SEL_REGULAR = 1, - SEL_RECTANGULAR = 2 -}; - -enum selection_snap { - SNAP_WORD = 1, - SNAP_LINE = 2 -}; - -typedef unsigned char uchar; -typedef unsigned int uint; -typedef unsigned long ulong; -typedef unsigned short ushort; - -typedef uint_least32_t Rune; - -typedef XftDraw *Draw; -typedef XftColor Color; - -typedef struct { - Rune u; /* character code */ - ushort mode; /* attribute flags */ - uint32_t fg; /* foreground */ - uint32_t bg; /* background */ -} Glyph; - -typedef Glyph *Line; - typedef struct { Glyph attr; /* current char attributes */ int x; @@ -210,88 +91,6 @@ typedef struct { char state; } TCursor; -/* CSI Escape sequence structs */ -/* ESC '[' [[ [] [;]] []] */ -typedef struct { - char buf[ESC_BUF_SIZ]; /* raw string */ - int len; /* raw string length */ - char priv; - int arg[ESC_ARG_SIZ]; - int narg; /* nb of args */ - char mode[2]; -} CSIEscape; - -/* STR Escape sequence structs */ -/* ESC type [[ [] [;]] ] ESC '\' */ -typedef struct { - char type; /* ESC type ... */ - char buf[STR_BUF_SIZ]; /* raw string */ - int len; /* raw string length */ - char *args[STR_ARG_SIZ]; - int narg; /* nb of args */ -} STREscape; - -/* Internal representation of the screen */ -typedef struct { - int row; /* nb row */ - int col; /* nb col */ - Line *line; /* screen */ - Line *alt; /* alternate screen */ - int *dirty; /* dirtyness of lines */ - XftGlyphFontSpec *specbuf; /* font spec buffer used for rendering */ - TCursor c; /* cursor */ - int top; /* top scroll limit */ - int bot; /* bottom scroll limit */ - int mode; /* terminal mode flags */ - int esc; /* escape state flags */ - char trantbl[4]; /* charset table translation */ - int charset; /* current charset */ - int icharset; /* selected charset for sequence */ - int numlock; /* lock numbers in keyboard */ - int *tabs; -} Term; - -/* Purely graphic info */ -typedef struct { - Display *dpy; - Colormap cmap; - Window win; - Drawable buf; - Atom xembed, wmdeletewin, netwmname, netwmpid; - XIM xim; - XIC xic; - Draw draw; - Visual *vis; - XSetWindowAttributes attrs; - int scr; - int isfixed; /* is fixed geometry? */ - int l, t; /* left and top offset */ - int gm; /* geometry mask */ - int tw, th; /* tty width and height */ - int w, h; /* window width and height */ - int ch; /* char height */ - int cw; /* char width */ - int depth; /* bit depth */ - char state; /* focus, redraw, visible */ - int cursor; /* cursor style */ -} XWindow; - -typedef struct { - uint b; - uint mask; - char *s; -} MouseShortcut; - -typedef struct { - KeySym k; - uint mask; - char *s; - /* three valued logic variables: 0 indifferent, 1 on, -1 off */ - signed char appkey; /* application keypad */ - signed char appcursor; /* application cursor */ - signed char crlf; /* crlf mode */ -} Key; - typedef struct { int mode; int type; @@ -307,72 +106,56 @@ typedef struct { int x, y; } nb, ne, ob, oe; - char *primary, *clipboard; - Atom xtarget; int alt; - struct timespec tclick1; - struct timespec tclick2; } Selection; -typedef union { - int i; - uint ui; - float f; - const void *v; -} Arg; - +/* Internal representation of the screen */ typedef struct { - uint mod; - KeySym keysym; - void (*func)(const Arg *); - const Arg arg; -} Shortcut; + int row; /* nb row */ + int col; /* nb col */ + Line *line; /* screen */ + Line *alt; /* alternate screen */ + int *dirty; /* dirtyness of lines */ + TCursor c; /* cursor */ + int ocx; /* old cursor col */ + int ocy; /* old cursor row */ + int top; /* top scroll limit */ + int bot; /* bottom scroll limit */ + int mode; /* terminal mode flags */ + int esc; /* escape state flags */ + char trantbl[4]; /* charset table translation */ + int charset; /* current charset */ + int icharset; /* selected charset for sequence */ + int *tabs; + Rune lastc; /* last printed char outside of sequence, 0 if control */ +} Term; -/* function definitions used in config.h */ -static void clipcopy(const Arg *); -static void clippaste(const Arg *); -static void numlock(const Arg *); -static void swapcolors(const Arg *); -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 sendbreak(const Arg *); - -/* Config.h for applying patches and the configuration. */ -#include "config.h" - -/* Font structure */ +/* CSI Escape sequence structs */ +/* ESC '[' [[ [] [;]] []] */ typedef struct { - int height; - int width; - int ascent; - int descent; - short lbearing; - short rbearing; - XftFont *match; - FcFontSet *set; - FcPattern *pattern; -} Font; + char buf[ESC_BUF_SIZ]; /* raw string */ + size_t len; /* raw string length */ + char priv; + int arg[ESC_ARG_SIZ]; + int narg; /* nb of args */ + char mode[2]; +} CSIEscape; -/* Drawing Context */ +/* STR Escape sequence structs */ +/* ESC type [[ [] [;]] ] ESC '\' */ typedef struct { - Color col[MAX(MAX(LEN(colorname), LEN(altcolorname)), 256)]; - Font font, bfont, ifont, ibfont; - GC gc; -} DC; + char type; /* ESC type ... */ + char *buf; /* allocated raw string */ + size_t siz; /* allocation size */ + size_t len; /* raw string length */ + char *args[STR_ARG_SIZ]; + int narg; /* nb of args */ +} STREscape; -static void die(const char *, ...); -static void draw(void); -static void redraw(void); -static void drawregion(int, int, int, int); -static void execsh(void); -static void stty(void); +static void execsh(char *, char **); +static void stty(char **); static void sigchld(int); -static void run(void); +static void ttywriteraw(const char *, size_t); static void csidump(void); static void csihandle(void); @@ -384,7 +167,6 @@ static void strhandle(void); static void strparse(void); static void strreset(void); -static int tattrset(int); static void tprinter(char *, size_t); static void tdumpsel(void); static void tdumpline(int); @@ -398,175 +180,83 @@ static void tinsertblankline(int); static int tlinelen(int); static void tmoveto(int, int); static void tmoveato(int, int); -static void tnew(int, int); static void tnewline(int); static void tputtab(int); static void tputc(Rune); static void treset(void); -static void tresize(int, int); static void tscrollup(int, int); static void tscrolldown(int, int); static void tsetattr(int *, int); static void tsetchar(Rune, Glyph *, int, int); +static void tsetdirt(int, int); static void tsetscroll(int, int); static void tswapscreen(void); -static void tsetdirt(int, int); -static void tsetdirtattr(int); static void tsetmode(int, int, int *, int); +static int twrite(const char *, int, int); static void tfulldirt(void); -static void techo(Rune); static void tcontrolcode(uchar ); static void tdectest(char ); +static void tdefutf8(char); static int32_t tdefcolor(int *, int *, int); static void tdeftran(char); -static inline int match(uint, uint); -static void ttynew(void); -static size_t ttyread(void); -static void ttyresize(void); -static void ttysend(char *, size_t); -static void ttywrite(const char *, size_t); static void tstrsequence(uchar); -static inline ushort sixd_to_16bit(int); -static int xmakeglyphfontspecs(XftGlyphFontSpec *, const Glyph *, int, int, int); -static void xdrawglyphfontspecs(const XftGlyphFontSpec *, Glyph, int, int, int); -static void xdrawglyph(Glyph, int, int); -static void xhints(void); -static void xclear(int, int, int, int); -static void xdrawcursor(void); -static void xinit(void); -static void xloadcols(void); -static int xsetcolorname(int, const char *); -static int xgeommasktogravity(int); -static int xloadfont(Font *, FcPattern *); -static void xloadfonts(char *, double); -static void xsettitle(char *); -static void xresettitle(void); -static void xsetpointermotion(int); -static void xseturgency(int); -static void xsetsel(char *, Time); -static void xunloadfont(Font *); -static void xunloadfonts(void); -static void xresize(int, int); +static void drawregion(int, int, int, int); -static void expose(XEvent *); -static void visibility(XEvent *); -static void unmap(XEvent *); -static char *kmap(KeySym, uint); -static void kpress(XEvent *); -static void cmessage(XEvent *); -static void cresize(int, int); -static void resize(XEvent *); -static void focus(XEvent *); -static void brelease(XEvent *); -static void bpress(XEvent *); -static void bmotion(XEvent *); -static void propnotify(XEvent *); -static void selnotify(XEvent *); -static void selclear(XEvent *); -static void selrequest(XEvent *); - -static void selinit(void); static void selnormalize(void); -static inline int selected(int, int); -static char *getsel(void); -static void selcopy(Time); static void selscroll(int, int); static void selsnap(int *, int *, int); -static int x2col(int); -static int y2row(int); -static void getbuttoninfo(XEvent *); -static void mousereport(XEvent *); -static size_t utf8decode(char *, Rune *, size_t); +static size_t utf8decode(const char *, Rune *, size_t); static Rune utf8decodebyte(char, size_t *); -static size_t utf8encode(Rune, char *); static char utf8encodebyte(Rune, size_t); -static char *utf8strchr(char *s, Rune u); static size_t utf8validate(Rune *, size_t); +static char *base64dec(const char *); +static char base64dec_getc(const char **); + static ssize_t xwrite(int, const char *, size_t); -static void *xmalloc(size_t); -static void *xrealloc(void *, size_t); -static char *xstrdup(char *); - -static void usage(void); - -static void (*handler[LASTEvent])(XEvent *) = { - [KeyPress] = kpress, - [ClientMessage] = cmessage, - [ConfigureNotify] = resize, - [VisibilityNotify] = visibility, - [UnmapNotify] = unmap, - [Expose] = expose, - [FocusIn] = focus, - [FocusOut] = focus, - [MotionNotify] = bmotion, - [ButtonPress] = bpress, - [ButtonRelease] = brelease, -/* - * Uncomment if you want the selection to disappear when you select something - * different in another window. - */ -/* [SelectionClear] = selclear, */ - [SelectionNotify] = selnotify, -/* - * PropertyNotify is only turned on when there is some INCR transfer happening - * for the selection retrieval. - */ - [PropertyNotify] = propnotify, - [SelectionRequest] = selrequest, -}; /* Globals */ -static DC dc; -static XWindow xw; static Term term; +static Selection sel; static CSIEscape csiescseq; static STREscape strescseq; +static int iofd = 1; static int cmdfd; static pid_t pid; -static Selection sel; -static int iofd = 1; -static char **opt_cmd = NULL; -static char *opt_class = NULL; -static char *opt_embed = NULL; -static char *opt_font = NULL; -static char *opt_io = NULL; -static char *opt_line = NULL; -static char *opt_name = NULL; -static char *opt_title = NULL; -static int oldbutton = 3; /* button event on startup: 3 = release */ -static int bellon = 0; /* visual bell status */ - -static int usealtcolors = 0; /* 1 to use alternate palette */ - -static char *usedfont = NULL; -static double usedfontsize = 0; -static double defaultfontsize = 0; static uchar utfbyte[UTF_SIZ + 1] = {0x80, 0, 0xC0, 0xE0, 0xF0}; static uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8}; static Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000}; static Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF}; -/* Font Ring Cache */ -enum { - FRC_NORMAL, - FRC_ITALIC, - FRC_BOLD, - FRC_ITALICBOLD -}; +#include +static int su = 0; +struct timespec sutv; -typedef struct { - XftFont *font; - int flags; - Rune unicodep; -} Fontcache; +static void +tsync_begin() +{ + clock_gettime(CLOCK_MONOTONIC, &sutv); + su = 1; +} -/* Fontcache is an array now. A new font will be appended to the array. */ -static Fontcache frc[16]; -static int frclen = 0; +static void +tsync_end() +{ + su = 0; +} + +int +tinsync(uint timeout) +{ + struct timespec now; + if (su && !clock_gettime(CLOCK_MONOTONIC, &now) + && TIMEDIFF(now, sutv) >= timeout) + su = 0; + return su; +} ssize_t xwrite(int fd, const char *s, size_t len) @@ -588,10 +278,10 @@ xwrite(int fd, const char *s, size_t len) void * xmalloc(size_t len) { - void *p = malloc(len); + void *p; - if (!p) - die("Out of memory\n"); + if (!(p = malloc(len))) + die("malloc: %s\n", strerror(errno)); return p; } @@ -600,7 +290,7 @@ void * xrealloc(void *p, size_t len) { if ((p = realloc(p, len)) == NULL) - die("Out of memory\n"); + die("realloc: %s\n", strerror(errno)); return p; } @@ -609,13 +299,13 @@ char * xstrdup(char *s) { if ((s = strdup(s)) == NULL) - die("Out of memory\n"); + die("strdup: %s\n", strerror(errno)); return s; } size_t -utf8decode(char *c, Rune *u, size_t clen) +utf8decode(const char *c, Rune *u, size_t clen) { size_t i, j, len, type; Rune udecoded; @@ -673,23 +363,6 @@ utf8encodebyte(Rune u, size_t i) return utfbyte[i] | (u & ~utfmask[i]); } -char * -utf8strchr(char *s, Rune u) -{ - Rune r; - size_t i, j, len; - - len = strlen(s); - for (i = 0, j = 0; i < len; i += j) { - if (!(j = utf8decode(&s[i], &r, len - i))) - break; - if (r == u) - return &(s[i]); - } - - return NULL; -} - size_t utf8validate(Rune *u, size_t i) { @@ -701,37 +374,66 @@ utf8validate(Rune *u, size_t i) return i; } +static const char base64_digits[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, + 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, -1, 0, 0, 0, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +char +base64dec_getc(const char **src) +{ + while (**src && !isprint(**src)) + (*src)++; + return **src ? *((*src)++) : '='; /* emulate padding if string ends */ +} + +char * +base64dec(const char *src) +{ + size_t in_len = strlen(src); + char *result, *dst; + + if (in_len % 4) + in_len += 4 - (in_len % 4); + result = dst = xmalloc(in_len / 4 * 3 + 1); + while (*src) { + int a = base64_digits[(unsigned char) base64dec_getc(&src)]; + int b = base64_digits[(unsigned char) base64dec_getc(&src)]; + int c = base64_digits[(unsigned char) base64dec_getc(&src)]; + int d = base64_digits[(unsigned char) base64dec_getc(&src)]; + + /* invalid input. 'a' can be -1, e.g. if src is "\n" (c-str) */ + if (a == -1 || b == -1) + break; + + *dst++ = (a << 2) | ((b & 0x30) >> 4); + if (c == -1) + break; + *dst++ = ((b & 0x0f) << 4) | ((c & 0x3c) >> 2); + if (d == -1) + break; + *dst++ = ((c & 0x03) << 6) | d; + } + *dst = '\0'; + return result; +} + void selinit(void) { - clock_gettime(CLOCK_MONOTONIC, &sel.tclick1); - clock_gettime(CLOCK_MONOTONIC, &sel.tclick2); sel.mode = SEL_IDLE; sel.snap = 0; sel.ob.x = -1; - sel.primary = NULL; - sel.clipboard = NULL; - sel.xtarget = XInternAtom(xw.dpy, "UTF8_STRING", 0); - if (sel.xtarget == None) - sel.xtarget = XA_STRING; -} - -int -x2col(int x) -{ - x -= borderpx; - x /= xw.cw; - - return LIMIT(x, 0, term.col-1); -} - -int -y2row(int y) -{ - y -= borderpx; - y /= xw.ch; - - return LIMIT(y, 0, term.row-1); } int @@ -748,6 +450,52 @@ tlinelen(int y) return i; } +void +selstart(int col, int row, int snap) +{ + selclear(); + sel.mode = SEL_EMPTY; + sel.type = SEL_REGULAR; + sel.alt = IS_SET(MODE_ALTSCREEN); + sel.snap = snap; + sel.oe.x = sel.ob.x = col; + sel.oe.y = sel.ob.y = row; + selnormalize(); + + if (sel.snap != 0) + sel.mode = SEL_READY; + tsetdirt(sel.nb.y, sel.ne.y); +} + +void +selextend(int col, int row, int type, int done) +{ + int oldey, oldex, oldsby, oldsey, oldtype; + + if (sel.mode == SEL_IDLE) + return; + if (done && sel.mode == SEL_EMPTY) { + selclear(); + return; + } + + oldey = sel.oe.y; + oldex = sel.oe.x; + oldsby = sel.nb.y; + oldsey = sel.ne.y; + oldtype = sel.type; + + sel.oe.x = col; + sel.oe.y = row; + selnormalize(); + sel.type = type; + + if (oldey != sel.oe.y || oldex != sel.oe.x || oldtype != sel.type || sel.mode == SEL_EMPTY) + tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey)); + + sel.mode = done ? SEL_IDLE : SEL_READY; +} + void selnormalize(void) { @@ -779,7 +527,8 @@ selnormalize(void) int selected(int x, int y) { - if (sel.mode == SEL_EMPTY) + if (sel.mode == SEL_EMPTY || sel.ob.x == -1 || + sel.alt != IS_SET(MODE_ALTSCREEN)) return 0; if (sel.type == SEL_RECTANGULAR) @@ -864,141 +613,6 @@ selsnap(int *x, int *y, int direction) } } -void -getbuttoninfo(XEvent *e) -{ - int type; - uint state = e->xbutton.state & ~(Button1Mask | forceselmod); - - sel.alt = IS_SET(MODE_ALTSCREEN); - - sel.oe.x = x2col(e->xbutton.x); - sel.oe.y = y2row(e->xbutton.y); - selnormalize(); - - sel.type = SEL_REGULAR; - for (type = 1; type < LEN(selmasks); ++type) { - if (match(selmasks[type], state)) { - sel.type = type; - break; - } - } -} - -void -mousereport(XEvent *e) -{ - int x = x2col(e->xbutton.x), y = y2row(e->xbutton.y), - button = e->xbutton.button, state = e->xbutton.state, - len; - char buf[40]; - static int ox, oy; - - /* from urxvt */ - if (e->xbutton.type == MotionNotify) { - if (x == ox && y == oy) - return; - if (!IS_SET(MODE_MOUSEMOTION) && !IS_SET(MODE_MOUSEMANY)) - return; - /* MOUSE_MOTION: no reporting if no button is pressed */ - if (IS_SET(MODE_MOUSEMOTION) && oldbutton == 3) - return; - - button = oldbutton + 32; - ox = x; - oy = y; - } else { - if (!IS_SET(MODE_MOUSESGR) && e->xbutton.type == ButtonRelease) { - button = 3; - } else { - button -= Button1; - if (button >= 3) - button += 64 - 3; - } - if (e->xbutton.type == ButtonPress) { - oldbutton = button; - ox = x; - oy = y; - } else if (e->xbutton.type == ButtonRelease) { - oldbutton = 3; - /* MODE_MOUSEX10: no button release reporting */ - if (IS_SET(MODE_MOUSEX10)) - return; - if (button == 64 || button == 65) - return; - } - } - - if (!IS_SET(MODE_MOUSEX10)) { - button += ((state & ShiftMask ) ? 4 : 0) - + ((state & Mod4Mask ) ? 8 : 0) - + ((state & ControlMask) ? 16 : 0); - } - - if (IS_SET(MODE_MOUSESGR)) { - len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c", - button, x+1, y+1, - e->xbutton.type == ButtonRelease ? 'm' : 'M'); - } else if (x < 223 && y < 223) { - len = snprintf(buf, sizeof(buf), "\033[M%c%c%c", - 32+button, 32+x+1, 32+y+1); - } else { - return; - } - - ttywrite(buf, len); -} - -void -bpress(XEvent *e) -{ - struct timespec now; - MouseShortcut *ms; - - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - mousereport(e); - return; - } - - for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { - if (e->xbutton.button == ms->b - && match(ms->mask, e->xbutton.state)) { - ttysend(ms->s, strlen(ms->s)); - return; - } - } - - if (e->xbutton.button == Button1) { - clock_gettime(CLOCK_MONOTONIC, &now); - - /* Clear previous selection, logically and visually. */ - selclear(NULL); - sel.mode = SEL_EMPTY; - sel.type = SEL_REGULAR; - sel.oe.x = sel.ob.x = x2col(e->xbutton.x); - sel.oe.y = sel.ob.y = y2row(e->xbutton.y); - - /* - * If the user clicks below predefined timeouts specific - * snapping behaviour is exposed. - */ - if (TIMEDIFF(now, sel.tclick2) <= tripleclicktimeout) { - sel.snap = SNAP_LINE; - } else if (TIMEDIFF(now, sel.tclick1) <= doubleclicktimeout) { - sel.snap = SNAP_WORD; - } else { - sel.snap = 0; - } - selnormalize(); - - if (sel.snap != 0) - sel.mode = SEL_READY; - tsetdirt(sel.nb.y, sel.ne.y); - sel.tclick2 = sel.tclick1; - sel.tclick1 = now; - } -} - char * getsel(void) { @@ -1046,7 +660,8 @@ getsel(void) * st. * FIXME: Fix the computer world. */ - if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP)) + if ((y < sel.ne.y || lastx >= linelen) && + (!(last->mode & ATTR_WRAP) || sel.type == SEL_RECTANGULAR)) *ptr++ = '\n'; } *ptr = 0; @@ -1054,148 +669,7 @@ getsel(void) } void -selcopy(Time t) -{ - xsetsel(getsel(), t); -} - -void -propnotify(XEvent *e) -{ - XPropertyEvent *xpev; - Atom clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); - - xpev = &e->xproperty; - if (xpev->state == PropertyNewValue && - (xpev->atom == XA_PRIMARY || - xpev->atom == clipboard)) { - selnotify(e); - } -} - -void -selnotify(XEvent *e) -{ - ulong nitems, ofs, rem; - int format; - uchar *data, *last, *repl; - Atom type, incratom, property; - - incratom = XInternAtom(xw.dpy, "INCR", 0); - - ofs = 0; - if (e->type == SelectionNotify) { - property = e->xselection.property; - } else if(e->type == PropertyNotify) { - property = e->xproperty.atom; - } else { - return; - } - if (property == None) - return; - - do { - if (XGetWindowProperty(xw.dpy, xw.win, property, ofs, - BUFSIZ/4, False, AnyPropertyType, - &type, &format, &nitems, &rem, - &data)) { - fprintf(stderr, "Clipboard allocation failed\n"); - return; - } - - if (e->type == PropertyNotify && nitems == 0 && rem == 0) { - /* - * If there is some PropertyNotify with no data, then - * this is the signal of the selection owner that all - * data has been transferred. We won't need to receive - * PropertyNotify events anymore. - */ - MODBIT(xw.attrs.event_mask, 0, PropertyChangeMask); - XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, - &xw.attrs); - } - - if (type == incratom) { - /* - * Activate the PropertyNotify events so we receive - * when the selection owner does send us the next - * chunk of data. - */ - MODBIT(xw.attrs.event_mask, 1, PropertyChangeMask); - XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, - &xw.attrs); - - /* - * Deleting the property is the transfer start signal. - */ - XDeleteProperty(xw.dpy, xw.win, (int)property); - continue; - } - - /* - * As seen in getsel: - * Line endings are inconsistent in the terminal and GUI world - * copy and pasting. When receiving some selection data, - * replace all '\n' with '\r'. - * FIXME: Fix the computer world. - */ - repl = data; - last = data + nitems * format / 8; - while ((repl = memchr(repl, '\n', last - repl))) { - *repl++ = '\r'; - } - - if (IS_SET(MODE_BRCKTPASTE) && ofs == 0) - ttywrite("\033[200~", 6); - ttysend((char *)data, nitems * format / 8); - if (IS_SET(MODE_BRCKTPASTE) && rem == 0) - ttywrite("\033[201~", 6); - XFree(data); - /* number of 32-bit chunks returned */ - ofs += nitems * format / 32; - } while (rem > 0); - - /* - * Deleting the property again tells the selection owner to send the - * next data chunk in the property. - */ - XDeleteProperty(xw.dpy, xw.win, (int)property); -} - -void -selpaste(const Arg *dummy) -{ - XConvertSelection(xw.dpy, XA_PRIMARY, sel.xtarget, XA_PRIMARY, - xw.win, CurrentTime); -} - -void -clipcopy(const Arg *dummy) -{ - Atom clipboard; - - if (sel.clipboard != NULL) - free(sel.clipboard); - - if (sel.primary != NULL) { - sel.clipboard = xstrdup(sel.primary); - clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); - XSetSelectionOwner(xw.dpy, clipboard, xw.win, CurrentTime); - } -} - -void -clippaste(const Arg *dummy) -{ - Atom clipboard; - - clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); - XConvertSelection(xw.dpy, clipboard, sel.xtarget, clipboard, - xw.win, CurrentTime); -} - -void -selclear(XEvent *e) +selclear(void) { if (sel.ob.x == -1) return; @@ -1204,120 +678,6 @@ selclear(XEvent *e) tsetdirt(sel.nb.y, sel.ne.y); } -void -selrequest(XEvent *e) -{ - XSelectionRequestEvent *xsre; - XSelectionEvent xev; - Atom xa_targets, string, clipboard; - char *seltext; - - xsre = (XSelectionRequestEvent *) e; - xev.type = SelectionNotify; - xev.requestor = xsre->requestor; - xev.selection = xsre->selection; - xev.target = xsre->target; - xev.time = xsre->time; - if (xsre->property == None) - xsre->property = xsre->target; - - /* reject */ - xev.property = None; - - xa_targets = XInternAtom(xw.dpy, "TARGETS", 0); - if (xsre->target == xa_targets) { - /* respond with the supported type */ - string = sel.xtarget; - XChangeProperty(xsre->display, xsre->requestor, xsre->property, - XA_ATOM, 32, PropModeReplace, - (uchar *) &string, 1); - xev.property = xsre->property; - } else if (xsre->target == sel.xtarget || xsre->target == XA_STRING) { - /* - * xith XA_STRING non ascii characters may be incorrect in the - * requestor. It is not our problem, use utf8. - */ - clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); - if (xsre->selection == XA_PRIMARY) { - seltext = sel.primary; - } else if (xsre->selection == clipboard) { - seltext = sel.clipboard; - } else { - fprintf(stderr, - "Unhandled clipboard selection 0x%lx\n", - xsre->selection); - return; - } - if (seltext != NULL) { - XChangeProperty(xsre->display, xsre->requestor, - xsre->property, xsre->target, - 8, PropModeReplace, - (uchar *)seltext, strlen(seltext)); - xev.property = xsre->property; - } - } - - /* all done, send a notification to the listener */ - if (!XSendEvent(xsre->display, xsre->requestor, 1, 0, (XEvent *) &xev)) - fprintf(stderr, "Error sending SelectionNotify event\n"); -} - -void -xsetsel(char *str, Time t) -{ - free(sel.primary); - sel.primary = str; - - XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); - if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) - selclear(0); -} - -void -brelease(XEvent *e) -{ - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - mousereport(e); - return; - } - - if (e->xbutton.button == Button2) { - selpaste(NULL); - } else if (e->xbutton.button == Button1) { - if (sel.mode == SEL_READY) { - getbuttoninfo(e); - selcopy(e->xbutton.time); - } else - selclear(NULL); - sel.mode = SEL_IDLE; - tsetdirt(sel.nb.y, sel.ne.y); - } -} - -void -bmotion(XEvent *e) -{ - int oldey, oldex, oldsby, oldsey; - - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - mousereport(e); - return; - } - - if (!sel.mode) - return; - - sel.mode = SEL_READY; - oldey = sel.oe.y; - oldex = sel.oe.x; - oldsby = sel.nb.y; - oldsey = sel.ne.y; - getbuttoninfo(e); - - if (oldey != sel.oe.y || oldex != sel.oe.x) - tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey)); -} - void die(const char *errstr, ...) { @@ -1330,32 +690,36 @@ die(const char *errstr, ...) } void -execsh(void) +execsh(char *cmd, char **args) { - char **args, *sh, *prog; + char *sh, *prog, *arg; const struct passwd *pw; - char buf[sizeof(long) * 8 + 1]; errno = 0; if ((pw = getpwuid(getuid())) == NULL) { if (errno) - die("getpwuid:%s\n", strerror(errno)); + die("getpwuid: %s\n", strerror(errno)); else die("who are you?\n"); } if ((sh = getenv("SHELL")) == NULL) - sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; + sh = (pw->pw_shell[0]) ? pw->pw_shell : cmd; - if (opt_cmd) - prog = opt_cmd[0]; - else if (utmp) + if (args) { + prog = args[0]; + arg = NULL; + } else if (scroll) { + prog = scroll; + arg = utmp ? utmp : sh; + } else if (utmp) { prog = utmp; - else + arg = NULL; + } else { prog = sh; - args = (opt_cmd) ? opt_cmd : (char *[]) {prog, NULL}; - - snprintf(buf, sizeof(buf), "%lu", xw.win); + arg = NULL; + } + DEFAULT(args, ((char *[]) {prog, arg, NULL})); unsetenv("COLUMNS"); unsetenv("LINES"); @@ -1365,7 +729,6 @@ execsh(void) setenv("SHELL", sh, 1); setenv("HOME", pw->pw_dir, 1); setenv("TERM", termname, 1); - setenv("WINDOWID", buf, 1); signal(SIGCHLD, SIG_DFL); signal(SIGHUP, SIG_DFL); @@ -1385,19 +748,20 @@ sigchld(int a) pid_t p; if ((p = waitpid(pid, &stat, WNOHANG)) < 0) - die("Waiting for pid %hd failed: %s\n", pid, strerror(errno)); + die("waiting for pid %hd failed: %s\n", pid, strerror(errno)); if (pid != p) return; - if (!WIFEXITED(stat) || WEXITSTATUS(stat)) - die("child finished with error '%d'\n", stat); - exit(0); + if (WIFEXITED(stat) && WEXITSTATUS(stat)) + die("child exited with status %d\n", WEXITSTATUS(stat)); + else if (WIFSIGNALED(stat)) + die("child terminated due to signal %d\n", WTERMSIG(stat)); + _exit(0); } - void -stty(void) +stty(char **args) { char cmd[_POSIX_ARG_MAX], **p, *q, *s; size_t n, siz; @@ -1407,7 +771,7 @@ stty(void) memcpy(cmd, stty_args, n); q = cmd + n; siz = sizeof(cmd) - n; - for (p = opt_cmd; p && (s = *p); ++p) { + for (p = args; p && (s = *p); ++p) { if ((n = strlen(s)) > siz-1) die("stty parameter length too long\n"); *q++ = ' '; @@ -1417,40 +781,40 @@ stty(void) } *q = '\0'; if (system(cmd) != 0) - perror("Couldn't call stty"); + perror("Couldn't call stty"); } -void -ttynew(void) +int +ttynew(char *line, char *cmd, char *out, char **args) { int m, s; - struct winsize w = {term.row, term.col, 0, 0}; - if (opt_io) { + if (out) { term.mode |= MODE_PRINT; - iofd = (!strcmp(opt_io, "-")) ? - 1 : open(opt_io, O_WRONLY | O_CREAT, 0666); + iofd = (!strcmp(out, "-")) ? + 1 : open(out, O_WRONLY | O_CREAT, 0666); if (iofd < 0) { fprintf(stderr, "Error opening %s:%s\n", - opt_io, strerror(errno)); + out, strerror(errno)); } } - if (opt_line) { - if ((cmdfd = open(opt_line, O_RDWR)) < 0) - die("open line failed: %s\n", strerror(errno)); + if (line) { + if ((cmdfd = open(line, O_RDWR)) < 0) + die("open line '%s' failed: %s\n", + line, strerror(errno)); dup2(cmdfd, 0); - stty(); - return; + stty(args); + return cmdfd; } /* seems to work fine on linux, openbsd and freebsd */ - if (openpty(&m, &s, NULL, NULL, &w) < 0) + if (openpty(&m, &s, NULL, NULL, NULL) < 0) die("openpty failed: %s\n", strerror(errno)); switch (pid = fork()) { case -1: - die("fork failed\n"); + die("fork failed: %s\n", strerror(errno)); break; case 0: close(iofd); @@ -1462,47 +826,84 @@ ttynew(void) die("ioctl TIOCSCTTY failed: %s\n", strerror(errno)); close(s); close(m); - execsh(); +#ifdef __OpenBSD__ + if (pledge("stdio getpw proc exec", NULL) == -1) + die("pledge\n"); +#endif + execsh(cmd, args); break; default: +#ifdef __OpenBSD__ + if (pledge("stdio rpath tty proc", NULL) == -1) + die("pledge\n"); +#endif close(s); cmdfd = m; signal(SIGCHLD, sigchld); break; } + return cmdfd; } +static int twrite_aborted = 0; +int ttyread_pending() { return twrite_aborted; } + size_t ttyread(void) { static char buf[BUFSIZ]; static int buflen = 0; - char *ptr; - int charsize; /* size of utf8 char in bytes */ - Rune unicodep; - int ret; + int ret, written; /* append read bytes to unprocessed bytes */ - if ((ret = read(cmdfd, buf+buflen, LEN(buf)-buflen)) < 0) - die("Couldn't read from shell: %s\n", strerror(errno)); + ret = twrite_aborted ? 1 : read(cmdfd, buf+buflen, LEN(buf)-buflen); - /* process every complete utf8 char */ - buflen += ret; - ptr = buf; - while ((charsize = utf8decode(ptr, &unicodep, buflen))) { - tputc(unicodep); - ptr += charsize; - buflen -= charsize; + switch (ret) { + case 0: + exit(0); + case -1: + die("couldn't read from shell: %s\n", strerror(errno)); + default: + buflen += twrite_aborted ? 0 : ret; + written = twrite(buf, buflen, 0); + buflen -= written; + /* keep any incomplete UTF-8 byte sequence for the next call */ + if (buflen > 0) + memmove(buf, buf + written, buflen); + return ret; } - - /* keep any uncomplete utf8 char for the next call */ - memmove(buf, ptr, buflen); - - return ret; } void -ttywrite(const char *s, size_t n) +ttywrite(const char *s, size_t n, int may_echo) +{ + const char *next; + + if (may_echo && IS_SET(MODE_ECHO)) + twrite(s, n, 1); + + if (!IS_SET(MODE_CRLF)) { + ttywriteraw(s, n); + return; + } + + /* This is similar to how the kernel handles ONLCR for ttys */ + while (n > 0) { + if (*s == '\r') { + next = s + 1; + ttywriteraw("\r\n", 2); + } else { + next = memchr(s, '\r', n); + DEFAULT(next, s + n); + ttywriteraw(s, next - s); + } + n -= next - s; + s = next; + } +} + +void +ttywriteraw(const char *s, size_t n) { fd_set wfd, rfd; ssize_t r; @@ -1537,7 +938,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) @@ -1559,33 +960,25 @@ write_error: } void -ttysend(char *s, size_t n) -{ - int len; - Rune u; - - ttywrite(s, n); - if (IS_SET(MODE_ECHO)) - while ((len = utf8decode(s, &u, n)) > 0) { - techo(u); - n -= len; - s += len; - } -} - -void -ttyresize(void) +ttyresize(int tw, int th) { struct winsize w; w.ws_row = term.row; w.ws_col = term.col; - w.ws_xpixel = xw.tw; - w.ws_ypixel = xw.th; + w.ws_xpixel = tw; + w.ws_ypixel = th; if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); } +void +ttyhangup() +{ + /* Send SIGHUP to shell */ + kill(pid, SIGHUP); +} + int tattrset(int attr) { @@ -1631,6 +1024,7 @@ tsetdirtattr(int attr) void tfulldirt(void) { + tsync_end(); tsetdirt(0, term.row-1); } @@ -1664,7 +1058,7 @@ treset(void) term.tabs[i] = 1; term.top = 0; term.bot = term.row - 1; - term.mode = MODE_WRAP; + term.mode = MODE_WRAP|MODE_UTF8; memset(term.trantbl, CS_USA, sizeof(term.trantbl)); term.charset = 0; @@ -1681,8 +1075,6 @@ tnew(int col, int row) { term = (Term){ .c = { .attr = { .fg = defaultfg, .bg = defaultbg } } }; tresize(col, row); - term.numlock = 1; - treset(); } @@ -1743,27 +1135,17 @@ selscroll(int orig, int n) if (sel.ob.x == -1) return; - if (BETWEEN(sel.ob.y, orig, term.bot) || BETWEEN(sel.oe.y, orig, term.bot)) { - if ((sel.ob.y += n) > term.bot || (sel.oe.y += n) < term.top) { - selclear(NULL); - return; - } - if (sel.type == SEL_RECTANGULAR) { - if (sel.ob.y < term.top) - sel.ob.y = term.top; - if (sel.oe.y > term.bot) - sel.oe.y = term.bot; + if (BETWEEN(sel.nb.y, orig, term.bot) != BETWEEN(sel.ne.y, orig, term.bot)) { + selclear(); + } else if (BETWEEN(sel.nb.y, orig, term.bot)) { + sel.ob.y += n; + sel.oe.y += n; + if (sel.ob.y < term.top || sel.ob.y > term.bot || + sel.oe.y < term.top || sel.oe.y > term.bot) { + selclear(); } else { - if (sel.ob.y < term.top) { - sel.ob.y = term.top; - sel.ob.x = 0; - } - if (sel.oe.y > term.bot) { - sel.oe.y = term.bot; - sel.oe.x = term.col; - } + selnormalize(); } - selnormalize(); } } @@ -1868,6 +1250,9 @@ tsetchar(Rune u, Glyph *attr, int x, int y) term.dirty[y] = 1; term.line[y][x] = *attr; term.line[y][x].u = u; + + if (isboxdraw(u)) + term.line[y][x].mode |= ATTR_BOXDRAW; } void @@ -1891,7 +1276,7 @@ tclearregion(int x1, int y1, int x2, int y2) for (x = x1; x <= x2; x++) { gp = &term.line[y][x]; if (selected(x, y)) - selclear(NULL); + selclear(); gp->fg = term.c.attr.fg; gp->bg = term.c.attr.bg; gp->mode = 0; @@ -2092,7 +1477,8 @@ tsetattr(int *attr, int l) } else { fprintf(stderr, "erresc(default): gfx attr %d unknown\n", - attr[i]), csidump(); + attr[i]); + csidump(); } break; } @@ -2118,20 +1504,16 @@ tsetscroll(int t, int b) void tsetmode(int priv, int set, int *args, int narg) { - int *lim, mode; - int alt; + int alt, *lim; for (lim = args + narg; args < lim; ++args) { if (priv) { switch (*args) { case 1: /* DECCKM -- Cursor key */ - MODBIT(term.mode, set, MODE_APPCURSOR); + xsetmode(set, MODE_APPCURSOR); break; case 5: /* DECSCNM -- Reverse video */ - mode = term.mode; - MODBIT(term.mode, set, MODE_REVERSE); - if (mode != term.mode) - redraw(); + xsetmode(set, MODE_REVERSE); break; case 6: /* DECOM -- Origin */ MODBIT(term.c.state, set, CURSOR_ORIGIN); @@ -2151,36 +1533,36 @@ tsetmode(int priv, int set, int *args, int narg) case 12: /* att610 -- Start blinking cursor (IGNORED) */ break; case 25: /* DECTCEM -- Text Cursor Enable Mode */ - MODBIT(term.mode, !set, MODE_HIDE); + xsetmode(!set, MODE_HIDE); break; case 9: /* X10 mouse compatibility mode */ xsetpointermotion(0); - MODBIT(term.mode, 0, MODE_MOUSE); - MODBIT(term.mode, set, MODE_MOUSEX10); + xsetmode(0, MODE_MOUSE); + xsetmode(set, MODE_MOUSEX10); break; case 1000: /* 1000: report button press */ xsetpointermotion(0); - MODBIT(term.mode, 0, MODE_MOUSE); - MODBIT(term.mode, set, MODE_MOUSEBTN); + xsetmode(0, MODE_MOUSE); + xsetmode(set, MODE_MOUSEBTN); break; case 1002: /* 1002: report motion on button press */ xsetpointermotion(0); - MODBIT(term.mode, 0, MODE_MOUSE); - MODBIT(term.mode, set, MODE_MOUSEMOTION); + xsetmode(0, MODE_MOUSE); + xsetmode(set, MODE_MOUSEMOTION); break; case 1003: /* 1003: enable all mouse motions */ xsetpointermotion(set); - MODBIT(term.mode, 0, MODE_MOUSE); - MODBIT(term.mode, set, MODE_MOUSEMANY); + xsetmode(0, MODE_MOUSE); + xsetmode(set, MODE_MOUSEMANY); break; case 1004: /* 1004: send focus events to tty */ - MODBIT(term.mode, set, MODE_FOCUS); + xsetmode(set, MODE_FOCUS); break; case 1006: /* 1006: extended reporting mode */ - MODBIT(term.mode, set, MODE_MOUSESGR); + xsetmode(set, MODE_MOUSESGR); break; case 1034: - MODBIT(term.mode, set, MODE_8BIT); + xsetmode(set, MODE_8BIT); break; case 1049: /* swap screen & set/restore cursor as xterm */ if (!allowaltscreen) @@ -2205,7 +1587,7 @@ tsetmode(int priv, int set, int *args, int narg) tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); break; case 2004: /* 2004: bracketed paste mode */ - MODBIT(term.mode, set, MODE_BRCKTPASTE); + xsetmode(set, MODE_BRCKTPASTE); break; /* Not implemented mouse modes. See comments there. */ case 1001: /* mouse highlight mode; can hang the @@ -2216,6 +1598,7 @@ tsetmode(int priv, int set, int *args, int narg) case 1015: /* urxvt mangled mouse mode; incompatible and can be mistaken for other control codes. */ + break; default: fprintf(stderr, "erresc: unknown private set/reset mode %d\n", @@ -2226,8 +1609,8 @@ tsetmode(int priv, int set, int *args, int narg) switch (*args) { case 0: /* Error (IGNORED) */ break; - case 2: /* KAM -- keyboard action */ - MODBIT(term.mode, set, MODE_KBDLOCK); + case 2: + xsetmode(set, MODE_KBDLOCK); break; case 4: /* IRM -- Insertion-replacement */ MODBIT(term.mode, set, MODE_INSERT); @@ -2295,7 +1678,13 @@ csihandle(void) break; case 'c': /* DA -- Device Attributes */ if (csiescseq.arg[0] == 0) - ttywrite(vtiden, sizeof(vtiden) - 1); + ttywrite(vtiden, strlen(vtiden), 0); + break; + case 'b': /* REP -- if last char is printable print it more times */ + DEFAULT(csiescseq.arg[0], 1); + if (term.lastc) + while (csiescseq.arg[0]-- > 0) + tputc(term.lastc); break; case 'C': /* CUF -- Cursor Forward */ case 'a': /* HPR -- Cursor Forward */ @@ -2342,7 +1731,6 @@ csihandle(void) tputtab(csiescseq.arg[0]); break; case 'J': /* ED -- Clear screen */ - selclear(NULL); switch (csiescseq.arg[0]) { case 0: /* below */ tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); @@ -2421,9 +1809,9 @@ csihandle(void) break; case 'n': /* DSR – Device Status Report (cursor position) */ if (csiescseq.arg[0] == 6) { - len = snprintf(buf, sizeof(buf),"\033[%i;%iR", + len = snprintf(buf, sizeof(buf), "\033[%i;%iR", term.c.y+1, term.c.x+1); - ttywrite(buf, len); + ttywrite(buf, len, 0); } break; case 'r': /* DECSTBM -- Set Scrolling Region */ @@ -2445,11 +1833,8 @@ csihandle(void) case ' ': switch (csiescseq.mode[1]) { case 'q': /* DECSCUSR -- Set Cursor Style */ - DEFAULT(csiescseq.arg[0], 1); - if (!BETWEEN(csiescseq.arg[0], 0, 6)) { + if (xsetcursor(csiescseq.arg[0])) goto unknown; - } - xw.cursor = csiescseq.arg[0]; break; default: goto unknown; @@ -2461,25 +1846,25 @@ csihandle(void) void csidump(void) { - int i; + size_t i; uint c; - printf("ESC["); + fprintf(stderr, "ESC["); for (i = 0; i < csiescseq.len; i++) { c = csiescseq.buf[i] & 0xff; if (isprint(c)) { - putchar(c); + putc(c, stderr); } else if (c == '\n') { - printf("(\\n)"); + fprintf(stderr, "(\\n)"); } else if (c == '\r') { - printf("(\\r)"); + fprintf(stderr, "(\\r)"); } else if (c == 0x1b) { - printf("(\\e)"); + fprintf(stderr, "(\\e)"); } else { - printf("(%02x)", c); + fprintf(stderr, "(%02x)", c); } } - putchar('\n'); + putc('\n', stderr); } void @@ -2491,7 +1876,7 @@ csireset(void) void strhandle(void) { - char *p = NULL; + char *p = NULL, *dec; int j, narg, par; term.esc &= ~(ESC_STR_END|ESC_STR); @@ -2507,6 +1892,17 @@ strhandle(void) if (narg > 1) xsettitle(strescseq.args[1]); return; + case 52: + if (narg > 2 && allowwindowops) { + dec = base64dec(strescseq.args[2]); + if (dec) { + xsetsel(dec); + xclipcopy(); + } else { + fprintf(stderr, "erresc: invalid base64\n"); + } + } + return; case 4: /* color set */ if (narg < 3) break; @@ -2515,7 +1911,10 @@ strhandle(void) case 104: /* color reset, here p = NULL */ j = (narg > 1) ? atoi(strescseq.args[1]) : -1; if (xsetcolorname(j, p)) { - fprintf(stderr, "erresc: invalid color %s\n", p); + if (par == 104 && narg <= 1) + return; /* color reset without parameter */ + fprintf(stderr, "erresc: invalid color j=%d, p=%s\n", + j, p ? p : "(null)"); } else { /* * TODO if defaultbg color is changed, borders @@ -2530,6 +1929,12 @@ strhandle(void) xsettitle(strescseq.args[0]); return; case 'P': /* DCS -- Device Control String */ + /* https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec */ + if (strstr(strescseq.buf, "=1s") == strescseq.buf) + tsync_begin(); /* BSU */ + else if (strstr(strescseq.buf, "=2s") == strescseq.buf) + tsync_end(); /* ESU */ + return; case '_': /* APC -- Application Program Command */ case '^': /* PM -- Privacy Message */ return; @@ -2564,33 +1969,37 @@ strparse(void) void strdump(void) { - int i; + size_t i; uint c; - printf("ESC%c", strescseq.type); + fprintf(stderr, "ESC%c", strescseq.type); for (i = 0; i < strescseq.len; i++) { c = strescseq.buf[i] & 0xff; if (c == '\0') { + putc('\n', stderr); return; } else if (isprint(c)) { - putchar(c); + putc(c, stderr); } else if (c == '\n') { - printf("(\\n)"); + fprintf(stderr, "(\\n)"); } else if (c == '\r') { - printf("(\\r)"); + fprintf(stderr, "(\\r)"); } else if (c == 0x1b) { - printf("(\\e)"); + fprintf(stderr, "(\\e)"); } else { - printf("(%02x)", c); + fprintf(stderr, "(%02x)", c); } } - printf("ESC\\\n"); + fprintf(stderr, "ESC\\\n"); } void strreset(void) { - memset(&strescseq, 0, sizeof(strescseq)); + strescseq = (STREscape){ + .buf = xrealloc(strescseq.buf, STR_BUF_SIZ), + .siz = STR_BUF_SIZ, + }; } void @@ -2604,30 +2013,29 @@ void tprinter(char *s, size_t len) { if (iofd != -1 && xwrite(iofd, s, len) < 0) { - fprintf(stderr, "Error writing in %s:%s\n", - opt_io, strerror(errno)); + perror("Error writing to output file"); close(iofd); iofd = -1; } } -// 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) @@ -2649,7 +2057,7 @@ tdumpline(int n) bp = &term.line[n][0]; end = &bp[MIN(tlinelen(n), term.col) - 1]; if (bp != end || bp->u != ' ') { - for ( ;bp <= end; ++bp) + for ( ; bp <= end; ++bp) tprinter(buf, utf8encode(bp->u, buf)); } tprinter("\n", 1); @@ -2682,19 +2090,12 @@ tputtab(int n) } void -techo(Rune u) +tdefutf8(char ascii) { - if (ISCONTROL(u)) { /* control code */ - if (u & 0x80) { - u &= 0x7f; - tputc('^'); - tputc('['); - } else if (u != '\n' && u != '\r' && u != '\t') { - u ^= 0x40; - tputc('^'); - } - } - tputc(u); + if (ascii == 'G') + term.mode |= MODE_UTF8; + else if (ascii == '@') + term.mode &= ~MODE_UTF8; } void @@ -2770,19 +2171,7 @@ tcontrolcode(uchar ascii) /* backwards compatibility to xterm */ strhandle(); } else { - if (!(xw.state & WIN_FOCUSED)) - xseturgency(1); - if (bellvolume) - XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); - - /* visual bell*/ - if (!bellon) { - bellon = 1; - MODBIT(term.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); - redraw(); - XFlush(xw.dpy); - MODBIT(term.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); - } + xbell(); } break; case '\033': /* ESC */ @@ -2796,6 +2185,7 @@ tcontrolcode(uchar ascii) return; case '\032': /* SUB */ tsetchar('?', &term.c.attr, term.c.x, term.c.y); + /* FALLTHROUGH */ case '\030': /* CAN */ csireset(); break; @@ -2838,7 +2228,7 @@ tcontrolcode(uchar ascii) case 0x99: /* TODO: SGCI */ break; case 0x9a: /* DECID -- Identify Terminal */ - ttywrite(vtiden, sizeof(vtiden) - 1); + ttywrite(vtiden, strlen(vtiden), 0); break; case 0x9b: /* TODO: CSI */ case 0x9c: /* TODO: ST */ @@ -2868,6 +2258,9 @@ eschandle(uchar ascii) case '#': term.esc |= ESC_TEST; return 0; + case '%': + term.esc |= ESC_UTF8; + return 0; case 'P': /* DCS -- Device Control String */ case '_': /* APC -- Application Program Command */ case '^': /* PM -- Privacy Message */ @@ -2907,18 +2300,18 @@ eschandle(uchar ascii) } break; case 'Z': /* DECID -- Identify Terminal */ - ttywrite(vtiden, sizeof(vtiden) - 1); + ttywrite(vtiden, strlen(vtiden), 0); break; - case 'c': /* RIS -- Reset to inital state */ + case 'c': /* RIS -- Reset to initial state */ treset(); - xresettitle(); + resettitle(); xloadcols(); break; case '=': /* DECPAM -- Application keypad */ - term.mode |= MODE_APPKEYPAD; + xsetmode(1, MODE_APPKEYPAD); break; case '>': /* DECPNM -- Normal keypad */ - term.mode &= ~MODE_APPKEYPAD; + xsetmode(0, MODE_APPKEYPAD); break; case '7': /* DECSC -- Save Cursor */ tcursor(CURSOR_SAVE); @@ -2947,10 +2340,13 @@ tputc(Rune u) Glyph *gp; control = ISCONTROL(u); - len = utf8encode(u, c); - if (!control && (width = wcwidth(u)) == -1) { - memcpy(c, "\357\277\275", 4); /* UTF_INVALID */ - width = 1; + if (u < 127 || !IS_SET(MODE_UTF8)) { + c[0] = u; + width = len = 1; + } else { + len = utf8encode(u, c); + if (!control && (width = wcwidth(u)) == -1) + width = 1; } if (IS_SET(MODE_PRINT)) @@ -2967,28 +2363,35 @@ tputc(Rune u) ISCONTROLC1(u)) { term.esc &= ~(ESC_START|ESC_STR); term.esc |= ESC_STR_END; - } else if (strescseq.len + len < sizeof(strescseq.buf) - 1) { - memmove(&strescseq.buf[strescseq.len], c, len); - strescseq.len += len; - return; - } else { - /* - * Here is a bug in terminals. If the user never sends - * some code to stop the str or esc command, then st - * will stop responding. But this is better than - * silently failing with unknown characters. At least - * then users will report back. - * - * In the case users ever get fixed, here is the code: - */ - /* - * term.esc = 0; - * strhandle(); - */ - return; + goto check_control_code; } + + if (strescseq.len+len >= strescseq.siz) { + /* + * Here is a bug in terminals. If the user never sends + * some code to stop the str or esc command, then st + * will stop responding. But this is better than + * silently failing with unknown characters. At least + * then users will report back. + * + * In the case users ever get fixed, here is the code: + */ + /* + * term.esc = 0; + * strhandle(); + */ + if (strescseq.siz > (SIZE_MAX - UTF_SIZ) / 2) + return; + strescseq.siz *= 2; + strescseq.buf = xrealloc(strescseq.buf, strescseq.siz); + } + + memmove(&strescseq.buf[strescseq.len], c, len); + strescseq.len += len; + return; } +check_control_code: /* * Actions of control codes must be performed as soon they arrive * because they can be embedded inside a control sequence, and @@ -2999,6 +2402,8 @@ tputc(Rune u) /* * control codes are not shown ever */ + if (!term.esc) + term.lastc = 0; return; } else if (term.esc & ESC_START) { if (term.esc & ESC_CSI) { @@ -3011,6 +2416,8 @@ tputc(Rune u) csihandle(); } return; + } else if (term.esc & ESC_UTF8) { + tdefutf8(u); } else if (term.esc & ESC_ALTCHARSET) { tdeftran(u); } else if (term.esc & ESC_TEST) { @@ -3027,8 +2434,8 @@ tputc(Rune u) */ return; } - if (sel.ob.x != -1 && BETWEEN(term.c.y, sel.ob.y, sel.oe.y)) - selclear(NULL); + if (selected(term.c.x, term.c.y)) + selclear(); gp = &term.line[term.c.y][term.c.x]; if (IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) { @@ -3046,6 +2453,7 @@ tputc(Rune u) } tsetchar(u, &term.c.attr, term.c.x, term.c.y); + term.lastc = u; if (width == 2) { gp->mode |= ATTR_WIDE; @@ -3061,6 +2469,45 @@ tputc(Rune u) } } +int +twrite(const char *buf, int buflen, int show_ctrl) +{ + int charsize; + Rune u; + int n; + + int su0 = su; + twrite_aborted = 0; + + for (n = 0; n < buflen; n += charsize) { + if (IS_SET(MODE_UTF8)) { + /* process a complete utf8 char */ + charsize = utf8decode(buf + n, &u, buflen - n); + if (charsize == 0) + break; + } else { + u = buf[n] & 0xFF; + charsize = 1; + } + if (su0 && !su) { + twrite_aborted = 1; + break; // ESU - allow rendering before a new BSU + } + if (show_ctrl && ISCONTROL(u)) { + if (u & 0x80) { + u &= 0x7f; + tputc('^'); + tputc('['); + } else if (u != '\n' && u != '\r' && u != '\t') { + u ^= 0x40; + tputc('^'); + } + } + tputc(u); + } + return n; +} + void tresize(int col, int row) { @@ -3095,9 +2542,6 @@ tresize(int col, int row) free(term.alt[i]); } - /* resize to new width */ - term.specbuf = xrealloc(term.specbuf, col * sizeof(XftGlyphFontSpec)); - /* resize to new height */ term.line = xrealloc(term.line, row * sizeof(Line)); term.alt = xrealloc(term.alt, row * sizeof(Line)); @@ -3111,7 +2555,7 @@ tresize(int col, int row) } /* allocate any new rows */ - for (/* i == minrow */; i < row; i++) { + for (/* i = minrow */; i < row; i++) { term.line[i] = xmalloc(col * sizeof(Glyph)); term.alt[i] = xmalloc(col * sizeof(Glyph)); } @@ -3147,902 +2591,49 @@ tresize(int col, int row) } void -xresize(int col, int row) +resettitle(void) { - xw.tw = MAX(1, col * xw.cw); - xw.th = MAX(1, row * xw.ch); - - XFreePixmap(xw.dpy, xw.buf); - xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, - xw.depth); - XftDrawChange(xw.draw, xw.buf); - xclear(0, 0, xw.w, xw.h); -} - -ushort -sixd_to_16bit(int x) -{ - return x == 0 ? 0 : 0x3737 + 0x2828 * x; -} - -const char* getcolorname(int i) -{ - return colorchart[whichcolortable][i]; -// return (usealtcolors) ? altcolorname[i] : colorname[i]; -} - -int -xloadcolor(int i, const char *name, Color *ncolor) -{ - XRenderColor color = { .alpha = 0xffff }; - - if (!name) { - if (BETWEEN(i, 16, 255)) { /* 256 color */ - if (i < 6*6*6+16) { /* same colors as xterm */ - color.red = sixd_to_16bit( ((i-16)/36)%6 ); - color.green = sixd_to_16bit( ((i-16)/6) %6 ); - color.blue = sixd_to_16bit( ((i-16)/1) %6 ); - } else { /* greyscale */ - color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16)); - color.green = color.blue = color.red; - } - return XftColorAllocValue(xw.dpy, xw.vis, - xw.cmap, &color, ncolor); - } else - name = getcolorname(i); - } - - return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor); + xsettitle(NULL); } void -xloadcols(void) +drawregion(int x1, int y1, int x2, int y2) { - int i; - static int loaded; - Color *cp; + int y; - if (loaded) { - for (cp = dc.col; cp < &dc.col[LEN(dc.col)]; ++cp) - XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); - } - - for (i = 0; i < LEN(dc.col); i++) - if (!xloadcolor(i, NULL, &dc.col[i])) { - if (getcolorname(i)) - die("Could not allocate color '%s'\n", getcolorname(i)); - else - die("Could not allocate color %d\n", i); - } - - /* set alpha value of bg color */ - if (USE_ARGB) { - dc.col[defaultbg].color.alpha = (0xffff * alpha) / OPAQUE; //0xcccc; - dc.col[defaultbg].pixel &= 0x00111111; - dc.col[defaultbg].pixel |= alpha << 24; // 0xcc000000; - } - - loaded = 1; -} - -int -xsetcolorname(int x, const char *name) -{ - Color ncolor; - - if (!BETWEEN(x, 0, LEN(dc.col))) - return 1; - - - if (!xloadcolor(x, name, &ncolor)) - return 1; - - XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]); - dc.col[x] = ncolor; - - return 0; -} - -void -xtermclear(int col1, int row1, int col2, int row2) { - XftDrawRect(xw.draw, - &dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg], - borderpx + col1 * xw.cw, - borderpx + row1 * xw.ch, - (col2-col1+1) * xw.cw, - (row2-row1+1) * xw.ch); -} - -/* - * Absolute coordinates. - */ -void -xclear(int x1, int y1, int x2, int y2) -{ - XftDrawRect(xw.draw, - &dc.col[IS_SET(MODE_REVERSE)? defaultfg : defaultbg], - x1, y1, x2-x1, y2-y1); -} - -void -xhints(void) -{ - XClassHint class = {opt_name ? opt_name : termname, - opt_class ? opt_class : termname}; - XWMHints wm = {.flags = InputHint, .input = 1}; - XSizeHints *sizeh = NULL; - - sizeh = XAllocSizeHints(); - - sizeh->flags = PSize | PResizeInc | PBaseSize; - sizeh->height = xw.h; - sizeh->width = xw.w; - sizeh->height_inc = xw.ch; - sizeh->width_inc = xw.cw; - sizeh->base_height = 2 * borderpx; - sizeh->base_width = 2 * borderpx; - if (xw.isfixed) { - sizeh->flags |= PMaxSize | PMinSize; - sizeh->min_width = sizeh->max_width = xw.w; - sizeh->min_height = sizeh->max_height = xw.h; - } - if (xw.gm & (XValue|YValue)) { - sizeh->flags |= USPosition | PWinGravity; - sizeh->x = xw.l; - sizeh->y = xw.t; - sizeh->win_gravity = xgeommasktogravity(xw.gm); - } - - XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm, - &class); - XFree(sizeh); -} - -int -xgeommasktogravity(int mask) -{ - switch (mask & (XNegative|YNegative)) { - case 0: - return NorthWestGravity; - case XNegative: - return NorthEastGravity; - case YNegative: - return SouthWestGravity; - } - - return SouthEastGravity; -} - -int -xloadfont(Font *f, FcPattern *pattern) -{ - FcPattern *match; - FcResult result; - XGlyphInfo extents; - - match = XftFontMatch(xw.dpy, xw.scr, pattern, &result); - if (!match) - return 1; - - if (!(f->match = XftFontOpenPattern(xw.dpy, match))) { - FcPatternDestroy(match); - return 1; - } - - XftTextExtentsUtf8(xw.dpy, f->match, - (const FcChar8 *) ascii_printable, - strlen(ascii_printable), &extents); - - f->set = NULL; - f->pattern = FcPatternDuplicate(pattern); - - f->ascent = f->match->ascent; - f->descent = f->match->descent; - f->lbearing = 0; - f->rbearing = f->match->max_advance_width; - - f->height = f->ascent + f->descent; - f->width = DIVCEIL(extents.xOff, strlen(ascii_printable)); - - return 0; -} - -void -xloadfonts(char *fontstr, double fontsize) -{ - FcPattern *pattern; - double fontval; - float ceilf(float); - - if (fontstr[0] == '-') { - pattern = XftXlfdParse(fontstr, False, False); - } else { - pattern = FcNameParse((FcChar8 *)fontstr); - } - - if (!pattern) - die("st: can't open font %s\n", fontstr); - - if (fontsize > 1) { - FcPatternDel(pattern, FC_PIXEL_SIZE); - FcPatternDel(pattern, FC_SIZE); - FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize); - usedfontsize = fontsize; - } else { - if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) == - FcResultMatch) { - usedfontsize = fontval; - } else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) == - FcResultMatch) { - usedfontsize = -1; - } else { - /* - * Default font size is 12, if none given. This is to - * have a known usedfontsize value. - */ - FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12); - usedfontsize = 12; - } - defaultfontsize = usedfontsize; - } - - if (xloadfont(&dc.font, pattern)) - die("st: can't open font %s\n", fontstr); - - if (usedfontsize < 0) { - FcPatternGetDouble(dc.font.match->pattern, - FC_PIXEL_SIZE, 0, &fontval); - usedfontsize = fontval; - if (fontsize == 0) - defaultfontsize = fontval; - } - - /* Setting character width and height. */ - xw.cw = ceilf(dc.font.width * cwscale); - xw.ch = ceilf(dc.font.height * chscale); - - FcPatternDel(pattern, FC_SLANT); - FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); - if (xloadfont(&dc.ifont, pattern)) - die("st: can't open font %s\n", fontstr); - - FcPatternDel(pattern, FC_WEIGHT); - FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); - if (xloadfont(&dc.ibfont, pattern)) - die("st: can't open font %s\n", fontstr); - - FcPatternDel(pattern, FC_SLANT); - FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN); - if (xloadfont(&dc.bfont, pattern)) - die("st: can't open font %s\n", fontstr); - - FcPatternDestroy(pattern); -} - -void -xunloadfont(Font *f) -{ - XftFontClose(xw.dpy, f->match); - FcPatternDestroy(f->pattern); - if (f->set) - FcFontSetDestroy(f->set); -} - -void -xunloadfonts(void) -{ - /* Free the loaded fonts in the font cache. */ - while (frclen > 0) - XftFontClose(xw.dpy, frc[--frclen].font); - - xunloadfont(&dc.font); - xunloadfont(&dc.bfont); - xunloadfont(&dc.ifont); - xunloadfont(&dc.ibfont); -} - -void -xzoom(const Arg *arg) -{ - Arg larg; - - larg.f = usedfontsize + arg->f; - xzoomabs(&larg); -} - -void -xzoomabs(const Arg *arg) -{ - xunloadfonts(); - xloadfonts(usedfont, arg->f); - cresize(0, 0); - ttyresize(); - redraw(); - xhints(); -} - -void -xzoomreset(const Arg *arg) -{ - Arg larg; - - if (defaultfontsize > 0) { - larg.f = defaultfontsize; - xzoomabs(&larg); - } -} - -void -xinit(void) -{ - XGCValues gcvalues; - Cursor cursor; - Window parent; - pid_t thispid = getpid(); - XColor xmousefg, xmousebg; - - if (!(xw.dpy = XOpenDisplay(NULL))) - die("Can't open display\n"); - xw.scr = XDefaultScreen(xw.dpy); - xw.depth = (USE_ARGB) ? 32: XDefaultDepth(xw.dpy, xw.scr); - if (! USE_ARGB) - xw.vis = XDefaultVisual(xw.dpy, xw.scr); - else { - XVisualInfo *vis; - XRenderPictFormat *fmt; - int nvi; - int i; - - XVisualInfo tpl = { - .screen = xw.scr, - .depth = 32, - .class = TrueColor - }; - - vis = XGetVisualInfo(xw.dpy, VisualScreenMask | VisualDepthMask | VisualClassMask, &tpl, &nvi); - xw.vis = NULL; - for(i = 0; i < nvi; i ++) { - fmt = XRenderFindVisualFormat(xw.dpy, vis[i].visual); - if (fmt->type == PictTypeDirect && fmt->direct.alphaMask) { - xw.vis = vis[i].visual; - break; - } - } - - XFree(vis); - - if (! xw.vis) { - fprintf(stderr, "Couldn't find ARGB visual.\n"); - exit(1); - } - } - - /* font */ - if (!FcInit()) - die("Could not init fontconfig.\n"); - - usedfont = (opt_font == NULL)? font : opt_font; - xloadfonts(usedfont, 0); - - /* colors */ - if (! USE_ARGB) - xw.cmap = XDefaultColormap(xw.dpy, xw.scr); - else - xw.cmap = XCreateColormap(xw.dpy, XRootWindow(xw.dpy, xw.scr), xw.vis, None); - xloadcols(); - - /* adjust fixed window geometry */ - xw.w = 2 * borderpx + term.col * xw.cw; - xw.h = 2 * borderpx + term.row * xw.ch; - if (xw.gm & XNegative) - xw.l += DisplayWidth(xw.dpy, xw.scr) - xw.w - 2; - if (xw.gm & YNegative) - xw.t += DisplayHeight(xw.dpy, xw.scr) - xw.h - 2; - - /* Events */ - xw.attrs.background_pixel = dc.col[defaultbg].pixel; - xw.attrs.border_pixel = dc.col[defaultbg].pixel; - xw.attrs.bit_gravity = NorthWestGravity; - xw.attrs.event_mask = FocusChangeMask | KeyPressMask - | ExposureMask | VisibilityChangeMask | StructureNotifyMask - | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask; - xw.attrs.colormap = xw.cmap; - - if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) - parent = XRootWindow(xw.dpy, xw.scr); - xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, - xw.w, xw.h, 0, xw.depth, InputOutput, - xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity - | CWEventMask | CWColormap, &xw.attrs); - - memset(&gcvalues, 0, sizeof(gcvalues)); - gcvalues.graphics_exposures = False; - xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, xw.depth); - dc.gc = XCreateGC(xw.dpy, - (USE_ARGB)? xw.buf: parent, - GCGraphicsExposures, - &gcvalues); - XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); - XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, xw.w, xw.h); - - /* Xft rendering context */ - xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); - - /* input methods */ - if ((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im=local"); - if ((xw.xim = XOpenIM(xw.dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im="); - if ((xw.xim = XOpenIM(xw.dpy, - NULL, NULL, NULL)) == NULL) { - die("XOpenIM failed. Could not open input" - " device.\n"); - } - } - } - xw.xic = XCreateIC(xw.xim, XNInputStyle, XIMPreeditNothing - | XIMStatusNothing, XNClientWindow, xw.win, - XNFocusWindow, xw.win, NULL); - if (xw.xic == NULL) - die("XCreateIC failed. Could not obtain input method.\n"); - - /* white cursor, black outline */ - cursor = XCreateFontCursor(xw.dpy, mouseshape); - XDefineCursor(xw.dpy, xw.win, cursor); - - if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousefg), &xmousefg) == 0) { - xmousefg.red = 0xffff; - xmousefg.green = 0xffff; - xmousefg.blue = 0xffff; - } - - if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousebg), &xmousebg) == 0) { - xmousebg.red = 0x0000; - xmousebg.green = 0x0000; - xmousebg.blue = 0x0000; - } - - XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg); - - xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); - xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); - xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); - XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); - - xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); - XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32, - PropModeReplace, (uchar *)&thispid, 1); - - xresettitle(); - XMapWindow(xw.dpy, xw.win); - xhints(); - XSync(xw.dpy, False); -} - -int -xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x, int y) -{ - float winx = borderpx + x * xw.cw, winy = borderpx + y * xw.ch, xp, yp; - ushort mode, prevmode = USHRT_MAX; - Font *font = &dc.font; - int frcflags = FRC_NORMAL; - float runewidth = xw.cw; - Rune rune; - FT_UInt glyphidx; - FcResult fcres; - FcPattern *fcpattern, *fontpattern; - FcFontSet *fcsets[] = { NULL }; - FcCharSet *fccharset; - int i, f, numspecs = 0; - - for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) { - /* Fetch rune and mode for current glyph. */ - rune = glyphs[i].u; - mode = glyphs[i].mode; - - /* Skip dummy wide-character spacing. */ - if (mode == ATTR_WDUMMY) + for (y = y1; y < y2; y++) { + if (!term.dirty[y]) continue; - /* Determine font for glyph if different from previous glyph. */ - if (prevmode != mode) { - prevmode = mode; - font = &dc.font; - frcflags = FRC_NORMAL; - runewidth = xw.cw * ((mode & ATTR_WIDE) ? 2.0f : 1.0f); - if ((mode & ATTR_ITALIC) && (mode & ATTR_BOLD)) { - font = &dc.ibfont; - frcflags = FRC_ITALICBOLD; - } else if (mode & ATTR_ITALIC) { - font = &dc.ifont; - frcflags = FRC_ITALIC; - } else if (mode & ATTR_BOLD) { - font = &dc.bfont; - frcflags = FRC_BOLD; - } - yp = winy + font->ascent; - } - - /* Lookup character index with default font. */ - glyphidx = XftCharIndex(xw.dpy, font->match, rune); - if (glyphidx) { - specs[numspecs].font = font->match; - specs[numspecs].glyph = glyphidx; - specs[numspecs].x = (short)xp; - specs[numspecs].y = (short)yp; - xp += runewidth; - numspecs++; - continue; - } - - /* Fallback on font cache, search the font cache for match. */ - for (f = 0; f < frclen; f++) { - glyphidx = XftCharIndex(xw.dpy, frc[f].font, rune); - /* Everything correct. */ - if (glyphidx && frc[f].flags == frcflags) - break; - /* We got a default font for a not found glyph. */ - if (!glyphidx && frc[f].flags == frcflags - && frc[f].unicodep == rune) { - break; - } - } - - /* Nothing was found. Use fontconfig to find matching font. */ - if (f >= frclen) { - if (!font->set) - font->set = FcFontSort(0, font->pattern, - 1, 0, &fcres); - fcsets[0] = font->set; - - /* - * Nothing was found in the cache. Now use - * some dozen of Fontconfig calls to get the - * font for one single character. - * - * Xft and fontconfig are design failures. - */ - fcpattern = FcPatternDuplicate(font->pattern); - fccharset = FcCharSetCreate(); - - FcCharSetAddChar(fccharset, rune); - FcPatternAddCharSet(fcpattern, FC_CHARSET, - fccharset); - FcPatternAddBool(fcpattern, FC_SCALABLE, 1); - - FcConfigSubstitute(0, fcpattern, - FcMatchPattern); - FcDefaultSubstitute(fcpattern); - - fontpattern = FcFontSetMatch(0, fcsets, 1, - fcpattern, &fcres); - - /* - * Overwrite or create the new cache entry. - */ - if (frclen >= LEN(frc)) { - frclen = LEN(frc) - 1; - XftFontClose(xw.dpy, frc[frclen].font); - frc[frclen].unicodep = 0; - } - - frc[frclen].font = XftFontOpenPattern(xw.dpy, - fontpattern); - frc[frclen].flags = frcflags; - frc[frclen].unicodep = rune; - - glyphidx = XftCharIndex(xw.dpy, frc[frclen].font, rune); - - f = frclen; - frclen++; - - FcPatternDestroy(fcpattern); - FcCharSetDestroy(fccharset); - } - - specs[numspecs].font = frc[f].font; - specs[numspecs].glyph = glyphidx; - specs[numspecs].x = (short)xp; - specs[numspecs].y = (short)yp; - xp += runewidth; - numspecs++; + term.dirty[y] = 0; + xdrawline(term.line[y], x1, y, x2); } - - return numspecs; } void -xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y) +draw(void) { - int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1); - int winx = borderpx + x * xw.cw, winy = borderpx + y * xw.ch, - width = charlen * xw.cw; - Color *fg, *bg, *temp, revfg, revbg, truefg, truebg; - XRenderColor colfg, colbg; - XRectangle r; + int cx = term.c.x, ocx = term.ocx, ocy = term.ocy; - /* Determine foreground and background colors based on mode. */ - if (base.fg == defaultfg) { - if (base.mode & ATTR_ITALIC) - base.fg = defaultitalic; - else if ((base.mode & ATTR_ITALIC) && (base.mode & ATTR_BOLD)) - base.fg = defaultitalic; - else if (base.mode & ATTR_UNDERLINE) - base.fg = defaultunderline; - } - - if (IS_TRUECOL(base.fg)) { - colfg.alpha = 0xffff; - colfg.red = TRUERED(base.fg); - colfg.green = TRUEGREEN(base.fg); - colfg.blue = TRUEBLUE(base.fg); - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &truefg); - fg = &truefg; - } else { - fg = &dc.col[base.fg]; - } - - if (IS_TRUECOL(base.bg)) { - colbg.alpha = 0xffff; - colbg.green = TRUEGREEN(base.bg); - colbg.red = TRUERED(base.bg); - colbg.blue = TRUEBLUE(base.bg); - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &truebg); - bg = &truebg; - } else { - bg = &dc.col[base.bg]; - } - - /* Change basic system colors [0-7] to bright system colors [8-15] */ - if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7)) - fg = &dc.col[base.fg]; - - if (IS_SET(MODE_REVERSE)) { - if (fg == &dc.col[defaultfg]) { - fg = &dc.col[defaultbg]; - } else { - colfg.red = ~fg->color.red; - colfg.green = ~fg->color.green; - colfg.blue = ~fg->color.blue; - colfg.alpha = fg->color.alpha; - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, - &revfg); - fg = &revfg; - } - - if (bg == &dc.col[defaultbg]) { - bg = &dc.col[defaultfg]; - } else { - colbg.red = ~bg->color.red; - colbg.green = ~bg->color.green; - colbg.blue = ~bg->color.blue; - colbg.alpha = bg->color.alpha; - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, - &revbg); - bg = &revbg; - } - } - - if (base.mode & ATTR_REVERSE) { - temp = fg; - fg = bg; - bg = temp; - } - - if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) { - colfg.red = fg->color.red / 2; - colfg.green = fg->color.green / 2; - colfg.blue = fg->color.blue / 2; - XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg); - fg = &revfg; - } - - if (base.mode & ATTR_BLINK && term.mode & MODE_BLINK) - fg = bg; - - if (base.mode & ATTR_INVISIBLE) - fg = bg; - - /* Intelligent cleaning up of the borders. */ - if (x == 0) { - xclear(0, (y == 0)? 0 : winy, borderpx, - winy + xw.ch + ((y >= term.row-1)? xw.h : 0)); - } - if (x + charlen >= term.col) { - xclear(winx + width, (y == 0)? 0 : winy, xw.w, - ((y >= term.row-1)? xw.h : (winy + xw.ch))); - } - if (y == 0) - xclear(winx, 0, winx + width, borderpx); - if (y == term.row-1) - xclear(winx, winy + xw.ch, winx + width, xw.h); - - /* Clean up the region we want to draw to. */ - XftDrawRect(xw.draw, bg, winx, winy, width, xw.ch); - - /* Set the clip region because Xft is sometimes dirty. */ - r.x = 0; - r.y = 0; - r.height = xw.ch; - r.width = width; - XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); - - /* Render the glyphs. */ - XftDrawGlyphFontSpec(xw.draw, fg, specs, len); - - /* Render underline and strikethrough. */ - if (base.mode & ATTR_UNDERLINE) { - XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, - width, 1); - } - - if (base.mode & ATTR_STRUCK) { - XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3, - width, 1); - } - - /* Reset clip to none. */ - XftDrawSetClip(xw.draw, 0); -} - -void -xdrawglyph(Glyph g, int x, int y) -{ - int numspecs; - XftGlyphFontSpec spec; - - numspecs = xmakeglyphfontspecs(&spec, &g, 1, x, y); - xdrawglyphfontspecs(&spec, g, numspecs, x, y); -} - -void -xdrawcursor(void) -{ - static int oldx = 0, oldy = 0; - int curx; - Glyph g = {' ', ATTR_NULL, defaultbg, defaultcs}, og; - int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); - Color drawcol; - - LIMIT(oldx, 0, term.col-1); - LIMIT(oldy, 0, term.row-1); - - curx = term.c.x; - - /* adjust position if in dummy */ - if (term.line[oldy][oldx].mode & ATTR_WDUMMY) - oldx--; - if (term.line[term.c.y][curx].mode & ATTR_WDUMMY) - curx--; - - /* remove the old cursor */ - og = term.line[oldy][oldx]; - if (ena_sel && selected(oldx, oldy)) - og.mode ^= ATTR_REVERSE; - xdrawglyph(og, oldx, oldy); - - g.u = term.line[term.c.y][term.c.x].u; - - /* - * Select the right color for the right mode. - */ - if (IS_SET(MODE_REVERSE)) { - g.mode |= ATTR_REVERSE; - g.bg = defaultfg; - if (ena_sel && selected(term.c.x, term.c.y)) { - drawcol = dc.col[defaultcs]; - g.fg = defaultrcs; - } else { - drawcol = dc.col[defaultrcs]; - g.fg = defaultcs; - } - } else { - if (ena_sel && selected(term.c.x, term.c.y)) { - drawcol = dc.col[defaultrcs]; - g.fg = defaultfg; - g.bg = defaultrcs; - } else { - drawcol = dc.col[defaultcs]; - } - } - - if (IS_SET(MODE_HIDE)) + if (!xstartdraw()) return; - /* draw the new one */ - if (xw.state & WIN_FOCUSED) { - switch (xw.cursor) { - /* truck extensions - don't work - case 8: - utf8decode("䷀", &g.u, UTF_SIZ); - case 9: - utf8decode("䷬", &g.u, UTF_SIZ); - case 10: - utf8decode("䷑", &g.u, UTF_SIZ); - case 11: - utf8decode("䷼", &g.u, UTF_SIZ); - case 12: - utf8decode("░", &g.u, UTF_SIZ); - case 13: - utf8decode("▒", &g.u, UTF_SIZ); - case 14: - utf8decode("▓", &g.u, UTF_SIZ); - case 15: - utf8decode("▣", &g.u, UTF_SIZ); */ - case 7: /* st extension: snowman */ - utf8decode("▒", &g.u, UTF_SIZ); - // utf8decode("☃", &g.u, UTF_SIZ); - case 0: /* Blinking Block */ - case 1: /* Blinking Block (Default) */ - case 2: /* Steady Block */ - g.mode |= term.line[term.c.y][curx].mode & ATTR_WIDE; - xdrawglyph(g, term.c.x, term.c.y); - break; - case 3: /* Blinking Underline */ - case 4: /* Steady Underline */ - XftDrawRect(xw.draw, &drawcol, - borderpx + curx * xw.cw, - borderpx + (term.c.y + 1) * xw.ch - \ - cursorthickness, - xw.cw, cursorthickness); - break; - case 5: /* Blinking bar */ - case 6: /* Steady bar */ - XftDrawRect(xw.draw, &drawcol, - borderpx + curx * xw.cw, - borderpx + term.c.y * xw.ch, - cursorthickness, xw.ch); - break; - } - } else { - XftDrawRect(xw.draw, &drawcol, - borderpx + curx * xw.cw, - borderpx + term.c.y * xw.ch, - xw.cw - 1, 1); - XftDrawRect(xw.draw, &drawcol, - borderpx + curx * xw.cw, - borderpx + term.c.y * xw.ch, - 1, xw.ch - 1); - XftDrawRect(xw.draw, &drawcol, - borderpx + (curx + 1) * xw.cw - 1, - borderpx + term.c.y * xw.ch, - 1, xw.ch - 1); - XftDrawRect(xw.draw, &drawcol, - borderpx + curx * xw.cw, - borderpx + (term.c.y + 1) * xw.ch - 1, - xw.cw, 1); - } - oldx = curx, oldy = term.c.y; -} + /* adjust cursor position */ + LIMIT(term.ocx, 0, term.col-1); + LIMIT(term.ocy, 0, term.row-1); + if (term.line[term.ocy][term.ocx].mode & ATTR_WDUMMY) + term.ocx--; + if (term.line[term.c.y][cx].mode & ATTR_WDUMMY) + cx--; - -void -xsettitle(char *p) -{ - XTextProperty prop; - - Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, - &prop); - XSetWMName(xw.dpy, xw.win, &prop); - XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname); - XFree(prop.value); -} - -void -xresettitle(void) -{ - xsettitle(opt_title ? opt_title : "st"); -} - -void xcolor2title(void){ - char *cs; - size_t lencs; - - lencs = (size_t)snprintf(NULL,0,"new color %d",whichcolortable); - cs = malloc(lencs); - sprintf(cs,"colorscheme %s",schemenames[whichcolortable]); - xsettitle(cs); - free(cs); + drawregion(0, 0, term.col, term.row); + xdrawcursor(cx, term.c.y, term.line[term.c.y][cx], + term.ocx, term.ocy, term.line[term.ocy][term.ocx]); + term.ocx = cx; + term.ocy = term.c.y; + xfinishdraw(); + if (ocx != term.ocx || ocy != term.ocy) + xximspot(term.ocx, term.ocy); } void @@ -4051,477 +2642,3 @@ redraw(void) tfulldirt(); draw(); } - -void -draw(void) -{ - drawregion(0, 0, term.col, term.row); - XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, xw.w, - xw.h, 0, 0); - XSetForeground(xw.dpy, dc.gc, - dc.col[IS_SET(MODE_REVERSE)? - defaultfg : defaultbg].pixel); -} - -void -drawregion(int x1, int y1, int x2, int y2) -{ - int i, x, y, ox, numspecs; - Glyph base, new; - XftGlyphFontSpec *specs; - int ena_sel = sel.ob.x != -1 && sel.alt == IS_SET(MODE_ALTSCREEN); - - if (!(xw.state & WIN_VISIBLE)) - return; - - for (y = y1; y < y2; y++) { - if (!term.dirty[y]) - continue; - - term.dirty[y] = 0; - - specs = term.specbuf; - numspecs = xmakeglyphfontspecs(specs, &term.line[y][x1], x2 - x1, x1, y); - - i = ox = 0; - for (x = x1; x < x2 && i < numspecs; x++) { - new = term.line[y][x]; - if (new.mode == ATTR_WDUMMY) - continue; - if (ena_sel && selected(x, y)) - new.mode ^= ATTR_REVERSE; - if (i > 0 && ATTRCMP(base, new)) { - xdrawglyphfontspecs(specs, base, i, ox, y); - specs += i; - numspecs -= i; - i = 0; - } - if (i == 0) { - ox = x; - base = new; - } - i++; - } - if (i > 0) - xdrawglyphfontspecs(specs, base, i, ox, y); - } - xdrawcursor(); -} - -void -expose(XEvent *ev) -{ - redraw(); -} - -void -visibility(XEvent *ev) -{ - XVisibilityEvent *e = &ev->xvisibility; - - MODBIT(xw.state, e->state != VisibilityFullyObscured, WIN_VISIBLE); -} - -void -unmap(XEvent *ev) -{ - xw.state &= ~WIN_VISIBLE; -} - -void -xsetpointermotion(int set) -{ - MODBIT(xw.attrs.event_mask, set, PointerMotionMask); - XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); -} - -void -xseturgency(int add) -{ - XWMHints *h = XGetWMHints(xw.dpy, xw.win); - - MODBIT(h->flags, add, XUrgencyHint); - XSetWMHints(xw.dpy, xw.win, h); - XFree(h); -} - -void -focus(XEvent *ev) -{ - XFocusChangeEvent *e = &ev->xfocus; - - if (e->mode == NotifyGrab) - return; - - if (ev->type == FocusIn) { - XSetICFocus(xw.xic); - xw.state |= WIN_FOCUSED; - xseturgency(0); - if (IS_SET(MODE_FOCUS)) - ttywrite("\033[I", 3); - } else { - XUnsetICFocus(xw.xic); - xw.state &= ~WIN_FOCUSED; - if (IS_SET(MODE_FOCUS)) - ttywrite("\033[O", 3); - } -} - -int -match(uint mask, uint state) -{ - return mask == XK_ANY_MOD || mask == (state & ~ignoremod); -} - -void -numlock(const Arg *dummy) -{ - term.numlock ^= 1; -} - -void -swapcolors(const Arg *dummy) -{ - usealtcolors = !usealtcolors; - whichcolortable = whichcolortable +1; - if ( whichcolortable >= sizeof(colorchart)/sizeof(colorchart[0]) ) { - whichcolortable = 0; - } - xcolor2title(); - xloadcols(); - redraw(); -} - -char* -kmap(KeySym k, uint state) -{ - Key *kp; - int i; - - /* Check for mapped keys out of X11 function keys. */ - for (i = 0; i < LEN(mappedkeys); i++) { - if (mappedkeys[i] == k) - break; - } - if (i == LEN(mappedkeys)) { - if ((k & 0xFFFF) < 0xFD00) - return NULL; - } - - for (kp = key; kp < key + LEN(key); kp++) { - if (kp->k != k) - continue; - - if (!match(kp->mask, state)) - continue; - - if (IS_SET(MODE_APPKEYPAD) ? kp->appkey < 0 : kp->appkey > 0) - continue; - if (term.numlock && kp->appkey == 2) - continue; - - if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0) - continue; - - if (IS_SET(MODE_CRLF) ? kp->crlf < 0 : kp->crlf > 0) - continue; - - return kp->s; - } - - return NULL; -} - -void -kpress(XEvent *ev) -{ - XKeyEvent *e = &ev->xkey; - KeySym ksym; - char buf[32], *customkey; - int len; - Rune c; - Status status; - Shortcut *bp; - - if (IS_SET(MODE_KBDLOCK)) - return; - - len = XmbLookupString(xw.xic, e, buf, sizeof buf, &ksym, &status); - /* 1. shortcuts */ - for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { - if (ksym == bp->keysym && match(bp->mod, e->state)) { - bp->func(&(bp->arg)); - return; - } - } - - /* 2. custom keys from config.h */ - if ((customkey = kmap(ksym, e->state))) { - ttysend(customkey, strlen(customkey)); - return; - } - - /* 3. composed string from input method */ - if (len == 0) - return; - if (len == 1 && e->state & Mod1Mask) { - if (IS_SET(MODE_8BIT)) { - if (*buf < 0177) { - c = *buf | 0x80; - len = utf8encode(c, buf); - } - } else { - buf[1] = buf[0]; - buf[0] = '\033'; - len = 2; - } - } - ttysend(buf, len); -} - - -void -cmessage(XEvent *e) -{ - /* - * See xembed specs - * http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html - */ - if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) { - if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) { - xw.state |= WIN_FOCUSED; - xseturgency(0); - } else if (e->xclient.data.l[1] == XEMBED_FOCUS_OUT) { - xw.state &= ~WIN_FOCUSED; - } - } else if (e->xclient.data.l[0] == xw.wmdeletewin) { - /* Send SIGHUP to shell */ - kill(pid, SIGHUP); - exit(0); - } -} - -void -cresize(int width, int height) -{ - int col, row; - - if (width != 0) - xw.w = width; - if (height != 0) - xw.h = height; - - col = (xw.w - 2 * borderpx) / xw.cw; - row = (xw.h - 2 * borderpx) / xw.ch; - - tresize(col, row); - xresize(col, row); -} - -void -resize(XEvent *e) -{ - if (e->xconfigure.width == xw.w && e->xconfigure.height == xw.h) - return; - - cresize(e->xconfigure.width, e->xconfigure.height); - ttyresize(); -} - -void -run(void) -{ - XEvent ev; - int w = xw.w, h = xw.h; - fd_set rfd; - int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0; - struct timespec drawtimeout, *tv = NULL, now, last, lastblink; - long deltatime; - - /* Waiting for window mapping */ - do { - XNextEvent(xw.dpy, &ev); - /* - * This XFilterEvent call is required because of XOpenIM. It - * does filter out the key event and some client message for - * the input method too. - */ - if (XFilterEvent(&ev, None)) - continue; - if (ev.type == ConfigureNotify) { - w = ev.xconfigure.width; - h = ev.xconfigure.height; - } - } while (ev.type != MapNotify); - - cresize(w, h); - ttynew(); - ttyresize(); - - clock_gettime(CLOCK_MONOTONIC, &last); - lastblink = last; - - for (xev = actionfps;;) { - FD_ZERO(&rfd); - FD_SET(cmdfd, &rfd); - FD_SET(xfd, &rfd); - - if (pselect(MAX(xfd, cmdfd)+1, &rfd, NULL, NULL, tv, NULL) < 0) { - if (errno == EINTR) - continue; - die("select failed: %s\n", strerror(errno)); - } - if (FD_ISSET(cmdfd, &rfd)) { - ttyread(); - if (blinktimeout) { - blinkset = tattrset(ATTR_BLINK); - if (!blinkset) - MODBIT(term.mode, 0, MODE_BLINK); - } - } - - if (FD_ISSET(xfd, &rfd)) - xev = actionfps; - - clock_gettime(CLOCK_MONOTONIC, &now); - drawtimeout.tv_sec = 0; - drawtimeout.tv_nsec = (1000 * 1E6)/ xfps; - tv = &drawtimeout; - - dodraw = 0; - if (blinktimeout && TIMEDIFF(now, lastblink) > blinktimeout) { - tsetdirtattr(ATTR_BLINK); - term.mode ^= MODE_BLINK; - lastblink = now; - dodraw = 1; - } - deltatime = TIMEDIFF(now, last); - if (deltatime > 1000 / (xev ? xfps : actionfps)) { - dodraw = 1; - last = now; - } - - if (dodraw) { - while (XPending(xw.dpy)) { - XNextEvent(xw.dpy, &ev); - if (XFilterEvent(&ev, None)) - continue; - if (handler[ev.type]) - (handler[ev.type])(&ev); - } - - if (bellon) { - bellon = 0; - redraw(); - } - else draw(); - - XFlush(xw.dpy); - - if (xev && !FD_ISSET(xfd, &rfd)) - xev--; - if (!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { - if (blinkset) { - if (TIMEDIFF(now, lastblink) \ - > blinktimeout) { - drawtimeout.tv_nsec = 1000; - } else { - drawtimeout.tv_nsec = (1E6 * \ - (blinktimeout - \ - TIMEDIFF(now, - lastblink))); - } - drawtimeout.tv_sec = \ - drawtimeout.tv_nsec / 1E9; - drawtimeout.tv_nsec %= (long)1E9; - } else { - tv = NULL; - } - } - } - } -} - -void -usage(void) -{ - die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid]" - " [[-e] command [args ...]]\n" - " %s [-aiv] [-c class] [-f font] [-g geometry]" - " [-n name] [-o file]\n" - " [-T title] [-t title] [-w windowid] -l line" - " [stty_args ...]\n", argv0, argv0); -} - -int -main(int argc, char *argv[]) -{ - uint cols = 80, rows = 24; - - xw.l = xw.t = 0; - xw.isfixed = False; - xw.cursor = cursorshape; - - ARGBEGIN { - case 'a': - allowaltscreen = 0; - break; - case 'c': - opt_class = EARGF(usage()); - break; - case 'e': - if (argc > 0) - --argc, ++argv; - goto run; - case 'f': - opt_font = EARGF(usage()); - break; - case 'g': - xw.gm = XParseGeometry(EARGF(usage()), - &xw.l, &xw.t, &cols, &rows); - break; - case 'i': - xw.isfixed = 1; - break; - case 'o': - opt_io = EARGF(usage()); - break; - case 'l': - opt_line = EARGF(usage()); - break; - case 'n': - opt_name = EARGF(usage()); - break; - case 't': - case 'T': - opt_title = EARGF(usage()); - break; - case 'w': - opt_embed = EARGF(usage()); - break; - case 'v': - die("%s " VERSION " (c) 2010-2016 st engineers\n", argv0); - break; - default: - usage(); - } ARGEND; - -run: - if (argc > 0) { - /* eat all remaining arguments */ - opt_cmd = argv; - if (!opt_title && !opt_line) - opt_title = basename(xstrdup(argv[0])); - } - setlocale(LC_CTYPE, ""); - XSetLocaleModifiers(""); - tnew(MAX(cols, 1), MAX(rows, 1)); - xinit(); - selinit(); - run(); - - return 0; -} - diff --git a/st.h b/st.h new file mode 100644 index 0000000..bca2cb5 --- /dev/null +++ b/st.h @@ -0,0 +1,136 @@ +/* See LICENSE for license details. */ + +#include +#include + +/* macros */ +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#define LEN(a) (sizeof(a) / sizeof(a)[0]) +#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) +#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) +#define DEFAULT(a, b) (a) = (a) ? (a) : (b) +#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) +#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ + (a).bg != (b).bg) +#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \ + (t1.tv_nsec-t2.tv_nsec)/1E6) +#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) + +#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) +#define IS_TRUECOL(x) (1 << 24 & (x)) + +enum glyph_attribute { + ATTR_NULL = 0, + ATTR_BOLD = 1 << 0, + ATTR_FAINT = 1 << 1, + ATTR_ITALIC = 1 << 2, + ATTR_UNDERLINE = 1 << 3, + ATTR_BLINK = 1 << 4, + ATTR_REVERSE = 1 << 5, + ATTR_INVISIBLE = 1 << 6, + ATTR_STRUCK = 1 << 7, + ATTR_WRAP = 1 << 8, + ATTR_WIDE = 1 << 9, + ATTR_WDUMMY = 1 << 10, + ATTR_BOXDRAW = 1 << 11, + ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, +}; + +enum selection_mode { + SEL_IDLE = 0, + SEL_EMPTY = 1, + SEL_READY = 2 +}; + +enum selection_type { + SEL_REGULAR = 1, + SEL_RECTANGULAR = 2 +}; + +enum selection_snap { + SNAP_WORD = 1, + SNAP_LINE = 2 +}; + +typedef unsigned char uchar; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned short ushort; + +typedef uint_least32_t Rune; + +#define Glyph Glyph_ +typedef struct { + Rune u; /* character code */ + ushort mode; /* attribute flags */ + uint32_t fg; /* foreground */ + uint32_t bg; /* background */ +} Glyph; + +typedef Glyph *Line; + +typedef union { + int i; + uint ui; + float f; + const void *v; + const char *s; +} Arg; + +void die(const char *, ...); +void redraw(void); +void draw(void); + +void printscreen(const Arg *); +void printsel(const Arg *); +void sendbreak(const Arg *); +void toggleprinter(const Arg *); + +int tattrset(int); +void tnew(int, int); +void tresize(int, int); +void tsetdirtattr(int); +void ttyhangup(void); +int ttynew(char *, char *, char *, char **); +size_t ttyread(void); +void ttyresize(int, int); +void ttywrite(const char *, size_t, int); + +void resettitle(void); + +void selclear(void); +void selinit(void); +void selstart(int, int, int); +void selextend(int, int, int, int); +int selected(int, int); +char *getsel(void); + +size_t utf8encode(Rune, char *); + +void *xmalloc(size_t); +void *xrealloc(void *, size_t); +char *xstrdup(char *); + +int isboxdraw(Rune); +ushort boxdrawindex(const Glyph *); +#ifdef XFT_VERSION +/* only exposed to x.c, otherwise we'll need Xft.h for the types */ +void boxdraw_xinit(Display *, Colormap, XftDraw *, Visual *); +void drawboxes(int, int, int, int, XftColor *, XftColor *, const XftGlyphFontSpec *, int); +#endif + +/* config.h globals */ +extern char *utmp; +extern char *scroll; +extern char *stty_args; +extern char *vtiden; +extern wchar_t *worddelimiters; +extern int allowaltscreen; +extern int allowwindowops; +extern char *termname; +extern unsigned int tabspaces; +extern unsigned int defaultfg; +extern unsigned int defaultbg; +extern const int boxdraw, boxdraw_bold, boxdraw_braille; +extern float alpha; diff --git a/st.info b/st.info index d979946..b32b446 100644 --- a/st.info +++ b/st.info @@ -1,4 +1,4 @@ -st| simpleterm, +st-mono| simpleterm monocolor, acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, am, bce, @@ -10,7 +10,7 @@ st| simpleterm, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, - colors#8, + colors#2, cols#80, cr=^M, csr=\E[%i%p1%d;%p2%dr, @@ -25,6 +25,7 @@ st| simpleterm, cuu=\E[%p1%dA, dch=\E[%p1%dP, dch1=\E[P, + dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, @@ -53,7 +54,7 @@ st| simpleterm, ka3=\E[5~, kc1=\E[4~, kc3=\E[6~, - kbs=\010, + kbs=\177, kcbt=\E[Z, kb2=\EOu, kcub1=\EOD, @@ -73,7 +74,7 @@ st| simpleterm, kri=\E[1;2A, kclr=\E[3;5~, kdl1=\E[3;2~, - kdch1=\177~, + kdch1=\E[3~, kich1=\E[2~, kend=\E[4~, kf1=\EOP, @@ -142,14 +143,12 @@ st| simpleterm, khome=\E[1~, kil1=\E[2;5~, krmir=\E[2;2~, - kich1=\E[2~, knp=\E[6~, kmous=\E[M, kpp=\E[5~, lines#24, mir, msgr, - ncv#3, npc, op=\E[39;49m, pairs#64, @@ -159,6 +158,7 @@ st| simpleterm, rc=\E8, rev=\E[7m, ri=\EM, + rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmcup=\E[?1049l, @@ -169,13 +169,8 @@ st| simpleterm, rs1=\Ec, rs2=\E[4l\E>\E[?1034l, sc=\E7, - setab=\E[4%p1%dm, - setaf=\E[3%p1%dm, - setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, - setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, - sgr0=\E[0m, - sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, sitm=\E[3m, + sgr0=\E[0m, smacs=\E(0, smcup=\E[?1049h, smir=\E[4h, @@ -186,13 +181,35 @@ st| simpleterm, tsl=\E]0;, xenl, vpa=\E[%i%p1%dd, +# XTerm extensions + rmxx=\E[29m, + smxx=\E[9m, +# disabled rep for now: causes some issues with older ncurses versions. +# rep=%p1%c\E[%p2%{1}%-%db, +# tmux extensions, see TERMINFO EXTENSIONS in tmux(1) + Tc, + Ms=\E]52;%p1%s;%p2%s\007, + Se=\E[2 q, + Ss=\E[%p1%d q, + Sync=\EP=%p1%ds\E\\, +st| simpleterm, + use=st-mono, + colors#8, + setab=\E[4%p1%dm, + setaf=\E[3%p1%dm, + setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, st-256color| simpleterm with 256 colors, use=st, + ccc, colors#256, + oc=\E]104\007, pairs#32767, # Nicked from xterm-256color + initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, @@ -211,3 +228,13 @@ st-meta-256color| simpleterm with meta key and 256 colors, smm=\E[?1034h, rs2=\E[4l\E>\E[?1034h, is2=\E[4l\E>\E[?1034h, + +st-bs| simpleterm with backspace as backspace, + use=st, + kbs=\010, + kdch1=\177, + +st-bs-256color| simpleterm with backspace as backspace and 256colors, + use=st-256color, + kbs=\010, + kdch1=\177, diff --git a/win.h b/win.h new file mode 100644 index 0000000..a6ef1b9 --- /dev/null +++ b/win.h @@ -0,0 +1,39 @@ +/* See LICENSE for license details. */ + +enum win_mode { + MODE_VISIBLE = 1 << 0, + MODE_FOCUSED = 1 << 1, + MODE_APPKEYPAD = 1 << 2, + MODE_MOUSEBTN = 1 << 3, + MODE_MOUSEMOTION = 1 << 4, + MODE_REVERSE = 1 << 5, + MODE_KBDLOCK = 1 << 6, + MODE_HIDE = 1 << 7, + MODE_APPCURSOR = 1 << 8, + MODE_MOUSESGR = 1 << 9, + MODE_8BIT = 1 << 10, + MODE_BLINK = 1 << 11, + MODE_FBLINK = 1 << 12, + MODE_FOCUS = 1 << 13, + MODE_MOUSEX10 = 1 << 14, + MODE_MOUSEMANY = 1 << 15, + MODE_BRCKTPASTE = 1 << 16, + MODE_NUMLOCK = 1 << 17, + MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ + |MODE_MOUSEMANY, +}; + +void xbell(void); +void xclipcopy(void); +void xdrawcursor(int, int, Glyph, int, int, Glyph); +void xdrawline(Line, int, int, int); +void xfinishdraw(void); +void xloadcols(void); +int xsetcolorname(int, const char *); +void xsettitle(char *); +int xsetcursor(int); +void xsetmode(int, unsigned int); +void xsetpointermotion(int); +void xsetsel(char *); +int xstartdraw(void); +void xximspot(int, int); diff --git a/x.c b/x.c new file mode 100644 index 0000000..4599b00 --- /dev/null +++ b/x.c @@ -0,0 +1,2113 @@ +/* See LICENSE for license details. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +char *argv0; +#include "arg.h" +#include "st.h" +#include "win.h" + +/* types used in config.h */ +typedef struct { + uint mod; + KeySym keysym; + void (*func)(const Arg *); + const Arg arg; +} Shortcut; + +typedef struct { + uint mod; + uint button; + void (*func)(const Arg *); + const Arg arg; + uint release; +} MouseShortcut; + +typedef struct { + KeySym k; + uint mask; + char *s; + /* three-valued logic variables: 0 indifferent, 1 on, -1 off */ + signed char appkey; /* application keypad */ + signed char appcursor; /* application cursor */ +} Key; + +/* X modifiers */ +#define XK_ANY_MOD UINT_MAX +#define XK_NO_MOD 0 +#define XK_SWITCH_MOD (1<<13) + +/* function definitions used in config.h */ +static void clipcopy(const Arg *); +static void clippaste(const Arg *); +static void numlock(const Arg *); +static void selpaste(const Arg *); +static void zoom(const Arg *); +static void zoomabs(const Arg *); +static void zoomreset(const Arg *); +static void ttysend(const Arg *); + +/* config.h for applying patches and the configuration. */ +#include "config.h" + +/* XEMBED messages */ +#define XEMBED_FOCUS_IN 4 +#define XEMBED_FOCUS_OUT 5 + +/* macros */ +#define IS_SET(flag) ((win.mode & (flag)) != 0) +#define TRUERED(x) (((x) & 0xff0000) >> 8) +#define TRUEGREEN(x) (((x) & 0xff00)) +#define TRUEBLUE(x) (((x) & 0xff) << 8) + +typedef XftDraw *Draw; +typedef XftColor Color; +typedef XftGlyphFontSpec GlyphFontSpec; + +/* Purely graphic info */ +typedef struct { + int tw, th; /* tty width and height */ + int w, h; /* window width and height */ + int ch; /* char height */ + int cw; /* char width */ + int mode; /* window state/mode flags */ + int cursor; /* cursor style */ +} TermWindow; + +typedef struct { + Display *dpy; + Colormap cmap; + Window win; + Drawable buf; + GlyphFontSpec *specbuf; /* font spec buffer used for rendering */ + Atom xembed, wmdeletewin, netwmname, netwmpid; + struct { + XIM xim; + XIC xic; + XPoint spot; + XVaNestedList spotlist; + } ime; + Draw draw; + Visual *vis; + XSetWindowAttributes attrs; + int scr; + int isfixed; /* is fixed geometry? */ + int depth; /* bit depth */ + int l, t; /* left and top offset */ + int gm; /* geometry mask */ +} XWindow; + +typedef struct { + Atom xtarget; + char *primary, *clipboard; + struct timespec tclick1; + struct timespec tclick2; +} XSelection; + +/* Font structure */ +#define Font Font_ +typedef struct { + int height; + int width; + int ascent; + int descent; + int badslant; + int badweight; + short lbearing; + short rbearing; + XftFont *match; + FcFontSet *set; + FcPattern *pattern; +} Font; + +/* Drawing Context */ +typedef struct { + Color *col; + size_t collen; + Font font, bfont, ifont, ibfont; + GC gc; +} DC; + +static inline ushort sixd_to_16bit(int); +static int xmakeglyphfontspecs(XftGlyphFontSpec *, const Glyph *, int, int, int); +static void xdrawglyphfontspecs(const XftGlyphFontSpec *, Glyph, int, int, int); +static void xdrawglyph(Glyph, int, int); +static void xclear(int, int, int, int); +static int xgeommasktogravity(int); +static int ximopen(Display *); +static void ximinstantiate(Display *, XPointer, XPointer); +static void ximdestroy(XIM, XPointer, XPointer); +static int xicdestroy(XIC, XPointer, XPointer); +static void xinit(int, int); +static void cresize(int, int); +static void xresize(int, int); +static void xhints(void); +static int xloadcolor(int, const char *, Color *); +static int xloadfont(Font *, FcPattern *); +static void xloadfonts(char *, double); +static void xunloadfont(Font *); +static void xunloadfonts(void); +static void xsetenv(void); +static void xseturgency(int); +static int evcol(XEvent *); +static int evrow(XEvent *); + +static void expose(XEvent *); +static void visibility(XEvent *); +static void unmap(XEvent *); +static void kpress(XEvent *); +static void cmessage(XEvent *); +static void resize(XEvent *); +static void focus(XEvent *); +static uint buttonmask(uint); +static int mouseaction(XEvent *, uint); +static void brelease(XEvent *); +static void bpress(XEvent *); +static void bmotion(XEvent *); +static void propnotify(XEvent *); +static void selnotify(XEvent *); +static void selclear_(XEvent *); +static void selrequest(XEvent *); +static void setsel(char *, Time); +static void mousesel(XEvent *, int); +static void mousereport(XEvent *); +static char *kmap(KeySym, uint); +static int match(uint, uint); + +static void run(void); +static void usage(void); + +static void (*handler[LASTEvent])(XEvent *) = { + [KeyPress] = kpress, + [ClientMessage] = cmessage, + [ConfigureNotify] = resize, + [VisibilityNotify] = visibility, + [UnmapNotify] = unmap, + [Expose] = expose, + [FocusIn] = focus, + [FocusOut] = focus, + [MotionNotify] = bmotion, + [ButtonPress] = bpress, + [ButtonRelease] = brelease, +/* + * Uncomment if you want the selection to disappear when you select something + * different in another window. + */ +/* [SelectionClear] = selclear_, */ + [SelectionNotify] = selnotify, +/* + * PropertyNotify is only turned on when there is some INCR transfer happening + * for the selection retrieval. + */ + [PropertyNotify] = propnotify, + [SelectionRequest] = selrequest, +}; + +/* Globals */ +static DC dc; +static XWindow xw; +static XSelection xsel; +static TermWindow win; + +/* Font Ring Cache */ +enum { + FRC_NORMAL, + FRC_ITALIC, + FRC_BOLD, + FRC_ITALICBOLD +}; + +typedef struct { + XftFont *font; + int flags; + Rune unicodep; +} Fontcache; + +/* Fontcache is an array now. A new font will be appended to the array. */ +static Fontcache *frc = NULL; +static int frclen = 0; +static int frccap = 0; +static char *usedfont = NULL; +static double usedfontsize = 0; +static double defaultfontsize = 0; + +static char *opt_alpha = NULL; +static char *opt_class = NULL; +static char **opt_cmd = NULL; +static char *opt_embed = NULL; +static char *opt_font = NULL; +static char *opt_io = NULL; +static char *opt_line = NULL; +static char *opt_name = NULL; +static char *opt_title = NULL; + +static int oldbutton = 3; /* button event on startup: 3 = release */ +static int cursorblinks = 0; + +void +clipcopy(const Arg *dummy) +{ + Atom clipboard; + + free(xsel.clipboard); + xsel.clipboard = NULL; + + if (xsel.primary != NULL) { + xsel.clipboard = xstrdup(xsel.primary); + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + XSetSelectionOwner(xw.dpy, clipboard, xw.win, CurrentTime); + } +} + +void +clippaste(const Arg *dummy) +{ + Atom clipboard; + + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + XConvertSelection(xw.dpy, clipboard, xsel.xtarget, clipboard, + xw.win, CurrentTime); +} + +void +selpaste(const Arg *dummy) +{ + XConvertSelection(xw.dpy, XA_PRIMARY, xsel.xtarget, XA_PRIMARY, + xw.win, CurrentTime); +} + +void +numlock(const Arg *dummy) +{ + win.mode ^= MODE_NUMLOCK; +} + +void +zoom(const Arg *arg) +{ + Arg larg; + + larg.f = usedfontsize + arg->f; + zoomabs(&larg); +} + +void +zoomabs(const Arg *arg) +{ + xunloadfonts(); + xloadfonts(usedfont, arg->f); + cresize(0, 0); + redraw(); + xhints(); +} + +void +zoomreset(const Arg *arg) +{ + Arg larg; + + if (defaultfontsize > 0) { + larg.f = defaultfontsize; + zoomabs(&larg); + } +} + +void +ttysend(const Arg *arg) +{ + ttywrite(arg->s, strlen(arg->s), 1); +} + +int +evcol(XEvent *e) +{ + int x = e->xbutton.x - borderpx; + LIMIT(x, 0, win.tw - 1); + return x / win.cw; +} + +int +evrow(XEvent *e) +{ + int y = e->xbutton.y - borderpx; + LIMIT(y, 0, win.th - 1); + return y / win.ch; +} + +void +mousesel(XEvent *e, int done) +{ + int type, seltype = SEL_REGULAR; + uint state = e->xbutton.state & ~(Button1Mask | forcemousemod); + + for (type = 1; type < LEN(selmasks); ++type) { + if (match(selmasks[type], state)) { + seltype = type; + break; + } + } + selextend(evcol(e), evrow(e), seltype, done); + if (done) + setsel(getsel(), e->xbutton.time); +} + +void +mousereport(XEvent *e) +{ + int len, x = evcol(e), y = evrow(e), + button = e->xbutton.button, state = e->xbutton.state; + char buf[40]; + static int ox, oy; + + /* from urxvt */ + if (e->xbutton.type == MotionNotify) { + if (x == ox && y == oy) + return; + if (!IS_SET(MODE_MOUSEMOTION) && !IS_SET(MODE_MOUSEMANY)) + return; + /* MOUSE_MOTION: no reporting if no button is pressed */ + if (IS_SET(MODE_MOUSEMOTION) && oldbutton == 3) + return; + + button = oldbutton + 32; + ox = x; + oy = y; + } else { + if (!IS_SET(MODE_MOUSESGR) && e->xbutton.type == ButtonRelease) { + button = 3; + } else { + button -= Button1; + if (button >= 3) + button += 64 - 3; + } + if (e->xbutton.type == ButtonPress) { + oldbutton = button; + ox = x; + oy = y; + } else if (e->xbutton.type == ButtonRelease) { + oldbutton = 3; + /* MODE_MOUSEX10: no button release reporting */ + if (IS_SET(MODE_MOUSEX10)) + return; + if (button == 64 || button == 65) + return; + } + } + + if (!IS_SET(MODE_MOUSEX10)) { + button += ((state & ShiftMask ) ? 4 : 0) + + ((state & Mod4Mask ) ? 8 : 0) + + ((state & ControlMask) ? 16 : 0); + } + + if (IS_SET(MODE_MOUSESGR)) { + len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c", + button, x+1, y+1, + e->xbutton.type == ButtonRelease ? 'm' : 'M'); + } else if (x < 223 && y < 223) { + len = snprintf(buf, sizeof(buf), "\033[M%c%c%c", + 32+button, 32+x+1, 32+y+1); + } else { + return; + } + + ttywrite(buf, len, 0); +} + +uint +buttonmask(uint button) +{ + return button == Button1 ? Button1Mask + : button == Button2 ? Button2Mask + : button == Button3 ? Button3Mask + : button == Button4 ? Button4Mask + : button == Button5 ? Button5Mask + : 0; +} + +int +mouseaction(XEvent *e, uint release) +{ + MouseShortcut *ms; + + /* ignore Buttonmask for Button - it's set on release */ + uint state = e->xbutton.state & ~buttonmask(e->xbutton.button); + + for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { + if (ms->release == release && + ms->button == e->xbutton.button && + (match(ms->mod, state) || /* exact or forced */ + match(ms->mod, state & ~forcemousemod))) { + ms->func(&(ms->arg)); + return 1; + } + } + + return 0; +} + +void +bpress(XEvent *e) +{ + struct timespec now; + int snap; + + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { + mousereport(e); + return; + } + + if (mouseaction(e, 0)) + return; + + if (e->xbutton.button == Button1) { + /* + * If the user clicks below predefined timeouts specific + * snapping behaviour is exposed. + */ + clock_gettime(CLOCK_MONOTONIC, &now); + if (TIMEDIFF(now, xsel.tclick2) <= tripleclicktimeout) { + snap = SNAP_LINE; + } else if (TIMEDIFF(now, xsel.tclick1) <= doubleclicktimeout) { + snap = SNAP_WORD; + } else { + snap = 0; + } + xsel.tclick2 = xsel.tclick1; + xsel.tclick1 = now; + + selstart(evcol(e), evrow(e), snap); + } +} + +void +propnotify(XEvent *e) +{ + XPropertyEvent *xpev; + Atom clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + + xpev = &e->xproperty; + if (xpev->state == PropertyNewValue && + (xpev->atom == XA_PRIMARY || + xpev->atom == clipboard)) { + selnotify(e); + } +} + +void +selnotify(XEvent *e) +{ + ulong nitems, ofs, rem; + int format; + uchar *data, *last, *repl; + Atom type, incratom, property = None; + + incratom = XInternAtom(xw.dpy, "INCR", 0); + + ofs = 0; + if (e->type == SelectionNotify) + property = e->xselection.property; + else if (e->type == PropertyNotify) + property = e->xproperty.atom; + + if (property == None) + return; + + do { + if (XGetWindowProperty(xw.dpy, xw.win, property, ofs, + BUFSIZ/4, False, AnyPropertyType, + &type, &format, &nitems, &rem, + &data)) { + fprintf(stderr, "Clipboard allocation failed\n"); + return; + } + + if (e->type == PropertyNotify && nitems == 0 && rem == 0) { + /* + * If there is some PropertyNotify with no data, then + * this is the signal of the selection owner that all + * data has been transferred. We won't need to receive + * PropertyNotify events anymore. + */ + MODBIT(xw.attrs.event_mask, 0, PropertyChangeMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, + &xw.attrs); + } + + if (type == incratom) { + /* + * Activate the PropertyNotify events so we receive + * when the selection owner does send us the next + * chunk of data. + */ + MODBIT(xw.attrs.event_mask, 1, PropertyChangeMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, + &xw.attrs); + + /* + * Deleting the property is the transfer start signal. + */ + XDeleteProperty(xw.dpy, xw.win, (int)property); + continue; + } + + /* + * As seen in getsel: + * Line endings are inconsistent in the terminal and GUI world + * copy and pasting. When receiving some selection data, + * replace all '\n' with '\r'. + * FIXME: Fix the computer world. + */ + repl = data; + last = data + nitems * format / 8; + while ((repl = memchr(repl, '\n', last - repl))) { + *repl++ = '\r'; + } + + if (IS_SET(MODE_BRCKTPASTE) && ofs == 0) + ttywrite("\033[200~", 6, 0); + ttywrite((char *)data, nitems * format / 8, 1); + if (IS_SET(MODE_BRCKTPASTE) && rem == 0) + ttywrite("\033[201~", 6, 0); + XFree(data); + /* number of 32-bit chunks returned */ + ofs += nitems * format / 32; + } while (rem > 0); + + /* + * Deleting the property again tells the selection owner to send the + * next data chunk in the property. + */ + XDeleteProperty(xw.dpy, xw.win, (int)property); +} + +void +xclipcopy(void) +{ + clipcopy(NULL); +} + +void +selclear_(XEvent *e) +{ + selclear(); +} + +void +selrequest(XEvent *e) +{ + XSelectionRequestEvent *xsre; + XSelectionEvent xev; + Atom xa_targets, string, clipboard; + char *seltext; + + xsre = (XSelectionRequestEvent *) e; + xev.type = SelectionNotify; + xev.requestor = xsre->requestor; + xev.selection = xsre->selection; + xev.target = xsre->target; + xev.time = xsre->time; + if (xsre->property == None) + xsre->property = xsre->target; + + /* reject */ + xev.property = None; + + xa_targets = XInternAtom(xw.dpy, "TARGETS", 0); + if (xsre->target == xa_targets) { + /* respond with the supported type */ + string = xsel.xtarget; + XChangeProperty(xsre->display, xsre->requestor, xsre->property, + XA_ATOM, 32, PropModeReplace, + (uchar *) &string, 1); + xev.property = xsre->property; + } else if (xsre->target == xsel.xtarget || xsre->target == XA_STRING) { + /* + * xith XA_STRING non ascii characters may be incorrect in the + * requestor. It is not our problem, use utf8. + */ + clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); + if (xsre->selection == XA_PRIMARY) { + seltext = xsel.primary; + } else if (xsre->selection == clipboard) { + seltext = xsel.clipboard; + } else { + fprintf(stderr, + "Unhandled clipboard selection 0x%lx\n", + xsre->selection); + return; + } + if (seltext != NULL) { + XChangeProperty(xsre->display, xsre->requestor, + xsre->property, xsre->target, + 8, PropModeReplace, + (uchar *)seltext, strlen(seltext)); + xev.property = xsre->property; + } + } + + /* all done, send a notification to the listener */ + if (!XSendEvent(xsre->display, xsre->requestor, 1, 0, (XEvent *) &xev)) + fprintf(stderr, "Error sending SelectionNotify event\n"); +} + +void +setsel(char *str, Time t) +{ + if (!str) + return; + + free(xsel.primary); + xsel.primary = str; + + XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t); + if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win) + selclear(); + clipcopy(NULL); +} + +void +xsetsel(char *str) +{ + setsel(str, CurrentTime); +} + +void +brelease(XEvent *e) +{ + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { + mousereport(e); + return; + } + + if (mouseaction(e, 1)) + return; + if (e->xbutton.button == Button1) + mousesel(e, 1); +} + +void +bmotion(XEvent *e) +{ + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { + mousereport(e); + return; + } + + mousesel(e, 0); +} + +void +cresize(int width, int height) +{ + int col, row; + + if (width != 0) + win.w = width; + if (height != 0) + win.h = height; + + col = (win.w - 2 * borderpx) / win.cw; + row = (win.h - 2 * borderpx) / win.ch; + col = MAX(1, col); + row = MAX(1, row); + + tresize(col, row); + xresize(col, row); + ttyresize(win.tw, win.th); +} + +void +xresize(int col, int row) +{ + win.tw = col * win.cw; + win.th = row * win.ch; + + XFreePixmap(xw.dpy, xw.buf); + xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, + xw.depth); + XftDrawChange(xw.draw, xw.buf); + xclear(0, 0, win.w, win.h); + + /* resize to new width */ + xw.specbuf = xrealloc(xw.specbuf, col * sizeof(GlyphFontSpec)); +} + +ushort +sixd_to_16bit(int x) +{ + return x == 0 ? 0 : 0x3737 + 0x2828 * x; +} + +int +xloadcolor(int i, const char *name, Color *ncolor) +{ + XRenderColor color = { .alpha = 0xffff }; + + if (!name) { + if (BETWEEN(i, 16, 255)) { /* 256 color */ + if (i < 6*6*6+16) { /* same colors as xterm */ + color.red = sixd_to_16bit( ((i-16)/36)%6 ); + color.green = sixd_to_16bit( ((i-16)/6) %6 ); + color.blue = sixd_to_16bit( ((i-16)/1) %6 ); + } else { /* greyscale */ + color.red = 0x0808 + 0x0a0a * (i - (6*6*6+16)); + color.green = color.blue = color.red; + } + return XftColorAllocValue(xw.dpy, xw.vis, + xw.cmap, &color, ncolor); + } else + name = colorname[i]; + } + + return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor); +} + +void +xloadcols(void) +{ + int i; + static int loaded; + Color *cp; + + if (loaded) { + for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp) + XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); + } else { + dc.collen = MAX(LEN(colorname), 256); + dc.col = xmalloc(dc.collen * sizeof(Color)); + } + + for (i = 0; i < dc.collen; i++) + if (!xloadcolor(i, NULL, &dc.col[i])) { + if (colorname[i]) + die("could not allocate color '%s'\n", colorname[i]); + else + die("could not allocate color %d\n", i); + } + + /* set alpha value of bg color */ + if (opt_alpha) + alpha = strtof(opt_alpha, NULL); + dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * alpha); + dc.col[defaultbg].pixel &= 0x00FFFFFF; + dc.col[defaultbg].pixel |= (unsigned char)(0xff * alpha) << 24; + loaded = 1; +} + +int +xsetcolorname(int x, const char *name) +{ + Color ncolor; + + if (!BETWEEN(x, 0, dc.collen)) + return 1; + + if (!xloadcolor(x, name, &ncolor)) + return 1; + + XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[x]); + dc.col[x] = ncolor; + + return 0; +} + +/* + * Absolute coordinates. + */ +void +xclear(int x1, int y1, int x2, int y2) +{ + XftDrawRect(xw.draw, + &dc.col[IS_SET(MODE_REVERSE)? defaultfg : defaultbg], + x1, y1, x2-x1, y2-y1); +} + +void +xhints(void) +{ + XClassHint class = {opt_name ? opt_name : termname, + opt_class ? opt_class : termname}; + XWMHints wm = {.flags = InputHint, .input = 1}; + XSizeHints *sizeh; + + sizeh = XAllocSizeHints(); + + sizeh->flags = PSize | PResizeInc | PBaseSize | PMinSize; + sizeh->height = win.h; + sizeh->width = win.w; + sizeh->height_inc = win.ch; + sizeh->width_inc = win.cw; + sizeh->base_height = 2 * borderpx; + sizeh->base_width = 2 * borderpx; + sizeh->min_height = win.ch + 2 * borderpx; + sizeh->min_width = win.cw + 2 * borderpx; + if (xw.isfixed) { + sizeh->flags |= PMaxSize; + sizeh->min_width = sizeh->max_width = win.w; + sizeh->min_height = sizeh->max_height = win.h; + } + if (xw.gm & (XValue|YValue)) { + sizeh->flags |= USPosition | PWinGravity; + sizeh->x = xw.l; + sizeh->y = xw.t; + sizeh->win_gravity = xgeommasktogravity(xw.gm); + } + + XSetWMProperties(xw.dpy, xw.win, NULL, NULL, NULL, 0, sizeh, &wm, + &class); + XFree(sizeh); +} + +int +xgeommasktogravity(int mask) +{ + switch (mask & (XNegative|YNegative)) { + case 0: + return NorthWestGravity; + case XNegative: + return NorthEastGravity; + case YNegative: + return SouthWestGravity; + } + + return SouthEastGravity; +} + +int +xloadfont(Font *f, FcPattern *pattern) +{ + FcPattern *configured; + FcPattern *match; + FcResult result; + XGlyphInfo extents; + int wantattr, haveattr; + + /* + * Manually configure instead of calling XftMatchFont + * so that we can use the configured pattern for + * "missing glyph" lookups. + */ + configured = FcPatternDuplicate(pattern); + if (!configured) + return 1; + + FcConfigSubstitute(NULL, configured, FcMatchPattern); + XftDefaultSubstitute(xw.dpy, xw.scr, configured); + + match = FcFontMatch(NULL, configured, &result); + if (!match) { + FcPatternDestroy(configured); + return 1; + } + + if (!(f->match = XftFontOpenPattern(xw.dpy, match))) { + FcPatternDestroy(configured); + FcPatternDestroy(match); + return 1; + } + + if ((XftPatternGetInteger(pattern, "slant", 0, &wantattr) == + XftResultMatch)) { + /* + * Check if xft was unable to find a font with the appropriate + * slant but gave us one anyway. Try to mitigate. + */ + if ((XftPatternGetInteger(f->match->pattern, "slant", 0, + &haveattr) != XftResultMatch) || haveattr < wantattr) { + f->badslant = 1; + fputs("font slant does not match\n", stderr); + } + } + + if ((XftPatternGetInteger(pattern, "weight", 0, &wantattr) == + XftResultMatch)) { + if ((XftPatternGetInteger(f->match->pattern, "weight", 0, + &haveattr) != XftResultMatch) || haveattr != wantattr) { + f->badweight = 1; + fputs("font weight does not match\n", stderr); + } + } + + XftTextExtentsUtf8(xw.dpy, f->match, + (const FcChar8 *) ascii_printable, + strlen(ascii_printable), &extents); + + f->set = NULL; + f->pattern = configured; + + f->ascent = f->match->ascent; + f->descent = f->match->descent; + f->lbearing = 0; + f->rbearing = f->match->max_advance_width; + + f->height = f->ascent + f->descent; + f->width = DIVCEIL(extents.xOff, strlen(ascii_printable)); + + return 0; +} + +void +xloadfonts(char *fontstr, double fontsize) +{ + FcPattern *pattern; + double fontval; + + if (fontstr[0] == '-') + pattern = XftXlfdParse(fontstr, False, False); + else + pattern = FcNameParse((FcChar8 *)fontstr); + + if (!pattern) + die("can't open font %s\n", fontstr); + + if (fontsize > 1) { + FcPatternDel(pattern, FC_PIXEL_SIZE); + FcPatternDel(pattern, FC_SIZE); + FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize); + usedfontsize = fontsize; + } else { + if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) == + FcResultMatch) { + usedfontsize = fontval; + } else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) == + FcResultMatch) { + usedfontsize = -1; + } else { + /* + * Default font size is 12, if none given. This is to + * have a known usedfontsize value. + */ + FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12); + usedfontsize = 12; + } + defaultfontsize = usedfontsize; + } + + if (xloadfont(&dc.font, pattern)) + die("can't open font %s\n", fontstr); + + if (usedfontsize < 0) { + FcPatternGetDouble(dc.font.match->pattern, + FC_PIXEL_SIZE, 0, &fontval); + usedfontsize = fontval; + if (fontsize == 0) + defaultfontsize = fontval; + } + + /* Setting character width and height. */ + win.cw = ceilf(dc.font.width * cwscale); + win.ch = ceilf(dc.font.height * chscale); + + FcPatternDel(pattern, FC_SLANT); + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC); + if (xloadfont(&dc.ifont, pattern)) + die("can't open font %s\n", fontstr); + + FcPatternDel(pattern, FC_WEIGHT); + FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD); + if (xloadfont(&dc.ibfont, pattern)) + die("can't open font %s\n", fontstr); + + FcPatternDel(pattern, FC_SLANT); + FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN); + if (xloadfont(&dc.bfont, pattern)) + die("can't open font %s\n", fontstr); + + FcPatternDestroy(pattern); +} + +void +xunloadfont(Font *f) +{ + XftFontClose(xw.dpy, f->match); + FcPatternDestroy(f->pattern); + if (f->set) + FcFontSetDestroy(f->set); +} + +void +xunloadfonts(void) +{ + /* Free the loaded fonts in the font cache. */ + while (frclen > 0) + XftFontClose(xw.dpy, frc[--frclen].font); + + xunloadfont(&dc.font); + xunloadfont(&dc.bfont); + xunloadfont(&dc.ifont); + xunloadfont(&dc.ibfont); +} + +int +ximopen(Display *dpy) +{ + XIMCallback imdestroy = { .client_data = NULL, .callback = ximdestroy }; + XICCallback icdestroy = { .client_data = NULL, .callback = xicdestroy }; + + xw.ime.xim = XOpenIM(xw.dpy, NULL, NULL, NULL); + if (xw.ime.xim == NULL) + return 0; + + if (XSetIMValues(xw.ime.xim, XNDestroyCallback, &imdestroy, NULL)) + fprintf(stderr, "XSetIMValues: " + "Could not set XNDestroyCallback.\n"); + + xw.ime.spotlist = XVaCreateNestedList(0, XNSpotLocation, &xw.ime.spot, + NULL); + + if (xw.ime.xic == NULL) { + xw.ime.xic = XCreateIC(xw.ime.xim, XNInputStyle, + XIMPreeditNothing | XIMStatusNothing, + XNClientWindow, xw.win, + XNDestroyCallback, &icdestroy, + NULL); + } + if (xw.ime.xic == NULL) + fprintf(stderr, "XCreateIC: Could not create input context.\n"); + + return 1; +} + +void +ximinstantiate(Display *dpy, XPointer client, XPointer call) +{ + if (ximopen(dpy)) + XUnregisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL, + ximinstantiate, NULL); +} + +void +ximdestroy(XIM xim, XPointer client, XPointer call) +{ + xw.ime.xim = NULL; + XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL, + ximinstantiate, NULL); + XFree(xw.ime.spotlist); +} + +int +xicdestroy(XIC xim, XPointer client, XPointer call) +{ + xw.ime.xic = NULL; + return 1; +} + +void +xinit(int cols, int rows) +{ + XGCValues gcvalues; + Cursor cursor; + Window parent; + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; + XWindowAttributes attr; + XVisualInfo vis; + + if (!(xw.dpy = XOpenDisplay(NULL))) + die("can't open display\n"); + xw.scr = XDefaultScreen(xw.dpy); + + if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) { + parent = XRootWindow(xw.dpy, xw.scr); + xw.depth = 32; + } else { + XGetWindowAttributes(xw.dpy, parent, &attr); + xw.depth = attr.depth; + } + + XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis); + xw.vis = vis.visual; + + /* font */ + if (!FcInit()) + die("could not init fontconfig.\n"); + + usedfont = (opt_font == NULL)? font : opt_font; + xloadfonts(usedfont, 0); + + /* colors */ + xw.cmap = XCreateColormap(xw.dpy, parent, xw.vis, None); + xloadcols(); + + /* adjust fixed window geometry */ + win.w = 2 * borderpx + cols * win.cw; + win.h = 2 * borderpx + rows * win.ch; + if (xw.gm & XNegative) + xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2; + if (xw.gm & YNegative) + xw.t += DisplayHeight(xw.dpy, xw.scr) - win.h - 2; + + /* Events */ + xw.attrs.background_pixel = dc.col[defaultbg].pixel; + xw.attrs.border_pixel = dc.col[defaultbg].pixel; + xw.attrs.bit_gravity = NorthWestGravity; + xw.attrs.event_mask = FocusChangeMask | KeyPressMask | KeyReleaseMask + | ExposureMask | VisibilityChangeMask | StructureNotifyMask + | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask; + xw.attrs.colormap = xw.cmap; + + xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t, + win.w, win.h, 0, xw.depth, InputOutput, + xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity + | CWEventMask | CWColormap, &xw.attrs); + + memset(&gcvalues, 0, sizeof(gcvalues)); + gcvalues.graphics_exposures = False; + xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, xw.depth); + dc.gc = XCreateGC(xw.dpy, xw.buf, GCGraphicsExposures, &gcvalues); + XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); + XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); + + /* font spec buffer */ + xw.specbuf = xmalloc(cols * sizeof(GlyphFontSpec)); + + /* Xft rendering context */ + xw.draw = XftDrawCreate(xw.dpy, xw.buf, xw.vis, xw.cmap); + + /* input methods */ + if (!ximopen(xw.dpy)) { + XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL, + ximinstantiate, NULL); + } + + /* white cursor, black outline */ + cursor = XcursorLibraryLoadCursor(xw.dpy, mouseshape); + XDefineCursor(xw.dpy, xw.win, cursor); + + xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); + xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); + xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False); + XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); + + xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); + XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32, + PropModeReplace, (uchar *)&thispid, 1); + + win.mode = MODE_NUMLOCK; + resettitle(); + xhints(); + XMapWindow(xw.dpy, xw.win); + XSync(xw.dpy, False); + + clock_gettime(CLOCK_MONOTONIC, &xsel.tclick1); + clock_gettime(CLOCK_MONOTONIC, &xsel.tclick2); + xsel.primary = NULL; + xsel.clipboard = NULL; + xsel.xtarget = XInternAtom(xw.dpy, "UTF8_STRING", 0); + if (xsel.xtarget == None) + xsel.xtarget = XA_STRING; + + boxdraw_xinit(xw.dpy, xw.cmap, xw.draw, xw.vis); +} + +int +xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x, int y) +{ + float winx = borderpx + x * win.cw, winy = borderpx + y * win.ch, xp, yp; + ushort mode, prevmode = USHRT_MAX; + Font *font = &dc.font; + int frcflags = FRC_NORMAL; + float runewidth = win.cw; + Rune rune; + FT_UInt glyphidx; + FcResult fcres; + FcPattern *fcpattern, *fontpattern; + FcFontSet *fcsets[] = { NULL }; + FcCharSet *fccharset; + int i, f, numspecs = 0; + + for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) { + /* Fetch rune and mode for current glyph. */ + rune = glyphs[i].u; + mode = glyphs[i].mode; + + /* Skip dummy wide-character spacing. */ + if (mode == ATTR_WDUMMY) + continue; + + /* Determine font for glyph if different from previous glyph. */ + if (prevmode != mode) { + prevmode = mode; + font = &dc.font; + frcflags = FRC_NORMAL; + runewidth = win.cw * ((mode & ATTR_WIDE) ? 2.0f : 1.0f); + if ((mode & ATTR_ITALIC) && (mode & ATTR_BOLD)) { + font = &dc.ibfont; + frcflags = FRC_ITALICBOLD; + } else if (mode & ATTR_ITALIC) { + font = &dc.ifont; + frcflags = FRC_ITALIC; + } else if (mode & ATTR_BOLD) { + font = &dc.bfont; + frcflags = FRC_BOLD; + } + yp = winy + font->ascent; + } + + if (mode & ATTR_BOXDRAW) { + /* minor shoehorning: boxdraw uses only this ushort */ + glyphidx = boxdrawindex(&glyphs[i]); + } else { + /* Lookup character index with default font. */ + glyphidx = XftCharIndex(xw.dpy, font->match, rune); + } + if (glyphidx) { + specs[numspecs].font = font->match; + specs[numspecs].glyph = glyphidx; + specs[numspecs].x = (short)xp; + specs[numspecs].y = (short)yp; + xp += runewidth; + numspecs++; + continue; + } + + /* Fallback on font cache, search the font cache for match. */ + for (f = 0; f < frclen; f++) { + glyphidx = XftCharIndex(xw.dpy, frc[f].font, rune); + /* Everything correct. */ + if (glyphidx && frc[f].flags == frcflags) + break; + /* We got a default font for a not found glyph. */ + if (!glyphidx && frc[f].flags == frcflags + && frc[f].unicodep == rune) { + break; + } + } + + /* Nothing was found. Use fontconfig to find matching font. */ + if (f >= frclen) { + if (!font->set) + font->set = FcFontSort(0, font->pattern, + 1, 0, &fcres); + fcsets[0] = font->set; + + /* + * Nothing was found in the cache. Now use + * some dozen of Fontconfig calls to get the + * font for one single character. + * + * Xft and fontconfig are design failures. + */ + fcpattern = FcPatternDuplicate(font->pattern); + fccharset = FcCharSetCreate(); + + FcCharSetAddChar(fccharset, rune); + FcPatternAddCharSet(fcpattern, FC_CHARSET, + fccharset); + FcPatternAddBool(fcpattern, FC_SCALABLE, 1); + + FcConfigSubstitute(0, fcpattern, + FcMatchPattern); + FcDefaultSubstitute(fcpattern); + + fontpattern = FcFontSetMatch(0, fcsets, 1, + fcpattern, &fcres); + + /* Allocate memory for the new cache entry. */ + if (frclen >= frccap) { + frccap += 16; + frc = xrealloc(frc, frccap * sizeof(Fontcache)); + } + + frc[frclen].font = XftFontOpenPattern(xw.dpy, + fontpattern); + if (!frc[frclen].font) + die("XftFontOpenPattern failed seeking fallback font: %s\n", + strerror(errno)); + frc[frclen].flags = frcflags; + frc[frclen].unicodep = rune; + + glyphidx = XftCharIndex(xw.dpy, frc[frclen].font, rune); + + f = frclen; + frclen++; + + FcPatternDestroy(fcpattern); + FcCharSetDestroy(fccharset); + } + + specs[numspecs].font = frc[f].font; + specs[numspecs].glyph = glyphidx; + specs[numspecs].x = (short)xp; + specs[numspecs].y = (short)yp; + xp += runewidth; + numspecs++; + } + + return numspecs; +} + +void +xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y) +{ + int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1); + int winx = borderpx + x * win.cw, winy = borderpx + y * win.ch, + width = charlen * win.cw; + Color *fg, *bg, *temp, revfg, revbg, truefg, truebg; + XRenderColor colfg, colbg; + XRectangle r; + + /* Fallback on color display for attributes not supported by the font */ + if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) { + if (dc.ibfont.badslant || dc.ibfont.badweight) + base.fg = defaultattr; + } else if ((base.mode & ATTR_ITALIC && dc.ifont.badslant) || + (base.mode & ATTR_BOLD && dc.bfont.badweight)) { + base.fg = defaultattr; + } + + if (IS_TRUECOL(base.fg)) { + colfg.alpha = 0xffff; + colfg.red = TRUERED(base.fg); + colfg.green = TRUEGREEN(base.fg); + colfg.blue = TRUEBLUE(base.fg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &truefg); + fg = &truefg; + } else { + fg = &dc.col[base.fg]; + } + + if (IS_TRUECOL(base.bg)) { + colbg.alpha = 0xffff; + colbg.green = TRUEGREEN(base.bg); + colbg.red = TRUERED(base.bg); + colbg.blue = TRUEBLUE(base.bg); + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &truebg); + bg = &truebg; + } else { + bg = &dc.col[base.bg]; + } + + /* Change basic system colors [0-7] to bright system colors [8-15] */ + if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7)) + fg = &dc.col[base.fg + 8]; + + if (IS_SET(MODE_REVERSE)) { + if (fg == &dc.col[defaultfg]) { + fg = &dc.col[defaultbg]; + } else { + colfg.red = ~fg->color.red; + colfg.green = ~fg->color.green; + colfg.blue = ~fg->color.blue; + colfg.alpha = fg->color.alpha; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, + &revfg); + fg = &revfg; + } + + if (bg == &dc.col[defaultbg]) { + bg = &dc.col[defaultfg]; + } else { + colbg.red = ~bg->color.red; + colbg.green = ~bg->color.green; + colbg.blue = ~bg->color.blue; + colbg.alpha = bg->color.alpha; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, + &revbg); + bg = &revbg; + } + } + + if ((base.mode & ATTR_BOLD_FAINT) == ATTR_FAINT) { + colfg.red = fg->color.red / 2; + colfg.green = fg->color.green / 2; + colfg.blue = fg->color.blue / 2; + colfg.alpha = fg->color.alpha; + XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg); + fg = &revfg; + } + + if (base.mode & ATTR_REVERSE) { + temp = fg; + fg = bg; + bg = temp; + } + + if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK) + fg = bg; + + if (base.mode & ATTR_INVISIBLE) + fg = bg; + + /* Intelligent cleaning up of the borders. */ + if (x == 0) { + xclear(0, (y == 0)? 0 : winy, borderpx, + winy + win.ch + + ((winy + win.ch >= borderpx + win.th)? win.h : 0)); + } + if (winx + width >= borderpx + win.tw) { + xclear(winx + width, (y == 0)? 0 : winy, win.w, + ((winy + win.ch >= borderpx + win.th)? win.h : (winy + win.ch))); + } + if (y == 0) + xclear(winx, 0, winx + width, borderpx); + if (winy + win.ch >= borderpx + win.th) + xclear(winx, winy + win.ch, winx + width, win.h); + + /* Clean up the region we want to draw to. */ + XftDrawRect(xw.draw, bg, winx, winy, width, win.ch); + + /* Set the clip region because Xft is sometimes dirty. */ + r.x = 0; + r.y = 0; + r.height = win.ch; + r.width = width; + XftDrawSetClipRectangles(xw.draw, winx, winy, &r, 1); + + if (base.mode & ATTR_BOXDRAW) { + drawboxes(winx, winy, width / len, win.ch, fg, bg, specs, len); + } else { + /* Render the glyphs. */ + XftDrawGlyphFontSpec(xw.draw, fg, specs, len); + } + + /* Render underline and strikethrough. */ + if (base.mode & ATTR_UNDERLINE) { + XftDrawRect(xw.draw, fg, winx, winy + dc.font.ascent + 1, + width, 1); + } + + if (base.mode & ATTR_STRUCK) { + XftDrawRect(xw.draw, fg, winx, winy + 2 * dc.font.ascent / 3, + width, 1); + } + + /* Reset clip to none. */ + XftDrawSetClip(xw.draw, 0); +} + +void +xdrawglyph(Glyph g, int x, int y) +{ + int numspecs; + XftGlyphFontSpec spec; + + numspecs = xmakeglyphfontspecs(&spec, &g, 1, x, y); + xdrawglyphfontspecs(&spec, g, numspecs, x, y); +} + +void +xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) +{ + Color drawcol; + + /* remove the old cursor */ + if (selected(ox, oy)) + og.mode ^= ATTR_REVERSE; + xdrawglyph(og, ox, oy); + + if (IS_SET(MODE_HIDE)) + return; + + /* + * Select the right color for the right mode. + */ + g.mode &= ATTR_BOLD|ATTR_ITALIC|ATTR_UNDERLINE|ATTR_STRUCK|ATTR_WIDE|ATTR_BOXDRAW; + + if (IS_SET(MODE_REVERSE)) { + g.mode |= ATTR_REVERSE; + g.bg = defaultfg; + if (selected(cx, cy)) { + drawcol = dc.col[defaultcs]; + g.fg = defaultrcs; + } else { + drawcol = dc.col[defaultrcs]; + g.fg = defaultcs; + } + } else { + if (selected(cx, cy)) { + g.fg = defaultfg; + g.bg = defaultrcs; + } else { + g.fg = defaultbg; + g.bg = defaultcs; + } + drawcol = dc.col[g.bg]; + } + + /* draw the new one */ + if (IS_SET(MODE_FOCUSED)) { + switch (win.cursor) { + case 0: /* Blinking block */ + case 1: /* Blinking block (default) */ + if (IS_SET(MODE_BLINK)) + break; + /* FALLTHROUGH */ + case 2: /* Steady block */ + xdrawglyph(g, cx, cy); + break; + case 3: /* Blinking underline */ + if (IS_SET(MODE_BLINK)) + break; + /* FALLTHROUGH */ + case 4: /* Steady underline */ + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + (cy + 1) * win.ch - \ + cursorthickness, + win.cw, cursorthickness); + break; + case 5: /* Blinking bar */ + if (IS_SET(MODE_BLINK)) + break; + /* FALLTHROUGH */ + case 6: /* Steady bar */ + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + cy * win.ch, + cursorthickness, win.ch); + break; + case 7: /* Blinking st cursor */ + if (IS_SET(MODE_BLINK)) + break; + /* FALLTHROUGH */ + case 8: /* Steady st cursor */ + g.u = stcursor; + xdrawglyph(g, cx, cy); + break; + } + } else { + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + cy * win.ch, + win.cw - 1, 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + cy * win.ch, + 1, win.ch - 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + (cx + 1) * win.cw - 1, + borderpx + cy * win.ch, + 1, win.ch - 1); + XftDrawRect(xw.draw, &drawcol, + borderpx + cx * win.cw, + borderpx + (cy + 1) * win.ch - 1, + win.cw, 1); + } +} + +void +xsetenv(void) +{ + char buf[sizeof(long) * 8 + 1]; + + snprintf(buf, sizeof(buf), "%lu", xw.win); + setenv("WINDOWID", buf, 1); +} + +void +xsettitle(char *p) +{ + XTextProperty prop; + DEFAULT(p, opt_title); + + Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, + &prop); + XSetWMName(xw.dpy, xw.win, &prop); + XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname); + XFree(prop.value); +} + +int +xstartdraw(void) +{ + return IS_SET(MODE_VISIBLE); +} + +void +xdrawline(Line line, int x1, int y1, int x2) +{ + int i, x, ox, numspecs; + Glyph base, new; + XftGlyphFontSpec *specs = xw.specbuf; + + numspecs = xmakeglyphfontspecs(specs, &line[x1], x2 - x1, x1, y1); + i = ox = 0; + for (x = x1; x < x2 && i < numspecs; x++) { + new = line[x]; + if (new.mode == ATTR_WDUMMY) + continue; + if (selected(x, y1)) + new.mode ^= ATTR_REVERSE; + if (i > 0 && ATTRCMP(base, new)) { + xdrawglyphfontspecs(specs, base, i, ox, y1); + specs += i; + numspecs -= i; + i = 0; + } + if (i == 0) { + ox = x; + base = new; + } + i++; + } + if (i > 0) + xdrawglyphfontspecs(specs, base, i, ox, y1); +} + +void +xfinishdraw(void) +{ + XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, + win.h, 0, 0); + XSetForeground(xw.dpy, dc.gc, + dc.col[IS_SET(MODE_REVERSE)? + defaultfg : defaultbg].pixel); +} + +void +xximspot(int x, int y) +{ + if (xw.ime.xic == NULL) + return; + + xw.ime.spot.x = borderpx + x * win.cw; + xw.ime.spot.y = borderpx + (y + 1) * win.ch; + + XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.spotlist, NULL); +} + +void +expose(XEvent *ev) +{ + redraw(); +} + +void +visibility(XEvent *ev) +{ + XVisibilityEvent *e = &ev->xvisibility; + + MODBIT(win.mode, e->state != VisibilityFullyObscured, MODE_VISIBLE); +} + +void +unmap(XEvent *ev) +{ + win.mode &= ~MODE_VISIBLE; +} + +void +xsetpointermotion(int set) +{ + MODBIT(xw.attrs.event_mask, set, PointerMotionMask); + XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); +} + +void +xsetmode(int set, unsigned int flags) +{ + int mode = win.mode; + MODBIT(win.mode, set, flags); + if ((win.mode & MODE_REVERSE) != (mode & MODE_REVERSE)) + redraw(); +} + +int +xsetcursor(int cursor) +{ + if (!BETWEEN(cursor, 0, 8)) /* 7-8: st extensions */ + return 1; + win.cursor = cursor; + cursorblinks = win.cursor == 0 || win.cursor == 1 || + win.cursor == 3 || win.cursor == 5 || + win.cursor == 7; + return 0; +} + +void +xseturgency(int add) +{ + XWMHints *h = XGetWMHints(xw.dpy, xw.win); + + MODBIT(h->flags, add, XUrgencyHint); + XSetWMHints(xw.dpy, xw.win, h); + XFree(h); +} + +void +xbell(void) +{ + if (!(IS_SET(MODE_FOCUSED))) + xseturgency(1); + if (bellvolume) + XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); +} + +void +focus(XEvent *ev) +{ + XFocusChangeEvent *e = &ev->xfocus; + + if (e->mode == NotifyGrab) + return; + + if (ev->type == FocusIn) { + if (xw.ime.xic) + XSetICFocus(xw.ime.xic); + win.mode |= MODE_FOCUSED; + xseturgency(0); + if (IS_SET(MODE_FOCUS)) + ttywrite("\033[I", 3, 0); + } else { + if (xw.ime.xic) + XUnsetICFocus(xw.ime.xic); + win.mode &= ~MODE_FOCUSED; + if (IS_SET(MODE_FOCUS)) + ttywrite("\033[O", 3, 0); + } +} + +int +match(uint mask, uint state) +{ + return mask == XK_ANY_MOD || mask == (state & ~ignoremod); +} + +char* +kmap(KeySym k, uint state) +{ + Key *kp; + int i; + + /* Check for mapped keys out of X11 function keys. */ + for (i = 0; i < LEN(mappedkeys); i++) { + if (mappedkeys[i] == k) + break; + } + if (i == LEN(mappedkeys)) { + if ((k & 0xFFFF) < 0xFD00) + return NULL; + } + + for (kp = key; kp < key + LEN(key); kp++) { + if (kp->k != k) + continue; + + if (!match(kp->mask, state)) + continue; + + if (IS_SET(MODE_APPKEYPAD) ? kp->appkey < 0 : kp->appkey > 0) + continue; + if (IS_SET(MODE_NUMLOCK) && kp->appkey == 2) + continue; + + if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0) + continue; + + return kp->s; + } + + return NULL; +} + +void +kpress(XEvent *ev) +{ + XKeyEvent *e = &ev->xkey; + KeySym ksym; + char buf[64], *customkey; + int len; + Rune c; + Status status; + Shortcut *bp; + + if (IS_SET(MODE_KBDLOCK)) + return; + + if (xw.ime.xic) + len = XmbLookupString(xw.ime.xic, e, buf, sizeof buf, &ksym, &status); + else + len = XLookupString(e, buf, sizeof buf, &ksym, NULL); + /* 1. shortcuts */ + for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) { + if (ksym == bp->keysym && match(bp->mod, e->state)) { + bp->func(&(bp->arg)); + return; + } + } + + /* 2. custom keys from config.h */ + if ((customkey = kmap(ksym, e->state))) { + ttywrite(customkey, strlen(customkey), 1); + return; + } + + /* 3. composed string from input method */ + if (len == 0) + return; + if (len == 1 && e->state & Mod1Mask) { + if (IS_SET(MODE_8BIT)) { + if (*buf < 0177) { + c = *buf | 0x80; + len = utf8encode(c, buf); + } + } else { + buf[1] = buf[0]; + buf[0] = '\033'; + len = 2; + } + } + ttywrite(buf, len, 1); +} + +void +cmessage(XEvent *e) +{ + /* + * See xembed specs + * http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html + */ + if (e->xclient.message_type == xw.xembed && e->xclient.format == 32) { + if (e->xclient.data.l[1] == XEMBED_FOCUS_IN) { + win.mode |= MODE_FOCUSED; + xseturgency(0); + } else if (e->xclient.data.l[1] == XEMBED_FOCUS_OUT) { + win.mode &= ~MODE_FOCUSED; + } + } else if (e->xclient.data.l[0] == xw.wmdeletewin) { + ttyhangup(); + exit(0); + } +} + +void +resize(XEvent *e) +{ + if (e->xconfigure.width == win.w && e->xconfigure.height == win.h) + return; + + cresize(e->xconfigure.width, e->xconfigure.height); +} + +int tinsync(uint); +int ttyread_pending(); + +void +run(void) +{ + XEvent ev; + int w = win.w, h = win.h; + fd_set rfd; + int xfd = XConnectionNumber(xw.dpy), ttyfd, xev, drawing; + struct timespec seltv, *tv, now, lastblink, trigger; + double timeout; + + /* Waiting for window mapping */ + do { + XNextEvent(xw.dpy, &ev); + /* + * This XFilterEvent call is required because of XOpenIM. It + * does filter out the key event and some client message for + * the input method too. + */ + if (XFilterEvent(&ev, None)) + continue; + if (ev.type == ConfigureNotify) { + w = ev.xconfigure.width; + h = ev.xconfigure.height; + } + } while (ev.type != MapNotify); + + ttyfd = ttynew(opt_line, shell, opt_io, opt_cmd); + cresize(w, h); + + for (timeout = -1, drawing = 0, lastblink = (struct timespec){0};;) { + FD_ZERO(&rfd); + FD_SET(ttyfd, &rfd); + FD_SET(xfd, &rfd); + + if (XPending(xw.dpy) || ttyread_pending()) + timeout = 0; /* existing events might not set xfd */ + + seltv.tv_sec = timeout / 1E3; + seltv.tv_nsec = 1E6 * (timeout - 1E3 * seltv.tv_sec); + tv = timeout >= 0 ? &seltv : NULL; + + if (pselect(MAX(xfd, ttyfd)+1, &rfd, NULL, NULL, tv, NULL) < 0) { + if (errno == EINTR) + continue; + die("select failed: %s\n", strerror(errno)); + } + clock_gettime(CLOCK_MONOTONIC, &now); + + int ttyin = FD_ISSET(ttyfd, &rfd) || ttyread_pending(); + if (ttyin) + ttyread(); + + xev = 0; + while (XPending(xw.dpy)) { + xev = 1; + XNextEvent(xw.dpy, &ev); + if (XFilterEvent(&ev, None)) + continue; + if (handler[ev.type]) + (handler[ev.type])(&ev); + } + + /* + * To reduce flicker and tearing, when new content or event + * triggers drawing, we first wait a bit to ensure we got + * everything, and if nothing new arrives - we draw. + * We start with trying to wait minlatency ms. If more content + * arrives sooner, we retry with shorter and shorter periods, + * and eventually draw even without idle after maxlatency ms. + * Typically this results in low latency while interacting, + * maximum latency intervals during `cat huge.txt`, and perfect + * sync with periodic updates from animations/key-repeats/etc. + */ + if (ttyin || xev) { + if (!drawing) { + trigger = now; + if (IS_SET(MODE_BLINK)) { + win.mode ^= MODE_BLINK; + } + lastblink = now; + drawing = 1; + } + timeout = (maxlatency - TIMEDIFF(now, trigger)) \ + / maxlatency * minlatency; + if (timeout > 0) + continue; /* we have time, try to find idle */ + } + + if (tinsync(su_timeout)) { + /* + * on synchronized-update draw-suspension: don't reset + * drawing so that we draw ASAP once we can (just after + * ESU). it won't be too soon because we already can + * draw now but we skip. we set timeout > 0 to draw on + * SU-timeout even without new content. + */ + timeout = minlatency; + continue; + } + + /* idle detected or maxlatency exhausted -> draw */ + timeout = -1; + if (blinktimeout && (cursorblinks || tattrset(ATTR_BLINK))) { + timeout = blinktimeout - TIMEDIFF(now, lastblink); + if (timeout <= 0) { + if (-timeout > blinktimeout) /* start visible */ + win.mode |= MODE_BLINK; + win.mode ^= MODE_BLINK; + tsetdirtattr(ATTR_BLINK); + lastblink = now; + timeout = blinktimeout; + } + } + + draw(); + XFlush(xw.dpy); + drawing = 0; + } +} + +void +usage(void) +{ + die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid]" + " [[-e] command [args ...]]\n" + " %s [-aiv] [-c class] [-f font] [-g geometry]" + " [-n name] [-o file]\n" + " [-T title] [-t title] [-w windowid] -l line" + " [stty_args ...]\n", argv0, argv0); +} + +int +main(int argc, char *argv[]) +{ + int i; + char *colval; + xw.l = xw.t = 0; + xw.isfixed = False; + xsetcursor(cursorstyle); + + ARGBEGIN { + case 'a': + allowaltscreen = 0; + break; + case 'A': + opt_alpha = EARGF(usage()); + break; + case 'c': + opt_class = EARGF(usage()); + break; + case 'e': + if (argc > 0) + --argc, ++argv; + goto run; + case 'f': + opt_font = EARGF(usage()); + break; + case 'g': + xw.gm = XParseGeometry(EARGF(usage()), + &xw.l, &xw.t, &cols, &rows); + break; + case 'i': + xw.isfixed = 1; + break; + case 'o': + opt_io = EARGF(usage()); + break; + case 'l': + opt_line = EARGF(usage()); + break; + case 'n': + opt_name = EARGF(usage()); + break; + case 't': + case 'T': + opt_title = EARGF(usage()); + break; + case 'w': + opt_embed = EARGF(usage()); + break; + case 'v': + die("%s " VERSION "\n", argv0); + break; + case 'C': + colval = strtok(EARGF(usage()), "@"); + i = atoi(strtok(NULL, "@")); + colorname[i] = colval; + break; + default: + usage(); + } ARGEND; + +run: + if (argc > 0) /* eat all remaining arguments */ + opt_cmd = argv; + + if (!opt_title) + opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0]; + + setlocale(LC_CTYPE, ""); + XSetLocaleModifiers(""); + cols = MAX(cols, 1); + rows = MAX(rows, 1); + tnew(cols, rows); + xinit(cols, rows); + xsetenv(); + selinit(); + run(); + + return 0; +}