diff --git a/old_work/8/delkey.patch b/8/delkey.patch similarity index 100% rename from old_work/8/delkey.patch rename to 8/delkey.patch diff --git a/old_work/8/st-0.8.1.tar.gz b/8/st-0.8.1.tar.gz similarity index 100% rename from old_work/8/st-0.8.1.tar.gz rename to 8/st-0.8.1.tar.gz diff --git a/old_work/8/st-0.8.1/FAQ b/8/st-0.8.1/FAQ similarity index 100% rename from old_work/8/st-0.8.1/FAQ rename to 8/st-0.8.1/FAQ diff --git a/old_work/8/st-0.8.1/LEGACY b/8/st-0.8.1/LEGACY similarity index 100% rename from old_work/8/st-0.8.1/LEGACY rename to 8/st-0.8.1/LEGACY diff --git a/old_work/8/st-0.8.1/LICENSE b/8/st-0.8.1/LICENSE similarity index 100% rename from old_work/8/st-0.8.1/LICENSE rename to 8/st-0.8.1/LICENSE diff --git a/old_work/8/st-0.8.1/Makefile b/8/st-0.8.1/Makefile similarity index 100% rename from old_work/8/st-0.8.1/Makefile rename to 8/st-0.8.1/Makefile diff --git a/README b/8/st-0.8.1/README similarity index 100% rename from README rename to 8/st-0.8.1/README diff --git a/old_work/8/st-0.8.1/TODO b/8/st-0.8.1/TODO similarity index 100% rename from old_work/8/st-0.8.1/TODO rename to 8/st-0.8.1/TODO diff --git a/old_work/8/st-0.8.1/arg.h b/8/st-0.8.1/arg.h similarity index 100% rename from old_work/8/st-0.8.1/arg.h rename to 8/st-0.8.1/arg.h diff --git a/old_work/8/st-0.8.1/config.def.h b/8/st-0.8.1/config.def.h similarity index 100% rename from old_work/8/st-0.8.1/config.def.h rename to 8/st-0.8.1/config.def.h diff --git a/old_work/8/st-0.8.1/config.def.h.rej b/8/st-0.8.1/config.def.h.rej similarity index 100% rename from old_work/8/st-0.8.1/config.def.h.rej rename to 8/st-0.8.1/config.def.h.rej diff --git a/old_work/8/st-0.8.1/config.h b/8/st-0.8.1/config.h similarity index 100% rename from old_work/8/st-0.8.1/config.h rename to 8/st-0.8.1/config.h diff --git a/old_work/8/st-0.8.1/config.mk b/8/st-0.8.1/config.mk similarity index 100% rename from old_work/8/st-0.8.1/config.mk rename to 8/st-0.8.1/config.mk diff --git a/old_work/8/st-0.8.1/st b/8/st-0.8.1/st similarity index 100% rename from old_work/8/st-0.8.1/st rename to 8/st-0.8.1/st diff --git a/old_work/8/st-0.8.1/st.1 b/8/st-0.8.1/st.1 similarity index 100% rename from old_work/8/st-0.8.1/st.1 rename to 8/st-0.8.1/st.1 diff --git a/old_work/8/st-0.8.1/st.c b/8/st-0.8.1/st.c similarity index 100% rename from old_work/8/st-0.8.1/st.c rename to 8/st-0.8.1/st.c diff --git a/old_work/8/st-0.8.1/st.h b/8/st-0.8.1/st.h similarity index 100% rename from old_work/8/st-0.8.1/st.h rename to 8/st-0.8.1/st.h diff --git a/old_work/8/st-0.8.1/st.info b/8/st-0.8.1/st.info similarity index 100% rename from old_work/8/st-0.8.1/st.info rename to 8/st-0.8.1/st.info diff --git a/old_work/8/st-0.8.1/win.h b/8/st-0.8.1/win.h similarity index 100% rename from old_work/8/st-0.8.1/win.h rename to 8/st-0.8.1/win.h diff --git a/old_work/8/st-0.8.1/x.c b/8/st-0.8.1/x.c similarity index 100% rename from old_work/8/st-0.8.1/x.c rename to 8/st-0.8.1/x.c diff --git a/old_work/8/st-0.8.1/x.c.rej b/8/st-0.8.1/x.c.rej similarity index 100% rename from old_work/8/st-0.8.1/x.c.rej rename to 8/st-0.8.1/x.c.rej diff --git a/old_work/8/st-alpha-0.8.1.diff b/8/st-alpha-0.8.1.diff similarity index 100% rename from old_work/8/st-alpha-0.8.1.diff rename to 8/st-alpha-0.8.1.diff diff --git a/old_work/8/st-clipboard-0.8.1.diff b/8/st-clipboard-0.8.1.diff similarity index 100% rename from old_work/8/st-clipboard-0.8.1.diff rename to 8/st-clipboard-0.8.1.diff diff --git a/old_work/8/st-visualbell-0.8.1.diff b/8/st-visualbell-0.8.1.diff similarity index 100% rename from old_work/8/st-visualbell-0.8.1.diff rename to 8/st-visualbell-0.8.1.diff diff --git a/old_work/8/st-xresources-20180309-c5ba9c0.diff b/8/st-xresources-20180309-c5ba9c0.diff similarity index 100% rename from old_work/8/st-xresources-20180309-c5ba9c0.diff rename to 8/st-xresources-20180309-c5ba9c0.diff diff --git a/FAQ b/FAQ index 0f9609d..3502c60 100644 --- a/FAQ +++ b/FAQ @@ -1,14 +1,12 @@ ## Why does st not handle utmp entries? -Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task. - +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 manually run `tic -sx st.info`. - +you can manualy run `tic -s st.info`. ## Nothing works, and nothing is said about an unknown terminal! @@ -17,21 +15,19 @@ you can manually run `tic -sx 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. - * `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. +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? @@ -88,14 +84,12 @@ 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 @@ -104,14 +98,13 @@ 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 @@ -166,85 +159,9 @@ 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] https://st.suckless.org/patches/delkey +[1] http://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 d80eb47..e61610a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,16 +1,13 @@ MIT/X Consortium License -© 2014-2020 Hiltjo Posthuma -© 2018 Devin J. Pohly -© 2014-2017 Quentin Rameau © 2009-2012 Aurélien APTEL -© 2008-2017 Anselm R Garbe -© 2012-2017 Roberto E. Vargas Caballero -© 2012-2016 Christoph Lohmann <20h at r-36 dot net> +© 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-2014 Eric Pruitt +© 2013 Eric Pruitt © 2013 Michael Forney © 2013-2014 Markus Teich © 2014-2015 Laslo Hunhold diff --git a/Makefile b/Makefile index 6dfa212..9e52d13 100644 --- a/Makefile +++ b/Makefile @@ -1,58 +1,60 @@ # st - simple terminal # See LICENSE file for copyright and license details. -.POSIX: include config.mk -SRC = st.c x.c boxdraw.c -OBJ = $(SRC:.c=.o) +SRC = st.c +OBJ = ${SRC:.c=.o} all: options st options: @echo st build options: - @echo "CFLAGS = $(STCFLAGS)" - @echo "LDFLAGS = $(STLDFLAGS)" - @echo "CC = $(CC)" + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" config.h: cp config.def.h config.h .c.o: - $(CC) $(STCFLAGS) -c $< + @echo CC $< + @${CC} -c ${CFLAGS} $< -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 -$(OBJ): config.h config.mk - -st: $(OBJ) - $(CC) -o $@ $(OBJ) $(STLDFLAGS) +st: ${OBJ} + @echo CC -o $@ + @${CC} -o $@ ${OBJ} ${LDFLAGS} clean: - rm -f st $(OBJ) st-$(VERSION).tar.gz + @echo cleaning + @rm -f st ${OBJ} st-${VERSION}.tar.gz dist: clean - 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) + @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: 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 +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: - rm -f $(DESTDIR)$(PREFIX)/bin/st - rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 + @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/old_work/README.MD b/README.MD similarity index 100% rename from old_work/README.MD rename to README.MD diff --git a/old_work/README.st b/README.st similarity index 100% rename from old_work/README.st rename to README.st diff --git a/arg.h b/arg.h index a22e019..ba3fb3f 100644 --- a/arg.h +++ b/arg.h @@ -21,30 +21,28 @@ extern char *argv0; argc--;\ break;\ }\ - int i_;\ - for (i_ = 1, brk_ = 0, argv_ = argv;\ - argv[0][i_] && !brk_;\ - i_++) {\ + for (brk_ = 0, argv[0]++, argv_ = argv;\ + argv[0][0] && !brk_;\ + argv[0]++) {\ if (argv_ != argv)\ break;\ - argc_ = argv[0][i_];\ + argc_ = argv[0][0];\ switch (argc_) - #define ARGEND }\ } #define ARGC() argc_ -#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ +#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ ((x), abort(), (char *)0) :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ + (brk_ = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ (argc--, argv++, argv[0]))) -#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ +#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ (char *)0 :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ + (brk_ = 1, (argv[0][1] != '\0')?\ + (&argv[0][1]) :\ (argc--, argv++, argv[0]))) #endif diff --git a/boxdraw.c b/boxdraw.c deleted file mode 100644 index 28a92d0..0000000 --- a/boxdraw.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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 deleted file mode 100644 index 7890500..0000000 --- a/boxdraw_data.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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 82df958..846e23c 100644 --- a/config.def.h +++ b/config.def.h @@ -5,25 +5,23 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; +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: scroll and/or utmp + * 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"; -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"; +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 */ -char *vtiden = "\033[?6c"; +static char vtiden[] = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; @@ -32,36 +30,20 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: L" `'\"()[]{}" + * More advanced example: " `'\"()[]{}" */ -//wchar_t *worddelimiters = L" "; -wchar_t *worddelimiters = L" `'\"()[]{}"; +static char worddelimiters[] = " `'\"()[]{}"; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600; /* alt screens */ -int allowaltscreen = 1; +static int allowaltscreen = 1; -/* 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; +/* 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 @@ -74,18 +56,6 @@ 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 @@ -93,7 +63,7 @@ const int boxdraw_braille = 0; static int bellvolume = 0; /* default TERM value */ -char *termname = "st-256color"; +static char termname[] = "st-256color"; /* * spaces per tab @@ -110,39 +80,51 @@ char *termname = "st-256color"; * * stty tabs */ -unsigned int tabspaces = 8; +static unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.8; +static const int alpha = 0xdd; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { - /* 8 normal colors */ - "black", - "red3", - "green3", - "yellow3", - "blue2", - "magenta3", - "cyan3", - "gray90", + /* 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 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", +/* 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 */ }; @@ -150,69 +132,47 @@ static const char *colorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 7; -unsigned int defaultbg = 258; -static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; +static unsigned int defaultfg = 12; +static unsigned int defaultbg = 8; +static unsigned int defaultcs = 14; +static unsigned int defaultrcs = 15; /* - * 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 + * Default shape of cursor + * 2: Block ("█") + * 4: Underline ("_") + * 6: Bar ("|") + * 7: Snowman ("☃") */ -static unsigned int cursorstyle = 1; -static Rune stcursor = 0x2603; /* snowman (U+2603) */ +static unsigned int cursorshape = 2; /* - * Default columns and rows numbers + * Default colour and shape of the mouse cursor */ - -static unsigned int cols = 80; -static unsigned int rows = 24; +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; /* - * Default shape of the mouse cursor + * 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 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; +static unsigned int defaultitalic = 11; +static unsigned int defaultunderline = 7; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* 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"} }, + /* button mask string */ + { Button4, XK_ANY_MOD, "\031" }, + { Button5, XK_ANY_MOD, "\005" }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask -#define TERMMOD (ControlMask|ShiftMask) static Shortcut shortcuts[] = { /* mask keysym function argument */ @@ -220,14 +180,15 @@ static Shortcut shortcuts[] = { { 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} }, + { 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} }, - { TERMMOD, XK_Num_Lock, numlock, {.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} }, }; /* @@ -245,6 +206,10 @@ 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 @@ -263,221 +228,214 @@ 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 */ - { 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}, + /* 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}, }; /* @@ -499,3 +457,4 @@ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~"; + diff --git a/old_work/config.def.h~ b/config.def.h~ similarity index 100% rename from old_work/config.def.h~ rename to config.def.h~ diff --git a/config.h b/config.h index 68aaf22..a3680f5 100644 --- a/config.h +++ b/config.h @@ -5,25 +5,24 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; +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: scroll and/or utmp + * 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"; -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"; +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 */ -char *vtiden = "\033[?6c"; +static char vtiden[] = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; @@ -32,36 +31,20 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: L" `'\"()[]{}" + * More advanced example: " `'\"()[]{}" */ -//wchar_t *worddelimiters = L" "; -wchar_t *worddelimiters = L" `'\"()[]{}"; +static char worddelimiters[] = " `'\"()[]{}"; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600; /* alt screens */ -int allowaltscreen = 1; +static int allowaltscreen = 1; -/* 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; +/* 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 @@ -74,18 +57,6 @@ 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 @@ -93,7 +64,7 @@ const int boxdraw_braille = 0; static int bellvolume = 0; /* default TERM value */ -char *termname = "st-256color"; +static char termname[] = "st-256color"; /* * spaces per tab @@ -110,40 +81,438 @@ char *termname = "st-256color"; * * stty tabs */ -unsigned int tabspaces = 8; +static unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.8; +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[] = { - /* 8 normal colors */ - "black", - "red3", - "green3", - "yellow3", - "blue2", - "magenta3", - "cyan3", - "gray90", +// cobalt neon - /* 8 bright colors */ - "gray50", - "red", - "green", - "yellow", - "#5c5cff", - "magenta", - "cyan", - "white", +"#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 */ - "#cccccc", - "#555555", - "#F0F0A0", - "black", +"#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 */ }; @@ -151,84 +520,84 @@ static const char *colorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 258; -unsigned int defaultbg = 259; -static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; +static unsigned int defaultbg = 256; +static unsigned int defaultfg = 257; +static unsigned int defaultcs = 258; +static unsigned int defaultrcs = 15; /* - * 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 + * 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 cursorstyle = 1; -static Rune stcursor = 0x2603; /* snowman (U+2603) */ +static unsigned int cursorshape = 1; /* - * Default columns and rows numbers + * Default colour and shape of the mouse cursor */ - -static unsigned int cols = 80; -static unsigned int rows = 24; +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; /* - * Default shape of the mouse cursor + * 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 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; +static unsigned int defaultitalic = 11; +static unsigned int defaultunderline = 7; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* 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"} }, + /* button mask string */ + { Button4, XK_ANY_MOD, "\031" }, + { Button5, XK_ANY_MOD, "\005" }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask -#define TERMMOD (ControlMask|ShiftMask) + +/* 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} }, - { 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} }, + // { 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} }, - { TERMMOD, XK_Num_Lock, numlock, {.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} }, + }; /* @@ -246,6 +615,10 @@ 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 @@ -264,221 +637,215 @@ 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 */ - { 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}, + /* 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}, }; /* @@ -500,3 +867,4 @@ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~"; + diff --git a/config.mk b/config.mk index 8e87e12..5806157 100644 --- a/config.mk +++ b/config.mk @@ -1,35 +1,28 @@ # st version -VERSION = 0.8.4 +VERSION = 0.7.truck # 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$(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` +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 -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` +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 = c99 +# CC = cc + diff --git a/old_work/conv/3024 Day.xrdb b/conv/3024 Day.xrdb similarity index 100% rename from old_work/conv/3024 Day.xrdb rename to conv/3024 Day.xrdb diff --git a/old_work/conv/3024 Night.xrdb b/conv/3024 Night.xrdb similarity index 100% rename from old_work/conv/3024 Night.xrdb rename to conv/3024 Night.xrdb diff --git a/old_work/conv/AdventureTime.xrdb b/conv/AdventureTime.xrdb similarity index 100% rename from old_work/conv/AdventureTime.xrdb rename to conv/AdventureTime.xrdb diff --git a/old_work/conv/Afterglow.xrdb b/conv/Afterglow.xrdb similarity index 100% rename from old_work/conv/Afterglow.xrdb rename to conv/Afterglow.xrdb diff --git a/old_work/conv/AlienBlood.xrdb b/conv/AlienBlood.xrdb similarity index 100% rename from old_work/conv/AlienBlood.xrdb rename to conv/AlienBlood.xrdb diff --git a/old_work/conv/Argonaut.xrdb b/conv/Argonaut.xrdb similarity index 100% rename from old_work/conv/Argonaut.xrdb rename to conv/Argonaut.xrdb diff --git a/old_work/conv/Arthur.xrdb b/conv/Arthur.xrdb similarity index 100% rename from old_work/conv/Arthur.xrdb rename to conv/Arthur.xrdb diff --git a/old_work/conv/AtelierSulphurpool.xrdb b/conv/AtelierSulphurpool.xrdb similarity index 100% rename from old_work/conv/AtelierSulphurpool.xrdb rename to conv/AtelierSulphurpool.xrdb diff --git a/old_work/conv/Atom.xrdb b/conv/Atom.xrdb similarity index 100% rename from old_work/conv/Atom.xrdb rename to conv/Atom.xrdb diff --git a/old_work/conv/AtomOneLight.xrdb b/conv/AtomOneLight.xrdb similarity index 100% rename from old_work/conv/AtomOneLight.xrdb rename to conv/AtomOneLight.xrdb diff --git a/old_work/conv/Batman.xrdb b/conv/Batman.xrdb similarity index 100% rename from old_work/conv/Batman.xrdb rename to conv/Batman.xrdb diff --git a/old_work/conv/Belafonte Day.xrdb b/conv/Belafonte Day.xrdb similarity index 100% rename from old_work/conv/Belafonte Day.xrdb rename to conv/Belafonte Day.xrdb diff --git a/old_work/conv/Belafonte Night.xrdb b/conv/Belafonte Night.xrdb similarity index 100% rename from old_work/conv/Belafonte Night.xrdb rename to conv/Belafonte Night.xrdb diff --git a/old_work/conv/BirdsOfParadise.xrdb b/conv/BirdsOfParadise.xrdb similarity index 100% rename from old_work/conv/BirdsOfParadise.xrdb rename to conv/BirdsOfParadise.xrdb diff --git a/old_work/conv/Blazer.xrdb b/conv/Blazer.xrdb similarity index 100% rename from old_work/conv/Blazer.xrdb rename to conv/Blazer.xrdb diff --git a/old_work/conv/Borland.xrdb b/conv/Borland.xrdb similarity index 100% rename from old_work/conv/Borland.xrdb rename to conv/Borland.xrdb diff --git a/old_work/conv/Bright Lights.xrdb b/conv/Bright Lights.xrdb similarity index 100% rename from old_work/conv/Bright Lights.xrdb rename to conv/Bright Lights.xrdb diff --git a/old_work/conv/Broadcast.xrdb b/conv/Broadcast.xrdb similarity index 100% rename from old_work/conv/Broadcast.xrdb rename to conv/Broadcast.xrdb diff --git a/old_work/conv/Brogrammer.xrdb b/conv/Brogrammer.xrdb similarity index 100% rename from old_work/conv/Brogrammer.xrdb rename to conv/Brogrammer.xrdb diff --git a/old_work/conv/C64.xrdb b/conv/C64.xrdb similarity index 100% rename from old_work/conv/C64.xrdb rename to conv/C64.xrdb diff --git a/old_work/conv/CLRS.xrdb b/conv/CLRS.xrdb similarity index 100% rename from old_work/conv/CLRS.xrdb rename to conv/CLRS.xrdb diff --git a/old_work/conv/Chalk.xrdb b/conv/Chalk.xrdb similarity index 100% rename from old_work/conv/Chalk.xrdb rename to conv/Chalk.xrdb diff --git a/old_work/conv/Chalkboard.xrdb b/conv/Chalkboard.xrdb similarity index 100% rename from old_work/conv/Chalkboard.xrdb rename to conv/Chalkboard.xrdb diff --git a/old_work/conv/Ciapre.xrdb b/conv/Ciapre.xrdb similarity index 100% rename from old_work/conv/Ciapre.xrdb rename to conv/Ciapre.xrdb diff --git a/old_work/conv/Cobalt Neon.xrdb b/conv/Cobalt Neon.xrdb similarity index 100% rename from old_work/conv/Cobalt Neon.xrdb rename to conv/Cobalt Neon.xrdb diff --git a/old_work/conv/Cobalt2.xrdb b/conv/Cobalt2.xrdb similarity index 100% rename from old_work/conv/Cobalt2.xrdb rename to conv/Cobalt2.xrdb diff --git a/old_work/conv/CrayonPonyFish.xrdb b/conv/CrayonPonyFish.xrdb similarity index 100% rename from old_work/conv/CrayonPonyFish.xrdb rename to conv/CrayonPonyFish.xrdb diff --git a/old_work/conv/Dark Pastel.xrdb b/conv/Dark Pastel.xrdb similarity index 100% rename from old_work/conv/Dark Pastel.xrdb rename to conv/Dark Pastel.xrdb diff --git a/old_work/conv/Darkside.xrdb b/conv/Darkside.xrdb similarity index 100% rename from old_work/conv/Darkside.xrdb rename to conv/Darkside.xrdb diff --git a/old_work/conv/Desert.xrdb b/conv/Desert.xrdb similarity index 100% rename from old_work/conv/Desert.xrdb rename to conv/Desert.xrdb diff --git a/old_work/conv/DimmedMonokai.xrdb b/conv/DimmedMonokai.xrdb similarity index 100% rename from old_work/conv/DimmedMonokai.xrdb rename to conv/DimmedMonokai.xrdb diff --git a/old_work/conv/DotGov.xrdb b/conv/DotGov.xrdb similarity index 100% rename from old_work/conv/DotGov.xrdb rename to conv/DotGov.xrdb diff --git a/old_work/conv/Dracula.xrdb b/conv/Dracula.xrdb similarity index 100% rename from old_work/conv/Dracula.xrdb rename to conv/Dracula.xrdb diff --git a/old_work/conv/Duotone Dark.xrdb b/conv/Duotone Dark.xrdb similarity index 100% rename from old_work/conv/Duotone Dark.xrdb rename to conv/Duotone Dark.xrdb diff --git a/old_work/conv/ENCOM.xrdb b/conv/ENCOM.xrdb similarity index 100% rename from old_work/conv/ENCOM.xrdb rename to conv/ENCOM.xrdb diff --git a/old_work/conv/Earthsong.xrdb b/conv/Earthsong.xrdb similarity index 100% rename from old_work/conv/Earthsong.xrdb rename to conv/Earthsong.xrdb diff --git a/old_work/conv/Elemental.xrdb b/conv/Elemental.xrdb similarity index 100% rename from old_work/conv/Elemental.xrdb rename to conv/Elemental.xrdb diff --git a/old_work/conv/Elementary.xrdb b/conv/Elementary.xrdb similarity index 100% rename from old_work/conv/Elementary.xrdb rename to conv/Elementary.xrdb diff --git a/old_work/conv/Espresso Libre.xrdb b/conv/Espresso Libre.xrdb similarity index 100% rename from old_work/conv/Espresso Libre.xrdb rename to conv/Espresso Libre.xrdb diff --git a/old_work/conv/Espresso.xrdb b/conv/Espresso.xrdb similarity index 100% rename from old_work/conv/Espresso.xrdb rename to conv/Espresso.xrdb diff --git a/old_work/conv/Fideloper.xrdb b/conv/Fideloper.xrdb similarity index 100% rename from old_work/conv/Fideloper.xrdb rename to conv/Fideloper.xrdb diff --git a/old_work/conv/FirefoxDev.xrdb b/conv/FirefoxDev.xrdb similarity index 100% rename from old_work/conv/FirefoxDev.xrdb rename to conv/FirefoxDev.xrdb diff --git a/old_work/conv/Firewatch.xrdb b/conv/Firewatch.xrdb similarity index 100% rename from old_work/conv/Firewatch.xrdb rename to conv/Firewatch.xrdb diff --git a/old_work/conv/FishTank.xrdb b/conv/FishTank.xrdb similarity index 100% rename from old_work/conv/FishTank.xrdb rename to conv/FishTank.xrdb diff --git a/old_work/conv/Flat.xrdb b/conv/Flat.xrdb similarity index 100% rename from old_work/conv/Flat.xrdb rename to conv/Flat.xrdb diff --git a/old_work/conv/Flatland.xrdb b/conv/Flatland.xrdb similarity index 100% rename from old_work/conv/Flatland.xrdb rename to conv/Flatland.xrdb diff --git a/old_work/conv/Floraverse.xrdb b/conv/Floraverse.xrdb similarity index 100% rename from old_work/conv/Floraverse.xrdb rename to conv/Floraverse.xrdb diff --git a/old_work/conv/ForestBlue.xrdb b/conv/ForestBlue.xrdb similarity index 100% rename from old_work/conv/ForestBlue.xrdb rename to conv/ForestBlue.xrdb diff --git a/old_work/conv/FrontEndDelight.xrdb b/conv/FrontEndDelight.xrdb similarity index 100% rename from old_work/conv/FrontEndDelight.xrdb rename to conv/FrontEndDelight.xrdb diff --git a/old_work/conv/FunForrest.xrdb b/conv/FunForrest.xrdb similarity index 100% rename from old_work/conv/FunForrest.xrdb rename to conv/FunForrest.xrdb diff --git a/old_work/conv/Galaxy.xrdb b/conv/Galaxy.xrdb similarity index 100% rename from old_work/conv/Galaxy.xrdb rename to conv/Galaxy.xrdb diff --git a/old_work/conv/Github.xrdb b/conv/Github.xrdb similarity index 100% rename from old_work/conv/Github.xrdb rename to conv/Github.xrdb diff --git a/old_work/conv/Glacier.xrdb b/conv/Glacier.xrdb similarity index 100% rename from old_work/conv/Glacier.xrdb rename to conv/Glacier.xrdb diff --git a/old_work/conv/Grape.xrdb b/conv/Grape.xrdb similarity index 100% rename from old_work/conv/Grape.xrdb rename to conv/Grape.xrdb diff --git a/old_work/conv/Grass.xrdb b/conv/Grass.xrdb similarity index 100% rename from old_work/conv/Grass.xrdb rename to conv/Grass.xrdb diff --git a/old_work/conv/Gruvbox Dark.xrdb b/conv/Gruvbox Dark.xrdb similarity index 100% rename from old_work/conv/Gruvbox Dark.xrdb rename to conv/Gruvbox Dark.xrdb diff --git a/old_work/conv/Hardcore.xrdb b/conv/Hardcore.xrdb similarity index 100% rename from old_work/conv/Hardcore.xrdb rename to conv/Hardcore.xrdb diff --git a/old_work/conv/Harper.xrdb b/conv/Harper.xrdb similarity index 100% rename from old_work/conv/Harper.xrdb rename to conv/Harper.xrdb diff --git a/old_work/conv/Highway.xrdb b/conv/Highway.xrdb similarity index 100% rename from old_work/conv/Highway.xrdb rename to conv/Highway.xrdb diff --git a/old_work/conv/Hipster Green.xrdb b/conv/Hipster Green.xrdb similarity index 100% rename from old_work/conv/Hipster Green.xrdb rename to conv/Hipster Green.xrdb diff --git a/old_work/conv/Homebrew.xrdb b/conv/Homebrew.xrdb similarity index 100% rename from old_work/conv/Homebrew.xrdb rename to conv/Homebrew.xrdb diff --git a/old_work/conv/Hurtado.xrdb b/conv/Hurtado.xrdb similarity index 100% rename from old_work/conv/Hurtado.xrdb rename to conv/Hurtado.xrdb diff --git a/old_work/conv/Hybrid.xrdb b/conv/Hybrid.xrdb similarity index 100% rename from old_work/conv/Hybrid.xrdb rename to conv/Hybrid.xrdb diff --git a/old_work/conv/IC_Green_PPL.xrdb b/conv/IC_Green_PPL.xrdb similarity index 100% rename from old_work/conv/IC_Green_PPL.xrdb rename to conv/IC_Green_PPL.xrdb diff --git a/old_work/conv/IC_Orange_PPL.xrdb b/conv/IC_Orange_PPL.xrdb similarity index 100% rename from old_work/conv/IC_Orange_PPL.xrdb rename to conv/IC_Orange_PPL.xrdb diff --git a/old_work/conv/IR_Black.xrdb b/conv/IR_Black.xrdb similarity index 100% rename from old_work/conv/IR_Black.xrdb rename to conv/IR_Black.xrdb diff --git a/old_work/conv/Jackie Brown.xrdb b/conv/Jackie Brown.xrdb similarity index 100% rename from old_work/conv/Jackie Brown.xrdb rename to conv/Jackie Brown.xrdb diff --git a/old_work/conv/Japanesque.xrdb b/conv/Japanesque.xrdb similarity index 100% rename from old_work/conv/Japanesque.xrdb rename to conv/Japanesque.xrdb diff --git a/old_work/conv/Jellybeans.xrdb b/conv/Jellybeans.xrdb similarity index 100% rename from old_work/conv/Jellybeans.xrdb rename to conv/Jellybeans.xrdb diff --git a/old_work/conv/JetBrains Darcula.xrdb b/conv/JetBrains Darcula.xrdb similarity index 100% rename from old_work/conv/JetBrains Darcula.xrdb rename to conv/JetBrains Darcula.xrdb diff --git a/old_work/conv/Kibble.xrdb b/conv/Kibble.xrdb similarity index 100% rename from old_work/conv/Kibble.xrdb rename to conv/Kibble.xrdb diff --git a/old_work/conv/Later This Evening.xrdb b/conv/Later This Evening.xrdb similarity index 100% rename from old_work/conv/Later This Evening.xrdb rename to conv/Later This Evening.xrdb diff --git a/old_work/conv/Lavandula.xrdb b/conv/Lavandula.xrdb similarity index 100% rename from old_work/conv/Lavandula.xrdb rename to conv/Lavandula.xrdb diff --git a/old_work/conv/LiquidCarbon.xrdb b/conv/LiquidCarbon.xrdb similarity index 100% rename from old_work/conv/LiquidCarbon.xrdb rename to conv/LiquidCarbon.xrdb diff --git a/old_work/conv/LiquidCarbonTransparent.xrdb b/conv/LiquidCarbonTransparent.xrdb similarity index 100% rename from old_work/conv/LiquidCarbonTransparent.xrdb rename to conv/LiquidCarbonTransparent.xrdb diff --git a/old_work/conv/LiquidCarbonTransparentInverse.xrdb b/conv/LiquidCarbonTransparentInverse.xrdb similarity index 100% rename from old_work/conv/LiquidCarbonTransparentInverse.xrdb rename to conv/LiquidCarbonTransparentInverse.xrdb diff --git a/old_work/conv/Man Page.xrdb b/conv/Man Page.xrdb similarity index 100% rename from old_work/conv/Man Page.xrdb rename to conv/Man Page.xrdb diff --git a/old_work/conv/Material.xrdb b/conv/Material.xrdb similarity index 100% rename from old_work/conv/Material.xrdb rename to conv/Material.xrdb diff --git a/old_work/conv/MaterialDark.xrdb b/conv/MaterialDark.xrdb similarity index 100% rename from old_work/conv/MaterialDark.xrdb rename to conv/MaterialDark.xrdb diff --git a/old_work/conv/Mathias.xrdb b/conv/Mathias.xrdb similarity index 100% rename from old_work/conv/Mathias.xrdb rename to conv/Mathias.xrdb diff --git a/old_work/conv/Medallion.xrdb b/conv/Medallion.xrdb similarity index 100% rename from old_work/conv/Medallion.xrdb rename to conv/Medallion.xrdb diff --git a/old_work/conv/Misterioso.xrdb b/conv/Misterioso.xrdb similarity index 100% rename from old_work/conv/Misterioso.xrdb rename to conv/Misterioso.xrdb diff --git a/old_work/conv/Molokai.xrdb b/conv/Molokai.xrdb similarity index 100% rename from old_work/conv/Molokai.xrdb rename to conv/Molokai.xrdb diff --git a/old_work/conv/MonaLisa.xrdb b/conv/MonaLisa.xrdb similarity index 100% rename from old_work/conv/MonaLisa.xrdb rename to conv/MonaLisa.xrdb diff --git a/old_work/conv/Monokai Soda.xrdb b/conv/Monokai Soda.xrdb similarity index 100% rename from old_work/conv/Monokai Soda.xrdb rename to conv/Monokai Soda.xrdb diff --git a/old_work/conv/Monokai Vivid.xrdb b/conv/Monokai Vivid.xrdb similarity index 100% rename from old_work/conv/Monokai Vivid.xrdb rename to conv/Monokai Vivid.xrdb diff --git a/old_work/conv/N0tch2k.xrdb b/conv/N0tch2k.xrdb similarity index 100% rename from old_work/conv/N0tch2k.xrdb rename to conv/N0tch2k.xrdb diff --git a/old_work/conv/Neopolitan.xrdb b/conv/Neopolitan.xrdb similarity index 100% rename from old_work/conv/Neopolitan.xrdb rename to conv/Neopolitan.xrdb diff --git a/old_work/conv/Neutron.xrdb b/conv/Neutron.xrdb similarity index 100% rename from old_work/conv/Neutron.xrdb rename to conv/Neutron.xrdb diff --git a/old_work/conv/NightLion v1.xrdb b/conv/NightLion v1.xrdb similarity index 100% rename from old_work/conv/NightLion v1.xrdb rename to conv/NightLion v1.xrdb diff --git a/old_work/conv/NightLion v2.xrdb b/conv/NightLion v2.xrdb similarity index 100% rename from old_work/conv/NightLion v2.xrdb rename to conv/NightLion v2.xrdb diff --git a/old_work/conv/Novel.xrdb b/conv/Novel.xrdb similarity index 100% rename from old_work/conv/Novel.xrdb rename to conv/Novel.xrdb diff --git a/old_work/conv/Obsidian.xrdb b/conv/Obsidian.xrdb similarity index 100% rename from old_work/conv/Obsidian.xrdb rename to conv/Obsidian.xrdb diff --git a/old_work/conv/Ocean.xrdb b/conv/Ocean.xrdb similarity index 100% rename from old_work/conv/Ocean.xrdb rename to conv/Ocean.xrdb diff --git a/old_work/conv/OceanicMaterial.xrdb b/conv/OceanicMaterial.xrdb similarity index 100% rename from old_work/conv/OceanicMaterial.xrdb rename to conv/OceanicMaterial.xrdb diff --git a/old_work/conv/Ollie.xrdb b/conv/Ollie.xrdb similarity index 100% rename from old_work/conv/Ollie.xrdb rename to conv/Ollie.xrdb diff --git a/old_work/conv/OneHalfDark.xrdb b/conv/OneHalfDark.xrdb similarity index 100% rename from old_work/conv/OneHalfDark.xrdb rename to conv/OneHalfDark.xrdb diff --git a/old_work/conv/OneHalfLight.xrdb b/conv/OneHalfLight.xrdb similarity index 100% rename from old_work/conv/OneHalfLight.xrdb rename to conv/OneHalfLight.xrdb diff --git a/old_work/conv/Pandora.xrdb b/conv/Pandora.xrdb similarity index 100% rename from old_work/conv/Pandora.xrdb rename to conv/Pandora.xrdb diff --git a/old_work/conv/Paraiso Dark.xrdb b/conv/Paraiso Dark.xrdb similarity index 100% rename from old_work/conv/Paraiso Dark.xrdb rename to conv/Paraiso Dark.xrdb diff --git a/old_work/conv/Parasio Dark.xrdb b/conv/Parasio Dark.xrdb similarity index 100% rename from old_work/conv/Parasio Dark.xrdb rename to conv/Parasio Dark.xrdb diff --git a/old_work/conv/PaulMillr.xrdb b/conv/PaulMillr.xrdb similarity index 100% rename from old_work/conv/PaulMillr.xrdb rename to conv/PaulMillr.xrdb diff --git a/old_work/conv/PencilDark.xrdb b/conv/PencilDark.xrdb similarity index 100% rename from old_work/conv/PencilDark.xrdb rename to conv/PencilDark.xrdb diff --git a/old_work/conv/PencilLight.xrdb b/conv/PencilLight.xrdb similarity index 100% rename from old_work/conv/PencilLight.xrdb rename to conv/PencilLight.xrdb diff --git a/old_work/conv/Piatto Light.xrdb b/conv/Piatto Light.xrdb similarity index 100% rename from old_work/conv/Piatto Light.xrdb rename to conv/Piatto Light.xrdb diff --git a/old_work/conv/Pnevma.xrdb b/conv/Pnevma.xrdb similarity index 100% rename from old_work/conv/Pnevma.xrdb rename to conv/Pnevma.xrdb diff --git a/old_work/conv/Pro.xrdb b/conv/Pro.xrdb similarity index 100% rename from old_work/conv/Pro.xrdb rename to conv/Pro.xrdb diff --git a/old_work/conv/Red Alert.xrdb b/conv/Red Alert.xrdb similarity index 100% rename from old_work/conv/Red Alert.xrdb rename to conv/Red Alert.xrdb diff --git a/old_work/conv/Red Sands.xrdb b/conv/Red Sands.xrdb similarity index 100% rename from old_work/conv/Red Sands.xrdb rename to conv/Red Sands.xrdb diff --git a/old_work/conv/Rippedcasts.xrdb b/conv/Rippedcasts.xrdb similarity index 100% rename from old_work/conv/Rippedcasts.xrdb rename to conv/Rippedcasts.xrdb diff --git a/old_work/conv/Royal.xrdb b/conv/Royal.xrdb similarity index 100% rename from old_work/conv/Royal.xrdb rename to conv/Royal.xrdb diff --git a/old_work/conv/Ryuuko.xrdb b/conv/Ryuuko.xrdb similarity index 100% rename from old_work/conv/Ryuuko.xrdb rename to conv/Ryuuko.xrdb diff --git a/old_work/conv/SeaShells.xrdb b/conv/SeaShells.xrdb similarity index 100% rename from old_work/conv/SeaShells.xrdb rename to conv/SeaShells.xrdb diff --git a/old_work/conv/Seafoam Pastel.xrdb b/conv/Seafoam Pastel.xrdb similarity index 100% rename from old_work/conv/Seafoam Pastel.xrdb rename to conv/Seafoam Pastel.xrdb diff --git a/old_work/conv/Seti.xrdb b/conv/Seti.xrdb similarity index 100% rename from old_work/conv/Seti.xrdb rename to conv/Seti.xrdb diff --git a/old_work/conv/Shaman.xrdb b/conv/Shaman.xrdb similarity index 100% rename from old_work/conv/Shaman.xrdb rename to conv/Shaman.xrdb diff --git a/old_work/conv/Slate.xrdb b/conv/Slate.xrdb similarity index 100% rename from old_work/conv/Slate.xrdb rename to conv/Slate.xrdb diff --git a/old_work/conv/Smyck.xrdb b/conv/Smyck.xrdb similarity index 100% rename from old_work/conv/Smyck.xrdb rename to conv/Smyck.xrdb diff --git a/old_work/conv/SoftServer.xrdb b/conv/SoftServer.xrdb similarity index 100% rename from old_work/conv/SoftServer.xrdb rename to conv/SoftServer.xrdb diff --git a/old_work/conv/Solarized Darcula.xrdb b/conv/Solarized Darcula.xrdb similarity index 100% rename from old_work/conv/Solarized Darcula.xrdb rename to conv/Solarized Darcula.xrdb diff --git a/old_work/conv/Solarized Dark - Patched.xrdb b/conv/Solarized Dark - Patched.xrdb similarity index 100% rename from old_work/conv/Solarized Dark - Patched.xrdb rename to conv/Solarized Dark - Patched.xrdb diff --git a/old_work/conv/Solarized Dark Higher Contrast.xrdb b/conv/Solarized Dark Higher Contrast.xrdb similarity index 100% rename from old_work/conv/Solarized Dark Higher Contrast.xrdb rename to conv/Solarized Dark Higher Contrast.xrdb diff --git a/old_work/conv/Solarized Dark.xrdb b/conv/Solarized Dark.xrdb similarity index 100% rename from old_work/conv/Solarized Dark.xrdb rename to conv/Solarized Dark.xrdb diff --git a/old_work/conv/Solarized Light.xrdb b/conv/Solarized Light.xrdb similarity index 100% rename from old_work/conv/Solarized Light.xrdb rename to conv/Solarized Light.xrdb diff --git a/old_work/conv/SpaceGray Eighties Dull.xrdb b/conv/SpaceGray Eighties Dull.xrdb similarity index 100% rename from old_work/conv/SpaceGray Eighties Dull.xrdb rename to conv/SpaceGray Eighties Dull.xrdb diff --git a/old_work/conv/SpaceGray Eighties.xrdb b/conv/SpaceGray Eighties.xrdb similarity index 100% rename from old_work/conv/SpaceGray Eighties.xrdb rename to conv/SpaceGray Eighties.xrdb diff --git a/old_work/conv/SpaceGray.xrdb b/conv/SpaceGray.xrdb similarity index 100% rename from old_work/conv/SpaceGray.xrdb rename to conv/SpaceGray.xrdb diff --git a/old_work/conv/Spacedust.xrdb b/conv/Spacedust.xrdb similarity index 100% rename from old_work/conv/Spacedust.xrdb rename to conv/Spacedust.xrdb diff --git a/old_work/conv/Spiderman.xrdb b/conv/Spiderman.xrdb similarity index 100% rename from old_work/conv/Spiderman.xrdb rename to conv/Spiderman.xrdb diff --git a/old_work/conv/Spring.xrdb b/conv/Spring.xrdb similarity index 100% rename from old_work/conv/Spring.xrdb rename to conv/Spring.xrdb diff --git a/old_work/conv/Square.xrdb b/conv/Square.xrdb similarity index 100% rename from old_work/conv/Square.xrdb rename to conv/Square.xrdb diff --git a/old_work/conv/Sundried.xrdb b/conv/Sundried.xrdb similarity index 100% rename from old_work/conv/Sundried.xrdb rename to conv/Sundried.xrdb diff --git a/old_work/conv/Symfonic.xrdb b/conv/Symfonic.xrdb similarity index 100% rename from old_work/conv/Symfonic.xrdb rename to conv/Symfonic.xrdb diff --git a/old_work/conv/Teerb.xrdb b/conv/Teerb.xrdb similarity index 100% rename from old_work/conv/Teerb.xrdb rename to conv/Teerb.xrdb diff --git a/old_work/conv/Terminal Basic.xrdb b/conv/Terminal Basic.xrdb similarity index 100% rename from old_work/conv/Terminal Basic.xrdb rename to conv/Terminal Basic.xrdb diff --git a/old_work/conv/Thayer Bright.xrdb b/conv/Thayer Bright.xrdb similarity index 100% rename from old_work/conv/Thayer Bright.xrdb rename to conv/Thayer Bright.xrdb diff --git a/old_work/conv/The Hulk.xrdb b/conv/The Hulk.xrdb similarity index 100% rename from old_work/conv/The Hulk.xrdb rename to conv/The Hulk.xrdb diff --git a/old_work/conv/Tomorrow Night Blue.xrdb b/conv/Tomorrow Night Blue.xrdb similarity index 100% rename from old_work/conv/Tomorrow Night Blue.xrdb rename to conv/Tomorrow Night Blue.xrdb diff --git a/old_work/conv/Tomorrow Night Bright.xrdb b/conv/Tomorrow Night Bright.xrdb similarity index 100% rename from old_work/conv/Tomorrow Night Bright.xrdb rename to conv/Tomorrow Night Bright.xrdb diff --git a/old_work/conv/Tomorrow Night Eighties.xrdb b/conv/Tomorrow Night Eighties.xrdb similarity index 100% rename from old_work/conv/Tomorrow Night Eighties.xrdb rename to conv/Tomorrow Night Eighties.xrdb diff --git a/old_work/conv/Tomorrow Night.xrdb b/conv/Tomorrow Night.xrdb similarity index 100% rename from old_work/conv/Tomorrow Night.xrdb rename to conv/Tomorrow Night.xrdb diff --git a/old_work/conv/Tomorrow.xrdb b/conv/Tomorrow.xrdb similarity index 100% rename from old_work/conv/Tomorrow.xrdb rename to conv/Tomorrow.xrdb diff --git a/old_work/conv/ToyChest.xrdb b/conv/ToyChest.xrdb similarity index 100% rename from old_work/conv/ToyChest.xrdb rename to conv/ToyChest.xrdb diff --git a/old_work/conv/Treehouse.xrdb b/conv/Treehouse.xrdb similarity index 100% rename from old_work/conv/Treehouse.xrdb rename to conv/Treehouse.xrdb diff --git a/old_work/conv/Twilight.xrdb b/conv/Twilight.xrdb similarity index 100% rename from old_work/conv/Twilight.xrdb rename to conv/Twilight.xrdb diff --git a/old_work/conv/Ubuntu.xrdb b/conv/Ubuntu.xrdb similarity index 100% rename from old_work/conv/Ubuntu.xrdb rename to conv/Ubuntu.xrdb diff --git a/old_work/conv/UnderTheSea.xrdb b/conv/UnderTheSea.xrdb similarity index 100% rename from old_work/conv/UnderTheSea.xrdb rename to conv/UnderTheSea.xrdb diff --git a/old_work/conv/Urple.xrdb b/conv/Urple.xrdb similarity index 100% rename from old_work/conv/Urple.xrdb rename to conv/Urple.xrdb diff --git a/old_work/conv/Vaughn.xrdb b/conv/Vaughn.xrdb similarity index 100% rename from old_work/conv/Vaughn.xrdb rename to conv/Vaughn.xrdb diff --git a/old_work/conv/VibrantInk.xrdb b/conv/VibrantInk.xrdb similarity index 100% rename from old_work/conv/VibrantInk.xrdb rename to conv/VibrantInk.xrdb diff --git a/old_work/conv/Violet Dark.xrdb b/conv/Violet Dark.xrdb similarity index 100% rename from old_work/conv/Violet Dark.xrdb rename to conv/Violet Dark.xrdb diff --git a/old_work/conv/Violet Light.xrdb b/conv/Violet Light.xrdb similarity index 100% rename from old_work/conv/Violet Light.xrdb rename to conv/Violet Light.xrdb diff --git a/old_work/conv/WarmNeon.xrdb b/conv/WarmNeon.xrdb similarity index 100% rename from old_work/conv/WarmNeon.xrdb rename to conv/WarmNeon.xrdb diff --git a/old_work/conv/Wez.xrdb b/conv/Wez.xrdb similarity index 100% rename from old_work/conv/Wez.xrdb rename to conv/Wez.xrdb diff --git a/old_work/conv/WildCherry.xrdb b/conv/WildCherry.xrdb similarity index 100% rename from old_work/conv/WildCherry.xrdb rename to conv/WildCherry.xrdb diff --git a/old_work/conv/Wombat.xrdb b/conv/Wombat.xrdb similarity index 100% rename from old_work/conv/Wombat.xrdb rename to conv/Wombat.xrdb diff --git a/old_work/conv/Wryan.xrdb b/conv/Wryan.xrdb similarity index 100% rename from old_work/conv/Wryan.xrdb rename to conv/Wryan.xrdb diff --git a/old_work/conv/Zenburn.xrdb b/conv/Zenburn.xrdb similarity index 100% rename from old_work/conv/Zenburn.xrdb rename to conv/Zenburn.xrdb diff --git a/old_work/conv/ayu.xrdb b/conv/ayu.xrdb similarity index 100% rename from old_work/conv/ayu.xrdb rename to conv/ayu.xrdb diff --git a/old_work/conv/ayu_light.xrdb b/conv/ayu_light.xrdb similarity index 100% rename from old_work/conv/ayu_light.xrdb rename to conv/ayu_light.xrdb diff --git a/old_work/conv/deep.xrdb b/conv/deep.xrdb similarity index 100% rename from old_work/conv/deep.xrdb rename to conv/deep.xrdb diff --git a/old_work/conv/idleToes.xrdb b/conv/idleToes.xrdb similarity index 100% rename from old_work/conv/idleToes.xrdb rename to conv/idleToes.xrdb diff --git a/old_work/iterm2colors/.gitignore b/iterm2colors/.gitignore similarity index 100% rename from old_work/iterm2colors/.gitignore rename to iterm2colors/.gitignore diff --git a/old_work/iterm2colors/README.md b/iterm2colors/README.md similarity index 100% rename from old_work/iterm2colors/README.md rename to iterm2colors/README.md diff --git a/old_work/iterm2colors/Xresources/3024 Day b/iterm2colors/Xresources/3024 Day similarity index 100% rename from old_work/iterm2colors/Xresources/3024 Day rename to iterm2colors/Xresources/3024 Day diff --git a/old_work/iterm2colors/Xresources/3024 Night b/iterm2colors/Xresources/3024 Night similarity index 100% rename from old_work/iterm2colors/Xresources/3024 Night rename to iterm2colors/Xresources/3024 Night diff --git a/old_work/iterm2colors/Xresources/AdventureTime b/iterm2colors/Xresources/AdventureTime similarity index 100% rename from old_work/iterm2colors/Xresources/AdventureTime rename to iterm2colors/Xresources/AdventureTime diff --git a/old_work/iterm2colors/Xresources/Afterglow b/iterm2colors/Xresources/Afterglow similarity index 100% rename from old_work/iterm2colors/Xresources/Afterglow rename to iterm2colors/Xresources/Afterglow diff --git a/old_work/iterm2colors/Xresources/AlienBlood b/iterm2colors/Xresources/AlienBlood similarity index 100% rename from old_work/iterm2colors/Xresources/AlienBlood rename to iterm2colors/Xresources/AlienBlood diff --git a/old_work/iterm2colors/Xresources/Argonaut b/iterm2colors/Xresources/Argonaut similarity index 100% rename from old_work/iterm2colors/Xresources/Argonaut rename to iterm2colors/Xresources/Argonaut diff --git a/old_work/iterm2colors/Xresources/Arthur b/iterm2colors/Xresources/Arthur similarity index 100% rename from old_work/iterm2colors/Xresources/Arthur rename to iterm2colors/Xresources/Arthur diff --git a/old_work/iterm2colors/Xresources/AtelierSulphurpool b/iterm2colors/Xresources/AtelierSulphurpool similarity index 100% rename from old_work/iterm2colors/Xresources/AtelierSulphurpool rename to iterm2colors/Xresources/AtelierSulphurpool diff --git a/old_work/iterm2colors/Xresources/Atom b/iterm2colors/Xresources/Atom similarity index 100% rename from old_work/iterm2colors/Xresources/Atom rename to iterm2colors/Xresources/Atom diff --git a/old_work/iterm2colors/Xresources/AtomOneLight b/iterm2colors/Xresources/AtomOneLight similarity index 100% rename from old_work/iterm2colors/Xresources/AtomOneLight rename to iterm2colors/Xresources/AtomOneLight diff --git a/old_work/iterm2colors/Xresources/Batman b/iterm2colors/Xresources/Batman similarity index 100% rename from old_work/iterm2colors/Xresources/Batman rename to iterm2colors/Xresources/Batman diff --git a/old_work/iterm2colors/Xresources/Belafonte Day b/iterm2colors/Xresources/Belafonte Day similarity index 100% rename from old_work/iterm2colors/Xresources/Belafonte Day rename to iterm2colors/Xresources/Belafonte Day diff --git a/old_work/iterm2colors/Xresources/Belafonte Night b/iterm2colors/Xresources/Belafonte Night similarity index 100% rename from old_work/iterm2colors/Xresources/Belafonte Night rename to iterm2colors/Xresources/Belafonte Night diff --git a/old_work/iterm2colors/Xresources/BirdsOfParadise b/iterm2colors/Xresources/BirdsOfParadise similarity index 100% rename from old_work/iterm2colors/Xresources/BirdsOfParadise rename to iterm2colors/Xresources/BirdsOfParadise diff --git a/old_work/iterm2colors/Xresources/Blazer b/iterm2colors/Xresources/Blazer similarity index 100% rename from old_work/iterm2colors/Xresources/Blazer rename to iterm2colors/Xresources/Blazer diff --git a/old_work/iterm2colors/Xresources/Borland b/iterm2colors/Xresources/Borland similarity index 100% rename from old_work/iterm2colors/Xresources/Borland rename to iterm2colors/Xresources/Borland diff --git a/old_work/iterm2colors/Xresources/Bright Lights b/iterm2colors/Xresources/Bright Lights similarity index 100% rename from old_work/iterm2colors/Xresources/Bright Lights rename to iterm2colors/Xresources/Bright Lights diff --git a/old_work/iterm2colors/Xresources/Broadcast b/iterm2colors/Xresources/Broadcast similarity index 100% rename from old_work/iterm2colors/Xresources/Broadcast rename to iterm2colors/Xresources/Broadcast diff --git a/old_work/iterm2colors/Xresources/Brogrammer b/iterm2colors/Xresources/Brogrammer similarity index 100% rename from old_work/iterm2colors/Xresources/Brogrammer rename to iterm2colors/Xresources/Brogrammer diff --git a/old_work/iterm2colors/Xresources/C64 b/iterm2colors/Xresources/C64 similarity index 100% rename from old_work/iterm2colors/Xresources/C64 rename to iterm2colors/Xresources/C64 diff --git a/old_work/iterm2colors/Xresources/CLRS b/iterm2colors/Xresources/CLRS similarity index 100% rename from old_work/iterm2colors/Xresources/CLRS rename to iterm2colors/Xresources/CLRS diff --git a/old_work/iterm2colors/Xresources/Chalk b/iterm2colors/Xresources/Chalk similarity index 100% rename from old_work/iterm2colors/Xresources/Chalk rename to iterm2colors/Xresources/Chalk diff --git a/old_work/iterm2colors/Xresources/Chalkboard b/iterm2colors/Xresources/Chalkboard similarity index 100% rename from old_work/iterm2colors/Xresources/Chalkboard rename to iterm2colors/Xresources/Chalkboard diff --git a/old_work/iterm2colors/Xresources/Ciapre b/iterm2colors/Xresources/Ciapre similarity index 100% rename from old_work/iterm2colors/Xresources/Ciapre rename to iterm2colors/Xresources/Ciapre diff --git a/old_work/iterm2colors/Xresources/Cobalt Neon b/iterm2colors/Xresources/Cobalt Neon similarity index 100% rename from old_work/iterm2colors/Xresources/Cobalt Neon rename to iterm2colors/Xresources/Cobalt Neon diff --git a/old_work/iterm2colors/Xresources/Cobalt2 b/iterm2colors/Xresources/Cobalt2 similarity index 100% rename from old_work/iterm2colors/Xresources/Cobalt2 rename to iterm2colors/Xresources/Cobalt2 diff --git a/old_work/iterm2colors/Xresources/CrayonPonyFish b/iterm2colors/Xresources/CrayonPonyFish similarity index 100% rename from old_work/iterm2colors/Xresources/CrayonPonyFish rename to iterm2colors/Xresources/CrayonPonyFish diff --git a/old_work/iterm2colors/Xresources/Dark Pastel b/iterm2colors/Xresources/Dark Pastel similarity index 100% rename from old_work/iterm2colors/Xresources/Dark Pastel rename to iterm2colors/Xresources/Dark Pastel diff --git a/old_work/iterm2colors/Xresources/Darkside b/iterm2colors/Xresources/Darkside similarity index 100% rename from old_work/iterm2colors/Xresources/Darkside rename to iterm2colors/Xresources/Darkside diff --git a/old_work/iterm2colors/Xresources/Desert b/iterm2colors/Xresources/Desert similarity index 100% rename from old_work/iterm2colors/Xresources/Desert rename to iterm2colors/Xresources/Desert diff --git a/old_work/iterm2colors/Xresources/DimmedMonokai b/iterm2colors/Xresources/DimmedMonokai similarity index 100% rename from old_work/iterm2colors/Xresources/DimmedMonokai rename to iterm2colors/Xresources/DimmedMonokai diff --git a/old_work/iterm2colors/Xresources/DotGov b/iterm2colors/Xresources/DotGov similarity index 100% rename from old_work/iterm2colors/Xresources/DotGov rename to iterm2colors/Xresources/DotGov diff --git a/old_work/iterm2colors/Xresources/Dracula b/iterm2colors/Xresources/Dracula similarity index 100% rename from old_work/iterm2colors/Xresources/Dracula rename to iterm2colors/Xresources/Dracula diff --git a/old_work/iterm2colors/Xresources/Duotone Dark b/iterm2colors/Xresources/Duotone Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Duotone Dark rename to iterm2colors/Xresources/Duotone Dark diff --git a/old_work/iterm2colors/Xresources/ENCOM b/iterm2colors/Xresources/ENCOM similarity index 100% rename from old_work/iterm2colors/Xresources/ENCOM rename to iterm2colors/Xresources/ENCOM diff --git a/old_work/iterm2colors/Xresources/Earthsong b/iterm2colors/Xresources/Earthsong similarity index 100% rename from old_work/iterm2colors/Xresources/Earthsong rename to iterm2colors/Xresources/Earthsong diff --git a/old_work/iterm2colors/Xresources/Elemental b/iterm2colors/Xresources/Elemental similarity index 100% rename from old_work/iterm2colors/Xresources/Elemental rename to iterm2colors/Xresources/Elemental diff --git a/old_work/iterm2colors/Xresources/Elementary b/iterm2colors/Xresources/Elementary similarity index 100% rename from old_work/iterm2colors/Xresources/Elementary rename to iterm2colors/Xresources/Elementary diff --git a/old_work/iterm2colors/Xresources/Espresso b/iterm2colors/Xresources/Espresso similarity index 100% rename from old_work/iterm2colors/Xresources/Espresso rename to iterm2colors/Xresources/Espresso diff --git a/old_work/iterm2colors/Xresources/Espresso Libre b/iterm2colors/Xresources/Espresso Libre similarity index 100% rename from old_work/iterm2colors/Xresources/Espresso Libre rename to iterm2colors/Xresources/Espresso Libre diff --git a/old_work/iterm2colors/Xresources/Fideloper b/iterm2colors/Xresources/Fideloper similarity index 100% rename from old_work/iterm2colors/Xresources/Fideloper rename to iterm2colors/Xresources/Fideloper diff --git a/old_work/iterm2colors/Xresources/FirefoxDev b/iterm2colors/Xresources/FirefoxDev similarity index 100% rename from old_work/iterm2colors/Xresources/FirefoxDev rename to iterm2colors/Xresources/FirefoxDev diff --git a/old_work/iterm2colors/Xresources/Firewatch b/iterm2colors/Xresources/Firewatch similarity index 100% rename from old_work/iterm2colors/Xresources/Firewatch rename to iterm2colors/Xresources/Firewatch diff --git a/old_work/iterm2colors/Xresources/FishTank b/iterm2colors/Xresources/FishTank similarity index 100% rename from old_work/iterm2colors/Xresources/FishTank rename to iterm2colors/Xresources/FishTank diff --git a/old_work/iterm2colors/Xresources/Flat b/iterm2colors/Xresources/Flat similarity index 100% rename from old_work/iterm2colors/Xresources/Flat rename to iterm2colors/Xresources/Flat diff --git a/old_work/iterm2colors/Xresources/Flatland b/iterm2colors/Xresources/Flatland similarity index 100% rename from old_work/iterm2colors/Xresources/Flatland rename to iterm2colors/Xresources/Flatland diff --git a/old_work/iterm2colors/Xresources/Floraverse b/iterm2colors/Xresources/Floraverse similarity index 100% rename from old_work/iterm2colors/Xresources/Floraverse rename to iterm2colors/Xresources/Floraverse diff --git a/old_work/iterm2colors/Xresources/ForestBlue b/iterm2colors/Xresources/ForestBlue similarity index 100% rename from old_work/iterm2colors/Xresources/ForestBlue rename to iterm2colors/Xresources/ForestBlue diff --git a/old_work/iterm2colors/Xresources/FrontEndDelight b/iterm2colors/Xresources/FrontEndDelight similarity index 100% rename from old_work/iterm2colors/Xresources/FrontEndDelight rename to iterm2colors/Xresources/FrontEndDelight diff --git a/old_work/iterm2colors/Xresources/FunForrest b/iterm2colors/Xresources/FunForrest similarity index 100% rename from old_work/iterm2colors/Xresources/FunForrest rename to iterm2colors/Xresources/FunForrest diff --git a/old_work/iterm2colors/Xresources/Galaxy b/iterm2colors/Xresources/Galaxy similarity index 100% rename from old_work/iterm2colors/Xresources/Galaxy rename to iterm2colors/Xresources/Galaxy diff --git a/old_work/iterm2colors/Xresources/Github b/iterm2colors/Xresources/Github similarity index 100% rename from old_work/iterm2colors/Xresources/Github rename to iterm2colors/Xresources/Github diff --git a/old_work/iterm2colors/Xresources/Glacier b/iterm2colors/Xresources/Glacier similarity index 100% rename from old_work/iterm2colors/Xresources/Glacier rename to iterm2colors/Xresources/Glacier diff --git a/old_work/iterm2colors/Xresources/Grape b/iterm2colors/Xresources/Grape similarity index 100% rename from old_work/iterm2colors/Xresources/Grape rename to iterm2colors/Xresources/Grape diff --git a/old_work/iterm2colors/Xresources/Grass b/iterm2colors/Xresources/Grass similarity index 100% rename from old_work/iterm2colors/Xresources/Grass rename to iterm2colors/Xresources/Grass diff --git a/old_work/iterm2colors/Xresources/Gruvbox Dark b/iterm2colors/Xresources/Gruvbox Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Gruvbox Dark rename to iterm2colors/Xresources/Gruvbox Dark diff --git a/old_work/iterm2colors/Xresources/Hardcore b/iterm2colors/Xresources/Hardcore similarity index 100% rename from old_work/iterm2colors/Xresources/Hardcore rename to iterm2colors/Xresources/Hardcore diff --git a/old_work/iterm2colors/Xresources/Harper b/iterm2colors/Xresources/Harper similarity index 100% rename from old_work/iterm2colors/Xresources/Harper rename to iterm2colors/Xresources/Harper diff --git a/old_work/iterm2colors/Xresources/Highway b/iterm2colors/Xresources/Highway similarity index 100% rename from old_work/iterm2colors/Xresources/Highway rename to iterm2colors/Xresources/Highway diff --git a/old_work/iterm2colors/Xresources/Hipster Green b/iterm2colors/Xresources/Hipster Green similarity index 100% rename from old_work/iterm2colors/Xresources/Hipster Green rename to iterm2colors/Xresources/Hipster Green diff --git a/old_work/iterm2colors/Xresources/Homebrew b/iterm2colors/Xresources/Homebrew similarity index 100% rename from old_work/iterm2colors/Xresources/Homebrew rename to iterm2colors/Xresources/Homebrew diff --git a/old_work/iterm2colors/Xresources/Hurtado b/iterm2colors/Xresources/Hurtado similarity index 100% rename from old_work/iterm2colors/Xresources/Hurtado rename to iterm2colors/Xresources/Hurtado diff --git a/old_work/iterm2colors/Xresources/Hybrid b/iterm2colors/Xresources/Hybrid similarity index 100% rename from old_work/iterm2colors/Xresources/Hybrid rename to iterm2colors/Xresources/Hybrid diff --git a/old_work/iterm2colors/Xresources/IC_Green_PPL b/iterm2colors/Xresources/IC_Green_PPL similarity index 100% rename from old_work/iterm2colors/Xresources/IC_Green_PPL rename to iterm2colors/Xresources/IC_Green_PPL diff --git a/old_work/iterm2colors/Xresources/IC_Orange_PPL b/iterm2colors/Xresources/IC_Orange_PPL similarity index 100% rename from old_work/iterm2colors/Xresources/IC_Orange_PPL rename to iterm2colors/Xresources/IC_Orange_PPL diff --git a/old_work/iterm2colors/Xresources/IR_Black b/iterm2colors/Xresources/IR_Black similarity index 100% rename from old_work/iterm2colors/Xresources/IR_Black rename to iterm2colors/Xresources/IR_Black diff --git a/old_work/iterm2colors/Xresources/Jackie Brown b/iterm2colors/Xresources/Jackie Brown similarity index 100% rename from old_work/iterm2colors/Xresources/Jackie Brown rename to iterm2colors/Xresources/Jackie Brown diff --git a/old_work/iterm2colors/Xresources/Japanesque b/iterm2colors/Xresources/Japanesque similarity index 100% rename from old_work/iterm2colors/Xresources/Japanesque rename to iterm2colors/Xresources/Japanesque diff --git a/old_work/iterm2colors/Xresources/Jellybeans b/iterm2colors/Xresources/Jellybeans similarity index 100% rename from old_work/iterm2colors/Xresources/Jellybeans rename to iterm2colors/Xresources/Jellybeans diff --git a/old_work/iterm2colors/Xresources/JetBrains Darcula b/iterm2colors/Xresources/JetBrains Darcula similarity index 100% rename from old_work/iterm2colors/Xresources/JetBrains Darcula rename to iterm2colors/Xresources/JetBrains Darcula diff --git a/old_work/iterm2colors/Xresources/Kibble b/iterm2colors/Xresources/Kibble similarity index 100% rename from old_work/iterm2colors/Xresources/Kibble rename to iterm2colors/Xresources/Kibble diff --git a/old_work/iterm2colors/Xresources/Later This Evening b/iterm2colors/Xresources/Later This Evening similarity index 100% rename from old_work/iterm2colors/Xresources/Later This Evening rename to iterm2colors/Xresources/Later This Evening diff --git a/old_work/iterm2colors/Xresources/Lavandula b/iterm2colors/Xresources/Lavandula similarity index 100% rename from old_work/iterm2colors/Xresources/Lavandula rename to iterm2colors/Xresources/Lavandula diff --git a/old_work/iterm2colors/Xresources/LiquidCarbon b/iterm2colors/Xresources/LiquidCarbon similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbon rename to iterm2colors/Xresources/LiquidCarbon diff --git a/old_work/iterm2colors/Xresources/LiquidCarbonTransparent b/iterm2colors/Xresources/LiquidCarbonTransparent similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbonTransparent rename to iterm2colors/Xresources/LiquidCarbonTransparent diff --git a/old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse b/iterm2colors/Xresources/LiquidCarbonTransparentInverse similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse rename to iterm2colors/Xresources/LiquidCarbonTransparentInverse diff --git a/old_work/iterm2colors/Xresources/Man Page b/iterm2colors/Xresources/Man Page similarity index 100% rename from old_work/iterm2colors/Xresources/Man Page rename to iterm2colors/Xresources/Man Page diff --git a/old_work/iterm2colors/Xresources/Material b/iterm2colors/Xresources/Material similarity index 100% rename from old_work/iterm2colors/Xresources/Material rename to iterm2colors/Xresources/Material diff --git a/old_work/iterm2colors/Xresources/MaterialDark b/iterm2colors/Xresources/MaterialDark similarity index 100% rename from old_work/iterm2colors/Xresources/MaterialDark rename to iterm2colors/Xresources/MaterialDark diff --git a/old_work/iterm2colors/Xresources/Mathias b/iterm2colors/Xresources/Mathias similarity index 100% rename from old_work/iterm2colors/Xresources/Mathias rename to iterm2colors/Xresources/Mathias diff --git a/old_work/iterm2colors/Xresources/Medallion b/iterm2colors/Xresources/Medallion similarity index 100% rename from old_work/iterm2colors/Xresources/Medallion rename to iterm2colors/Xresources/Medallion diff --git a/old_work/iterm2colors/Xresources/Misterioso b/iterm2colors/Xresources/Misterioso similarity index 100% rename from old_work/iterm2colors/Xresources/Misterioso rename to iterm2colors/Xresources/Misterioso diff --git a/old_work/iterm2colors/Xresources/Molokai b/iterm2colors/Xresources/Molokai similarity index 100% rename from old_work/iterm2colors/Xresources/Molokai rename to iterm2colors/Xresources/Molokai diff --git a/old_work/iterm2colors/Xresources/MonaLisa b/iterm2colors/Xresources/MonaLisa similarity index 100% rename from old_work/iterm2colors/Xresources/MonaLisa rename to iterm2colors/Xresources/MonaLisa diff --git a/old_work/iterm2colors/Xresources/Monokai Soda b/iterm2colors/Xresources/Monokai Soda similarity index 100% rename from old_work/iterm2colors/Xresources/Monokai Soda rename to iterm2colors/Xresources/Monokai Soda diff --git a/old_work/iterm2colors/Xresources/Monokai Vivid b/iterm2colors/Xresources/Monokai Vivid similarity index 100% rename from old_work/iterm2colors/Xresources/Monokai Vivid rename to iterm2colors/Xresources/Monokai Vivid diff --git a/old_work/iterm2colors/Xresources/N0tch2k b/iterm2colors/Xresources/N0tch2k similarity index 100% rename from old_work/iterm2colors/Xresources/N0tch2k rename to iterm2colors/Xresources/N0tch2k diff --git a/old_work/iterm2colors/Xresources/Neopolitan b/iterm2colors/Xresources/Neopolitan similarity index 100% rename from old_work/iterm2colors/Xresources/Neopolitan rename to iterm2colors/Xresources/Neopolitan diff --git a/old_work/iterm2colors/Xresources/Neutron b/iterm2colors/Xresources/Neutron similarity index 100% rename from old_work/iterm2colors/Xresources/Neutron rename to iterm2colors/Xresources/Neutron diff --git a/old_work/iterm2colors/Xresources/NightLion v1 b/iterm2colors/Xresources/NightLion v1 similarity index 100% rename from old_work/iterm2colors/Xresources/NightLion v1 rename to iterm2colors/Xresources/NightLion v1 diff --git a/old_work/iterm2colors/Xresources/NightLion v2 b/iterm2colors/Xresources/NightLion v2 similarity index 100% rename from old_work/iterm2colors/Xresources/NightLion v2 rename to iterm2colors/Xresources/NightLion v2 diff --git a/old_work/iterm2colors/Xresources/Novel b/iterm2colors/Xresources/Novel similarity index 100% rename from old_work/iterm2colors/Xresources/Novel rename to iterm2colors/Xresources/Novel diff --git a/old_work/iterm2colors/Xresources/Obsidian b/iterm2colors/Xresources/Obsidian similarity index 100% rename from old_work/iterm2colors/Xresources/Obsidian rename to iterm2colors/Xresources/Obsidian diff --git a/old_work/iterm2colors/Xresources/Ocean b/iterm2colors/Xresources/Ocean similarity index 100% rename from old_work/iterm2colors/Xresources/Ocean rename to iterm2colors/Xresources/Ocean diff --git a/old_work/iterm2colors/Xresources/OceanicMaterial b/iterm2colors/Xresources/OceanicMaterial similarity index 100% rename from old_work/iterm2colors/Xresources/OceanicMaterial rename to iterm2colors/Xresources/OceanicMaterial diff --git a/old_work/iterm2colors/Xresources/Ollie b/iterm2colors/Xresources/Ollie similarity index 100% rename from old_work/iterm2colors/Xresources/Ollie rename to iterm2colors/Xresources/Ollie diff --git a/old_work/iterm2colors/Xresources/OneHalfDark b/iterm2colors/Xresources/OneHalfDark similarity index 100% rename from old_work/iterm2colors/Xresources/OneHalfDark rename to iterm2colors/Xresources/OneHalfDark diff --git a/old_work/iterm2colors/Xresources/OneHalfLight b/iterm2colors/Xresources/OneHalfLight similarity index 100% rename from old_work/iterm2colors/Xresources/OneHalfLight rename to iterm2colors/Xresources/OneHalfLight diff --git a/old_work/iterm2colors/Xresources/Pandora b/iterm2colors/Xresources/Pandora similarity index 100% rename from old_work/iterm2colors/Xresources/Pandora rename to iterm2colors/Xresources/Pandora diff --git a/old_work/iterm2colors/Xresources/Paraiso Dark b/iterm2colors/Xresources/Paraiso Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Paraiso Dark rename to iterm2colors/Xresources/Paraiso Dark diff --git a/old_work/iterm2colors/Xresources/Parasio Dark b/iterm2colors/Xresources/Parasio Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Parasio Dark rename to iterm2colors/Xresources/Parasio Dark diff --git a/old_work/iterm2colors/Xresources/PaulMillr b/iterm2colors/Xresources/PaulMillr similarity index 100% rename from old_work/iterm2colors/Xresources/PaulMillr rename to iterm2colors/Xresources/PaulMillr diff --git a/old_work/iterm2colors/Xresources/PencilDark b/iterm2colors/Xresources/PencilDark similarity index 100% rename from old_work/iterm2colors/Xresources/PencilDark rename to iterm2colors/Xresources/PencilDark diff --git a/old_work/iterm2colors/Xresources/PencilLight b/iterm2colors/Xresources/PencilLight similarity index 100% rename from old_work/iterm2colors/Xresources/PencilLight rename to iterm2colors/Xresources/PencilLight diff --git a/old_work/iterm2colors/Xresources/Piatto Light b/iterm2colors/Xresources/Piatto Light similarity index 100% rename from old_work/iterm2colors/Xresources/Piatto Light rename to iterm2colors/Xresources/Piatto Light diff --git a/old_work/iterm2colors/Xresources/Pnevma b/iterm2colors/Xresources/Pnevma similarity index 100% rename from old_work/iterm2colors/Xresources/Pnevma rename to iterm2colors/Xresources/Pnevma diff --git a/old_work/iterm2colors/Xresources/Pro b/iterm2colors/Xresources/Pro similarity index 100% rename from old_work/iterm2colors/Xresources/Pro rename to iterm2colors/Xresources/Pro diff --git a/old_work/iterm2colors/Xresources/Red Alert b/iterm2colors/Xresources/Red Alert similarity index 100% rename from old_work/iterm2colors/Xresources/Red Alert rename to iterm2colors/Xresources/Red Alert diff --git a/old_work/iterm2colors/Xresources/Red Sands b/iterm2colors/Xresources/Red Sands similarity index 100% rename from old_work/iterm2colors/Xresources/Red Sands rename to iterm2colors/Xresources/Red Sands diff --git a/old_work/iterm2colors/Xresources/Rippedcasts b/iterm2colors/Xresources/Rippedcasts similarity index 100% rename from old_work/iterm2colors/Xresources/Rippedcasts rename to iterm2colors/Xresources/Rippedcasts diff --git a/old_work/iterm2colors/Xresources/Royal b/iterm2colors/Xresources/Royal similarity index 100% rename from old_work/iterm2colors/Xresources/Royal rename to iterm2colors/Xresources/Royal diff --git a/old_work/iterm2colors/Xresources/Ryuuko b/iterm2colors/Xresources/Ryuuko similarity index 100% rename from old_work/iterm2colors/Xresources/Ryuuko rename to iterm2colors/Xresources/Ryuuko diff --git a/old_work/iterm2colors/Xresources/SeaShells b/iterm2colors/Xresources/SeaShells similarity index 100% rename from old_work/iterm2colors/Xresources/SeaShells rename to iterm2colors/Xresources/SeaShells diff --git a/old_work/iterm2colors/Xresources/Seafoam Pastel b/iterm2colors/Xresources/Seafoam Pastel similarity index 100% rename from old_work/iterm2colors/Xresources/Seafoam Pastel rename to iterm2colors/Xresources/Seafoam Pastel diff --git a/old_work/iterm2colors/Xresources/Seti b/iterm2colors/Xresources/Seti similarity index 100% rename from old_work/iterm2colors/Xresources/Seti rename to iterm2colors/Xresources/Seti diff --git a/old_work/iterm2colors/Xresources/Shaman b/iterm2colors/Xresources/Shaman similarity index 100% rename from old_work/iterm2colors/Xresources/Shaman rename to iterm2colors/Xresources/Shaman diff --git a/old_work/iterm2colors/Xresources/Slate b/iterm2colors/Xresources/Slate similarity index 100% rename from old_work/iterm2colors/Xresources/Slate rename to iterm2colors/Xresources/Slate diff --git a/old_work/iterm2colors/Xresources/Smyck b/iterm2colors/Xresources/Smyck similarity index 100% rename from old_work/iterm2colors/Xresources/Smyck rename to iterm2colors/Xresources/Smyck diff --git a/old_work/iterm2colors/Xresources/SoftServer b/iterm2colors/Xresources/SoftServer similarity index 100% rename from old_work/iterm2colors/Xresources/SoftServer rename to iterm2colors/Xresources/SoftServer diff --git a/old_work/iterm2colors/Xresources/Solarized Darcula b/iterm2colors/Xresources/Solarized Darcula similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Darcula rename to iterm2colors/Xresources/Solarized Darcula diff --git a/old_work/iterm2colors/Xresources/Solarized Dark b/iterm2colors/Xresources/Solarized Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark rename to iterm2colors/Xresources/Solarized Dark diff --git a/old_work/iterm2colors/Xresources/Solarized Dark - Patched b/iterm2colors/Xresources/Solarized Dark - Patched similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark - Patched rename to iterm2colors/Xresources/Solarized Dark - Patched diff --git a/old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast b/iterm2colors/Xresources/Solarized Dark Higher Contrast similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast rename to iterm2colors/Xresources/Solarized Dark Higher Contrast diff --git a/old_work/iterm2colors/Xresources/Solarized Light b/iterm2colors/Xresources/Solarized Light similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Light rename to iterm2colors/Xresources/Solarized Light diff --git a/old_work/iterm2colors/Xresources/SpaceGray b/iterm2colors/Xresources/SpaceGray similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray rename to iterm2colors/Xresources/SpaceGray diff --git a/old_work/iterm2colors/Xresources/SpaceGray Eighties b/iterm2colors/Xresources/SpaceGray Eighties similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray Eighties rename to iterm2colors/Xresources/SpaceGray Eighties diff --git a/old_work/iterm2colors/Xresources/SpaceGray Eighties Dull b/iterm2colors/Xresources/SpaceGray Eighties Dull similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray Eighties Dull rename to iterm2colors/Xresources/SpaceGray Eighties Dull diff --git a/old_work/iterm2colors/Xresources/Spacedust b/iterm2colors/Xresources/Spacedust similarity index 100% rename from old_work/iterm2colors/Xresources/Spacedust rename to iterm2colors/Xresources/Spacedust diff --git a/old_work/iterm2colors/Xresources/Spiderman b/iterm2colors/Xresources/Spiderman similarity index 100% rename from old_work/iterm2colors/Xresources/Spiderman rename to iterm2colors/Xresources/Spiderman diff --git a/old_work/iterm2colors/Xresources/Spring b/iterm2colors/Xresources/Spring similarity index 100% rename from old_work/iterm2colors/Xresources/Spring rename to iterm2colors/Xresources/Spring diff --git a/old_work/iterm2colors/Xresources/Square b/iterm2colors/Xresources/Square similarity index 100% rename from old_work/iterm2colors/Xresources/Square rename to iterm2colors/Xresources/Square diff --git a/old_work/iterm2colors/Xresources/Sundried b/iterm2colors/Xresources/Sundried similarity index 100% rename from old_work/iterm2colors/Xresources/Sundried rename to iterm2colors/Xresources/Sundried diff --git a/old_work/iterm2colors/Xresources/Symfonic b/iterm2colors/Xresources/Symfonic similarity index 100% rename from old_work/iterm2colors/Xresources/Symfonic rename to iterm2colors/Xresources/Symfonic diff --git a/old_work/iterm2colors/Xresources/Teerb b/iterm2colors/Xresources/Teerb similarity index 100% rename from old_work/iterm2colors/Xresources/Teerb rename to iterm2colors/Xresources/Teerb diff --git a/old_work/iterm2colors/Xresources/Terminal Basic b/iterm2colors/Xresources/Terminal Basic similarity index 100% rename from old_work/iterm2colors/Xresources/Terminal Basic rename to iterm2colors/Xresources/Terminal Basic diff --git a/old_work/iterm2colors/Xresources/Thayer Bright b/iterm2colors/Xresources/Thayer Bright similarity index 100% rename from old_work/iterm2colors/Xresources/Thayer Bright rename to iterm2colors/Xresources/Thayer Bright diff --git a/old_work/iterm2colors/Xresources/The Hulk b/iterm2colors/Xresources/The Hulk similarity index 100% rename from old_work/iterm2colors/Xresources/The Hulk rename to iterm2colors/Xresources/The Hulk diff --git a/old_work/iterm2colors/Xresources/Tomorrow b/iterm2colors/Xresources/Tomorrow similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow rename to iterm2colors/Xresources/Tomorrow diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night b/iterm2colors/Xresources/Tomorrow Night similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night rename to iterm2colors/Xresources/Tomorrow Night diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Blue b/iterm2colors/Xresources/Tomorrow Night Blue similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Blue rename to iterm2colors/Xresources/Tomorrow Night Blue diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Bright b/iterm2colors/Xresources/Tomorrow Night Bright similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Bright rename to iterm2colors/Xresources/Tomorrow Night Bright diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Eighties b/iterm2colors/Xresources/Tomorrow Night Eighties similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Eighties rename to iterm2colors/Xresources/Tomorrow Night Eighties diff --git a/old_work/iterm2colors/Xresources/ToyChest b/iterm2colors/Xresources/ToyChest similarity index 100% rename from old_work/iterm2colors/Xresources/ToyChest rename to iterm2colors/Xresources/ToyChest diff --git a/old_work/iterm2colors/Xresources/Treehouse b/iterm2colors/Xresources/Treehouse similarity index 100% rename from old_work/iterm2colors/Xresources/Treehouse rename to iterm2colors/Xresources/Treehouse diff --git a/old_work/iterm2colors/Xresources/Twilight b/iterm2colors/Xresources/Twilight similarity index 100% rename from old_work/iterm2colors/Xresources/Twilight rename to iterm2colors/Xresources/Twilight diff --git a/old_work/iterm2colors/Xresources/Ubuntu b/iterm2colors/Xresources/Ubuntu similarity index 100% rename from old_work/iterm2colors/Xresources/Ubuntu rename to iterm2colors/Xresources/Ubuntu diff --git a/old_work/iterm2colors/Xresources/UnderTheSea b/iterm2colors/Xresources/UnderTheSea similarity index 100% rename from old_work/iterm2colors/Xresources/UnderTheSea rename to iterm2colors/Xresources/UnderTheSea diff --git a/old_work/iterm2colors/Xresources/Urple b/iterm2colors/Xresources/Urple similarity index 100% rename from old_work/iterm2colors/Xresources/Urple rename to iterm2colors/Xresources/Urple diff --git a/old_work/iterm2colors/Xresources/Vaughn b/iterm2colors/Xresources/Vaughn similarity index 100% rename from old_work/iterm2colors/Xresources/Vaughn rename to iterm2colors/Xresources/Vaughn diff --git a/old_work/iterm2colors/Xresources/VibrantInk b/iterm2colors/Xresources/VibrantInk similarity index 100% rename from old_work/iterm2colors/Xresources/VibrantInk rename to iterm2colors/Xresources/VibrantInk diff --git a/old_work/iterm2colors/Xresources/Violet Dark b/iterm2colors/Xresources/Violet Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Violet Dark rename to iterm2colors/Xresources/Violet Dark diff --git a/old_work/iterm2colors/Xresources/Violet Light b/iterm2colors/Xresources/Violet Light similarity index 100% rename from old_work/iterm2colors/Xresources/Violet Light rename to iterm2colors/Xresources/Violet Light diff --git a/old_work/iterm2colors/Xresources/WarmNeon b/iterm2colors/Xresources/WarmNeon similarity index 100% rename from old_work/iterm2colors/Xresources/WarmNeon rename to iterm2colors/Xresources/WarmNeon diff --git a/old_work/iterm2colors/Xresources/Wez b/iterm2colors/Xresources/Wez similarity index 100% rename from old_work/iterm2colors/Xresources/Wez rename to iterm2colors/Xresources/Wez diff --git a/old_work/iterm2colors/Xresources/WildCherry b/iterm2colors/Xresources/WildCherry similarity index 100% rename from old_work/iterm2colors/Xresources/WildCherry rename to iterm2colors/Xresources/WildCherry diff --git a/old_work/iterm2colors/Xresources/Wombat b/iterm2colors/Xresources/Wombat similarity index 100% rename from old_work/iterm2colors/Xresources/Wombat rename to iterm2colors/Xresources/Wombat diff --git a/old_work/iterm2colors/Xresources/Wryan b/iterm2colors/Xresources/Wryan similarity index 100% rename from old_work/iterm2colors/Xresources/Wryan rename to iterm2colors/Xresources/Wryan diff --git a/old_work/iterm2colors/Xresources/Zenburn b/iterm2colors/Xresources/Zenburn similarity index 100% rename from old_work/iterm2colors/Xresources/Zenburn rename to iterm2colors/Xresources/Zenburn diff --git a/old_work/iterm2colors/Xresources/ayu b/iterm2colors/Xresources/ayu similarity index 100% rename from old_work/iterm2colors/Xresources/ayu rename to iterm2colors/Xresources/ayu diff --git a/old_work/iterm2colors/Xresources/ayu_light b/iterm2colors/Xresources/ayu_light similarity index 100% rename from old_work/iterm2colors/Xresources/ayu_light rename to iterm2colors/Xresources/ayu_light diff --git a/old_work/iterm2colors/Xresources/deep b/iterm2colors/Xresources/deep similarity index 100% rename from old_work/iterm2colors/Xresources/deep rename to iterm2colors/Xresources/deep diff --git a/old_work/iterm2colors/Xresources/idleToes b/iterm2colors/Xresources/idleToes similarity index 100% rename from old_work/iterm2colors/Xresources/idleToes rename to iterm2colors/Xresources/idleToes diff --git a/old_work/iterm2colors/backgrounds/solarized_darcula.jpg b/iterm2colors/backgrounds/solarized_darcula.jpg similarity index 100% rename from old_work/iterm2colors/backgrounds/solarized_darcula.jpg rename to iterm2colors/backgrounds/solarized_darcula.jpg diff --git a/old_work/iterm2colors/konsole/3024 Day.colorscheme b/iterm2colors/konsole/3024 Day.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/3024 Day.colorscheme rename to iterm2colors/konsole/3024 Day.colorscheme diff --git a/old_work/iterm2colors/konsole/3024 Night.colorscheme b/iterm2colors/konsole/3024 Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/3024 Night.colorscheme rename to iterm2colors/konsole/3024 Night.colorscheme diff --git a/old_work/iterm2colors/konsole/AdventureTime.colorscheme b/iterm2colors/konsole/AdventureTime.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AdventureTime.colorscheme rename to iterm2colors/konsole/AdventureTime.colorscheme diff --git a/old_work/iterm2colors/konsole/Afterglow.colorscheme b/iterm2colors/konsole/Afterglow.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Afterglow.colorscheme rename to iterm2colors/konsole/Afterglow.colorscheme diff --git a/old_work/iterm2colors/konsole/AlienBlood.colorscheme b/iterm2colors/konsole/AlienBlood.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AlienBlood.colorscheme rename to iterm2colors/konsole/AlienBlood.colorscheme diff --git a/old_work/iterm2colors/konsole/Argonaut.colorscheme b/iterm2colors/konsole/Argonaut.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Argonaut.colorscheme rename to iterm2colors/konsole/Argonaut.colorscheme diff --git a/old_work/iterm2colors/konsole/Arthur.colorscheme b/iterm2colors/konsole/Arthur.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Arthur.colorscheme rename to iterm2colors/konsole/Arthur.colorscheme diff --git a/old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme b/iterm2colors/konsole/AtelierSulphurpool.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme rename to iterm2colors/konsole/AtelierSulphurpool.colorscheme diff --git a/old_work/iterm2colors/konsole/Atom.colorscheme b/iterm2colors/konsole/Atom.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Atom.colorscheme rename to iterm2colors/konsole/Atom.colorscheme diff --git a/old_work/iterm2colors/konsole/AtomOneLight.colorscheme b/iterm2colors/konsole/AtomOneLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AtomOneLight.colorscheme rename to iterm2colors/konsole/AtomOneLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Batman.colorscheme b/iterm2colors/konsole/Batman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Batman.colorscheme rename to iterm2colors/konsole/Batman.colorscheme diff --git a/old_work/iterm2colors/konsole/Belafonte Day.colorscheme b/iterm2colors/konsole/Belafonte Day.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Belafonte Day.colorscheme rename to iterm2colors/konsole/Belafonte Day.colorscheme diff --git a/old_work/iterm2colors/konsole/Belafonte Night.colorscheme b/iterm2colors/konsole/Belafonte Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Belafonte Night.colorscheme rename to iterm2colors/konsole/Belafonte Night.colorscheme diff --git a/old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme b/iterm2colors/konsole/BirdsOfParadise.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme rename to iterm2colors/konsole/BirdsOfParadise.colorscheme diff --git a/old_work/iterm2colors/konsole/Blazer.colorscheme b/iterm2colors/konsole/Blazer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Blazer.colorscheme rename to iterm2colors/konsole/Blazer.colorscheme diff --git a/old_work/iterm2colors/konsole/Borland.colorscheme b/iterm2colors/konsole/Borland.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Borland.colorscheme rename to iterm2colors/konsole/Borland.colorscheme diff --git a/old_work/iterm2colors/konsole/Bright Lights.colorscheme b/iterm2colors/konsole/Bright Lights.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Bright Lights.colorscheme rename to iterm2colors/konsole/Bright Lights.colorscheme diff --git a/old_work/iterm2colors/konsole/Broadcast.colorscheme b/iterm2colors/konsole/Broadcast.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Broadcast.colorscheme rename to iterm2colors/konsole/Broadcast.colorscheme diff --git a/old_work/iterm2colors/konsole/Brogrammer.colorscheme b/iterm2colors/konsole/Brogrammer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Brogrammer.colorscheme rename to iterm2colors/konsole/Brogrammer.colorscheme diff --git a/old_work/iterm2colors/konsole/C64.colorscheme b/iterm2colors/konsole/C64.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/C64.colorscheme rename to iterm2colors/konsole/C64.colorscheme diff --git a/old_work/iterm2colors/konsole/CLRS.colorscheme b/iterm2colors/konsole/CLRS.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/CLRS.colorscheme rename to iterm2colors/konsole/CLRS.colorscheme diff --git a/old_work/iterm2colors/konsole/Chalk.colorscheme b/iterm2colors/konsole/Chalk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Chalk.colorscheme rename to iterm2colors/konsole/Chalk.colorscheme diff --git a/old_work/iterm2colors/konsole/Chalkboard.colorscheme b/iterm2colors/konsole/Chalkboard.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Chalkboard.colorscheme rename to iterm2colors/konsole/Chalkboard.colorscheme diff --git a/old_work/iterm2colors/konsole/Ciapre.colorscheme b/iterm2colors/konsole/Ciapre.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ciapre.colorscheme rename to iterm2colors/konsole/Ciapre.colorscheme diff --git a/old_work/iterm2colors/konsole/Cobalt Neon.colorscheme b/iterm2colors/konsole/Cobalt Neon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Cobalt Neon.colorscheme rename to iterm2colors/konsole/Cobalt Neon.colorscheme diff --git a/old_work/iterm2colors/konsole/Cobalt2.colorscheme b/iterm2colors/konsole/Cobalt2.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Cobalt2.colorscheme rename to iterm2colors/konsole/Cobalt2.colorscheme diff --git a/old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme b/iterm2colors/konsole/CrayonPonyFish.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme rename to iterm2colors/konsole/CrayonPonyFish.colorscheme diff --git a/old_work/iterm2colors/konsole/Dark Pastel.colorscheme b/iterm2colors/konsole/Dark Pastel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Dark Pastel.colorscheme rename to iterm2colors/konsole/Dark Pastel.colorscheme diff --git a/old_work/iterm2colors/konsole/Darkside.colorscheme b/iterm2colors/konsole/Darkside.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Darkside.colorscheme rename to iterm2colors/konsole/Darkside.colorscheme diff --git a/old_work/iterm2colors/konsole/Desert.colorscheme b/iterm2colors/konsole/Desert.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Desert.colorscheme rename to iterm2colors/konsole/Desert.colorscheme diff --git a/old_work/iterm2colors/konsole/DimmedMonokai.colorscheme b/iterm2colors/konsole/DimmedMonokai.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/DimmedMonokai.colorscheme rename to iterm2colors/konsole/DimmedMonokai.colorscheme diff --git a/old_work/iterm2colors/konsole/DotGov.colorscheme b/iterm2colors/konsole/DotGov.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/DotGov.colorscheme rename to iterm2colors/konsole/DotGov.colorscheme diff --git a/old_work/iterm2colors/konsole/Dracula.colorscheme b/iterm2colors/konsole/Dracula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Dracula.colorscheme rename to iterm2colors/konsole/Dracula.colorscheme diff --git a/old_work/iterm2colors/konsole/Duotone Dark.colorscheme b/iterm2colors/konsole/Duotone Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Duotone Dark.colorscheme rename to iterm2colors/konsole/Duotone Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/ENCOM.colorscheme b/iterm2colors/konsole/ENCOM.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ENCOM.colorscheme rename to iterm2colors/konsole/ENCOM.colorscheme diff --git a/old_work/iterm2colors/konsole/Earthsong.colorscheme b/iterm2colors/konsole/Earthsong.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Earthsong.colorscheme rename to iterm2colors/konsole/Earthsong.colorscheme diff --git a/old_work/iterm2colors/konsole/Elemental.colorscheme b/iterm2colors/konsole/Elemental.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Elemental.colorscheme rename to iterm2colors/konsole/Elemental.colorscheme diff --git a/old_work/iterm2colors/konsole/Elementary.colorscheme b/iterm2colors/konsole/Elementary.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Elementary.colorscheme rename to iterm2colors/konsole/Elementary.colorscheme diff --git a/old_work/iterm2colors/konsole/Espresso Libre.colorscheme b/iterm2colors/konsole/Espresso Libre.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Espresso Libre.colorscheme rename to iterm2colors/konsole/Espresso Libre.colorscheme diff --git a/old_work/iterm2colors/konsole/Espresso.colorscheme b/iterm2colors/konsole/Espresso.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Espresso.colorscheme rename to iterm2colors/konsole/Espresso.colorscheme diff --git a/old_work/iterm2colors/konsole/Fideloper.colorscheme b/iterm2colors/konsole/Fideloper.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Fideloper.colorscheme rename to iterm2colors/konsole/Fideloper.colorscheme diff --git a/old_work/iterm2colors/konsole/FirefoxDev.colorscheme b/iterm2colors/konsole/FirefoxDev.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FirefoxDev.colorscheme rename to iterm2colors/konsole/FirefoxDev.colorscheme diff --git a/old_work/iterm2colors/konsole/Firewatch.colorscheme b/iterm2colors/konsole/Firewatch.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Firewatch.colorscheme rename to iterm2colors/konsole/Firewatch.colorscheme diff --git a/old_work/iterm2colors/konsole/FishTank.colorscheme b/iterm2colors/konsole/FishTank.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FishTank.colorscheme rename to iterm2colors/konsole/FishTank.colorscheme diff --git a/old_work/iterm2colors/konsole/Flat.colorscheme b/iterm2colors/konsole/Flat.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Flat.colorscheme rename to iterm2colors/konsole/Flat.colorscheme diff --git a/old_work/iterm2colors/konsole/Flatland.colorscheme b/iterm2colors/konsole/Flatland.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Flatland.colorscheme rename to iterm2colors/konsole/Flatland.colorscheme diff --git a/old_work/iterm2colors/konsole/Floraverse.colorscheme b/iterm2colors/konsole/Floraverse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Floraverse.colorscheme rename to iterm2colors/konsole/Floraverse.colorscheme diff --git a/old_work/iterm2colors/konsole/ForestBlue.colorscheme b/iterm2colors/konsole/ForestBlue.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ForestBlue.colorscheme rename to iterm2colors/konsole/ForestBlue.colorscheme diff --git a/old_work/iterm2colors/konsole/FrontEndDelight.colorscheme b/iterm2colors/konsole/FrontEndDelight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FrontEndDelight.colorscheme rename to iterm2colors/konsole/FrontEndDelight.colorscheme diff --git a/old_work/iterm2colors/konsole/FunForrest.colorscheme b/iterm2colors/konsole/FunForrest.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FunForrest.colorscheme rename to iterm2colors/konsole/FunForrest.colorscheme diff --git a/old_work/iterm2colors/konsole/Galaxy.colorscheme b/iterm2colors/konsole/Galaxy.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Galaxy.colorscheme rename to iterm2colors/konsole/Galaxy.colorscheme diff --git a/old_work/iterm2colors/konsole/Github.colorscheme b/iterm2colors/konsole/Github.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Github.colorscheme rename to iterm2colors/konsole/Github.colorscheme diff --git a/old_work/iterm2colors/konsole/Glacier.colorscheme b/iterm2colors/konsole/Glacier.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Glacier.colorscheme rename to iterm2colors/konsole/Glacier.colorscheme diff --git a/old_work/iterm2colors/konsole/Grape.colorscheme b/iterm2colors/konsole/Grape.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Grape.colorscheme rename to iterm2colors/konsole/Grape.colorscheme diff --git a/old_work/iterm2colors/konsole/Grass.colorscheme b/iterm2colors/konsole/Grass.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Grass.colorscheme rename to iterm2colors/konsole/Grass.colorscheme diff --git a/old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme b/iterm2colors/konsole/Gruvbox Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme rename to iterm2colors/konsole/Gruvbox Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Hardcore.colorscheme b/iterm2colors/konsole/Hardcore.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hardcore.colorscheme rename to iterm2colors/konsole/Hardcore.colorscheme diff --git a/old_work/iterm2colors/konsole/Harper.colorscheme b/iterm2colors/konsole/Harper.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Harper.colorscheme rename to iterm2colors/konsole/Harper.colorscheme diff --git a/old_work/iterm2colors/konsole/Highway.colorscheme b/iterm2colors/konsole/Highway.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Highway.colorscheme rename to iterm2colors/konsole/Highway.colorscheme diff --git a/old_work/iterm2colors/konsole/Hipster Green.colorscheme b/iterm2colors/konsole/Hipster Green.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hipster Green.colorscheme rename to iterm2colors/konsole/Hipster Green.colorscheme diff --git a/old_work/iterm2colors/konsole/Homebrew.colorscheme b/iterm2colors/konsole/Homebrew.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Homebrew.colorscheme rename to iterm2colors/konsole/Homebrew.colorscheme diff --git a/old_work/iterm2colors/konsole/Hurtado.colorscheme b/iterm2colors/konsole/Hurtado.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hurtado.colorscheme rename to iterm2colors/konsole/Hurtado.colorscheme diff --git a/old_work/iterm2colors/konsole/Hybrid.colorscheme b/iterm2colors/konsole/Hybrid.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hybrid.colorscheme rename to iterm2colors/konsole/Hybrid.colorscheme diff --git a/old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme b/iterm2colors/konsole/IC_Green_PPL.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme rename to iterm2colors/konsole/IC_Green_PPL.colorscheme diff --git a/old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme b/iterm2colors/konsole/IC_Orange_PPL.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme rename to iterm2colors/konsole/IC_Orange_PPL.colorscheme diff --git a/old_work/iterm2colors/konsole/IR_Black.colorscheme b/iterm2colors/konsole/IR_Black.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IR_Black.colorscheme rename to iterm2colors/konsole/IR_Black.colorscheme diff --git a/old_work/iterm2colors/konsole/Jackie Brown.colorscheme b/iterm2colors/konsole/Jackie Brown.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Jackie Brown.colorscheme rename to iterm2colors/konsole/Jackie Brown.colorscheme diff --git a/old_work/iterm2colors/konsole/Japanesque.colorscheme b/iterm2colors/konsole/Japanesque.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Japanesque.colorscheme rename to iterm2colors/konsole/Japanesque.colorscheme diff --git a/old_work/iterm2colors/konsole/Jellybeans.colorscheme b/iterm2colors/konsole/Jellybeans.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Jellybeans.colorscheme rename to iterm2colors/konsole/Jellybeans.colorscheme diff --git a/old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme b/iterm2colors/konsole/JetBrains Darcula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme rename to iterm2colors/konsole/JetBrains Darcula.colorscheme diff --git a/old_work/iterm2colors/konsole/Kibble.colorscheme b/iterm2colors/konsole/Kibble.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Kibble.colorscheme rename to iterm2colors/konsole/Kibble.colorscheme diff --git a/old_work/iterm2colors/konsole/Later This Evening.colorscheme b/iterm2colors/konsole/Later This Evening.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Later This Evening.colorscheme rename to iterm2colors/konsole/Later This Evening.colorscheme diff --git a/old_work/iterm2colors/konsole/Lavandula.colorscheme b/iterm2colors/konsole/Lavandula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Lavandula.colorscheme rename to iterm2colors/konsole/Lavandula.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbon.colorscheme b/iterm2colors/konsole/LiquidCarbon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbon.colorscheme rename to iterm2colors/konsole/LiquidCarbon.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme b/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme rename to iterm2colors/konsole/LiquidCarbonTransparent.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme b/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme rename to iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme diff --git a/old_work/iterm2colors/konsole/Man Page.colorscheme b/iterm2colors/konsole/Man Page.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Man Page.colorscheme rename to iterm2colors/konsole/Man Page.colorscheme diff --git a/old_work/iterm2colors/konsole/Material.colorscheme b/iterm2colors/konsole/Material.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Material.colorscheme rename to iterm2colors/konsole/Material.colorscheme diff --git a/old_work/iterm2colors/konsole/MaterialDark.colorscheme b/iterm2colors/konsole/MaterialDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/MaterialDark.colorscheme rename to iterm2colors/konsole/MaterialDark.colorscheme diff --git a/old_work/iterm2colors/konsole/Mathias.colorscheme b/iterm2colors/konsole/Mathias.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Mathias.colorscheme rename to iterm2colors/konsole/Mathias.colorscheme diff --git a/old_work/iterm2colors/konsole/Medallion.colorscheme b/iterm2colors/konsole/Medallion.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Medallion.colorscheme rename to iterm2colors/konsole/Medallion.colorscheme diff --git a/old_work/iterm2colors/konsole/Misterioso.colorscheme b/iterm2colors/konsole/Misterioso.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Misterioso.colorscheme rename to iterm2colors/konsole/Misterioso.colorscheme diff --git a/old_work/iterm2colors/konsole/Molokai.colorscheme b/iterm2colors/konsole/Molokai.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Molokai.colorscheme rename to iterm2colors/konsole/Molokai.colorscheme diff --git a/old_work/iterm2colors/konsole/MonaLisa.colorscheme b/iterm2colors/konsole/MonaLisa.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/MonaLisa.colorscheme rename to iterm2colors/konsole/MonaLisa.colorscheme diff --git a/old_work/iterm2colors/konsole/Monokai Soda.colorscheme b/iterm2colors/konsole/Monokai Soda.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Monokai Soda.colorscheme rename to iterm2colors/konsole/Monokai Soda.colorscheme diff --git a/old_work/iterm2colors/konsole/Monokai Vivid.colorscheme b/iterm2colors/konsole/Monokai Vivid.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Monokai Vivid.colorscheme rename to iterm2colors/konsole/Monokai Vivid.colorscheme diff --git a/old_work/iterm2colors/konsole/N0tch2k.colorscheme b/iterm2colors/konsole/N0tch2k.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/N0tch2k.colorscheme rename to iterm2colors/konsole/N0tch2k.colorscheme diff --git a/old_work/iterm2colors/konsole/Neopolitan.colorscheme b/iterm2colors/konsole/Neopolitan.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Neopolitan.colorscheme rename to iterm2colors/konsole/Neopolitan.colorscheme diff --git a/old_work/iterm2colors/konsole/Neutron.colorscheme b/iterm2colors/konsole/Neutron.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Neutron.colorscheme rename to iterm2colors/konsole/Neutron.colorscheme diff --git a/old_work/iterm2colors/konsole/NightLion v1.colorscheme b/iterm2colors/konsole/NightLion v1.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/NightLion v1.colorscheme rename to iterm2colors/konsole/NightLion v1.colorscheme diff --git a/old_work/iterm2colors/konsole/NightLion v2.colorscheme b/iterm2colors/konsole/NightLion v2.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/NightLion v2.colorscheme rename to iterm2colors/konsole/NightLion v2.colorscheme diff --git a/old_work/iterm2colors/konsole/Novel.colorscheme b/iterm2colors/konsole/Novel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Novel.colorscheme rename to iterm2colors/konsole/Novel.colorscheme diff --git a/old_work/iterm2colors/konsole/Obsidian.colorscheme b/iterm2colors/konsole/Obsidian.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Obsidian.colorscheme rename to iterm2colors/konsole/Obsidian.colorscheme diff --git a/old_work/iterm2colors/konsole/Ocean.colorscheme b/iterm2colors/konsole/Ocean.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ocean.colorscheme rename to iterm2colors/konsole/Ocean.colorscheme diff --git a/old_work/iterm2colors/konsole/OceanicMaterial.colorscheme b/iterm2colors/konsole/OceanicMaterial.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OceanicMaterial.colorscheme rename to iterm2colors/konsole/OceanicMaterial.colorscheme diff --git a/old_work/iterm2colors/konsole/Ollie.colorscheme b/iterm2colors/konsole/Ollie.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ollie.colorscheme rename to iterm2colors/konsole/Ollie.colorscheme diff --git a/old_work/iterm2colors/konsole/OneHalfDark.colorscheme b/iterm2colors/konsole/OneHalfDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OneHalfDark.colorscheme rename to iterm2colors/konsole/OneHalfDark.colorscheme diff --git a/old_work/iterm2colors/konsole/OneHalfLight.colorscheme b/iterm2colors/konsole/OneHalfLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OneHalfLight.colorscheme rename to iterm2colors/konsole/OneHalfLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Pandora.colorscheme b/iterm2colors/konsole/Pandora.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pandora.colorscheme rename to iterm2colors/konsole/Pandora.colorscheme diff --git a/old_work/iterm2colors/konsole/Paraiso Dark.colorscheme b/iterm2colors/konsole/Paraiso Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Paraiso Dark.colorscheme rename to iterm2colors/konsole/Paraiso Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Parasio Dark.colorscheme b/iterm2colors/konsole/Parasio Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Parasio Dark.colorscheme rename to iterm2colors/konsole/Parasio Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/PaulMillr.colorscheme b/iterm2colors/konsole/PaulMillr.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PaulMillr.colorscheme rename to iterm2colors/konsole/PaulMillr.colorscheme diff --git a/old_work/iterm2colors/konsole/PencilDark.colorscheme b/iterm2colors/konsole/PencilDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PencilDark.colorscheme rename to iterm2colors/konsole/PencilDark.colorscheme diff --git a/old_work/iterm2colors/konsole/PencilLight.colorscheme b/iterm2colors/konsole/PencilLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PencilLight.colorscheme rename to iterm2colors/konsole/PencilLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Piatto Light.colorscheme b/iterm2colors/konsole/Piatto Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Piatto Light.colorscheme rename to iterm2colors/konsole/Piatto Light.colorscheme diff --git a/old_work/iterm2colors/konsole/Pnevma.colorscheme b/iterm2colors/konsole/Pnevma.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pnevma.colorscheme rename to iterm2colors/konsole/Pnevma.colorscheme diff --git a/old_work/iterm2colors/konsole/Pro.colorscheme b/iterm2colors/konsole/Pro.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pro.colorscheme rename to iterm2colors/konsole/Pro.colorscheme diff --git a/old_work/iterm2colors/konsole/Red Alert.colorscheme b/iterm2colors/konsole/Red Alert.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Red Alert.colorscheme rename to iterm2colors/konsole/Red Alert.colorscheme diff --git a/old_work/iterm2colors/konsole/Red Sands.colorscheme b/iterm2colors/konsole/Red Sands.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Red Sands.colorscheme rename to iterm2colors/konsole/Red Sands.colorscheme diff --git a/old_work/iterm2colors/konsole/Rippedcasts.colorscheme b/iterm2colors/konsole/Rippedcasts.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Rippedcasts.colorscheme rename to iterm2colors/konsole/Rippedcasts.colorscheme diff --git a/old_work/iterm2colors/konsole/Royal.colorscheme b/iterm2colors/konsole/Royal.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Royal.colorscheme rename to iterm2colors/konsole/Royal.colorscheme diff --git a/old_work/iterm2colors/konsole/Ryuuko.colorscheme b/iterm2colors/konsole/Ryuuko.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ryuuko.colorscheme rename to iterm2colors/konsole/Ryuuko.colorscheme diff --git a/old_work/iterm2colors/konsole/SeaShells.colorscheme b/iterm2colors/konsole/SeaShells.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SeaShells.colorscheme rename to iterm2colors/konsole/SeaShells.colorscheme diff --git a/old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme b/iterm2colors/konsole/Seafoam Pastel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme rename to iterm2colors/konsole/Seafoam Pastel.colorscheme diff --git a/old_work/iterm2colors/konsole/Seti.colorscheme b/iterm2colors/konsole/Seti.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Seti.colorscheme rename to iterm2colors/konsole/Seti.colorscheme diff --git a/old_work/iterm2colors/konsole/Shaman.colorscheme b/iterm2colors/konsole/Shaman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Shaman.colorscheme rename to iterm2colors/konsole/Shaman.colorscheme diff --git a/old_work/iterm2colors/konsole/Slate.colorscheme b/iterm2colors/konsole/Slate.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Slate.colorscheme rename to iterm2colors/konsole/Slate.colorscheme diff --git a/old_work/iterm2colors/konsole/Smyck.colorscheme b/iterm2colors/konsole/Smyck.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Smyck.colorscheme rename to iterm2colors/konsole/Smyck.colorscheme diff --git a/old_work/iterm2colors/konsole/SoftServer.colorscheme b/iterm2colors/konsole/SoftServer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SoftServer.colorscheme rename to iterm2colors/konsole/SoftServer.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Darcula.colorscheme b/iterm2colors/konsole/Solarized Darcula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Darcula.colorscheme rename to iterm2colors/konsole/Solarized Darcula.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme b/iterm2colors/konsole/Solarized Dark - Patched.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme rename to iterm2colors/konsole/Solarized Dark - Patched.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme b/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme rename to iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark.colorscheme b/iterm2colors/konsole/Solarized Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark.colorscheme rename to iterm2colors/konsole/Solarized Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Light.colorscheme b/iterm2colors/konsole/Solarized Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Light.colorscheme rename to iterm2colors/konsole/Solarized Light.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme b/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme rename to iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme b/iterm2colors/konsole/SpaceGray Eighties.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme rename to iterm2colors/konsole/SpaceGray Eighties.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray.colorscheme b/iterm2colors/konsole/SpaceGray.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray.colorscheme rename to iterm2colors/konsole/SpaceGray.colorscheme diff --git a/old_work/iterm2colors/konsole/Spacedust.colorscheme b/iterm2colors/konsole/Spacedust.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spacedust.colorscheme rename to iterm2colors/konsole/Spacedust.colorscheme diff --git a/old_work/iterm2colors/konsole/Spiderman.colorscheme b/iterm2colors/konsole/Spiderman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spiderman.colorscheme rename to iterm2colors/konsole/Spiderman.colorscheme diff --git a/old_work/iterm2colors/konsole/Spring.colorscheme b/iterm2colors/konsole/Spring.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spring.colorscheme rename to iterm2colors/konsole/Spring.colorscheme diff --git a/old_work/iterm2colors/konsole/Square.colorscheme b/iterm2colors/konsole/Square.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Square.colorscheme rename to iterm2colors/konsole/Square.colorscheme diff --git a/old_work/iterm2colors/konsole/Sundried.colorscheme b/iterm2colors/konsole/Sundried.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Sundried.colorscheme rename to iterm2colors/konsole/Sundried.colorscheme diff --git a/old_work/iterm2colors/konsole/Symfonic.colorscheme b/iterm2colors/konsole/Symfonic.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Symfonic.colorscheme rename to iterm2colors/konsole/Symfonic.colorscheme diff --git a/old_work/iterm2colors/konsole/Teerb.colorscheme b/iterm2colors/konsole/Teerb.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Teerb.colorscheme rename to iterm2colors/konsole/Teerb.colorscheme diff --git a/old_work/iterm2colors/konsole/Terminal Basic.colorscheme b/iterm2colors/konsole/Terminal Basic.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Terminal Basic.colorscheme rename to iterm2colors/konsole/Terminal Basic.colorscheme diff --git a/old_work/iterm2colors/konsole/Thayer Bright.colorscheme b/iterm2colors/konsole/Thayer Bright.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Thayer Bright.colorscheme rename to iterm2colors/konsole/Thayer Bright.colorscheme diff --git a/old_work/iterm2colors/konsole/The Hulk.colorscheme b/iterm2colors/konsole/The Hulk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/The Hulk.colorscheme rename to iterm2colors/konsole/The Hulk.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme b/iterm2colors/konsole/Tomorrow Night Blue.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme rename to iterm2colors/konsole/Tomorrow Night Blue.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme b/iterm2colors/konsole/Tomorrow Night Bright.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme rename to iterm2colors/konsole/Tomorrow Night Bright.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme b/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme rename to iterm2colors/konsole/Tomorrow Night Eighties.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night.colorscheme b/iterm2colors/konsole/Tomorrow Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night.colorscheme rename to iterm2colors/konsole/Tomorrow Night.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow.colorscheme b/iterm2colors/konsole/Tomorrow.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow.colorscheme rename to iterm2colors/konsole/Tomorrow.colorscheme diff --git a/old_work/iterm2colors/konsole/ToyChest.colorscheme b/iterm2colors/konsole/ToyChest.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ToyChest.colorscheme rename to iterm2colors/konsole/ToyChest.colorscheme diff --git a/old_work/iterm2colors/konsole/Treehouse.colorscheme b/iterm2colors/konsole/Treehouse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Treehouse.colorscheme rename to iterm2colors/konsole/Treehouse.colorscheme diff --git a/old_work/iterm2colors/konsole/Twilight.colorscheme b/iterm2colors/konsole/Twilight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Twilight.colorscheme rename to iterm2colors/konsole/Twilight.colorscheme diff --git a/old_work/iterm2colors/konsole/Ubuntu.colorscheme b/iterm2colors/konsole/Ubuntu.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ubuntu.colorscheme rename to iterm2colors/konsole/Ubuntu.colorscheme diff --git a/old_work/iterm2colors/konsole/UnderTheSea.colorscheme b/iterm2colors/konsole/UnderTheSea.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/UnderTheSea.colorscheme rename to iterm2colors/konsole/UnderTheSea.colorscheme diff --git a/old_work/iterm2colors/konsole/Urple.colorscheme b/iterm2colors/konsole/Urple.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Urple.colorscheme rename to iterm2colors/konsole/Urple.colorscheme diff --git a/old_work/iterm2colors/konsole/Vaughn.colorscheme b/iterm2colors/konsole/Vaughn.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Vaughn.colorscheme rename to iterm2colors/konsole/Vaughn.colorscheme diff --git a/old_work/iterm2colors/konsole/VibrantInk.colorscheme b/iterm2colors/konsole/VibrantInk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/VibrantInk.colorscheme rename to iterm2colors/konsole/VibrantInk.colorscheme diff --git a/old_work/iterm2colors/konsole/Violet Dark.colorscheme b/iterm2colors/konsole/Violet Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Violet Dark.colorscheme rename to iterm2colors/konsole/Violet Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Violet Light.colorscheme b/iterm2colors/konsole/Violet Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Violet Light.colorscheme rename to iterm2colors/konsole/Violet Light.colorscheme diff --git a/old_work/iterm2colors/konsole/WarmNeon.colorscheme b/iterm2colors/konsole/WarmNeon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/WarmNeon.colorscheme rename to iterm2colors/konsole/WarmNeon.colorscheme diff --git a/old_work/iterm2colors/konsole/Wez.colorscheme b/iterm2colors/konsole/Wez.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wez.colorscheme rename to iterm2colors/konsole/Wez.colorscheme diff --git a/old_work/iterm2colors/konsole/WildCherry.colorscheme b/iterm2colors/konsole/WildCherry.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/WildCherry.colorscheme rename to iterm2colors/konsole/WildCherry.colorscheme diff --git a/old_work/iterm2colors/konsole/Wombat.colorscheme b/iterm2colors/konsole/Wombat.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wombat.colorscheme rename to iterm2colors/konsole/Wombat.colorscheme diff --git a/old_work/iterm2colors/konsole/Wryan.colorscheme b/iterm2colors/konsole/Wryan.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wryan.colorscheme rename to iterm2colors/konsole/Wryan.colorscheme diff --git a/old_work/iterm2colors/konsole/Zenburn.colorscheme b/iterm2colors/konsole/Zenburn.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Zenburn.colorscheme rename to iterm2colors/konsole/Zenburn.colorscheme diff --git a/old_work/iterm2colors/konsole/ayu.colorscheme b/iterm2colors/konsole/ayu.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ayu.colorscheme rename to iterm2colors/konsole/ayu.colorscheme diff --git a/old_work/iterm2colors/konsole/ayu_light.colorscheme b/iterm2colors/konsole/ayu_light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ayu_light.colorscheme rename to iterm2colors/konsole/ayu_light.colorscheme diff --git a/old_work/iterm2colors/konsole/deep.colorscheme b/iterm2colors/konsole/deep.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/deep.colorscheme rename to iterm2colors/konsole/deep.colorscheme diff --git a/old_work/iterm2colors/konsole/idleToes.colorscheme b/iterm2colors/konsole/idleToes.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/idleToes.colorscheme rename to iterm2colors/konsole/idleToes.colorscheme diff --git a/old_work/iterm2colors/putty/3024 Day.reg b/iterm2colors/putty/3024 Day.reg similarity index 100% rename from old_work/iterm2colors/putty/3024 Day.reg rename to iterm2colors/putty/3024 Day.reg diff --git a/old_work/iterm2colors/putty/3024 Night.reg b/iterm2colors/putty/3024 Night.reg similarity index 100% rename from old_work/iterm2colors/putty/3024 Night.reg rename to iterm2colors/putty/3024 Night.reg diff --git a/old_work/iterm2colors/putty/AdventureTime.reg b/iterm2colors/putty/AdventureTime.reg similarity index 100% rename from old_work/iterm2colors/putty/AdventureTime.reg rename to iterm2colors/putty/AdventureTime.reg diff --git a/old_work/iterm2colors/putty/Afterglow.reg b/iterm2colors/putty/Afterglow.reg similarity index 100% rename from old_work/iterm2colors/putty/Afterglow.reg rename to iterm2colors/putty/Afterglow.reg diff --git a/old_work/iterm2colors/putty/AlienBlood.reg b/iterm2colors/putty/AlienBlood.reg similarity index 100% rename from old_work/iterm2colors/putty/AlienBlood.reg rename to iterm2colors/putty/AlienBlood.reg diff --git a/old_work/iterm2colors/putty/Argonaut.reg b/iterm2colors/putty/Argonaut.reg similarity index 100% rename from old_work/iterm2colors/putty/Argonaut.reg rename to iterm2colors/putty/Argonaut.reg diff --git a/old_work/iterm2colors/putty/Arthur.reg b/iterm2colors/putty/Arthur.reg similarity index 100% rename from old_work/iterm2colors/putty/Arthur.reg rename to iterm2colors/putty/Arthur.reg diff --git a/old_work/iterm2colors/putty/AtelierSulphurpool.reg b/iterm2colors/putty/AtelierSulphurpool.reg similarity index 100% rename from old_work/iterm2colors/putty/AtelierSulphurpool.reg rename to iterm2colors/putty/AtelierSulphurpool.reg diff --git a/old_work/iterm2colors/putty/Atom.reg b/iterm2colors/putty/Atom.reg similarity index 100% rename from old_work/iterm2colors/putty/Atom.reg rename to iterm2colors/putty/Atom.reg diff --git a/old_work/iterm2colors/putty/AtomOneLight.reg b/iterm2colors/putty/AtomOneLight.reg similarity index 100% rename from old_work/iterm2colors/putty/AtomOneLight.reg rename to iterm2colors/putty/AtomOneLight.reg diff --git a/old_work/iterm2colors/putty/Batman.reg b/iterm2colors/putty/Batman.reg similarity index 100% rename from old_work/iterm2colors/putty/Batman.reg rename to iterm2colors/putty/Batman.reg diff --git a/old_work/iterm2colors/putty/Belafonte Day.reg b/iterm2colors/putty/Belafonte Day.reg similarity index 100% rename from old_work/iterm2colors/putty/Belafonte Day.reg rename to iterm2colors/putty/Belafonte Day.reg diff --git a/old_work/iterm2colors/putty/Belafonte Night.reg b/iterm2colors/putty/Belafonte Night.reg similarity index 100% rename from old_work/iterm2colors/putty/Belafonte Night.reg rename to iterm2colors/putty/Belafonte Night.reg diff --git a/old_work/iterm2colors/putty/BirdsOfParadise.reg b/iterm2colors/putty/BirdsOfParadise.reg similarity index 100% rename from old_work/iterm2colors/putty/BirdsOfParadise.reg rename to iterm2colors/putty/BirdsOfParadise.reg diff --git a/old_work/iterm2colors/putty/Blazer.reg b/iterm2colors/putty/Blazer.reg similarity index 100% rename from old_work/iterm2colors/putty/Blazer.reg rename to iterm2colors/putty/Blazer.reg diff --git a/old_work/iterm2colors/putty/Borland.reg b/iterm2colors/putty/Borland.reg similarity index 100% rename from old_work/iterm2colors/putty/Borland.reg rename to iterm2colors/putty/Borland.reg diff --git a/old_work/iterm2colors/putty/Bright Lights.reg b/iterm2colors/putty/Bright Lights.reg similarity index 100% rename from old_work/iterm2colors/putty/Bright Lights.reg rename to iterm2colors/putty/Bright Lights.reg diff --git a/old_work/iterm2colors/putty/Broadcast.reg b/iterm2colors/putty/Broadcast.reg similarity index 100% rename from old_work/iterm2colors/putty/Broadcast.reg rename to iterm2colors/putty/Broadcast.reg diff --git a/old_work/iterm2colors/putty/Brogrammer.reg b/iterm2colors/putty/Brogrammer.reg similarity index 100% rename from old_work/iterm2colors/putty/Brogrammer.reg rename to iterm2colors/putty/Brogrammer.reg diff --git a/old_work/iterm2colors/putty/C64.reg b/iterm2colors/putty/C64.reg similarity index 100% rename from old_work/iterm2colors/putty/C64.reg rename to iterm2colors/putty/C64.reg diff --git a/old_work/iterm2colors/putty/CLRS.reg b/iterm2colors/putty/CLRS.reg similarity index 100% rename from old_work/iterm2colors/putty/CLRS.reg rename to iterm2colors/putty/CLRS.reg diff --git a/old_work/iterm2colors/putty/Chalk.reg b/iterm2colors/putty/Chalk.reg similarity index 100% rename from old_work/iterm2colors/putty/Chalk.reg rename to iterm2colors/putty/Chalk.reg diff --git a/old_work/iterm2colors/putty/Chalkboard.reg b/iterm2colors/putty/Chalkboard.reg similarity index 100% rename from old_work/iterm2colors/putty/Chalkboard.reg rename to iterm2colors/putty/Chalkboard.reg diff --git a/old_work/iterm2colors/putty/Ciapre.reg b/iterm2colors/putty/Ciapre.reg similarity index 100% rename from old_work/iterm2colors/putty/Ciapre.reg rename to iterm2colors/putty/Ciapre.reg diff --git a/old_work/iterm2colors/putty/Cobalt Neon.reg b/iterm2colors/putty/Cobalt Neon.reg similarity index 100% rename from old_work/iterm2colors/putty/Cobalt Neon.reg rename to iterm2colors/putty/Cobalt Neon.reg diff --git a/old_work/iterm2colors/putty/Cobalt2.reg b/iterm2colors/putty/Cobalt2.reg similarity index 100% rename from old_work/iterm2colors/putty/Cobalt2.reg rename to iterm2colors/putty/Cobalt2.reg diff --git a/old_work/iterm2colors/putty/CrayonPonyFish.reg b/iterm2colors/putty/CrayonPonyFish.reg similarity index 100% rename from old_work/iterm2colors/putty/CrayonPonyFish.reg rename to iterm2colors/putty/CrayonPonyFish.reg diff --git a/old_work/iterm2colors/putty/Dark Pastel.reg b/iterm2colors/putty/Dark Pastel.reg similarity index 100% rename from old_work/iterm2colors/putty/Dark Pastel.reg rename to iterm2colors/putty/Dark Pastel.reg diff --git a/old_work/iterm2colors/putty/Darkside.reg b/iterm2colors/putty/Darkside.reg similarity index 100% rename from old_work/iterm2colors/putty/Darkside.reg rename to iterm2colors/putty/Darkside.reg diff --git a/old_work/iterm2colors/putty/Desert.reg b/iterm2colors/putty/Desert.reg similarity index 100% rename from old_work/iterm2colors/putty/Desert.reg rename to iterm2colors/putty/Desert.reg diff --git a/old_work/iterm2colors/putty/DimmedMonokai.reg b/iterm2colors/putty/DimmedMonokai.reg similarity index 100% rename from old_work/iterm2colors/putty/DimmedMonokai.reg rename to iterm2colors/putty/DimmedMonokai.reg diff --git a/old_work/iterm2colors/putty/DotGov.reg b/iterm2colors/putty/DotGov.reg similarity index 100% rename from old_work/iterm2colors/putty/DotGov.reg rename to iterm2colors/putty/DotGov.reg diff --git a/old_work/iterm2colors/putty/Dracula.reg b/iterm2colors/putty/Dracula.reg similarity index 100% rename from old_work/iterm2colors/putty/Dracula.reg rename to iterm2colors/putty/Dracula.reg diff --git a/old_work/iterm2colors/putty/Duotone Dark.reg b/iterm2colors/putty/Duotone Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Duotone Dark.reg rename to iterm2colors/putty/Duotone Dark.reg diff --git a/old_work/iterm2colors/putty/ENCOM.reg b/iterm2colors/putty/ENCOM.reg similarity index 100% rename from old_work/iterm2colors/putty/ENCOM.reg rename to iterm2colors/putty/ENCOM.reg diff --git a/old_work/iterm2colors/putty/Earthsong.reg b/iterm2colors/putty/Earthsong.reg similarity index 100% rename from old_work/iterm2colors/putty/Earthsong.reg rename to iterm2colors/putty/Earthsong.reg diff --git a/old_work/iterm2colors/putty/Elemental.reg b/iterm2colors/putty/Elemental.reg similarity index 100% rename from old_work/iterm2colors/putty/Elemental.reg rename to iterm2colors/putty/Elemental.reg diff --git a/old_work/iterm2colors/putty/Elementary.reg b/iterm2colors/putty/Elementary.reg similarity index 100% rename from old_work/iterm2colors/putty/Elementary.reg rename to iterm2colors/putty/Elementary.reg diff --git a/old_work/iterm2colors/putty/Espresso Libre.reg b/iterm2colors/putty/Espresso Libre.reg similarity index 100% rename from old_work/iterm2colors/putty/Espresso Libre.reg rename to iterm2colors/putty/Espresso Libre.reg diff --git a/old_work/iterm2colors/putty/Espresso.reg b/iterm2colors/putty/Espresso.reg similarity index 100% rename from old_work/iterm2colors/putty/Espresso.reg rename to iterm2colors/putty/Espresso.reg diff --git a/old_work/iterm2colors/putty/Fideloper.reg b/iterm2colors/putty/Fideloper.reg similarity index 100% rename from old_work/iterm2colors/putty/Fideloper.reg rename to iterm2colors/putty/Fideloper.reg diff --git a/old_work/iterm2colors/putty/FirefoxDev.reg b/iterm2colors/putty/FirefoxDev.reg similarity index 100% rename from old_work/iterm2colors/putty/FirefoxDev.reg rename to iterm2colors/putty/FirefoxDev.reg diff --git a/old_work/iterm2colors/putty/Firewatch.reg b/iterm2colors/putty/Firewatch.reg similarity index 100% rename from old_work/iterm2colors/putty/Firewatch.reg rename to iterm2colors/putty/Firewatch.reg diff --git a/old_work/iterm2colors/putty/FishTank.reg b/iterm2colors/putty/FishTank.reg similarity index 100% rename from old_work/iterm2colors/putty/FishTank.reg rename to iterm2colors/putty/FishTank.reg diff --git a/old_work/iterm2colors/putty/Flat.reg b/iterm2colors/putty/Flat.reg similarity index 100% rename from old_work/iterm2colors/putty/Flat.reg rename to iterm2colors/putty/Flat.reg diff --git a/old_work/iterm2colors/putty/Flatland.reg b/iterm2colors/putty/Flatland.reg similarity index 100% rename from old_work/iterm2colors/putty/Flatland.reg rename to iterm2colors/putty/Flatland.reg diff --git a/old_work/iterm2colors/putty/Floraverse.reg b/iterm2colors/putty/Floraverse.reg similarity index 100% rename from old_work/iterm2colors/putty/Floraverse.reg rename to iterm2colors/putty/Floraverse.reg diff --git a/old_work/iterm2colors/putty/ForestBlue.reg b/iterm2colors/putty/ForestBlue.reg similarity index 100% rename from old_work/iterm2colors/putty/ForestBlue.reg rename to iterm2colors/putty/ForestBlue.reg diff --git a/old_work/iterm2colors/putty/FrontEndDelight.reg b/iterm2colors/putty/FrontEndDelight.reg similarity index 100% rename from old_work/iterm2colors/putty/FrontEndDelight.reg rename to iterm2colors/putty/FrontEndDelight.reg diff --git a/old_work/iterm2colors/putty/FunForrest.reg b/iterm2colors/putty/FunForrest.reg similarity index 100% rename from old_work/iterm2colors/putty/FunForrest.reg rename to iterm2colors/putty/FunForrest.reg diff --git a/old_work/iterm2colors/putty/Galaxy.reg b/iterm2colors/putty/Galaxy.reg similarity index 100% rename from old_work/iterm2colors/putty/Galaxy.reg rename to iterm2colors/putty/Galaxy.reg diff --git a/old_work/iterm2colors/putty/Github.reg b/iterm2colors/putty/Github.reg similarity index 100% rename from old_work/iterm2colors/putty/Github.reg rename to iterm2colors/putty/Github.reg diff --git a/old_work/iterm2colors/putty/Glacier.reg b/iterm2colors/putty/Glacier.reg similarity index 100% rename from old_work/iterm2colors/putty/Glacier.reg rename to iterm2colors/putty/Glacier.reg diff --git a/old_work/iterm2colors/putty/Grape.reg b/iterm2colors/putty/Grape.reg similarity index 100% rename from old_work/iterm2colors/putty/Grape.reg rename to iterm2colors/putty/Grape.reg diff --git a/old_work/iterm2colors/putty/Grass.reg b/iterm2colors/putty/Grass.reg similarity index 100% rename from old_work/iterm2colors/putty/Grass.reg rename to iterm2colors/putty/Grass.reg diff --git a/old_work/iterm2colors/putty/Gruvbox Dark.reg b/iterm2colors/putty/Gruvbox Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Gruvbox Dark.reg rename to iterm2colors/putty/Gruvbox Dark.reg diff --git a/old_work/iterm2colors/putty/Hardcore.reg b/iterm2colors/putty/Hardcore.reg similarity index 100% rename from old_work/iterm2colors/putty/Hardcore.reg rename to iterm2colors/putty/Hardcore.reg diff --git a/old_work/iterm2colors/putty/Harper.reg b/iterm2colors/putty/Harper.reg similarity index 100% rename from old_work/iterm2colors/putty/Harper.reg rename to iterm2colors/putty/Harper.reg diff --git a/old_work/iterm2colors/putty/Highway.reg b/iterm2colors/putty/Highway.reg similarity index 100% rename from old_work/iterm2colors/putty/Highway.reg rename to iterm2colors/putty/Highway.reg diff --git a/old_work/iterm2colors/putty/Hipster Green.reg b/iterm2colors/putty/Hipster Green.reg similarity index 100% rename from old_work/iterm2colors/putty/Hipster Green.reg rename to iterm2colors/putty/Hipster Green.reg diff --git a/old_work/iterm2colors/putty/Homebrew.reg b/iterm2colors/putty/Homebrew.reg similarity index 100% rename from old_work/iterm2colors/putty/Homebrew.reg rename to iterm2colors/putty/Homebrew.reg diff --git a/old_work/iterm2colors/putty/Hurtado.reg b/iterm2colors/putty/Hurtado.reg similarity index 100% rename from old_work/iterm2colors/putty/Hurtado.reg rename to iterm2colors/putty/Hurtado.reg diff --git a/old_work/iterm2colors/putty/Hybrid.reg b/iterm2colors/putty/Hybrid.reg similarity index 100% rename from old_work/iterm2colors/putty/Hybrid.reg rename to iterm2colors/putty/Hybrid.reg diff --git a/old_work/iterm2colors/putty/IC_Green_PPL.reg b/iterm2colors/putty/IC_Green_PPL.reg similarity index 100% rename from old_work/iterm2colors/putty/IC_Green_PPL.reg rename to iterm2colors/putty/IC_Green_PPL.reg diff --git a/old_work/iterm2colors/putty/IC_Orange_PPL.reg b/iterm2colors/putty/IC_Orange_PPL.reg similarity index 100% rename from old_work/iterm2colors/putty/IC_Orange_PPL.reg rename to iterm2colors/putty/IC_Orange_PPL.reg diff --git a/old_work/iterm2colors/putty/IR_Black.reg b/iterm2colors/putty/IR_Black.reg similarity index 100% rename from old_work/iterm2colors/putty/IR_Black.reg rename to iterm2colors/putty/IR_Black.reg diff --git a/old_work/iterm2colors/putty/Jackie Brown.reg b/iterm2colors/putty/Jackie Brown.reg similarity index 100% rename from old_work/iterm2colors/putty/Jackie Brown.reg rename to iterm2colors/putty/Jackie Brown.reg diff --git a/old_work/iterm2colors/putty/Japanesque.reg b/iterm2colors/putty/Japanesque.reg similarity index 100% rename from old_work/iterm2colors/putty/Japanesque.reg rename to iterm2colors/putty/Japanesque.reg diff --git a/old_work/iterm2colors/putty/Jellybeans.reg b/iterm2colors/putty/Jellybeans.reg similarity index 100% rename from old_work/iterm2colors/putty/Jellybeans.reg rename to iterm2colors/putty/Jellybeans.reg diff --git a/old_work/iterm2colors/putty/JetBrains Darcula.reg b/iterm2colors/putty/JetBrains Darcula.reg similarity index 100% rename from old_work/iterm2colors/putty/JetBrains Darcula.reg rename to iterm2colors/putty/JetBrains Darcula.reg diff --git a/old_work/iterm2colors/putty/Kibble.reg b/iterm2colors/putty/Kibble.reg similarity index 100% rename from old_work/iterm2colors/putty/Kibble.reg rename to iterm2colors/putty/Kibble.reg diff --git a/old_work/iterm2colors/putty/Later This Evening.reg b/iterm2colors/putty/Later This Evening.reg similarity index 100% rename from old_work/iterm2colors/putty/Later This Evening.reg rename to iterm2colors/putty/Later This Evening.reg diff --git a/old_work/iterm2colors/putty/Lavandula.reg b/iterm2colors/putty/Lavandula.reg similarity index 100% rename from old_work/iterm2colors/putty/Lavandula.reg rename to iterm2colors/putty/Lavandula.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbon.reg b/iterm2colors/putty/LiquidCarbon.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbon.reg rename to iterm2colors/putty/LiquidCarbon.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbonTransparent.reg b/iterm2colors/putty/LiquidCarbonTransparent.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbonTransparent.reg rename to iterm2colors/putty/LiquidCarbonTransparent.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg b/iterm2colors/putty/LiquidCarbonTransparentInverse.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg rename to iterm2colors/putty/LiquidCarbonTransparentInverse.reg diff --git a/old_work/iterm2colors/putty/Man Page.reg b/iterm2colors/putty/Man Page.reg similarity index 100% rename from old_work/iterm2colors/putty/Man Page.reg rename to iterm2colors/putty/Man Page.reg diff --git a/old_work/iterm2colors/putty/Material.reg b/iterm2colors/putty/Material.reg similarity index 100% rename from old_work/iterm2colors/putty/Material.reg rename to iterm2colors/putty/Material.reg diff --git a/old_work/iterm2colors/putty/MaterialDark.reg b/iterm2colors/putty/MaterialDark.reg similarity index 100% rename from old_work/iterm2colors/putty/MaterialDark.reg rename to iterm2colors/putty/MaterialDark.reg diff --git a/old_work/iterm2colors/putty/Mathias.reg b/iterm2colors/putty/Mathias.reg similarity index 100% rename from old_work/iterm2colors/putty/Mathias.reg rename to iterm2colors/putty/Mathias.reg diff --git a/old_work/iterm2colors/putty/Medallion.reg b/iterm2colors/putty/Medallion.reg similarity index 100% rename from old_work/iterm2colors/putty/Medallion.reg rename to iterm2colors/putty/Medallion.reg diff --git a/old_work/iterm2colors/putty/Misterioso.reg b/iterm2colors/putty/Misterioso.reg similarity index 100% rename from old_work/iterm2colors/putty/Misterioso.reg rename to iterm2colors/putty/Misterioso.reg diff --git a/old_work/iterm2colors/putty/Molokai.reg b/iterm2colors/putty/Molokai.reg similarity index 100% rename from old_work/iterm2colors/putty/Molokai.reg rename to iterm2colors/putty/Molokai.reg diff --git a/old_work/iterm2colors/putty/MonaLisa.reg b/iterm2colors/putty/MonaLisa.reg similarity index 100% rename from old_work/iterm2colors/putty/MonaLisa.reg rename to iterm2colors/putty/MonaLisa.reg diff --git a/old_work/iterm2colors/putty/Monokai Soda.reg b/iterm2colors/putty/Monokai Soda.reg similarity index 100% rename from old_work/iterm2colors/putty/Monokai Soda.reg rename to iterm2colors/putty/Monokai Soda.reg diff --git a/old_work/iterm2colors/putty/Monokai Vivid.reg b/iterm2colors/putty/Monokai Vivid.reg similarity index 100% rename from old_work/iterm2colors/putty/Monokai Vivid.reg rename to iterm2colors/putty/Monokai Vivid.reg diff --git a/old_work/iterm2colors/putty/N0tch2k.reg b/iterm2colors/putty/N0tch2k.reg similarity index 100% rename from old_work/iterm2colors/putty/N0tch2k.reg rename to iterm2colors/putty/N0tch2k.reg diff --git a/old_work/iterm2colors/putty/Neopolitan.reg b/iterm2colors/putty/Neopolitan.reg similarity index 100% rename from old_work/iterm2colors/putty/Neopolitan.reg rename to iterm2colors/putty/Neopolitan.reg diff --git a/old_work/iterm2colors/putty/Neutron.reg b/iterm2colors/putty/Neutron.reg similarity index 100% rename from old_work/iterm2colors/putty/Neutron.reg rename to iterm2colors/putty/Neutron.reg diff --git a/old_work/iterm2colors/putty/NightLion v1.reg b/iterm2colors/putty/NightLion v1.reg similarity index 100% rename from old_work/iterm2colors/putty/NightLion v1.reg rename to iterm2colors/putty/NightLion v1.reg diff --git a/old_work/iterm2colors/putty/NightLion v2.reg b/iterm2colors/putty/NightLion v2.reg similarity index 100% rename from old_work/iterm2colors/putty/NightLion v2.reg rename to iterm2colors/putty/NightLion v2.reg diff --git a/old_work/iterm2colors/putty/Novel.reg b/iterm2colors/putty/Novel.reg similarity index 100% rename from old_work/iterm2colors/putty/Novel.reg rename to iterm2colors/putty/Novel.reg diff --git a/old_work/iterm2colors/putty/Obsidian.reg b/iterm2colors/putty/Obsidian.reg similarity index 100% rename from old_work/iterm2colors/putty/Obsidian.reg rename to iterm2colors/putty/Obsidian.reg diff --git a/old_work/iterm2colors/putty/Ocean.reg b/iterm2colors/putty/Ocean.reg similarity index 100% rename from old_work/iterm2colors/putty/Ocean.reg rename to iterm2colors/putty/Ocean.reg diff --git a/old_work/iterm2colors/putty/OceanicMaterial.reg b/iterm2colors/putty/OceanicMaterial.reg similarity index 100% rename from old_work/iterm2colors/putty/OceanicMaterial.reg rename to iterm2colors/putty/OceanicMaterial.reg diff --git a/old_work/iterm2colors/putty/Ollie.reg b/iterm2colors/putty/Ollie.reg similarity index 100% rename from old_work/iterm2colors/putty/Ollie.reg rename to iterm2colors/putty/Ollie.reg diff --git a/old_work/iterm2colors/putty/OneHalfDark.reg b/iterm2colors/putty/OneHalfDark.reg similarity index 100% rename from old_work/iterm2colors/putty/OneHalfDark.reg rename to iterm2colors/putty/OneHalfDark.reg diff --git a/old_work/iterm2colors/putty/OneHalfLight.reg b/iterm2colors/putty/OneHalfLight.reg similarity index 100% rename from old_work/iterm2colors/putty/OneHalfLight.reg rename to iterm2colors/putty/OneHalfLight.reg diff --git a/old_work/iterm2colors/putty/Pandora.reg b/iterm2colors/putty/Pandora.reg similarity index 100% rename from old_work/iterm2colors/putty/Pandora.reg rename to iterm2colors/putty/Pandora.reg diff --git a/old_work/iterm2colors/putty/Paraiso Dark.reg b/iterm2colors/putty/Paraiso Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Paraiso Dark.reg rename to iterm2colors/putty/Paraiso Dark.reg diff --git a/old_work/iterm2colors/putty/Parasio Dark.reg b/iterm2colors/putty/Parasio Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Parasio Dark.reg rename to iterm2colors/putty/Parasio Dark.reg diff --git a/old_work/iterm2colors/putty/PaulMillr.reg b/iterm2colors/putty/PaulMillr.reg similarity index 100% rename from old_work/iterm2colors/putty/PaulMillr.reg rename to iterm2colors/putty/PaulMillr.reg diff --git a/old_work/iterm2colors/putty/PencilDark.reg b/iterm2colors/putty/PencilDark.reg similarity index 100% rename from old_work/iterm2colors/putty/PencilDark.reg rename to iterm2colors/putty/PencilDark.reg diff --git a/old_work/iterm2colors/putty/PencilLight.reg b/iterm2colors/putty/PencilLight.reg similarity index 100% rename from old_work/iterm2colors/putty/PencilLight.reg rename to iterm2colors/putty/PencilLight.reg diff --git a/old_work/iterm2colors/putty/Piatto Light.reg b/iterm2colors/putty/Piatto Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Piatto Light.reg rename to iterm2colors/putty/Piatto Light.reg diff --git a/old_work/iterm2colors/putty/Pnevma.reg b/iterm2colors/putty/Pnevma.reg similarity index 100% rename from old_work/iterm2colors/putty/Pnevma.reg rename to iterm2colors/putty/Pnevma.reg diff --git a/old_work/iterm2colors/putty/Pro.reg b/iterm2colors/putty/Pro.reg similarity index 100% rename from old_work/iterm2colors/putty/Pro.reg rename to iterm2colors/putty/Pro.reg diff --git a/old_work/iterm2colors/putty/Red Alert.reg b/iterm2colors/putty/Red Alert.reg similarity index 100% rename from old_work/iterm2colors/putty/Red Alert.reg rename to iterm2colors/putty/Red Alert.reg diff --git a/old_work/iterm2colors/putty/Red Sands.reg b/iterm2colors/putty/Red Sands.reg similarity index 100% rename from old_work/iterm2colors/putty/Red Sands.reg rename to iterm2colors/putty/Red Sands.reg diff --git a/old_work/iterm2colors/putty/Rippedcasts.reg b/iterm2colors/putty/Rippedcasts.reg similarity index 100% rename from old_work/iterm2colors/putty/Rippedcasts.reg rename to iterm2colors/putty/Rippedcasts.reg diff --git a/old_work/iterm2colors/putty/Royal.reg b/iterm2colors/putty/Royal.reg similarity index 100% rename from old_work/iterm2colors/putty/Royal.reg rename to iterm2colors/putty/Royal.reg diff --git a/old_work/iterm2colors/putty/Ryuuko.reg b/iterm2colors/putty/Ryuuko.reg similarity index 100% rename from old_work/iterm2colors/putty/Ryuuko.reg rename to iterm2colors/putty/Ryuuko.reg diff --git a/old_work/iterm2colors/putty/SeaShells.reg b/iterm2colors/putty/SeaShells.reg similarity index 100% rename from old_work/iterm2colors/putty/SeaShells.reg rename to iterm2colors/putty/SeaShells.reg diff --git a/old_work/iterm2colors/putty/Seafoam Pastel.reg b/iterm2colors/putty/Seafoam Pastel.reg similarity index 100% rename from old_work/iterm2colors/putty/Seafoam Pastel.reg rename to iterm2colors/putty/Seafoam Pastel.reg diff --git a/old_work/iterm2colors/putty/Seti.reg b/iterm2colors/putty/Seti.reg similarity index 100% rename from old_work/iterm2colors/putty/Seti.reg rename to iterm2colors/putty/Seti.reg diff --git a/old_work/iterm2colors/putty/Shaman.reg b/iterm2colors/putty/Shaman.reg similarity index 100% rename from old_work/iterm2colors/putty/Shaman.reg rename to iterm2colors/putty/Shaman.reg diff --git a/old_work/iterm2colors/putty/Slate.reg b/iterm2colors/putty/Slate.reg similarity index 100% rename from old_work/iterm2colors/putty/Slate.reg rename to iterm2colors/putty/Slate.reg diff --git a/old_work/iterm2colors/putty/Smyck.reg b/iterm2colors/putty/Smyck.reg similarity index 100% rename from old_work/iterm2colors/putty/Smyck.reg rename to iterm2colors/putty/Smyck.reg diff --git a/old_work/iterm2colors/putty/SoftServer.reg b/iterm2colors/putty/SoftServer.reg similarity index 100% rename from old_work/iterm2colors/putty/SoftServer.reg rename to iterm2colors/putty/SoftServer.reg diff --git a/old_work/iterm2colors/putty/Solarized Darcula.reg b/iterm2colors/putty/Solarized Darcula.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Darcula.reg rename to iterm2colors/putty/Solarized Darcula.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark - Patched.reg b/iterm2colors/putty/Solarized Dark - Patched.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark - Patched.reg rename to iterm2colors/putty/Solarized Dark - Patched.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg b/iterm2colors/putty/Solarized Dark Higher Contrast.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg rename to iterm2colors/putty/Solarized Dark Higher Contrast.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark.reg b/iterm2colors/putty/Solarized Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark.reg rename to iterm2colors/putty/Solarized Dark.reg diff --git a/old_work/iterm2colors/putty/Solarized Light.reg b/iterm2colors/putty/Solarized Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Light.reg rename to iterm2colors/putty/Solarized Light.reg diff --git a/old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg b/iterm2colors/putty/SpaceGray Eighties Dull.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg rename to iterm2colors/putty/SpaceGray Eighties Dull.reg diff --git a/old_work/iterm2colors/putty/SpaceGray Eighties.reg b/iterm2colors/putty/SpaceGray Eighties.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray Eighties.reg rename to iterm2colors/putty/SpaceGray Eighties.reg diff --git a/old_work/iterm2colors/putty/SpaceGray.reg b/iterm2colors/putty/SpaceGray.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray.reg rename to iterm2colors/putty/SpaceGray.reg diff --git a/old_work/iterm2colors/putty/Spacedust.reg b/iterm2colors/putty/Spacedust.reg similarity index 100% rename from old_work/iterm2colors/putty/Spacedust.reg rename to iterm2colors/putty/Spacedust.reg diff --git a/old_work/iterm2colors/putty/Spiderman.reg b/iterm2colors/putty/Spiderman.reg similarity index 100% rename from old_work/iterm2colors/putty/Spiderman.reg rename to iterm2colors/putty/Spiderman.reg diff --git a/old_work/iterm2colors/putty/Spring.reg b/iterm2colors/putty/Spring.reg similarity index 100% rename from old_work/iterm2colors/putty/Spring.reg rename to iterm2colors/putty/Spring.reg diff --git a/old_work/iterm2colors/putty/Square.reg b/iterm2colors/putty/Square.reg similarity index 100% rename from old_work/iterm2colors/putty/Square.reg rename to iterm2colors/putty/Square.reg diff --git a/old_work/iterm2colors/putty/Sundried.reg b/iterm2colors/putty/Sundried.reg similarity index 100% rename from old_work/iterm2colors/putty/Sundried.reg rename to iterm2colors/putty/Sundried.reg diff --git a/old_work/iterm2colors/putty/Symfonic.reg b/iterm2colors/putty/Symfonic.reg similarity index 100% rename from old_work/iterm2colors/putty/Symfonic.reg rename to iterm2colors/putty/Symfonic.reg diff --git a/old_work/iterm2colors/putty/Teerb.reg b/iterm2colors/putty/Teerb.reg similarity index 100% rename from old_work/iterm2colors/putty/Teerb.reg rename to iterm2colors/putty/Teerb.reg diff --git a/old_work/iterm2colors/putty/Terminal Basic.reg b/iterm2colors/putty/Terminal Basic.reg similarity index 100% rename from old_work/iterm2colors/putty/Terminal Basic.reg rename to iterm2colors/putty/Terminal Basic.reg diff --git a/old_work/iterm2colors/putty/Thayer Bright.reg b/iterm2colors/putty/Thayer Bright.reg similarity index 100% rename from old_work/iterm2colors/putty/Thayer Bright.reg rename to iterm2colors/putty/Thayer Bright.reg diff --git a/old_work/iterm2colors/putty/The Hulk.reg b/iterm2colors/putty/The Hulk.reg similarity index 100% rename from old_work/iterm2colors/putty/The Hulk.reg rename to iterm2colors/putty/The Hulk.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Blue.reg b/iterm2colors/putty/Tomorrow Night Blue.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Blue.reg rename to iterm2colors/putty/Tomorrow Night Blue.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Bright.reg b/iterm2colors/putty/Tomorrow Night Bright.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Bright.reg rename to iterm2colors/putty/Tomorrow Night Bright.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Eighties.reg b/iterm2colors/putty/Tomorrow Night Eighties.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Eighties.reg rename to iterm2colors/putty/Tomorrow Night Eighties.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night.reg b/iterm2colors/putty/Tomorrow Night.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night.reg rename to iterm2colors/putty/Tomorrow Night.reg diff --git a/old_work/iterm2colors/putty/Tomorrow.reg b/iterm2colors/putty/Tomorrow.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow.reg rename to iterm2colors/putty/Tomorrow.reg diff --git a/old_work/iterm2colors/putty/ToyChest.reg b/iterm2colors/putty/ToyChest.reg similarity index 100% rename from old_work/iterm2colors/putty/ToyChest.reg rename to iterm2colors/putty/ToyChest.reg diff --git a/old_work/iterm2colors/putty/Treehouse.reg b/iterm2colors/putty/Treehouse.reg similarity index 100% rename from old_work/iterm2colors/putty/Treehouse.reg rename to iterm2colors/putty/Treehouse.reg diff --git a/old_work/iterm2colors/putty/Twilight.reg b/iterm2colors/putty/Twilight.reg similarity index 100% rename from old_work/iterm2colors/putty/Twilight.reg rename to iterm2colors/putty/Twilight.reg diff --git a/old_work/iterm2colors/putty/Ubuntu.reg b/iterm2colors/putty/Ubuntu.reg similarity index 100% rename from old_work/iterm2colors/putty/Ubuntu.reg rename to iterm2colors/putty/Ubuntu.reg diff --git a/old_work/iterm2colors/putty/UnderTheSea.reg b/iterm2colors/putty/UnderTheSea.reg similarity index 100% rename from old_work/iterm2colors/putty/UnderTheSea.reg rename to iterm2colors/putty/UnderTheSea.reg diff --git a/old_work/iterm2colors/putty/Urple.reg b/iterm2colors/putty/Urple.reg similarity index 100% rename from old_work/iterm2colors/putty/Urple.reg rename to iterm2colors/putty/Urple.reg diff --git a/old_work/iterm2colors/putty/Vaughn.reg b/iterm2colors/putty/Vaughn.reg similarity index 100% rename from old_work/iterm2colors/putty/Vaughn.reg rename to iterm2colors/putty/Vaughn.reg diff --git a/old_work/iterm2colors/putty/VibrantInk.reg b/iterm2colors/putty/VibrantInk.reg similarity index 100% rename from old_work/iterm2colors/putty/VibrantInk.reg rename to iterm2colors/putty/VibrantInk.reg diff --git a/old_work/iterm2colors/putty/Violet Dark.reg b/iterm2colors/putty/Violet Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Violet Dark.reg rename to iterm2colors/putty/Violet Dark.reg diff --git a/old_work/iterm2colors/putty/Violet Light.reg b/iterm2colors/putty/Violet Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Violet Light.reg rename to iterm2colors/putty/Violet Light.reg diff --git a/old_work/iterm2colors/putty/WarmNeon.reg b/iterm2colors/putty/WarmNeon.reg similarity index 100% rename from old_work/iterm2colors/putty/WarmNeon.reg rename to iterm2colors/putty/WarmNeon.reg diff --git a/old_work/iterm2colors/putty/Wez.reg b/iterm2colors/putty/Wez.reg similarity index 100% rename from old_work/iterm2colors/putty/Wez.reg rename to iterm2colors/putty/Wez.reg diff --git a/old_work/iterm2colors/putty/WildCherry.reg b/iterm2colors/putty/WildCherry.reg similarity index 100% rename from old_work/iterm2colors/putty/WildCherry.reg rename to iterm2colors/putty/WildCherry.reg diff --git a/old_work/iterm2colors/putty/Wombat.reg b/iterm2colors/putty/Wombat.reg similarity index 100% rename from old_work/iterm2colors/putty/Wombat.reg rename to iterm2colors/putty/Wombat.reg diff --git a/old_work/iterm2colors/putty/Wryan.reg b/iterm2colors/putty/Wryan.reg similarity index 100% rename from old_work/iterm2colors/putty/Wryan.reg rename to iterm2colors/putty/Wryan.reg diff --git a/old_work/iterm2colors/putty/Zenburn.reg b/iterm2colors/putty/Zenburn.reg similarity index 100% rename from old_work/iterm2colors/putty/Zenburn.reg rename to iterm2colors/putty/Zenburn.reg diff --git a/old_work/iterm2colors/putty/ayu.reg b/iterm2colors/putty/ayu.reg similarity index 100% rename from old_work/iterm2colors/putty/ayu.reg rename to iterm2colors/putty/ayu.reg diff --git a/old_work/iterm2colors/putty/ayu_light.reg b/iterm2colors/putty/ayu_light.reg similarity index 100% rename from old_work/iterm2colors/putty/ayu_light.reg rename to iterm2colors/putty/ayu_light.reg diff --git a/old_work/iterm2colors/putty/deep.reg b/iterm2colors/putty/deep.reg similarity index 100% rename from old_work/iterm2colors/putty/deep.reg rename to iterm2colors/putty/deep.reg diff --git a/old_work/iterm2colors/putty/idleToes.reg b/iterm2colors/putty/idleToes.reg similarity index 100% rename from old_work/iterm2colors/putty/idleToes.reg rename to iterm2colors/putty/idleToes.reg diff --git a/old_work/iterm2colors/schemes/3024 Day.itermcolors b/iterm2colors/schemes/3024 Day.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/3024 Day.itermcolors rename to iterm2colors/schemes/3024 Day.itermcolors diff --git a/old_work/iterm2colors/schemes/3024 Night.itermcolors b/iterm2colors/schemes/3024 Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/3024 Night.itermcolors rename to iterm2colors/schemes/3024 Night.itermcolors diff --git a/old_work/iterm2colors/schemes/AdventureTime.itermcolors b/iterm2colors/schemes/AdventureTime.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AdventureTime.itermcolors rename to iterm2colors/schemes/AdventureTime.itermcolors diff --git a/old_work/iterm2colors/schemes/Afterglow.itermcolors b/iterm2colors/schemes/Afterglow.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Afterglow.itermcolors rename to iterm2colors/schemes/Afterglow.itermcolors diff --git a/old_work/iterm2colors/schemes/AlienBlood.itermcolors b/iterm2colors/schemes/AlienBlood.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AlienBlood.itermcolors rename to iterm2colors/schemes/AlienBlood.itermcolors diff --git a/old_work/iterm2colors/schemes/Argonaut.itermcolors b/iterm2colors/schemes/Argonaut.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Argonaut.itermcolors rename to iterm2colors/schemes/Argonaut.itermcolors diff --git a/old_work/iterm2colors/schemes/Arthur.itermcolors b/iterm2colors/schemes/Arthur.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Arthur.itermcolors rename to iterm2colors/schemes/Arthur.itermcolors diff --git a/old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors b/iterm2colors/schemes/AtelierSulphurpool.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors rename to iterm2colors/schemes/AtelierSulphurpool.itermcolors diff --git a/old_work/iterm2colors/schemes/Atom.itermcolors b/iterm2colors/schemes/Atom.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Atom.itermcolors rename to iterm2colors/schemes/Atom.itermcolors diff --git a/old_work/iterm2colors/schemes/AtomOneLight.itermcolors b/iterm2colors/schemes/AtomOneLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AtomOneLight.itermcolors rename to iterm2colors/schemes/AtomOneLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Batman.itermcolors b/iterm2colors/schemes/Batman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Batman.itermcolors rename to iterm2colors/schemes/Batman.itermcolors diff --git a/old_work/iterm2colors/schemes/Belafonte Day.itermcolors b/iterm2colors/schemes/Belafonte Day.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Belafonte Day.itermcolors rename to iterm2colors/schemes/Belafonte Day.itermcolors diff --git a/old_work/iterm2colors/schemes/Belafonte Night.itermcolors b/iterm2colors/schemes/Belafonte Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Belafonte Night.itermcolors rename to iterm2colors/schemes/Belafonte Night.itermcolors diff --git a/old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors b/iterm2colors/schemes/BirdsOfParadise.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors rename to iterm2colors/schemes/BirdsOfParadise.itermcolors diff --git a/old_work/iterm2colors/schemes/Blazer.itermcolors b/iterm2colors/schemes/Blazer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Blazer.itermcolors rename to iterm2colors/schemes/Blazer.itermcolors diff --git a/old_work/iterm2colors/schemes/Borland.itermcolors b/iterm2colors/schemes/Borland.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Borland.itermcolors rename to iterm2colors/schemes/Borland.itermcolors diff --git a/old_work/iterm2colors/schemes/Bright Lights.itermcolors b/iterm2colors/schemes/Bright Lights.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Bright Lights.itermcolors rename to iterm2colors/schemes/Bright Lights.itermcolors diff --git a/old_work/iterm2colors/schemes/Broadcast.itermcolors b/iterm2colors/schemes/Broadcast.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Broadcast.itermcolors rename to iterm2colors/schemes/Broadcast.itermcolors diff --git a/old_work/iterm2colors/schemes/Brogrammer.itermcolors b/iterm2colors/schemes/Brogrammer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Brogrammer.itermcolors rename to iterm2colors/schemes/Brogrammer.itermcolors diff --git a/old_work/iterm2colors/schemes/C64.itermcolors b/iterm2colors/schemes/C64.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/C64.itermcolors rename to iterm2colors/schemes/C64.itermcolors diff --git a/old_work/iterm2colors/schemes/CLRS.itermcolors b/iterm2colors/schemes/CLRS.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/CLRS.itermcolors rename to iterm2colors/schemes/CLRS.itermcolors diff --git a/old_work/iterm2colors/schemes/Chalk.itermcolors b/iterm2colors/schemes/Chalk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Chalk.itermcolors rename to iterm2colors/schemes/Chalk.itermcolors diff --git a/old_work/iterm2colors/schemes/Chalkboard.itermcolors b/iterm2colors/schemes/Chalkboard.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Chalkboard.itermcolors rename to iterm2colors/schemes/Chalkboard.itermcolors diff --git a/old_work/iterm2colors/schemes/Ciapre.itermcolors b/iterm2colors/schemes/Ciapre.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ciapre.itermcolors rename to iterm2colors/schemes/Ciapre.itermcolors diff --git a/old_work/iterm2colors/schemes/Cobalt Neon.itermcolors b/iterm2colors/schemes/Cobalt Neon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Cobalt Neon.itermcolors rename to iterm2colors/schemes/Cobalt Neon.itermcolors diff --git a/old_work/iterm2colors/schemes/Cobalt2.itermcolors b/iterm2colors/schemes/Cobalt2.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Cobalt2.itermcolors rename to iterm2colors/schemes/Cobalt2.itermcolors diff --git a/old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors b/iterm2colors/schemes/CrayonPonyFish.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors rename to iterm2colors/schemes/CrayonPonyFish.itermcolors diff --git a/old_work/iterm2colors/schemes/Dark Pastel.itermcolors b/iterm2colors/schemes/Dark Pastel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Dark Pastel.itermcolors rename to iterm2colors/schemes/Dark Pastel.itermcolors diff --git a/old_work/iterm2colors/schemes/Darkside.itermcolors b/iterm2colors/schemes/Darkside.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Darkside.itermcolors rename to iterm2colors/schemes/Darkside.itermcolors diff --git a/old_work/iterm2colors/schemes/Desert.itermcolors b/iterm2colors/schemes/Desert.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Desert.itermcolors rename to iterm2colors/schemes/Desert.itermcolors diff --git a/old_work/iterm2colors/schemes/DimmedMonokai.itermcolors b/iterm2colors/schemes/DimmedMonokai.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/DimmedMonokai.itermcolors rename to iterm2colors/schemes/DimmedMonokai.itermcolors diff --git a/old_work/iterm2colors/schemes/DotGov.itermcolors b/iterm2colors/schemes/DotGov.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/DotGov.itermcolors rename to iterm2colors/schemes/DotGov.itermcolors diff --git a/old_work/iterm2colors/schemes/Dracula.itermcolors b/iterm2colors/schemes/Dracula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Dracula.itermcolors rename to iterm2colors/schemes/Dracula.itermcolors diff --git a/old_work/iterm2colors/schemes/Duotone Dark.itermcolors b/iterm2colors/schemes/Duotone Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Duotone Dark.itermcolors rename to iterm2colors/schemes/Duotone Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/ENCOM.itermcolors b/iterm2colors/schemes/ENCOM.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ENCOM.itermcolors rename to iterm2colors/schemes/ENCOM.itermcolors diff --git a/old_work/iterm2colors/schemes/Earthsong.itermcolors b/iterm2colors/schemes/Earthsong.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Earthsong.itermcolors rename to iterm2colors/schemes/Earthsong.itermcolors diff --git a/old_work/iterm2colors/schemes/Elemental.itermcolors b/iterm2colors/schemes/Elemental.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Elemental.itermcolors rename to iterm2colors/schemes/Elemental.itermcolors diff --git a/old_work/iterm2colors/schemes/Elementary.itermcolors b/iterm2colors/schemes/Elementary.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Elementary.itermcolors rename to iterm2colors/schemes/Elementary.itermcolors diff --git a/old_work/iterm2colors/schemes/Espresso Libre.itermcolors b/iterm2colors/schemes/Espresso Libre.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Espresso Libre.itermcolors rename to iterm2colors/schemes/Espresso Libre.itermcolors diff --git a/old_work/iterm2colors/schemes/Espresso.itermcolors b/iterm2colors/schemes/Espresso.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Espresso.itermcolors rename to iterm2colors/schemes/Espresso.itermcolors diff --git a/old_work/iterm2colors/schemes/Fideloper.itermcolors b/iterm2colors/schemes/Fideloper.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Fideloper.itermcolors rename to iterm2colors/schemes/Fideloper.itermcolors diff --git a/old_work/iterm2colors/schemes/FirefoxDev.itermcolors b/iterm2colors/schemes/FirefoxDev.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FirefoxDev.itermcolors rename to iterm2colors/schemes/FirefoxDev.itermcolors diff --git a/old_work/iterm2colors/schemes/Firewatch.itermcolors b/iterm2colors/schemes/Firewatch.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Firewatch.itermcolors rename to iterm2colors/schemes/Firewatch.itermcolors diff --git a/old_work/iterm2colors/schemes/FishTank.itermcolors b/iterm2colors/schemes/FishTank.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FishTank.itermcolors rename to iterm2colors/schemes/FishTank.itermcolors diff --git a/old_work/iterm2colors/schemes/Flat.itermcolors b/iterm2colors/schemes/Flat.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Flat.itermcolors rename to iterm2colors/schemes/Flat.itermcolors diff --git a/old_work/iterm2colors/schemes/Flatland.itermcolors b/iterm2colors/schemes/Flatland.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Flatland.itermcolors rename to iterm2colors/schemes/Flatland.itermcolors diff --git a/old_work/iterm2colors/schemes/Floraverse.itermcolors b/iterm2colors/schemes/Floraverse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Floraverse.itermcolors rename to iterm2colors/schemes/Floraverse.itermcolors diff --git a/old_work/iterm2colors/schemes/ForestBlue.itermcolors b/iterm2colors/schemes/ForestBlue.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ForestBlue.itermcolors rename to iterm2colors/schemes/ForestBlue.itermcolors diff --git a/old_work/iterm2colors/schemes/FrontEndDelight.itermcolors b/iterm2colors/schemes/FrontEndDelight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FrontEndDelight.itermcolors rename to iterm2colors/schemes/FrontEndDelight.itermcolors diff --git a/old_work/iterm2colors/schemes/FunForrest.itermcolors b/iterm2colors/schemes/FunForrest.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FunForrest.itermcolors rename to iterm2colors/schemes/FunForrest.itermcolors diff --git a/old_work/iterm2colors/schemes/Galaxy.itermcolors b/iterm2colors/schemes/Galaxy.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Galaxy.itermcolors rename to iterm2colors/schemes/Galaxy.itermcolors diff --git a/old_work/iterm2colors/schemes/Github.itermcolors b/iterm2colors/schemes/Github.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Github.itermcolors rename to iterm2colors/schemes/Github.itermcolors diff --git a/old_work/iterm2colors/schemes/Glacier.itermcolors b/iterm2colors/schemes/Glacier.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Glacier.itermcolors rename to iterm2colors/schemes/Glacier.itermcolors diff --git a/old_work/iterm2colors/schemes/Grape.itermcolors b/iterm2colors/schemes/Grape.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Grape.itermcolors rename to iterm2colors/schemes/Grape.itermcolors diff --git a/old_work/iterm2colors/schemes/Grass.itermcolors b/iterm2colors/schemes/Grass.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Grass.itermcolors rename to iterm2colors/schemes/Grass.itermcolors diff --git a/old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors b/iterm2colors/schemes/Gruvbox Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors rename to iterm2colors/schemes/Gruvbox Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Hardcore.itermcolors b/iterm2colors/schemes/Hardcore.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hardcore.itermcolors rename to iterm2colors/schemes/Hardcore.itermcolors diff --git a/old_work/iterm2colors/schemes/Harper.itermcolors b/iterm2colors/schemes/Harper.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Harper.itermcolors rename to iterm2colors/schemes/Harper.itermcolors diff --git a/old_work/iterm2colors/schemes/Highway.itermcolors b/iterm2colors/schemes/Highway.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Highway.itermcolors rename to iterm2colors/schemes/Highway.itermcolors diff --git a/old_work/iterm2colors/schemes/Hipster Green.itermcolors b/iterm2colors/schemes/Hipster Green.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hipster Green.itermcolors rename to iterm2colors/schemes/Hipster Green.itermcolors diff --git a/old_work/iterm2colors/schemes/Homebrew.itermcolors b/iterm2colors/schemes/Homebrew.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Homebrew.itermcolors rename to iterm2colors/schemes/Homebrew.itermcolors diff --git a/old_work/iterm2colors/schemes/Hurtado.itermcolors b/iterm2colors/schemes/Hurtado.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hurtado.itermcolors rename to iterm2colors/schemes/Hurtado.itermcolors diff --git a/old_work/iterm2colors/schemes/Hybrid.itermcolors b/iterm2colors/schemes/Hybrid.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hybrid.itermcolors rename to iterm2colors/schemes/Hybrid.itermcolors diff --git a/old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors b/iterm2colors/schemes/IC_Green_PPL.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors rename to iterm2colors/schemes/IC_Green_PPL.itermcolors diff --git a/old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors b/iterm2colors/schemes/IC_Orange_PPL.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors rename to iterm2colors/schemes/IC_Orange_PPL.itermcolors diff --git a/old_work/iterm2colors/schemes/IR_Black.itermcolors b/iterm2colors/schemes/IR_Black.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IR_Black.itermcolors rename to iterm2colors/schemes/IR_Black.itermcolors diff --git a/old_work/iterm2colors/schemes/Jackie Brown.itermcolors b/iterm2colors/schemes/Jackie Brown.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Jackie Brown.itermcolors rename to iterm2colors/schemes/Jackie Brown.itermcolors diff --git a/old_work/iterm2colors/schemes/Japanesque.itermcolors b/iterm2colors/schemes/Japanesque.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Japanesque.itermcolors rename to iterm2colors/schemes/Japanesque.itermcolors diff --git a/old_work/iterm2colors/schemes/Jellybeans.itermcolors b/iterm2colors/schemes/Jellybeans.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Jellybeans.itermcolors rename to iterm2colors/schemes/Jellybeans.itermcolors diff --git a/old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors b/iterm2colors/schemes/JetBrains Darcula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors rename to iterm2colors/schemes/JetBrains Darcula.itermcolors diff --git a/old_work/iterm2colors/schemes/Kibble.itermcolors b/iterm2colors/schemes/Kibble.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Kibble.itermcolors rename to iterm2colors/schemes/Kibble.itermcolors diff --git a/old_work/iterm2colors/schemes/Later This Evening.itermcolors b/iterm2colors/schemes/Later This Evening.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Later This Evening.itermcolors rename to iterm2colors/schemes/Later This Evening.itermcolors diff --git a/old_work/iterm2colors/schemes/Lavandula.itermcolors b/iterm2colors/schemes/Lavandula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Lavandula.itermcolors rename to iterm2colors/schemes/Lavandula.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbon.itermcolors b/iterm2colors/schemes/LiquidCarbon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbon.itermcolors rename to iterm2colors/schemes/LiquidCarbon.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors b/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors rename to iterm2colors/schemes/LiquidCarbonTransparent.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors b/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors rename to iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors diff --git a/old_work/iterm2colors/schemes/Man Page.itermcolors b/iterm2colors/schemes/Man Page.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Man Page.itermcolors rename to iterm2colors/schemes/Man Page.itermcolors diff --git a/old_work/iterm2colors/schemes/Material.itermcolors b/iterm2colors/schemes/Material.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Material.itermcolors rename to iterm2colors/schemes/Material.itermcolors diff --git a/old_work/iterm2colors/schemes/MaterialDark.itermcolors b/iterm2colors/schemes/MaterialDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/MaterialDark.itermcolors rename to iterm2colors/schemes/MaterialDark.itermcolors diff --git a/old_work/iterm2colors/schemes/Mathias.itermcolors b/iterm2colors/schemes/Mathias.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Mathias.itermcolors rename to iterm2colors/schemes/Mathias.itermcolors diff --git a/old_work/iterm2colors/schemes/Medallion.itermcolors b/iterm2colors/schemes/Medallion.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Medallion.itermcolors rename to iterm2colors/schemes/Medallion.itermcolors diff --git a/old_work/iterm2colors/schemes/Misterioso.itermcolors b/iterm2colors/schemes/Misterioso.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Misterioso.itermcolors rename to iterm2colors/schemes/Misterioso.itermcolors diff --git a/old_work/iterm2colors/schemes/Molokai.itermcolors b/iterm2colors/schemes/Molokai.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Molokai.itermcolors rename to iterm2colors/schemes/Molokai.itermcolors diff --git a/old_work/iterm2colors/schemes/MonaLisa.itermcolors b/iterm2colors/schemes/MonaLisa.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/MonaLisa.itermcolors rename to iterm2colors/schemes/MonaLisa.itermcolors diff --git a/old_work/iterm2colors/schemes/Monokai Soda.itermcolors b/iterm2colors/schemes/Monokai Soda.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Monokai Soda.itermcolors rename to iterm2colors/schemes/Monokai Soda.itermcolors diff --git a/old_work/iterm2colors/schemes/Monokai Vivid.itermcolors b/iterm2colors/schemes/Monokai Vivid.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Monokai Vivid.itermcolors rename to iterm2colors/schemes/Monokai Vivid.itermcolors diff --git a/old_work/iterm2colors/schemes/N0tch2k.itermcolors b/iterm2colors/schemes/N0tch2k.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/N0tch2k.itermcolors rename to iterm2colors/schemes/N0tch2k.itermcolors diff --git a/old_work/iterm2colors/schemes/Neopolitan.itermcolors b/iterm2colors/schemes/Neopolitan.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Neopolitan.itermcolors rename to iterm2colors/schemes/Neopolitan.itermcolors diff --git a/old_work/iterm2colors/schemes/Neutron.itermcolors b/iterm2colors/schemes/Neutron.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Neutron.itermcolors rename to iterm2colors/schemes/Neutron.itermcolors diff --git a/old_work/iterm2colors/schemes/NightLion v1.itermcolors b/iterm2colors/schemes/NightLion v1.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/NightLion v1.itermcolors rename to iterm2colors/schemes/NightLion v1.itermcolors diff --git a/old_work/iterm2colors/schemes/NightLion v2.itermcolors b/iterm2colors/schemes/NightLion v2.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/NightLion v2.itermcolors rename to iterm2colors/schemes/NightLion v2.itermcolors diff --git a/old_work/iterm2colors/schemes/Novel.itermcolors b/iterm2colors/schemes/Novel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Novel.itermcolors rename to iterm2colors/schemes/Novel.itermcolors diff --git a/old_work/iterm2colors/schemes/Obsidian.itermcolors b/iterm2colors/schemes/Obsidian.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Obsidian.itermcolors rename to iterm2colors/schemes/Obsidian.itermcolors diff --git a/old_work/iterm2colors/schemes/Ocean.itermcolors b/iterm2colors/schemes/Ocean.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ocean.itermcolors rename to iterm2colors/schemes/Ocean.itermcolors diff --git a/old_work/iterm2colors/schemes/OceanicMaterial.itermcolors b/iterm2colors/schemes/OceanicMaterial.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OceanicMaterial.itermcolors rename to iterm2colors/schemes/OceanicMaterial.itermcolors diff --git a/old_work/iterm2colors/schemes/Ollie.itermcolors b/iterm2colors/schemes/Ollie.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ollie.itermcolors rename to iterm2colors/schemes/Ollie.itermcolors diff --git a/old_work/iterm2colors/schemes/OneHalfDark.itermcolors b/iterm2colors/schemes/OneHalfDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OneHalfDark.itermcolors rename to iterm2colors/schemes/OneHalfDark.itermcolors diff --git a/old_work/iterm2colors/schemes/OneHalfLight.itermcolors b/iterm2colors/schemes/OneHalfLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OneHalfLight.itermcolors rename to iterm2colors/schemes/OneHalfLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Pandora.itermcolors b/iterm2colors/schemes/Pandora.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pandora.itermcolors rename to iterm2colors/schemes/Pandora.itermcolors diff --git a/old_work/iterm2colors/schemes/Parasio Dark.itermcolors b/iterm2colors/schemes/Parasio Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Parasio Dark.itermcolors rename to iterm2colors/schemes/Parasio Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/PaulMillr.itermcolors b/iterm2colors/schemes/PaulMillr.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PaulMillr.itermcolors rename to iterm2colors/schemes/PaulMillr.itermcolors diff --git a/old_work/iterm2colors/schemes/PencilDark.itermcolors b/iterm2colors/schemes/PencilDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PencilDark.itermcolors rename to iterm2colors/schemes/PencilDark.itermcolors diff --git a/old_work/iterm2colors/schemes/PencilLight.itermcolors b/iterm2colors/schemes/PencilLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PencilLight.itermcolors rename to iterm2colors/schemes/PencilLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Piatto Light.itermcolors b/iterm2colors/schemes/Piatto Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Piatto Light.itermcolors rename to iterm2colors/schemes/Piatto Light.itermcolors diff --git a/old_work/iterm2colors/schemes/Pnevma.itermcolors b/iterm2colors/schemes/Pnevma.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pnevma.itermcolors rename to iterm2colors/schemes/Pnevma.itermcolors diff --git a/old_work/iterm2colors/schemes/Pro.itermcolors b/iterm2colors/schemes/Pro.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pro.itermcolors rename to iterm2colors/schemes/Pro.itermcolors diff --git a/old_work/iterm2colors/schemes/Red Alert.itermcolors b/iterm2colors/schemes/Red Alert.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Red Alert.itermcolors rename to iterm2colors/schemes/Red Alert.itermcolors diff --git a/old_work/iterm2colors/schemes/Red Sands.itermcolors b/iterm2colors/schemes/Red Sands.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Red Sands.itermcolors rename to iterm2colors/schemes/Red Sands.itermcolors diff --git a/old_work/iterm2colors/schemes/Rippedcasts.itermcolors b/iterm2colors/schemes/Rippedcasts.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Rippedcasts.itermcolors rename to iterm2colors/schemes/Rippedcasts.itermcolors diff --git a/old_work/iterm2colors/schemes/Royal.itermcolors b/iterm2colors/schemes/Royal.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Royal.itermcolors rename to iterm2colors/schemes/Royal.itermcolors diff --git a/old_work/iterm2colors/schemes/Ryuuko.itermcolors b/iterm2colors/schemes/Ryuuko.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ryuuko.itermcolors rename to iterm2colors/schemes/Ryuuko.itermcolors diff --git a/old_work/iterm2colors/schemes/SeaShells.itermcolors b/iterm2colors/schemes/SeaShells.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SeaShells.itermcolors rename to iterm2colors/schemes/SeaShells.itermcolors diff --git a/old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors b/iterm2colors/schemes/Seafoam Pastel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors rename to iterm2colors/schemes/Seafoam Pastel.itermcolors diff --git a/old_work/iterm2colors/schemes/Seti.itermcolors b/iterm2colors/schemes/Seti.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Seti.itermcolors rename to iterm2colors/schemes/Seti.itermcolors diff --git a/old_work/iterm2colors/schemes/Shaman.itermcolors b/iterm2colors/schemes/Shaman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Shaman.itermcolors rename to iterm2colors/schemes/Shaman.itermcolors diff --git a/old_work/iterm2colors/schemes/Slate.itermcolors b/iterm2colors/schemes/Slate.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Slate.itermcolors rename to iterm2colors/schemes/Slate.itermcolors diff --git a/old_work/iterm2colors/schemes/Smyck.itermcolors b/iterm2colors/schemes/Smyck.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Smyck.itermcolors rename to iterm2colors/schemes/Smyck.itermcolors diff --git a/old_work/iterm2colors/schemes/SoftServer.itermcolors b/iterm2colors/schemes/SoftServer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SoftServer.itermcolors rename to iterm2colors/schemes/SoftServer.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Darcula.itermcolors b/iterm2colors/schemes/Solarized Darcula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Darcula.itermcolors rename to iterm2colors/schemes/Solarized Darcula.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors b/iterm2colors/schemes/Solarized Dark - Patched.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors rename to iterm2colors/schemes/Solarized Dark - Patched.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors b/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors rename to iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark.itermcolors b/iterm2colors/schemes/Solarized Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark.itermcolors rename to iterm2colors/schemes/Solarized Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Light.itermcolors b/iterm2colors/schemes/Solarized Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Light.itermcolors rename to iterm2colors/schemes/Solarized Light.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors b/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors rename to iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors b/iterm2colors/schemes/SpaceGray Eighties.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors rename to iterm2colors/schemes/SpaceGray Eighties.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray.itermcolors b/iterm2colors/schemes/SpaceGray.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray.itermcolors rename to iterm2colors/schemes/SpaceGray.itermcolors diff --git a/old_work/iterm2colors/schemes/Spacedust.itermcolors b/iterm2colors/schemes/Spacedust.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spacedust.itermcolors rename to iterm2colors/schemes/Spacedust.itermcolors diff --git a/old_work/iterm2colors/schemes/Spiderman.itermcolors b/iterm2colors/schemes/Spiderman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spiderman.itermcolors rename to iterm2colors/schemes/Spiderman.itermcolors diff --git a/old_work/iterm2colors/schemes/Spring.itermcolors b/iterm2colors/schemes/Spring.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spring.itermcolors rename to iterm2colors/schemes/Spring.itermcolors diff --git a/old_work/iterm2colors/schemes/Square.itermcolors b/iterm2colors/schemes/Square.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Square.itermcolors rename to iterm2colors/schemes/Square.itermcolors diff --git a/old_work/iterm2colors/schemes/Sundried.itermcolors b/iterm2colors/schemes/Sundried.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Sundried.itermcolors rename to iterm2colors/schemes/Sundried.itermcolors diff --git a/old_work/iterm2colors/schemes/Symfonic.itermcolors b/iterm2colors/schemes/Symfonic.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Symfonic.itermcolors rename to iterm2colors/schemes/Symfonic.itermcolors diff --git a/old_work/iterm2colors/schemes/Teerb.itermcolors b/iterm2colors/schemes/Teerb.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Teerb.itermcolors rename to iterm2colors/schemes/Teerb.itermcolors diff --git a/old_work/iterm2colors/schemes/Terminal Basic.itermcolors b/iterm2colors/schemes/Terminal Basic.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Terminal Basic.itermcolors rename to iterm2colors/schemes/Terminal Basic.itermcolors diff --git a/old_work/iterm2colors/schemes/Thayer Bright.itermcolors b/iterm2colors/schemes/Thayer Bright.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Thayer Bright.itermcolors rename to iterm2colors/schemes/Thayer Bright.itermcolors diff --git a/old_work/iterm2colors/schemes/The Hulk.itermcolors b/iterm2colors/schemes/The Hulk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/The Hulk.itermcolors rename to iterm2colors/schemes/The Hulk.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors b/iterm2colors/schemes/Tomorrow Night Blue.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors rename to iterm2colors/schemes/Tomorrow Night Blue.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors b/iterm2colors/schemes/Tomorrow Night Bright.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors rename to iterm2colors/schemes/Tomorrow Night Bright.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors b/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors rename to iterm2colors/schemes/Tomorrow Night Eighties.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night.itermcolors b/iterm2colors/schemes/Tomorrow Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night.itermcolors rename to iterm2colors/schemes/Tomorrow Night.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow.itermcolors b/iterm2colors/schemes/Tomorrow.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow.itermcolors rename to iterm2colors/schemes/Tomorrow.itermcolors diff --git a/old_work/iterm2colors/schemes/ToyChest.itermcolors b/iterm2colors/schemes/ToyChest.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ToyChest.itermcolors rename to iterm2colors/schemes/ToyChest.itermcolors diff --git a/old_work/iterm2colors/schemes/Treehouse.itermcolors b/iterm2colors/schemes/Treehouse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Treehouse.itermcolors rename to iterm2colors/schemes/Treehouse.itermcolors diff --git a/old_work/iterm2colors/schemes/Twilight.itermcolors b/iterm2colors/schemes/Twilight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Twilight.itermcolors rename to iterm2colors/schemes/Twilight.itermcolors diff --git a/old_work/iterm2colors/schemes/Ubuntu.itermcolors b/iterm2colors/schemes/Ubuntu.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ubuntu.itermcolors rename to iterm2colors/schemes/Ubuntu.itermcolors diff --git a/old_work/iterm2colors/schemes/UnderTheSea.itermcolors b/iterm2colors/schemes/UnderTheSea.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/UnderTheSea.itermcolors rename to iterm2colors/schemes/UnderTheSea.itermcolors diff --git a/old_work/iterm2colors/schemes/Urple.itermcolors b/iterm2colors/schemes/Urple.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Urple.itermcolors rename to iterm2colors/schemes/Urple.itermcolors diff --git a/old_work/iterm2colors/schemes/Vaughn.itermcolors b/iterm2colors/schemes/Vaughn.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Vaughn.itermcolors rename to iterm2colors/schemes/Vaughn.itermcolors diff --git a/old_work/iterm2colors/schemes/VibrantInk.itermcolors b/iterm2colors/schemes/VibrantInk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/VibrantInk.itermcolors rename to iterm2colors/schemes/VibrantInk.itermcolors diff --git a/old_work/iterm2colors/schemes/Violet Dark.itermcolors b/iterm2colors/schemes/Violet Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Violet Dark.itermcolors rename to iterm2colors/schemes/Violet Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Violet Light.itermcolors b/iterm2colors/schemes/Violet Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Violet Light.itermcolors rename to iterm2colors/schemes/Violet Light.itermcolors diff --git a/old_work/iterm2colors/schemes/WarmNeon.itermcolors b/iterm2colors/schemes/WarmNeon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/WarmNeon.itermcolors rename to iterm2colors/schemes/WarmNeon.itermcolors diff --git a/old_work/iterm2colors/schemes/Wez.itermcolors b/iterm2colors/schemes/Wez.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wez.itermcolors rename to iterm2colors/schemes/Wez.itermcolors diff --git a/old_work/iterm2colors/schemes/WildCherry.itermcolors b/iterm2colors/schemes/WildCherry.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/WildCherry.itermcolors rename to iterm2colors/schemes/WildCherry.itermcolors diff --git a/old_work/iterm2colors/schemes/Wombat.itermcolors b/iterm2colors/schemes/Wombat.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wombat.itermcolors rename to iterm2colors/schemes/Wombat.itermcolors diff --git a/old_work/iterm2colors/schemes/Wryan.itermcolors b/iterm2colors/schemes/Wryan.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wryan.itermcolors rename to iterm2colors/schemes/Wryan.itermcolors diff --git a/old_work/iterm2colors/schemes/Zenburn.itermcolors b/iterm2colors/schemes/Zenburn.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Zenburn.itermcolors rename to iterm2colors/schemes/Zenburn.itermcolors diff --git a/old_work/iterm2colors/schemes/ayu.itermcolors b/iterm2colors/schemes/ayu.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ayu.itermcolors rename to iterm2colors/schemes/ayu.itermcolors diff --git a/old_work/iterm2colors/schemes/ayu_light.itermcolors b/iterm2colors/schemes/ayu_light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ayu_light.itermcolors rename to iterm2colors/schemes/ayu_light.itermcolors diff --git a/old_work/iterm2colors/schemes/deep.itermcolors b/iterm2colors/schemes/deep.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/deep.itermcolors rename to iterm2colors/schemes/deep.itermcolors diff --git a/old_work/iterm2colors/schemes/idleToes.itermcolors b/iterm2colors/schemes/idleToes.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/idleToes.itermcolors rename to iterm2colors/schemes/idleToes.itermcolors diff --git a/old_work/iterm2colors/screenshots/3024_day.png b/iterm2colors/screenshots/3024_day.png similarity index 100% rename from old_work/iterm2colors/screenshots/3024_day.png rename to iterm2colors/screenshots/3024_day.png diff --git a/old_work/iterm2colors/screenshots/3024_night.png b/iterm2colors/screenshots/3024_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/3024_night.png rename to iterm2colors/screenshots/3024_night.png diff --git a/old_work/iterm2colors/screenshots/README.md b/iterm2colors/screenshots/README.md similarity index 100% rename from old_work/iterm2colors/screenshots/README.md rename to iterm2colors/screenshots/README.md diff --git a/old_work/iterm2colors/screenshots/adventure_time.png b/iterm2colors/screenshots/adventure_time.png similarity index 100% rename from old_work/iterm2colors/screenshots/adventure_time.png rename to iterm2colors/screenshots/adventure_time.png diff --git a/old_work/iterm2colors/screenshots/afterglow.png b/iterm2colors/screenshots/afterglow.png similarity index 100% rename from old_work/iterm2colors/screenshots/afterglow.png rename to iterm2colors/screenshots/afterglow.png diff --git a/old_work/iterm2colors/screenshots/alien_blood.png b/iterm2colors/screenshots/alien_blood.png similarity index 100% rename from old_work/iterm2colors/screenshots/alien_blood.png rename to iterm2colors/screenshots/alien_blood.png diff --git a/old_work/iterm2colors/screenshots/argonaut.png b/iterm2colors/screenshots/argonaut.png similarity index 100% rename from old_work/iterm2colors/screenshots/argonaut.png rename to iterm2colors/screenshots/argonaut.png diff --git a/old_work/iterm2colors/screenshots/arthur.png b/iterm2colors/screenshots/arthur.png similarity index 100% rename from old_work/iterm2colors/screenshots/arthur.png rename to iterm2colors/screenshots/arthur.png diff --git a/old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png b/iterm2colors/screenshots/atelier-sulphurpool_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png rename to iterm2colors/screenshots/atelier-sulphurpool_dark.png diff --git a/old_work/iterm2colors/screenshots/atom.png b/iterm2colors/screenshots/atom.png similarity index 100% rename from old_work/iterm2colors/screenshots/atom.png rename to iterm2colors/screenshots/atom.png diff --git a/old_work/iterm2colors/screenshots/atom_one_light.png b/iterm2colors/screenshots/atom_one_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/atom_one_light.png rename to iterm2colors/screenshots/atom_one_light.png diff --git a/old_work/iterm2colors/screenshots/ayu.png b/iterm2colors/screenshots/ayu.png similarity index 100% rename from old_work/iterm2colors/screenshots/ayu.png rename to iterm2colors/screenshots/ayu.png diff --git a/old_work/iterm2colors/screenshots/ayu_light.png b/iterm2colors/screenshots/ayu_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/ayu_light.png rename to iterm2colors/screenshots/ayu_light.png diff --git a/old_work/iterm2colors/screenshots/batman.png b/iterm2colors/screenshots/batman.png similarity index 100% rename from old_work/iterm2colors/screenshots/batman.png rename to iterm2colors/screenshots/batman.png diff --git a/old_work/iterm2colors/screenshots/belafonte_day.png b/iterm2colors/screenshots/belafonte_day.png similarity index 100% rename from old_work/iterm2colors/screenshots/belafonte_day.png rename to iterm2colors/screenshots/belafonte_day.png diff --git a/old_work/iterm2colors/screenshots/belafonte_night.png b/iterm2colors/screenshots/belafonte_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/belafonte_night.png rename to iterm2colors/screenshots/belafonte_night.png diff --git a/old_work/iterm2colors/screenshots/birds_of_paradise.png b/iterm2colors/screenshots/birds_of_paradise.png similarity index 100% rename from old_work/iterm2colors/screenshots/birds_of_paradise.png rename to iterm2colors/screenshots/birds_of_paradise.png diff --git a/old_work/iterm2colors/screenshots/blazer.png b/iterm2colors/screenshots/blazer.png similarity index 100% rename from old_work/iterm2colors/screenshots/blazer.png rename to iterm2colors/screenshots/blazer.png diff --git a/old_work/iterm2colors/screenshots/borland.png b/iterm2colors/screenshots/borland.png similarity index 100% rename from old_work/iterm2colors/screenshots/borland.png rename to iterm2colors/screenshots/borland.png diff --git a/old_work/iterm2colors/screenshots/bright_lights.png b/iterm2colors/screenshots/bright_lights.png similarity index 100% rename from old_work/iterm2colors/screenshots/bright_lights.png rename to iterm2colors/screenshots/bright_lights.png diff --git a/old_work/iterm2colors/screenshots/broadcast.png b/iterm2colors/screenshots/broadcast.png similarity index 100% rename from old_work/iterm2colors/screenshots/broadcast.png rename to iterm2colors/screenshots/broadcast.png diff --git a/old_work/iterm2colors/screenshots/brogrammer.png b/iterm2colors/screenshots/brogrammer.png similarity index 100% rename from old_work/iterm2colors/screenshots/brogrammer.png rename to iterm2colors/screenshots/brogrammer.png diff --git a/old_work/iterm2colors/screenshots/c64.png b/iterm2colors/screenshots/c64.png similarity index 100% rename from old_work/iterm2colors/screenshots/c64.png rename to iterm2colors/screenshots/c64.png diff --git a/old_work/iterm2colors/screenshots/chalk.png b/iterm2colors/screenshots/chalk.png similarity index 100% rename from old_work/iterm2colors/screenshots/chalk.png rename to iterm2colors/screenshots/chalk.png diff --git a/old_work/iterm2colors/screenshots/chalkboard.png b/iterm2colors/screenshots/chalkboard.png similarity index 100% rename from old_work/iterm2colors/screenshots/chalkboard.png rename to iterm2colors/screenshots/chalkboard.png diff --git a/old_work/iterm2colors/screenshots/ciapre.png b/iterm2colors/screenshots/ciapre.png similarity index 100% rename from old_work/iterm2colors/screenshots/ciapre.png rename to iterm2colors/screenshots/ciapre.png diff --git a/old_work/iterm2colors/screenshots/clrs.png b/iterm2colors/screenshots/clrs.png similarity index 100% rename from old_work/iterm2colors/screenshots/clrs.png rename to iterm2colors/screenshots/clrs.png diff --git a/old_work/iterm2colors/screenshots/cobalt2.png b/iterm2colors/screenshots/cobalt2.png similarity index 100% rename from old_work/iterm2colors/screenshots/cobalt2.png rename to iterm2colors/screenshots/cobalt2.png diff --git a/old_work/iterm2colors/screenshots/cobalt_neon.png b/iterm2colors/screenshots/cobalt_neon.png similarity index 100% rename from old_work/iterm2colors/screenshots/cobalt_neon.png rename to iterm2colors/screenshots/cobalt_neon.png diff --git a/old_work/iterm2colors/screenshots/crayon_pony_fish.png b/iterm2colors/screenshots/crayon_pony_fish.png similarity index 100% rename from old_work/iterm2colors/screenshots/crayon_pony_fish.png rename to iterm2colors/screenshots/crayon_pony_fish.png diff --git a/old_work/iterm2colors/screenshots/dark_pastel.png b/iterm2colors/screenshots/dark_pastel.png similarity index 100% rename from old_work/iterm2colors/screenshots/dark_pastel.png rename to iterm2colors/screenshots/dark_pastel.png diff --git a/old_work/iterm2colors/screenshots/darkside.png b/iterm2colors/screenshots/darkside.png similarity index 100% rename from old_work/iterm2colors/screenshots/darkside.png rename to iterm2colors/screenshots/darkside.png diff --git a/old_work/iterm2colors/screenshots/deep.png b/iterm2colors/screenshots/deep.png similarity index 100% rename from old_work/iterm2colors/screenshots/deep.png rename to iterm2colors/screenshots/deep.png diff --git a/old_work/iterm2colors/screenshots/desert.png b/iterm2colors/screenshots/desert.png similarity index 100% rename from old_work/iterm2colors/screenshots/desert.png rename to iterm2colors/screenshots/desert.png diff --git a/old_work/iterm2colors/screenshots/dimmed_monokai.png b/iterm2colors/screenshots/dimmed_monokai.png similarity index 100% rename from old_work/iterm2colors/screenshots/dimmed_monokai.png rename to iterm2colors/screenshots/dimmed_monokai.png diff --git a/old_work/iterm2colors/screenshots/dot_gov.png b/iterm2colors/screenshots/dot_gov.png similarity index 100% rename from old_work/iterm2colors/screenshots/dot_gov.png rename to iterm2colors/screenshots/dot_gov.png diff --git a/old_work/iterm2colors/screenshots/dracula.png b/iterm2colors/screenshots/dracula.png similarity index 100% rename from old_work/iterm2colors/screenshots/dracula.png rename to iterm2colors/screenshots/dracula.png diff --git a/old_work/iterm2colors/screenshots/duotone_dark.png b/iterm2colors/screenshots/duotone_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/duotone_dark.png rename to iterm2colors/screenshots/duotone_dark.png diff --git a/old_work/iterm2colors/screenshots/earthsong.png b/iterm2colors/screenshots/earthsong.png similarity index 100% rename from old_work/iterm2colors/screenshots/earthsong.png rename to iterm2colors/screenshots/earthsong.png diff --git a/old_work/iterm2colors/screenshots/elemental.png b/iterm2colors/screenshots/elemental.png similarity index 100% rename from old_work/iterm2colors/screenshots/elemental.png rename to iterm2colors/screenshots/elemental.png diff --git a/old_work/iterm2colors/screenshots/elementary.png b/iterm2colors/screenshots/elementary.png similarity index 100% rename from old_work/iterm2colors/screenshots/elementary.png rename to iterm2colors/screenshots/elementary.png diff --git a/old_work/iterm2colors/screenshots/encom.png b/iterm2colors/screenshots/encom.png similarity index 100% rename from old_work/iterm2colors/screenshots/encom.png rename to iterm2colors/screenshots/encom.png diff --git a/old_work/iterm2colors/screenshots/espresso.png b/iterm2colors/screenshots/espresso.png similarity index 100% rename from old_work/iterm2colors/screenshots/espresso.png rename to iterm2colors/screenshots/espresso.png diff --git a/old_work/iterm2colors/screenshots/espresso_libre.png b/iterm2colors/screenshots/espresso_libre.png similarity index 100% rename from old_work/iterm2colors/screenshots/espresso_libre.png rename to iterm2colors/screenshots/espresso_libre.png diff --git a/old_work/iterm2colors/screenshots/fideloper.png b/iterm2colors/screenshots/fideloper.png similarity index 100% rename from old_work/iterm2colors/screenshots/fideloper.png rename to iterm2colors/screenshots/fideloper.png diff --git a/old_work/iterm2colors/screenshots/firefox_dev.png b/iterm2colors/screenshots/firefox_dev.png similarity index 100% rename from old_work/iterm2colors/screenshots/firefox_dev.png rename to iterm2colors/screenshots/firefox_dev.png diff --git a/old_work/iterm2colors/screenshots/firewatch.png b/iterm2colors/screenshots/firewatch.png similarity index 100% rename from old_work/iterm2colors/screenshots/firewatch.png rename to iterm2colors/screenshots/firewatch.png diff --git a/old_work/iterm2colors/screenshots/fish_tank.png b/iterm2colors/screenshots/fish_tank.png similarity index 100% rename from old_work/iterm2colors/screenshots/fish_tank.png rename to iterm2colors/screenshots/fish_tank.png diff --git a/old_work/iterm2colors/screenshots/flat.png b/iterm2colors/screenshots/flat.png similarity index 100% rename from old_work/iterm2colors/screenshots/flat.png rename to iterm2colors/screenshots/flat.png diff --git a/old_work/iterm2colors/screenshots/flatland.png b/iterm2colors/screenshots/flatland.png similarity index 100% rename from old_work/iterm2colors/screenshots/flatland.png rename to iterm2colors/screenshots/flatland.png diff --git a/old_work/iterm2colors/screenshots/floraverse.png b/iterm2colors/screenshots/floraverse.png similarity index 100% rename from old_work/iterm2colors/screenshots/floraverse.png rename to iterm2colors/screenshots/floraverse.png diff --git a/old_work/iterm2colors/screenshots/forest_blue.png b/iterm2colors/screenshots/forest_blue.png similarity index 100% rename from old_work/iterm2colors/screenshots/forest_blue.png rename to iterm2colors/screenshots/forest_blue.png diff --git a/old_work/iterm2colors/screenshots/front_end_delight.png b/iterm2colors/screenshots/front_end_delight.png similarity index 100% rename from old_work/iterm2colors/screenshots/front_end_delight.png rename to iterm2colors/screenshots/front_end_delight.png diff --git a/old_work/iterm2colors/screenshots/fun_forrest.png b/iterm2colors/screenshots/fun_forrest.png similarity index 100% rename from old_work/iterm2colors/screenshots/fun_forrest.png rename to iterm2colors/screenshots/fun_forrest.png diff --git a/old_work/iterm2colors/screenshots/galaxy.png b/iterm2colors/screenshots/galaxy.png similarity index 100% rename from old_work/iterm2colors/screenshots/galaxy.png rename to iterm2colors/screenshots/galaxy.png diff --git a/old_work/iterm2colors/screenshots/github.png b/iterm2colors/screenshots/github.png similarity index 100% rename from old_work/iterm2colors/screenshots/github.png rename to iterm2colors/screenshots/github.png diff --git a/old_work/iterm2colors/screenshots/glacier.png b/iterm2colors/screenshots/glacier.png similarity index 100% rename from old_work/iterm2colors/screenshots/glacier.png rename to iterm2colors/screenshots/glacier.png diff --git a/old_work/iterm2colors/screenshots/grape.png b/iterm2colors/screenshots/grape.png similarity index 100% rename from old_work/iterm2colors/screenshots/grape.png rename to iterm2colors/screenshots/grape.png diff --git a/old_work/iterm2colors/screenshots/grass.png b/iterm2colors/screenshots/grass.png similarity index 100% rename from old_work/iterm2colors/screenshots/grass.png rename to iterm2colors/screenshots/grass.png diff --git a/old_work/iterm2colors/screenshots/gruvbox_dark.png b/iterm2colors/screenshots/gruvbox_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/gruvbox_dark.png rename to iterm2colors/screenshots/gruvbox_dark.png diff --git a/old_work/iterm2colors/screenshots/hardcore.png b/iterm2colors/screenshots/hardcore.png similarity index 100% rename from old_work/iterm2colors/screenshots/hardcore.png rename to iterm2colors/screenshots/hardcore.png diff --git a/old_work/iterm2colors/screenshots/harper.png b/iterm2colors/screenshots/harper.png similarity index 100% rename from old_work/iterm2colors/screenshots/harper.png rename to iterm2colors/screenshots/harper.png diff --git a/old_work/iterm2colors/screenshots/highway.png b/iterm2colors/screenshots/highway.png similarity index 100% rename from old_work/iterm2colors/screenshots/highway.png rename to iterm2colors/screenshots/highway.png diff --git a/old_work/iterm2colors/screenshots/hipster_green.png b/iterm2colors/screenshots/hipster_green.png similarity index 100% rename from old_work/iterm2colors/screenshots/hipster_green.png rename to iterm2colors/screenshots/hipster_green.png diff --git a/old_work/iterm2colors/screenshots/homebrew.png b/iterm2colors/screenshots/homebrew.png similarity index 100% rename from old_work/iterm2colors/screenshots/homebrew.png rename to iterm2colors/screenshots/homebrew.png diff --git a/old_work/iterm2colors/screenshots/hurtado.png b/iterm2colors/screenshots/hurtado.png similarity index 100% rename from old_work/iterm2colors/screenshots/hurtado.png rename to iterm2colors/screenshots/hurtado.png diff --git a/old_work/iterm2colors/screenshots/hybrid.png b/iterm2colors/screenshots/hybrid.png similarity index 100% rename from old_work/iterm2colors/screenshots/hybrid.png rename to iterm2colors/screenshots/hybrid.png diff --git a/old_work/iterm2colors/screenshots/ic_green_ppl.png b/iterm2colors/screenshots/ic_green_ppl.png similarity index 100% rename from old_work/iterm2colors/screenshots/ic_green_ppl.png rename to iterm2colors/screenshots/ic_green_ppl.png diff --git a/old_work/iterm2colors/screenshots/ic_orange_ppl.png b/iterm2colors/screenshots/ic_orange_ppl.png similarity index 100% rename from old_work/iterm2colors/screenshots/ic_orange_ppl.png rename to iterm2colors/screenshots/ic_orange_ppl.png diff --git a/old_work/iterm2colors/screenshots/idleToes.png b/iterm2colors/screenshots/idleToes.png similarity index 100% rename from old_work/iterm2colors/screenshots/idleToes.png rename to iterm2colors/screenshots/idleToes.png diff --git a/old_work/iterm2colors/screenshots/ir_black.png b/iterm2colors/screenshots/ir_black.png similarity index 100% rename from old_work/iterm2colors/screenshots/ir_black.png rename to iterm2colors/screenshots/ir_black.png diff --git a/old_work/iterm2colors/screenshots/jackie_brown.png b/iterm2colors/screenshots/jackie_brown.png similarity index 100% rename from old_work/iterm2colors/screenshots/jackie_brown.png rename to iterm2colors/screenshots/jackie_brown.png diff --git a/old_work/iterm2colors/screenshots/japanesque.png b/iterm2colors/screenshots/japanesque.png similarity index 100% rename from old_work/iterm2colors/screenshots/japanesque.png rename to iterm2colors/screenshots/japanesque.png diff --git a/old_work/iterm2colors/screenshots/jellybeans.png b/iterm2colors/screenshots/jellybeans.png similarity index 100% rename from old_work/iterm2colors/screenshots/jellybeans.png rename to iterm2colors/screenshots/jellybeans.png diff --git a/old_work/iterm2colors/screenshots/jetbrains_darcula.png b/iterm2colors/screenshots/jetbrains_darcula.png similarity index 100% rename from old_work/iterm2colors/screenshots/jetbrains_darcula.png rename to iterm2colors/screenshots/jetbrains_darcula.png diff --git a/old_work/iterm2colors/screenshots/kibble.png b/iterm2colors/screenshots/kibble.png similarity index 100% rename from old_work/iterm2colors/screenshots/kibble.png rename to iterm2colors/screenshots/kibble.png diff --git a/old_work/iterm2colors/screenshots/later_this_evening.png b/iterm2colors/screenshots/later_this_evening.png similarity index 100% rename from old_work/iterm2colors/screenshots/later_this_evening.png rename to iterm2colors/screenshots/later_this_evening.png diff --git a/old_work/iterm2colors/screenshots/lavandula.png b/iterm2colors/screenshots/lavandula.png similarity index 100% rename from old_work/iterm2colors/screenshots/lavandula.png rename to iterm2colors/screenshots/lavandula.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon.png b/iterm2colors/screenshots/liquid_carbon.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon.png rename to iterm2colors/screenshots/liquid_carbon.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon_transparent.png b/iterm2colors/screenshots/liquid_carbon_transparent.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon_transparent.png rename to iterm2colors/screenshots/liquid_carbon_transparent.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png b/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png rename to iterm2colors/screenshots/liquid_carbon_transparent_inverse.png diff --git a/old_work/iterm2colors/screenshots/man_page.png b/iterm2colors/screenshots/man_page.png similarity index 100% rename from old_work/iterm2colors/screenshots/man_page.png rename to iterm2colors/screenshots/man_page.png diff --git a/old_work/iterm2colors/screenshots/material.png b/iterm2colors/screenshots/material.png similarity index 100% rename from old_work/iterm2colors/screenshots/material.png rename to iterm2colors/screenshots/material.png diff --git a/old_work/iterm2colors/screenshots/material_dark.png b/iterm2colors/screenshots/material_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/material_dark.png rename to iterm2colors/screenshots/material_dark.png diff --git a/old_work/iterm2colors/screenshots/mathias.png b/iterm2colors/screenshots/mathias.png similarity index 100% rename from old_work/iterm2colors/screenshots/mathias.png rename to iterm2colors/screenshots/mathias.png diff --git a/old_work/iterm2colors/screenshots/medallion.png b/iterm2colors/screenshots/medallion.png similarity index 100% rename from old_work/iterm2colors/screenshots/medallion.png rename to iterm2colors/screenshots/medallion.png diff --git a/old_work/iterm2colors/screenshots/misterioso.png b/iterm2colors/screenshots/misterioso.png similarity index 100% rename from old_work/iterm2colors/screenshots/misterioso.png rename to iterm2colors/screenshots/misterioso.png diff --git a/old_work/iterm2colors/screenshots/molokai.png b/iterm2colors/screenshots/molokai.png similarity index 100% rename from old_work/iterm2colors/screenshots/molokai.png rename to iterm2colors/screenshots/molokai.png diff --git a/old_work/iterm2colors/screenshots/mona_lisa.png b/iterm2colors/screenshots/mona_lisa.png similarity index 100% rename from old_work/iterm2colors/screenshots/mona_lisa.png rename to iterm2colors/screenshots/mona_lisa.png diff --git a/old_work/iterm2colors/screenshots/monokai_soda.png b/iterm2colors/screenshots/monokai_soda.png similarity index 100% rename from old_work/iterm2colors/screenshots/monokai_soda.png rename to iterm2colors/screenshots/monokai_soda.png diff --git a/old_work/iterm2colors/screenshots/monokai_vivid.png b/iterm2colors/screenshots/monokai_vivid.png similarity index 100% rename from old_work/iterm2colors/screenshots/monokai_vivid.png rename to iterm2colors/screenshots/monokai_vivid.png diff --git a/old_work/iterm2colors/screenshots/n0tch2k.png b/iterm2colors/screenshots/n0tch2k.png similarity index 100% rename from old_work/iterm2colors/screenshots/n0tch2k.png rename to iterm2colors/screenshots/n0tch2k.png diff --git a/old_work/iterm2colors/screenshots/neopolitan.png b/iterm2colors/screenshots/neopolitan.png similarity index 100% rename from old_work/iterm2colors/screenshots/neopolitan.png rename to iterm2colors/screenshots/neopolitan.png diff --git a/old_work/iterm2colors/screenshots/neutron.png b/iterm2colors/screenshots/neutron.png similarity index 100% rename from old_work/iterm2colors/screenshots/neutron.png rename to iterm2colors/screenshots/neutron.png diff --git a/old_work/iterm2colors/screenshots/nightlion_v1.png b/iterm2colors/screenshots/nightlion_v1.png similarity index 100% rename from old_work/iterm2colors/screenshots/nightlion_v1.png rename to iterm2colors/screenshots/nightlion_v1.png diff --git a/old_work/iterm2colors/screenshots/nightlion_v2.png b/iterm2colors/screenshots/nightlion_v2.png similarity index 100% rename from old_work/iterm2colors/screenshots/nightlion_v2.png rename to iterm2colors/screenshots/nightlion_v2.png diff --git a/old_work/iterm2colors/screenshots/novel.png b/iterm2colors/screenshots/novel.png similarity index 100% rename from old_work/iterm2colors/screenshots/novel.png rename to iterm2colors/screenshots/novel.png diff --git a/old_work/iterm2colors/screenshots/obsidian.png b/iterm2colors/screenshots/obsidian.png similarity index 100% rename from old_work/iterm2colors/screenshots/obsidian.png rename to iterm2colors/screenshots/obsidian.png diff --git a/old_work/iterm2colors/screenshots/ocean.png b/iterm2colors/screenshots/ocean.png similarity index 100% rename from old_work/iterm2colors/screenshots/ocean.png rename to iterm2colors/screenshots/ocean.png diff --git a/old_work/iterm2colors/screenshots/oceanic_material.png b/iterm2colors/screenshots/oceanic_material.png similarity index 100% rename from old_work/iterm2colors/screenshots/oceanic_material.png rename to iterm2colors/screenshots/oceanic_material.png diff --git a/old_work/iterm2colors/screenshots/ollie.png b/iterm2colors/screenshots/ollie.png similarity index 100% rename from old_work/iterm2colors/screenshots/ollie.png rename to iterm2colors/screenshots/ollie.png diff --git a/old_work/iterm2colors/screenshots/onehalfdark.png b/iterm2colors/screenshots/onehalfdark.png similarity index 100% rename from old_work/iterm2colors/screenshots/onehalfdark.png rename to iterm2colors/screenshots/onehalfdark.png diff --git a/old_work/iterm2colors/screenshots/onehalflight.png b/iterm2colors/screenshots/onehalflight.png similarity index 100% rename from old_work/iterm2colors/screenshots/onehalflight.png rename to iterm2colors/screenshots/onehalflight.png diff --git a/old_work/iterm2colors/screenshots/pandora.png b/iterm2colors/screenshots/pandora.png similarity index 100% rename from old_work/iterm2colors/screenshots/pandora.png rename to iterm2colors/screenshots/pandora.png diff --git a/old_work/iterm2colors/screenshots/paraiso_dark.png b/iterm2colors/screenshots/paraiso_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/paraiso_dark.png rename to iterm2colors/screenshots/paraiso_dark.png diff --git a/old_work/iterm2colors/screenshots/paul_millr.png b/iterm2colors/screenshots/paul_millr.png similarity index 100% rename from old_work/iterm2colors/screenshots/paul_millr.png rename to iterm2colors/screenshots/paul_millr.png diff --git a/old_work/iterm2colors/screenshots/pencil_dark.png b/iterm2colors/screenshots/pencil_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/pencil_dark.png rename to iterm2colors/screenshots/pencil_dark.png diff --git a/old_work/iterm2colors/screenshots/pencil_light.png b/iterm2colors/screenshots/pencil_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/pencil_light.png rename to iterm2colors/screenshots/pencil_light.png diff --git a/old_work/iterm2colors/screenshots/piatto_light.png b/iterm2colors/screenshots/piatto_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/piatto_light.png rename to iterm2colors/screenshots/piatto_light.png diff --git a/old_work/iterm2colors/screenshots/pnevma.png b/iterm2colors/screenshots/pnevma.png similarity index 100% rename from old_work/iterm2colors/screenshots/pnevma.png rename to iterm2colors/screenshots/pnevma.png diff --git a/old_work/iterm2colors/screenshots/pro.png b/iterm2colors/screenshots/pro.png similarity index 100% rename from old_work/iterm2colors/screenshots/pro.png rename to iterm2colors/screenshots/pro.png diff --git a/old_work/iterm2colors/screenshots/red_alert.png b/iterm2colors/screenshots/red_alert.png similarity index 100% rename from old_work/iterm2colors/screenshots/red_alert.png rename to iterm2colors/screenshots/red_alert.png diff --git a/old_work/iterm2colors/screenshots/red_sands.png b/iterm2colors/screenshots/red_sands.png similarity index 100% rename from old_work/iterm2colors/screenshots/red_sands.png rename to iterm2colors/screenshots/red_sands.png diff --git a/old_work/iterm2colors/screenshots/rippedcasts.png b/iterm2colors/screenshots/rippedcasts.png similarity index 100% rename from old_work/iterm2colors/screenshots/rippedcasts.png rename to iterm2colors/screenshots/rippedcasts.png diff --git a/old_work/iterm2colors/screenshots/royal.png b/iterm2colors/screenshots/royal.png similarity index 100% rename from old_work/iterm2colors/screenshots/royal.png rename to iterm2colors/screenshots/royal.png diff --git a/old_work/iterm2colors/screenshots/ryuuko.png b/iterm2colors/screenshots/ryuuko.png similarity index 100% rename from old_work/iterm2colors/screenshots/ryuuko.png rename to iterm2colors/screenshots/ryuuko.png diff --git a/old_work/iterm2colors/screenshots/sea_shells.png b/iterm2colors/screenshots/sea_shells.png similarity index 100% rename from old_work/iterm2colors/screenshots/sea_shells.png rename to iterm2colors/screenshots/sea_shells.png diff --git a/old_work/iterm2colors/screenshots/seafoam_pastel.png b/iterm2colors/screenshots/seafoam_pastel.png similarity index 100% rename from old_work/iterm2colors/screenshots/seafoam_pastel.png rename to iterm2colors/screenshots/seafoam_pastel.png diff --git a/old_work/iterm2colors/screenshots/seti.png b/iterm2colors/screenshots/seti.png similarity index 100% rename from old_work/iterm2colors/screenshots/seti.png rename to iterm2colors/screenshots/seti.png diff --git a/old_work/iterm2colors/screenshots/shaman.png b/iterm2colors/screenshots/shaman.png similarity index 100% rename from old_work/iterm2colors/screenshots/shaman.png rename to iterm2colors/screenshots/shaman.png diff --git a/old_work/iterm2colors/screenshots/slate.png b/iterm2colors/screenshots/slate.png similarity index 100% rename from old_work/iterm2colors/screenshots/slate.png rename to iterm2colors/screenshots/slate.png diff --git a/old_work/iterm2colors/screenshots/smyck.png b/iterm2colors/screenshots/smyck.png similarity index 100% rename from old_work/iterm2colors/screenshots/smyck.png rename to iterm2colors/screenshots/smyck.png diff --git a/old_work/iterm2colors/screenshots/soft_server.png b/iterm2colors/screenshots/soft_server.png similarity index 100% rename from old_work/iterm2colors/screenshots/soft_server.png rename to iterm2colors/screenshots/soft_server.png diff --git a/old_work/iterm2colors/screenshots/solarized_darcula.png b/iterm2colors/screenshots/solarized_darcula.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_darcula.png rename to iterm2colors/screenshots/solarized_darcula.png diff --git a/old_work/iterm2colors/screenshots/solarized_darcula_with_background.png b/iterm2colors/screenshots/solarized_darcula_with_background.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_darcula_with_background.png rename to iterm2colors/screenshots/solarized_darcula_with_background.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark.png b/iterm2colors/screenshots/solarized_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark.png rename to iterm2colors/screenshots/solarized_dark.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png b/iterm2colors/screenshots/solarized_dark_higher_contrast.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png rename to iterm2colors/screenshots/solarized_dark_higher_contrast.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark_patched.png b/iterm2colors/screenshots/solarized_dark_patched.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark_patched.png rename to iterm2colors/screenshots/solarized_dark_patched.png diff --git a/old_work/iterm2colors/screenshots/solarized_light.png b/iterm2colors/screenshots/solarized_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_light.png rename to iterm2colors/screenshots/solarized_light.png diff --git a/old_work/iterm2colors/screenshots/space_gray.png b/iterm2colors/screenshots/space_gray.png similarity index 100% rename from old_work/iterm2colors/screenshots/space_gray.png rename to iterm2colors/screenshots/space_gray.png diff --git a/old_work/iterm2colors/screenshots/spacedust.png b/iterm2colors/screenshots/spacedust.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacedust.png rename to iterm2colors/screenshots/spacedust.png diff --git a/old_work/iterm2colors/screenshots/spacegray_eighties.png b/iterm2colors/screenshots/spacegray_eighties.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacegray_eighties.png rename to iterm2colors/screenshots/spacegray_eighties.png diff --git a/old_work/iterm2colors/screenshots/spacegray_eighties_dull.png b/iterm2colors/screenshots/spacegray_eighties_dull.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacegray_eighties_dull.png rename to iterm2colors/screenshots/spacegray_eighties_dull.png diff --git a/old_work/iterm2colors/screenshots/spiderman.png b/iterm2colors/screenshots/spiderman.png similarity index 100% rename from old_work/iterm2colors/screenshots/spiderman.png rename to iterm2colors/screenshots/spiderman.png diff --git a/old_work/iterm2colors/screenshots/spring.png b/iterm2colors/screenshots/spring.png similarity index 100% rename from old_work/iterm2colors/screenshots/spring.png rename to iterm2colors/screenshots/spring.png diff --git a/old_work/iterm2colors/screenshots/square.png b/iterm2colors/screenshots/square.png similarity index 100% rename from old_work/iterm2colors/screenshots/square.png rename to iterm2colors/screenshots/square.png diff --git a/old_work/iterm2colors/screenshots/sundried.png b/iterm2colors/screenshots/sundried.png similarity index 100% rename from old_work/iterm2colors/screenshots/sundried.png rename to iterm2colors/screenshots/sundried.png diff --git a/old_work/iterm2colors/screenshots/symfonic.png b/iterm2colors/screenshots/symfonic.png similarity index 100% rename from old_work/iterm2colors/screenshots/symfonic.png rename to iterm2colors/screenshots/symfonic.png diff --git a/old_work/iterm2colors/screenshots/teerb.png b/iterm2colors/screenshots/teerb.png similarity index 100% rename from old_work/iterm2colors/screenshots/teerb.png rename to iterm2colors/screenshots/teerb.png diff --git a/old_work/iterm2colors/screenshots/terminal_basic.png b/iterm2colors/screenshots/terminal_basic.png similarity index 100% rename from old_work/iterm2colors/screenshots/terminal_basic.png rename to iterm2colors/screenshots/terminal_basic.png diff --git a/old_work/iterm2colors/screenshots/thayer_bright.png b/iterm2colors/screenshots/thayer_bright.png similarity index 100% rename from old_work/iterm2colors/screenshots/thayer_bright.png rename to iterm2colors/screenshots/thayer_bright.png diff --git a/old_work/iterm2colors/screenshots/the_hulk.png b/iterm2colors/screenshots/the_hulk.png similarity index 100% rename from old_work/iterm2colors/screenshots/the_hulk.png rename to iterm2colors/screenshots/the_hulk.png diff --git a/old_work/iterm2colors/screenshots/tomorrow.png b/iterm2colors/screenshots/tomorrow.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow.png rename to iterm2colors/screenshots/tomorrow.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night.png b/iterm2colors/screenshots/tomorrow_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night.png rename to iterm2colors/screenshots/tomorrow_night.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_blue.png b/iterm2colors/screenshots/tomorrow_night_blue.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_blue.png rename to iterm2colors/screenshots/tomorrow_night_blue.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_bright.png b/iterm2colors/screenshots/tomorrow_night_bright.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_bright.png rename to iterm2colors/screenshots/tomorrow_night_bright.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_eighties.png b/iterm2colors/screenshots/tomorrow_night_eighties.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_eighties.png rename to iterm2colors/screenshots/tomorrow_night_eighties.png diff --git a/old_work/iterm2colors/screenshots/toy_chest.png b/iterm2colors/screenshots/toy_chest.png similarity index 100% rename from old_work/iterm2colors/screenshots/toy_chest.png rename to iterm2colors/screenshots/toy_chest.png diff --git a/old_work/iterm2colors/screenshots/treehouse.png b/iterm2colors/screenshots/treehouse.png similarity index 100% rename from old_work/iterm2colors/screenshots/treehouse.png rename to iterm2colors/screenshots/treehouse.png diff --git a/old_work/iterm2colors/screenshots/twilight.png b/iterm2colors/screenshots/twilight.png similarity index 100% rename from old_work/iterm2colors/screenshots/twilight.png rename to iterm2colors/screenshots/twilight.png diff --git a/old_work/iterm2colors/screenshots/ubuntu.png b/iterm2colors/screenshots/ubuntu.png similarity index 100% rename from old_work/iterm2colors/screenshots/ubuntu.png rename to iterm2colors/screenshots/ubuntu.png diff --git a/old_work/iterm2colors/screenshots/under_the_sea.png b/iterm2colors/screenshots/under_the_sea.png similarity index 100% rename from old_work/iterm2colors/screenshots/under_the_sea.png rename to iterm2colors/screenshots/under_the_sea.png diff --git a/old_work/iterm2colors/screenshots/urple.png b/iterm2colors/screenshots/urple.png similarity index 100% rename from old_work/iterm2colors/screenshots/urple.png rename to iterm2colors/screenshots/urple.png diff --git a/old_work/iterm2colors/screenshots/vaughn.png b/iterm2colors/screenshots/vaughn.png similarity index 100% rename from old_work/iterm2colors/screenshots/vaughn.png rename to iterm2colors/screenshots/vaughn.png diff --git a/old_work/iterm2colors/screenshots/vibrant_ink.png b/iterm2colors/screenshots/vibrant_ink.png similarity index 100% rename from old_work/iterm2colors/screenshots/vibrant_ink.png rename to iterm2colors/screenshots/vibrant_ink.png diff --git a/old_work/iterm2colors/screenshots/violet_dark.png b/iterm2colors/screenshots/violet_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/violet_dark.png rename to iterm2colors/screenshots/violet_dark.png diff --git a/old_work/iterm2colors/screenshots/violet_light.png b/iterm2colors/screenshots/violet_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/violet_light.png rename to iterm2colors/screenshots/violet_light.png diff --git a/old_work/iterm2colors/screenshots/warm_neon.png b/iterm2colors/screenshots/warm_neon.png similarity index 100% rename from old_work/iterm2colors/screenshots/warm_neon.png rename to iterm2colors/screenshots/warm_neon.png diff --git a/old_work/iterm2colors/screenshots/wez.png b/iterm2colors/screenshots/wez.png similarity index 100% rename from old_work/iterm2colors/screenshots/wez.png rename to iterm2colors/screenshots/wez.png diff --git a/old_work/iterm2colors/screenshots/wild_cherry.png b/iterm2colors/screenshots/wild_cherry.png similarity index 100% rename from old_work/iterm2colors/screenshots/wild_cherry.png rename to iterm2colors/screenshots/wild_cherry.png diff --git a/old_work/iterm2colors/screenshots/wombat.png b/iterm2colors/screenshots/wombat.png similarity index 100% rename from old_work/iterm2colors/screenshots/wombat.png rename to iterm2colors/screenshots/wombat.png diff --git a/old_work/iterm2colors/screenshots/wryan.png b/iterm2colors/screenshots/wryan.png similarity index 100% rename from old_work/iterm2colors/screenshots/wryan.png rename to iterm2colors/screenshots/wryan.png diff --git a/old_work/iterm2colors/screenshots/zenburn.png b/iterm2colors/screenshots/zenburn.png similarity index 100% rename from old_work/iterm2colors/screenshots/zenburn.png rename to iterm2colors/screenshots/zenburn.png diff --git a/old_work/iterm2colors/terminal/3024 Day.terminal b/iterm2colors/terminal/3024 Day.terminal similarity index 100% rename from old_work/iterm2colors/terminal/3024 Day.terminal rename to iterm2colors/terminal/3024 Day.terminal diff --git a/old_work/iterm2colors/terminal/3024 Night.terminal b/iterm2colors/terminal/3024 Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/3024 Night.terminal rename to iterm2colors/terminal/3024 Night.terminal diff --git a/old_work/iterm2colors/terminal/AdventureTime.terminal b/iterm2colors/terminal/AdventureTime.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AdventureTime.terminal rename to iterm2colors/terminal/AdventureTime.terminal diff --git a/old_work/iterm2colors/terminal/Afterglow.terminal b/iterm2colors/terminal/Afterglow.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Afterglow.terminal rename to iterm2colors/terminal/Afterglow.terminal diff --git a/old_work/iterm2colors/terminal/AlienBlood.terminal b/iterm2colors/terminal/AlienBlood.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AlienBlood.terminal rename to iterm2colors/terminal/AlienBlood.terminal diff --git a/old_work/iterm2colors/terminal/Argonaut.terminal b/iterm2colors/terminal/Argonaut.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Argonaut.terminal rename to iterm2colors/terminal/Argonaut.terminal diff --git a/old_work/iterm2colors/terminal/Arthur.terminal b/iterm2colors/terminal/Arthur.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Arthur.terminal rename to iterm2colors/terminal/Arthur.terminal diff --git a/old_work/iterm2colors/terminal/AtelierSulphurpool.terminal b/iterm2colors/terminal/AtelierSulphurpool.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AtelierSulphurpool.terminal rename to iterm2colors/terminal/AtelierSulphurpool.terminal diff --git a/old_work/iterm2colors/terminal/Atom.terminal b/iterm2colors/terminal/Atom.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Atom.terminal rename to iterm2colors/terminal/Atom.terminal diff --git a/old_work/iterm2colors/terminal/AtomOneLight.terminal b/iterm2colors/terminal/AtomOneLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AtomOneLight.terminal rename to iterm2colors/terminal/AtomOneLight.terminal diff --git a/old_work/iterm2colors/terminal/Batman.terminal b/iterm2colors/terminal/Batman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Batman.terminal rename to iterm2colors/terminal/Batman.terminal diff --git a/old_work/iterm2colors/terminal/Belafonte Day.terminal b/iterm2colors/terminal/Belafonte Day.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Belafonte Day.terminal rename to iterm2colors/terminal/Belafonte Day.terminal diff --git a/old_work/iterm2colors/terminal/Belafonte Night.terminal b/iterm2colors/terminal/Belafonte Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Belafonte Night.terminal rename to iterm2colors/terminal/Belafonte Night.terminal diff --git a/old_work/iterm2colors/terminal/BirdsOfParadise.terminal b/iterm2colors/terminal/BirdsOfParadise.terminal similarity index 100% rename from old_work/iterm2colors/terminal/BirdsOfParadise.terminal rename to iterm2colors/terminal/BirdsOfParadise.terminal diff --git a/old_work/iterm2colors/terminal/Blazer.terminal b/iterm2colors/terminal/Blazer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Blazer.terminal rename to iterm2colors/terminal/Blazer.terminal diff --git a/old_work/iterm2colors/terminal/Borland.terminal b/iterm2colors/terminal/Borland.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Borland.terminal rename to iterm2colors/terminal/Borland.terminal diff --git a/old_work/iterm2colors/terminal/Bright Lights.terminal b/iterm2colors/terminal/Bright Lights.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Bright Lights.terminal rename to iterm2colors/terminal/Bright Lights.terminal diff --git a/old_work/iterm2colors/terminal/Broadcast.terminal b/iterm2colors/terminal/Broadcast.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Broadcast.terminal rename to iterm2colors/terminal/Broadcast.terminal diff --git a/old_work/iterm2colors/terminal/Brogrammer.terminal b/iterm2colors/terminal/Brogrammer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Brogrammer.terminal rename to iterm2colors/terminal/Brogrammer.terminal diff --git a/old_work/iterm2colors/terminal/C64.terminal b/iterm2colors/terminal/C64.terminal similarity index 100% rename from old_work/iterm2colors/terminal/C64.terminal rename to iterm2colors/terminal/C64.terminal diff --git a/old_work/iterm2colors/terminal/CLRS.terminal b/iterm2colors/terminal/CLRS.terminal similarity index 100% rename from old_work/iterm2colors/terminal/CLRS.terminal rename to iterm2colors/terminal/CLRS.terminal diff --git a/old_work/iterm2colors/terminal/Chalk.terminal b/iterm2colors/terminal/Chalk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Chalk.terminal rename to iterm2colors/terminal/Chalk.terminal diff --git a/old_work/iterm2colors/terminal/Chalkboard.terminal b/iterm2colors/terminal/Chalkboard.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Chalkboard.terminal rename to iterm2colors/terminal/Chalkboard.terminal diff --git a/old_work/iterm2colors/terminal/Ciapre.terminal b/iterm2colors/terminal/Ciapre.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ciapre.terminal rename to iterm2colors/terminal/Ciapre.terminal diff --git a/old_work/iterm2colors/terminal/Cobalt Neon.terminal b/iterm2colors/terminal/Cobalt Neon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Cobalt Neon.terminal rename to iterm2colors/terminal/Cobalt Neon.terminal diff --git a/old_work/iterm2colors/terminal/Cobalt2.terminal b/iterm2colors/terminal/Cobalt2.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Cobalt2.terminal rename to iterm2colors/terminal/Cobalt2.terminal diff --git a/old_work/iterm2colors/terminal/CrayonPonyFish.terminal b/iterm2colors/terminal/CrayonPonyFish.terminal similarity index 100% rename from old_work/iterm2colors/terminal/CrayonPonyFish.terminal rename to iterm2colors/terminal/CrayonPonyFish.terminal diff --git a/old_work/iterm2colors/terminal/Dark Pastel.terminal b/iterm2colors/terminal/Dark Pastel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Dark Pastel.terminal rename to iterm2colors/terminal/Dark Pastel.terminal diff --git a/old_work/iterm2colors/terminal/Darkside.terminal b/iterm2colors/terminal/Darkside.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Darkside.terminal rename to iterm2colors/terminal/Darkside.terminal diff --git a/old_work/iterm2colors/terminal/Desert.terminal b/iterm2colors/terminal/Desert.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Desert.terminal rename to iterm2colors/terminal/Desert.terminal diff --git a/old_work/iterm2colors/terminal/DimmedMonokai.terminal b/iterm2colors/terminal/DimmedMonokai.terminal similarity index 100% rename from old_work/iterm2colors/terminal/DimmedMonokai.terminal rename to iterm2colors/terminal/DimmedMonokai.terminal diff --git a/old_work/iterm2colors/terminal/DotGov.terminal b/iterm2colors/terminal/DotGov.terminal similarity index 100% rename from old_work/iterm2colors/terminal/DotGov.terminal rename to iterm2colors/terminal/DotGov.terminal diff --git a/old_work/iterm2colors/terminal/Dracula.terminal b/iterm2colors/terminal/Dracula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Dracula.terminal rename to iterm2colors/terminal/Dracula.terminal diff --git a/old_work/iterm2colors/terminal/Duotone Dark.terminal b/iterm2colors/terminal/Duotone Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Duotone Dark.terminal rename to iterm2colors/terminal/Duotone Dark.terminal diff --git a/old_work/iterm2colors/terminal/ENCOM.terminal b/iterm2colors/terminal/ENCOM.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ENCOM.terminal rename to iterm2colors/terminal/ENCOM.terminal diff --git a/old_work/iterm2colors/terminal/Earthsong.terminal b/iterm2colors/terminal/Earthsong.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Earthsong.terminal rename to iterm2colors/terminal/Earthsong.terminal diff --git a/old_work/iterm2colors/terminal/Elemental.terminal b/iterm2colors/terminal/Elemental.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Elemental.terminal rename to iterm2colors/terminal/Elemental.terminal diff --git a/old_work/iterm2colors/terminal/Espresso Libre.terminal b/iterm2colors/terminal/Espresso Libre.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Espresso Libre.terminal rename to iterm2colors/terminal/Espresso Libre.terminal diff --git a/old_work/iterm2colors/terminal/Espresso.terminal b/iterm2colors/terminal/Espresso.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Espresso.terminal rename to iterm2colors/terminal/Espresso.terminal diff --git a/old_work/iterm2colors/terminal/Fideloper.terminal b/iterm2colors/terminal/Fideloper.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Fideloper.terminal rename to iterm2colors/terminal/Fideloper.terminal diff --git a/old_work/iterm2colors/terminal/FishTank.terminal b/iterm2colors/terminal/FishTank.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FishTank.terminal rename to iterm2colors/terminal/FishTank.terminal diff --git a/old_work/iterm2colors/terminal/Flat.terminal b/iterm2colors/terminal/Flat.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Flat.terminal rename to iterm2colors/terminal/Flat.terminal diff --git a/old_work/iterm2colors/terminal/Flatland.terminal b/iterm2colors/terminal/Flatland.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Flatland.terminal rename to iterm2colors/terminal/Flatland.terminal diff --git a/old_work/iterm2colors/terminal/Floraverse.terminal b/iterm2colors/terminal/Floraverse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Floraverse.terminal rename to iterm2colors/terminal/Floraverse.terminal diff --git a/old_work/iterm2colors/terminal/FrontEndDelight.terminal b/iterm2colors/terminal/FrontEndDelight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FrontEndDelight.terminal rename to iterm2colors/terminal/FrontEndDelight.terminal diff --git a/old_work/iterm2colors/terminal/FunForrest.terminal b/iterm2colors/terminal/FunForrest.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FunForrest.terminal rename to iterm2colors/terminal/FunForrest.terminal diff --git a/old_work/iterm2colors/terminal/Galaxy.terminal b/iterm2colors/terminal/Galaxy.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Galaxy.terminal rename to iterm2colors/terminal/Galaxy.terminal diff --git a/old_work/iterm2colors/terminal/Github.terminal b/iterm2colors/terminal/Github.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Github.terminal rename to iterm2colors/terminal/Github.terminal diff --git a/old_work/iterm2colors/terminal/Glacier.terminal b/iterm2colors/terminal/Glacier.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Glacier.terminal rename to iterm2colors/terminal/Glacier.terminal diff --git a/old_work/iterm2colors/terminal/Grape.terminal b/iterm2colors/terminal/Grape.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Grape.terminal rename to iterm2colors/terminal/Grape.terminal diff --git a/old_work/iterm2colors/terminal/Grass.terminal b/iterm2colors/terminal/Grass.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Grass.terminal rename to iterm2colors/terminal/Grass.terminal diff --git a/old_work/iterm2colors/terminal/Hardcore.terminal b/iterm2colors/terminal/Hardcore.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hardcore.terminal rename to iterm2colors/terminal/Hardcore.terminal diff --git a/old_work/iterm2colors/terminal/Harper.terminal b/iterm2colors/terminal/Harper.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Harper.terminal rename to iterm2colors/terminal/Harper.terminal diff --git a/old_work/iterm2colors/terminal/Highway.terminal b/iterm2colors/terminal/Highway.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Highway.terminal rename to iterm2colors/terminal/Highway.terminal diff --git a/old_work/iterm2colors/terminal/Hipster Green.terminal b/iterm2colors/terminal/Hipster Green.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hipster Green.terminal rename to iterm2colors/terminal/Hipster Green.terminal diff --git a/old_work/iterm2colors/terminal/Homebrew.terminal b/iterm2colors/terminal/Homebrew.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Homebrew.terminal rename to iterm2colors/terminal/Homebrew.terminal diff --git a/old_work/iterm2colors/terminal/Hurtado.terminal b/iterm2colors/terminal/Hurtado.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hurtado.terminal rename to iterm2colors/terminal/Hurtado.terminal diff --git a/old_work/iterm2colors/terminal/Hybrid.terminal b/iterm2colors/terminal/Hybrid.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hybrid.terminal rename to iterm2colors/terminal/Hybrid.terminal diff --git a/old_work/iterm2colors/terminal/IC_Green_PPL.terminal b/iterm2colors/terminal/IC_Green_PPL.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IC_Green_PPL.terminal rename to iterm2colors/terminal/IC_Green_PPL.terminal diff --git a/old_work/iterm2colors/terminal/IC_Orange_PPL.terminal b/iterm2colors/terminal/IC_Orange_PPL.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IC_Orange_PPL.terminal rename to iterm2colors/terminal/IC_Orange_PPL.terminal diff --git a/old_work/iterm2colors/terminal/IR_Black.terminal b/iterm2colors/terminal/IR_Black.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IR_Black.terminal rename to iterm2colors/terminal/IR_Black.terminal diff --git a/old_work/iterm2colors/terminal/Jackie Brown.terminal b/iterm2colors/terminal/Jackie Brown.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Jackie Brown.terminal rename to iterm2colors/terminal/Jackie Brown.terminal diff --git a/old_work/iterm2colors/terminal/Japanesque.terminal b/iterm2colors/terminal/Japanesque.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Japanesque.terminal rename to iterm2colors/terminal/Japanesque.terminal diff --git a/old_work/iterm2colors/terminal/Jellybeans.terminal b/iterm2colors/terminal/Jellybeans.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Jellybeans.terminal rename to iterm2colors/terminal/Jellybeans.terminal diff --git a/old_work/iterm2colors/terminal/JetBrains Darcula.terminal b/iterm2colors/terminal/JetBrains Darcula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/JetBrains Darcula.terminal rename to iterm2colors/terminal/JetBrains Darcula.terminal diff --git a/old_work/iterm2colors/terminal/Kibble.terminal b/iterm2colors/terminal/Kibble.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Kibble.terminal rename to iterm2colors/terminal/Kibble.terminal diff --git a/old_work/iterm2colors/terminal/Later This Evening.terminal b/iterm2colors/terminal/Later This Evening.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Later This Evening.terminal rename to iterm2colors/terminal/Later This Evening.terminal diff --git a/old_work/iterm2colors/terminal/Lavandula.terminal b/iterm2colors/terminal/Lavandula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Lavandula.terminal rename to iterm2colors/terminal/Lavandula.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbon.terminal b/iterm2colors/terminal/LiquidCarbon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbon.terminal rename to iterm2colors/terminal/LiquidCarbon.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal b/iterm2colors/terminal/LiquidCarbonTransparent.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal rename to iterm2colors/terminal/LiquidCarbonTransparent.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal b/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal rename to iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal diff --git a/old_work/iterm2colors/terminal/Man Page.terminal b/iterm2colors/terminal/Man Page.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Man Page.terminal rename to iterm2colors/terminal/Man Page.terminal diff --git a/old_work/iterm2colors/terminal/Material.terminal b/iterm2colors/terminal/Material.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Material.terminal rename to iterm2colors/terminal/Material.terminal diff --git a/old_work/iterm2colors/terminal/MaterialDark.terminal b/iterm2colors/terminal/MaterialDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/MaterialDark.terminal rename to iterm2colors/terminal/MaterialDark.terminal diff --git a/old_work/iterm2colors/terminal/Mathias.terminal b/iterm2colors/terminal/Mathias.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Mathias.terminal rename to iterm2colors/terminal/Mathias.terminal diff --git a/old_work/iterm2colors/terminal/Medallion.terminal b/iterm2colors/terminal/Medallion.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Medallion.terminal rename to iterm2colors/terminal/Medallion.terminal diff --git a/old_work/iterm2colors/terminal/Misterioso.terminal b/iterm2colors/terminal/Misterioso.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Misterioso.terminal rename to iterm2colors/terminal/Misterioso.terminal diff --git a/old_work/iterm2colors/terminal/Molokai.terminal b/iterm2colors/terminal/Molokai.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Molokai.terminal rename to iterm2colors/terminal/Molokai.terminal diff --git a/old_work/iterm2colors/terminal/MonaLisa.terminal b/iterm2colors/terminal/MonaLisa.terminal similarity index 100% rename from old_work/iterm2colors/terminal/MonaLisa.terminal rename to iterm2colors/terminal/MonaLisa.terminal diff --git a/old_work/iterm2colors/terminal/Monokai Soda.terminal b/iterm2colors/terminal/Monokai Soda.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Monokai Soda.terminal rename to iterm2colors/terminal/Monokai Soda.terminal diff --git a/old_work/iterm2colors/terminal/N0tch2k.terminal b/iterm2colors/terminal/N0tch2k.terminal similarity index 100% rename from old_work/iterm2colors/terminal/N0tch2k.terminal rename to iterm2colors/terminal/N0tch2k.terminal diff --git a/old_work/iterm2colors/terminal/Neopolitan.terminal b/iterm2colors/terminal/Neopolitan.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Neopolitan.terminal rename to iterm2colors/terminal/Neopolitan.terminal diff --git a/old_work/iterm2colors/terminal/Neutron.terminal b/iterm2colors/terminal/Neutron.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Neutron.terminal rename to iterm2colors/terminal/Neutron.terminal diff --git a/old_work/iterm2colors/terminal/NightLion v1.terminal b/iterm2colors/terminal/NightLion v1.terminal similarity index 100% rename from old_work/iterm2colors/terminal/NightLion v1.terminal rename to iterm2colors/terminal/NightLion v1.terminal diff --git a/old_work/iterm2colors/terminal/NightLion v2.terminal b/iterm2colors/terminal/NightLion v2.terminal similarity index 100% rename from old_work/iterm2colors/terminal/NightLion v2.terminal rename to iterm2colors/terminal/NightLion v2.terminal diff --git a/old_work/iterm2colors/terminal/Novel.terminal b/iterm2colors/terminal/Novel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Novel.terminal rename to iterm2colors/terminal/Novel.terminal diff --git a/old_work/iterm2colors/terminal/Obsidian.terminal b/iterm2colors/terminal/Obsidian.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Obsidian.terminal rename to iterm2colors/terminal/Obsidian.terminal diff --git a/old_work/iterm2colors/terminal/Ocean.terminal b/iterm2colors/terminal/Ocean.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ocean.terminal rename to iterm2colors/terminal/Ocean.terminal diff --git a/old_work/iterm2colors/terminal/OceanicMaterial.terminal b/iterm2colors/terminal/OceanicMaterial.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OceanicMaterial.terminal rename to iterm2colors/terminal/OceanicMaterial.terminal diff --git a/old_work/iterm2colors/terminal/Ollie.terminal b/iterm2colors/terminal/Ollie.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ollie.terminal rename to iterm2colors/terminal/Ollie.terminal diff --git a/old_work/iterm2colors/terminal/OneHalfDark.terminal b/iterm2colors/terminal/OneHalfDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OneHalfDark.terminal rename to iterm2colors/terminal/OneHalfDark.terminal diff --git a/old_work/iterm2colors/terminal/OneHalfLight.terminal b/iterm2colors/terminal/OneHalfLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OneHalfLight.terminal rename to iterm2colors/terminal/OneHalfLight.terminal diff --git a/old_work/iterm2colors/terminal/Parasio Dark.terminal b/iterm2colors/terminal/Parasio Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Parasio Dark.terminal rename to iterm2colors/terminal/Parasio Dark.terminal diff --git a/old_work/iterm2colors/terminal/PaulMillr.terminal b/iterm2colors/terminal/PaulMillr.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PaulMillr.terminal rename to iterm2colors/terminal/PaulMillr.terminal diff --git a/old_work/iterm2colors/terminal/PencilDark.terminal b/iterm2colors/terminal/PencilDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PencilDark.terminal rename to iterm2colors/terminal/PencilDark.terminal diff --git a/old_work/iterm2colors/terminal/PencilLight.terminal b/iterm2colors/terminal/PencilLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PencilLight.terminal rename to iterm2colors/terminal/PencilLight.terminal diff --git a/old_work/iterm2colors/terminal/Piatto Light.terminal b/iterm2colors/terminal/Piatto Light.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Piatto Light.terminal rename to iterm2colors/terminal/Piatto Light.terminal diff --git a/old_work/iterm2colors/terminal/Pnevma.terminal b/iterm2colors/terminal/Pnevma.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Pnevma.terminal rename to iterm2colors/terminal/Pnevma.terminal diff --git a/old_work/iterm2colors/terminal/Pro.terminal b/iterm2colors/terminal/Pro.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Pro.terminal rename to iterm2colors/terminal/Pro.terminal diff --git a/old_work/iterm2colors/terminal/Red Alert.terminal b/iterm2colors/terminal/Red Alert.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Red Alert.terminal rename to iterm2colors/terminal/Red Alert.terminal diff --git a/old_work/iterm2colors/terminal/Red Sands.terminal b/iterm2colors/terminal/Red Sands.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Red Sands.terminal rename to iterm2colors/terminal/Red Sands.terminal diff --git a/old_work/iterm2colors/terminal/Rippedcasts.terminal b/iterm2colors/terminal/Rippedcasts.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Rippedcasts.terminal rename to iterm2colors/terminal/Rippedcasts.terminal diff --git a/old_work/iterm2colors/terminal/Royal.terminal b/iterm2colors/terminal/Royal.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Royal.terminal rename to iterm2colors/terminal/Royal.terminal diff --git a/old_work/iterm2colors/terminal/SeaShells.terminal b/iterm2colors/terminal/SeaShells.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SeaShells.terminal rename to iterm2colors/terminal/SeaShells.terminal diff --git a/old_work/iterm2colors/terminal/Seafoam Pastel.terminal b/iterm2colors/terminal/Seafoam Pastel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Seafoam Pastel.terminal rename to iterm2colors/terminal/Seafoam Pastel.terminal diff --git a/old_work/iterm2colors/terminal/Seti.terminal b/iterm2colors/terminal/Seti.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Seti.terminal rename to iterm2colors/terminal/Seti.terminal diff --git a/old_work/iterm2colors/terminal/Shaman.terminal b/iterm2colors/terminal/Shaman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Shaman.terminal rename to iterm2colors/terminal/Shaman.terminal diff --git a/old_work/iterm2colors/terminal/Slate.terminal b/iterm2colors/terminal/Slate.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Slate.terminal rename to iterm2colors/terminal/Slate.terminal diff --git a/old_work/iterm2colors/terminal/Smyck.terminal b/iterm2colors/terminal/Smyck.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Smyck.terminal rename to iterm2colors/terminal/Smyck.terminal diff --git a/old_work/iterm2colors/terminal/SoftServer.terminal b/iterm2colors/terminal/SoftServer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SoftServer.terminal rename to iterm2colors/terminal/SoftServer.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Darcula.terminal b/iterm2colors/terminal/Solarized Darcula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Darcula.terminal rename to iterm2colors/terminal/Solarized Darcula.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal b/iterm2colors/terminal/Solarized Dark - Patched.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal rename to iterm2colors/terminal/Solarized Dark - Patched.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal b/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal rename to iterm2colors/terminal/Solarized Dark Higher Contrast.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark.terminal b/iterm2colors/terminal/Solarized Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark.terminal rename to iterm2colors/terminal/Solarized Dark.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Light.terminal b/iterm2colors/terminal/Solarized Light.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Light.terminal rename to iterm2colors/terminal/Solarized Light.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal b/iterm2colors/terminal/SpaceGray Eighties Dull.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal rename to iterm2colors/terminal/SpaceGray Eighties Dull.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray Eighties.terminal b/iterm2colors/terminal/SpaceGray Eighties.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray Eighties.terminal rename to iterm2colors/terminal/SpaceGray Eighties.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray.terminal b/iterm2colors/terminal/SpaceGray.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray.terminal rename to iterm2colors/terminal/SpaceGray.terminal diff --git a/old_work/iterm2colors/terminal/Spacedust.terminal b/iterm2colors/terminal/Spacedust.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spacedust.terminal rename to iterm2colors/terminal/Spacedust.terminal diff --git a/old_work/iterm2colors/terminal/Spiderman.terminal b/iterm2colors/terminal/Spiderman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spiderman.terminal rename to iterm2colors/terminal/Spiderman.terminal diff --git a/old_work/iterm2colors/terminal/Spring.terminal b/iterm2colors/terminal/Spring.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spring.terminal rename to iterm2colors/terminal/Spring.terminal diff --git a/old_work/iterm2colors/terminal/Square.terminal b/iterm2colors/terminal/Square.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Square.terminal rename to iterm2colors/terminal/Square.terminal diff --git a/old_work/iterm2colors/terminal/Sundried.terminal b/iterm2colors/terminal/Sundried.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Sundried.terminal rename to iterm2colors/terminal/Sundried.terminal diff --git a/old_work/iterm2colors/terminal/Symfonic.terminal b/iterm2colors/terminal/Symfonic.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Symfonic.terminal rename to iterm2colors/terminal/Symfonic.terminal diff --git a/old_work/iterm2colors/terminal/Teerb.terminal b/iterm2colors/terminal/Teerb.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Teerb.terminal rename to iterm2colors/terminal/Teerb.terminal diff --git a/old_work/iterm2colors/terminal/Terminal Basic.terminal b/iterm2colors/terminal/Terminal Basic.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Terminal Basic.terminal rename to iterm2colors/terminal/Terminal Basic.terminal diff --git a/old_work/iterm2colors/terminal/Thayer Bright.terminal b/iterm2colors/terminal/Thayer Bright.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Thayer Bright.terminal rename to iterm2colors/terminal/Thayer Bright.terminal diff --git a/old_work/iterm2colors/terminal/The Hulk.terminal b/iterm2colors/terminal/The Hulk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/The Hulk.terminal rename to iterm2colors/terminal/The Hulk.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal b/iterm2colors/terminal/Tomorrow Night Blue.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal rename to iterm2colors/terminal/Tomorrow Night Blue.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal b/iterm2colors/terminal/Tomorrow Night Bright.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal rename to iterm2colors/terminal/Tomorrow Night Bright.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal b/iterm2colors/terminal/Tomorrow Night Eighties.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal rename to iterm2colors/terminal/Tomorrow Night Eighties.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night.terminal b/iterm2colors/terminal/Tomorrow Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night.terminal rename to iterm2colors/terminal/Tomorrow Night.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow.terminal b/iterm2colors/terminal/Tomorrow.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow.terminal rename to iterm2colors/terminal/Tomorrow.terminal diff --git a/old_work/iterm2colors/terminal/ToyChest.terminal b/iterm2colors/terminal/ToyChest.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ToyChest.terminal rename to iterm2colors/terminal/ToyChest.terminal diff --git a/old_work/iterm2colors/terminal/Treehouse.terminal b/iterm2colors/terminal/Treehouse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Treehouse.terminal rename to iterm2colors/terminal/Treehouse.terminal diff --git a/old_work/iterm2colors/terminal/Twilight.terminal b/iterm2colors/terminal/Twilight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Twilight.terminal rename to iterm2colors/terminal/Twilight.terminal diff --git a/old_work/iterm2colors/terminal/Ubuntu.terminal b/iterm2colors/terminal/Ubuntu.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ubuntu.terminal rename to iterm2colors/terminal/Ubuntu.terminal diff --git a/old_work/iterm2colors/terminal/Urple.terminal b/iterm2colors/terminal/Urple.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Urple.terminal rename to iterm2colors/terminal/Urple.terminal diff --git a/old_work/iterm2colors/terminal/Vaughn.terminal b/iterm2colors/terminal/Vaughn.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Vaughn.terminal rename to iterm2colors/terminal/Vaughn.terminal diff --git a/old_work/iterm2colors/terminal/VibrantInk.terminal b/iterm2colors/terminal/VibrantInk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/VibrantInk.terminal rename to iterm2colors/terminal/VibrantInk.terminal diff --git a/old_work/iterm2colors/terminal/WarmNeon.terminal b/iterm2colors/terminal/WarmNeon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/WarmNeon.terminal rename to iterm2colors/terminal/WarmNeon.terminal diff --git a/old_work/iterm2colors/terminal/Wez.terminal b/iterm2colors/terminal/Wez.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wez.terminal rename to iterm2colors/terminal/Wez.terminal diff --git a/old_work/iterm2colors/terminal/WildCherry.terminal b/iterm2colors/terminal/WildCherry.terminal similarity index 100% rename from old_work/iterm2colors/terminal/WildCherry.terminal rename to iterm2colors/terminal/WildCherry.terminal diff --git a/old_work/iterm2colors/terminal/Wombat.terminal b/iterm2colors/terminal/Wombat.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wombat.terminal rename to iterm2colors/terminal/Wombat.terminal diff --git a/old_work/iterm2colors/terminal/Wryan.terminal b/iterm2colors/terminal/Wryan.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wryan.terminal rename to iterm2colors/terminal/Wryan.terminal diff --git a/old_work/iterm2colors/terminal/Zenburn.terminal b/iterm2colors/terminal/Zenburn.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Zenburn.terminal rename to iterm2colors/terminal/Zenburn.terminal diff --git a/old_work/iterm2colors/terminal/ayu.terminal b/iterm2colors/terminal/ayu.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ayu.terminal rename to iterm2colors/terminal/ayu.terminal diff --git a/old_work/iterm2colors/terminal/idleToes.terminal b/iterm2colors/terminal/idleToes.terminal similarity index 100% rename from old_work/iterm2colors/terminal/idleToes.terminal rename to iterm2colors/terminal/idleToes.terminal diff --git a/old_work/iterm2colors/terminator/3024 Day.config b/iterm2colors/terminator/3024 Day.config similarity index 100% rename from old_work/iterm2colors/terminator/3024 Day.config rename to iterm2colors/terminator/3024 Day.config diff --git a/old_work/iterm2colors/terminator/3024 Night.config b/iterm2colors/terminator/3024 Night.config similarity index 100% rename from old_work/iterm2colors/terminator/3024 Night.config rename to iterm2colors/terminator/3024 Night.config diff --git a/old_work/iterm2colors/terminator/AdventureTime.config b/iterm2colors/terminator/AdventureTime.config similarity index 100% rename from old_work/iterm2colors/terminator/AdventureTime.config rename to iterm2colors/terminator/AdventureTime.config diff --git a/old_work/iterm2colors/terminator/Afterglow.config b/iterm2colors/terminator/Afterglow.config similarity index 100% rename from old_work/iterm2colors/terminator/Afterglow.config rename to iterm2colors/terminator/Afterglow.config diff --git a/old_work/iterm2colors/terminator/AlienBlood.config b/iterm2colors/terminator/AlienBlood.config similarity index 100% rename from old_work/iterm2colors/terminator/AlienBlood.config rename to iterm2colors/terminator/AlienBlood.config diff --git a/old_work/iterm2colors/terminator/Argonaut.config b/iterm2colors/terminator/Argonaut.config similarity index 100% rename from old_work/iterm2colors/terminator/Argonaut.config rename to iterm2colors/terminator/Argonaut.config diff --git a/old_work/iterm2colors/terminator/Arthur.config b/iterm2colors/terminator/Arthur.config similarity index 100% rename from old_work/iterm2colors/terminator/Arthur.config rename to iterm2colors/terminator/Arthur.config diff --git a/old_work/iterm2colors/terminator/AtelierSulphurpool.config b/iterm2colors/terminator/AtelierSulphurpool.config similarity index 100% rename from old_work/iterm2colors/terminator/AtelierSulphurpool.config rename to iterm2colors/terminator/AtelierSulphurpool.config diff --git a/old_work/iterm2colors/terminator/Atom.config b/iterm2colors/terminator/Atom.config similarity index 100% rename from old_work/iterm2colors/terminator/Atom.config rename to iterm2colors/terminator/Atom.config diff --git a/old_work/iterm2colors/terminator/AtomOneLight.config b/iterm2colors/terminator/AtomOneLight.config similarity index 100% rename from old_work/iterm2colors/terminator/AtomOneLight.config rename to iterm2colors/terminator/AtomOneLight.config diff --git a/old_work/iterm2colors/terminator/Batman.config b/iterm2colors/terminator/Batman.config similarity index 100% rename from old_work/iterm2colors/terminator/Batman.config rename to iterm2colors/terminator/Batman.config diff --git a/old_work/iterm2colors/terminator/Belafonte Day.config b/iterm2colors/terminator/Belafonte Day.config similarity index 100% rename from old_work/iterm2colors/terminator/Belafonte Day.config rename to iterm2colors/terminator/Belafonte Day.config diff --git a/old_work/iterm2colors/terminator/Belafonte Night.config b/iterm2colors/terminator/Belafonte Night.config similarity index 100% rename from old_work/iterm2colors/terminator/Belafonte Night.config rename to iterm2colors/terminator/Belafonte Night.config diff --git a/old_work/iterm2colors/terminator/BirdsOfParadise.config b/iterm2colors/terminator/BirdsOfParadise.config similarity index 100% rename from old_work/iterm2colors/terminator/BirdsOfParadise.config rename to iterm2colors/terminator/BirdsOfParadise.config diff --git a/old_work/iterm2colors/terminator/Blazer.config b/iterm2colors/terminator/Blazer.config similarity index 100% rename from old_work/iterm2colors/terminator/Blazer.config rename to iterm2colors/terminator/Blazer.config diff --git a/old_work/iterm2colors/terminator/Borland.config b/iterm2colors/terminator/Borland.config similarity index 100% rename from old_work/iterm2colors/terminator/Borland.config rename to iterm2colors/terminator/Borland.config diff --git a/old_work/iterm2colors/terminator/Bright Lights.config b/iterm2colors/terminator/Bright Lights.config similarity index 100% rename from old_work/iterm2colors/terminator/Bright Lights.config rename to iterm2colors/terminator/Bright Lights.config diff --git a/old_work/iterm2colors/terminator/Broadcast.config b/iterm2colors/terminator/Broadcast.config similarity index 100% rename from old_work/iterm2colors/terminator/Broadcast.config rename to iterm2colors/terminator/Broadcast.config diff --git a/old_work/iterm2colors/terminator/Brogrammer.config b/iterm2colors/terminator/Brogrammer.config similarity index 100% rename from old_work/iterm2colors/terminator/Brogrammer.config rename to iterm2colors/terminator/Brogrammer.config diff --git a/old_work/iterm2colors/terminator/C64.config b/iterm2colors/terminator/C64.config similarity index 100% rename from old_work/iterm2colors/terminator/C64.config rename to iterm2colors/terminator/C64.config diff --git a/old_work/iterm2colors/terminator/CLRS.config b/iterm2colors/terminator/CLRS.config similarity index 100% rename from old_work/iterm2colors/terminator/CLRS.config rename to iterm2colors/terminator/CLRS.config diff --git a/old_work/iterm2colors/terminator/Chalk.config b/iterm2colors/terminator/Chalk.config similarity index 100% rename from old_work/iterm2colors/terminator/Chalk.config rename to iterm2colors/terminator/Chalk.config diff --git a/old_work/iterm2colors/terminator/Chalkboard.config b/iterm2colors/terminator/Chalkboard.config similarity index 100% rename from old_work/iterm2colors/terminator/Chalkboard.config rename to iterm2colors/terminator/Chalkboard.config diff --git a/old_work/iterm2colors/terminator/Ciapre.config b/iterm2colors/terminator/Ciapre.config similarity index 100% rename from old_work/iterm2colors/terminator/Ciapre.config rename to iterm2colors/terminator/Ciapre.config diff --git a/old_work/iterm2colors/terminator/Cobalt Neon.config b/iterm2colors/terminator/Cobalt Neon.config similarity index 100% rename from old_work/iterm2colors/terminator/Cobalt Neon.config rename to iterm2colors/terminator/Cobalt Neon.config diff --git a/old_work/iterm2colors/terminator/Cobalt2.config b/iterm2colors/terminator/Cobalt2.config similarity index 100% rename from old_work/iterm2colors/terminator/Cobalt2.config rename to iterm2colors/terminator/Cobalt2.config diff --git a/old_work/iterm2colors/terminator/CrayonPonyFish.config b/iterm2colors/terminator/CrayonPonyFish.config similarity index 100% rename from old_work/iterm2colors/terminator/CrayonPonyFish.config rename to iterm2colors/terminator/CrayonPonyFish.config diff --git a/old_work/iterm2colors/terminator/Dark Pastel.config b/iterm2colors/terminator/Dark Pastel.config similarity index 100% rename from old_work/iterm2colors/terminator/Dark Pastel.config rename to iterm2colors/terminator/Dark Pastel.config diff --git a/old_work/iterm2colors/terminator/Darkside.config b/iterm2colors/terminator/Darkside.config similarity index 100% rename from old_work/iterm2colors/terminator/Darkside.config rename to iterm2colors/terminator/Darkside.config diff --git a/old_work/iterm2colors/terminator/Desert.config b/iterm2colors/terminator/Desert.config similarity index 100% rename from old_work/iterm2colors/terminator/Desert.config rename to iterm2colors/terminator/Desert.config diff --git a/old_work/iterm2colors/terminator/DimmedMonokai.config b/iterm2colors/terminator/DimmedMonokai.config similarity index 100% rename from old_work/iterm2colors/terminator/DimmedMonokai.config rename to iterm2colors/terminator/DimmedMonokai.config diff --git a/old_work/iterm2colors/terminator/DotGov.config b/iterm2colors/terminator/DotGov.config similarity index 100% rename from old_work/iterm2colors/terminator/DotGov.config rename to iterm2colors/terminator/DotGov.config diff --git a/old_work/iterm2colors/terminator/Dracula.config b/iterm2colors/terminator/Dracula.config similarity index 100% rename from old_work/iterm2colors/terminator/Dracula.config rename to iterm2colors/terminator/Dracula.config diff --git a/old_work/iterm2colors/terminator/Duotone Dark.config b/iterm2colors/terminator/Duotone Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Duotone Dark.config rename to iterm2colors/terminator/Duotone Dark.config diff --git a/old_work/iterm2colors/terminator/ENCOM.config b/iterm2colors/terminator/ENCOM.config similarity index 100% rename from old_work/iterm2colors/terminator/ENCOM.config rename to iterm2colors/terminator/ENCOM.config diff --git a/old_work/iterm2colors/terminator/Earthsong.config b/iterm2colors/terminator/Earthsong.config similarity index 100% rename from old_work/iterm2colors/terminator/Earthsong.config rename to iterm2colors/terminator/Earthsong.config diff --git a/old_work/iterm2colors/terminator/Elemental.config b/iterm2colors/terminator/Elemental.config similarity index 100% rename from old_work/iterm2colors/terminator/Elemental.config rename to iterm2colors/terminator/Elemental.config diff --git a/old_work/iterm2colors/terminator/Elementary.config b/iterm2colors/terminator/Elementary.config similarity index 100% rename from old_work/iterm2colors/terminator/Elementary.config rename to iterm2colors/terminator/Elementary.config diff --git a/old_work/iterm2colors/terminator/Espresso Libre.config b/iterm2colors/terminator/Espresso Libre.config similarity index 100% rename from old_work/iterm2colors/terminator/Espresso Libre.config rename to iterm2colors/terminator/Espresso Libre.config diff --git a/old_work/iterm2colors/terminator/Espresso.config b/iterm2colors/terminator/Espresso.config similarity index 100% rename from old_work/iterm2colors/terminator/Espresso.config rename to iterm2colors/terminator/Espresso.config diff --git a/old_work/iterm2colors/terminator/Fideloper.config b/iterm2colors/terminator/Fideloper.config similarity index 100% rename from old_work/iterm2colors/terminator/Fideloper.config rename to iterm2colors/terminator/Fideloper.config diff --git a/old_work/iterm2colors/terminator/FirefoxDev.config b/iterm2colors/terminator/FirefoxDev.config similarity index 100% rename from old_work/iterm2colors/terminator/FirefoxDev.config rename to iterm2colors/terminator/FirefoxDev.config diff --git a/old_work/iterm2colors/terminator/Firewatch.config b/iterm2colors/terminator/Firewatch.config similarity index 100% rename from old_work/iterm2colors/terminator/Firewatch.config rename to iterm2colors/terminator/Firewatch.config diff --git a/old_work/iterm2colors/terminator/FishTank.config b/iterm2colors/terminator/FishTank.config similarity index 100% rename from old_work/iterm2colors/terminator/FishTank.config rename to iterm2colors/terminator/FishTank.config diff --git a/old_work/iterm2colors/terminator/Flat.config b/iterm2colors/terminator/Flat.config similarity index 100% rename from old_work/iterm2colors/terminator/Flat.config rename to iterm2colors/terminator/Flat.config diff --git a/old_work/iterm2colors/terminator/Flatland.config b/iterm2colors/terminator/Flatland.config similarity index 100% rename from old_work/iterm2colors/terminator/Flatland.config rename to iterm2colors/terminator/Flatland.config diff --git a/old_work/iterm2colors/terminator/Floraverse.config b/iterm2colors/terminator/Floraverse.config similarity index 100% rename from old_work/iterm2colors/terminator/Floraverse.config rename to iterm2colors/terminator/Floraverse.config diff --git a/old_work/iterm2colors/terminator/ForestBlue.config b/iterm2colors/terminator/ForestBlue.config similarity index 100% rename from old_work/iterm2colors/terminator/ForestBlue.config rename to iterm2colors/terminator/ForestBlue.config diff --git a/old_work/iterm2colors/terminator/FrontEndDelight.config b/iterm2colors/terminator/FrontEndDelight.config similarity index 100% rename from old_work/iterm2colors/terminator/FrontEndDelight.config rename to iterm2colors/terminator/FrontEndDelight.config diff --git a/old_work/iterm2colors/terminator/FunForrest.config b/iterm2colors/terminator/FunForrest.config similarity index 100% rename from old_work/iterm2colors/terminator/FunForrest.config rename to iterm2colors/terminator/FunForrest.config diff --git a/old_work/iterm2colors/terminator/Galaxy.config b/iterm2colors/terminator/Galaxy.config similarity index 100% rename from old_work/iterm2colors/terminator/Galaxy.config rename to iterm2colors/terminator/Galaxy.config diff --git a/old_work/iterm2colors/terminator/Github.config b/iterm2colors/terminator/Github.config similarity index 100% rename from old_work/iterm2colors/terminator/Github.config rename to iterm2colors/terminator/Github.config diff --git a/old_work/iterm2colors/terminator/Glacier.config b/iterm2colors/terminator/Glacier.config similarity index 100% rename from old_work/iterm2colors/terminator/Glacier.config rename to iterm2colors/terminator/Glacier.config diff --git a/old_work/iterm2colors/terminator/Grape.config b/iterm2colors/terminator/Grape.config similarity index 100% rename from old_work/iterm2colors/terminator/Grape.config rename to iterm2colors/terminator/Grape.config diff --git a/old_work/iterm2colors/terminator/Grass.config b/iterm2colors/terminator/Grass.config similarity index 100% rename from old_work/iterm2colors/terminator/Grass.config rename to iterm2colors/terminator/Grass.config diff --git a/old_work/iterm2colors/terminator/Gruvbox Dark.config b/iterm2colors/terminator/Gruvbox Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Gruvbox Dark.config rename to iterm2colors/terminator/Gruvbox Dark.config diff --git a/old_work/iterm2colors/terminator/Hardcore.config b/iterm2colors/terminator/Hardcore.config similarity index 100% rename from old_work/iterm2colors/terminator/Hardcore.config rename to iterm2colors/terminator/Hardcore.config diff --git a/old_work/iterm2colors/terminator/Harper.config b/iterm2colors/terminator/Harper.config similarity index 100% rename from old_work/iterm2colors/terminator/Harper.config rename to iterm2colors/terminator/Harper.config diff --git a/old_work/iterm2colors/terminator/Highway.config b/iterm2colors/terminator/Highway.config similarity index 100% rename from old_work/iterm2colors/terminator/Highway.config rename to iterm2colors/terminator/Highway.config diff --git a/old_work/iterm2colors/terminator/Hipster Green.config b/iterm2colors/terminator/Hipster Green.config similarity index 100% rename from old_work/iterm2colors/terminator/Hipster Green.config rename to iterm2colors/terminator/Hipster Green.config diff --git a/old_work/iterm2colors/terminator/Homebrew.config b/iterm2colors/terminator/Homebrew.config similarity index 100% rename from old_work/iterm2colors/terminator/Homebrew.config rename to iterm2colors/terminator/Homebrew.config diff --git a/old_work/iterm2colors/terminator/Hurtado.config b/iterm2colors/terminator/Hurtado.config similarity index 100% rename from old_work/iterm2colors/terminator/Hurtado.config rename to iterm2colors/terminator/Hurtado.config diff --git a/old_work/iterm2colors/terminator/Hybrid.config b/iterm2colors/terminator/Hybrid.config similarity index 100% rename from old_work/iterm2colors/terminator/Hybrid.config rename to iterm2colors/terminator/Hybrid.config diff --git a/old_work/iterm2colors/terminator/IC_Green_PPL.config b/iterm2colors/terminator/IC_Green_PPL.config similarity index 100% rename from old_work/iterm2colors/terminator/IC_Green_PPL.config rename to iterm2colors/terminator/IC_Green_PPL.config diff --git a/old_work/iterm2colors/terminator/IC_Orange_PPL.config b/iterm2colors/terminator/IC_Orange_PPL.config similarity index 100% rename from old_work/iterm2colors/terminator/IC_Orange_PPL.config rename to iterm2colors/terminator/IC_Orange_PPL.config diff --git a/old_work/iterm2colors/terminator/IR_Black.config b/iterm2colors/terminator/IR_Black.config similarity index 100% rename from old_work/iterm2colors/terminator/IR_Black.config rename to iterm2colors/terminator/IR_Black.config diff --git a/old_work/iterm2colors/terminator/Jackie Brown.config b/iterm2colors/terminator/Jackie Brown.config similarity index 100% rename from old_work/iterm2colors/terminator/Jackie Brown.config rename to iterm2colors/terminator/Jackie Brown.config diff --git a/old_work/iterm2colors/terminator/Japanesque.config b/iterm2colors/terminator/Japanesque.config similarity index 100% rename from old_work/iterm2colors/terminator/Japanesque.config rename to iterm2colors/terminator/Japanesque.config diff --git a/old_work/iterm2colors/terminator/Jellybeans.config b/iterm2colors/terminator/Jellybeans.config similarity index 100% rename from old_work/iterm2colors/terminator/Jellybeans.config rename to iterm2colors/terminator/Jellybeans.config diff --git a/old_work/iterm2colors/terminator/JetBrains Darcula.config b/iterm2colors/terminator/JetBrains Darcula.config similarity index 100% rename from old_work/iterm2colors/terminator/JetBrains Darcula.config rename to iterm2colors/terminator/JetBrains Darcula.config diff --git a/old_work/iterm2colors/terminator/Kibble.config b/iterm2colors/terminator/Kibble.config similarity index 100% rename from old_work/iterm2colors/terminator/Kibble.config rename to iterm2colors/terminator/Kibble.config diff --git a/old_work/iterm2colors/terminator/Later This Evening.config b/iterm2colors/terminator/Later This Evening.config similarity index 100% rename from old_work/iterm2colors/terminator/Later This Evening.config rename to iterm2colors/terminator/Later This Evening.config diff --git a/old_work/iterm2colors/terminator/Lavandula.config b/iterm2colors/terminator/Lavandula.config similarity index 100% rename from old_work/iterm2colors/terminator/Lavandula.config rename to iterm2colors/terminator/Lavandula.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbon.config b/iterm2colors/terminator/LiquidCarbon.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbon.config rename to iterm2colors/terminator/LiquidCarbon.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbonTransparent.config b/iterm2colors/terminator/LiquidCarbonTransparent.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbonTransparent.config rename to iterm2colors/terminator/LiquidCarbonTransparent.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config b/iterm2colors/terminator/LiquidCarbonTransparentInverse.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config rename to iterm2colors/terminator/LiquidCarbonTransparentInverse.config diff --git a/old_work/iterm2colors/terminator/Man Page.config b/iterm2colors/terminator/Man Page.config similarity index 100% rename from old_work/iterm2colors/terminator/Man Page.config rename to iterm2colors/terminator/Man Page.config diff --git a/old_work/iterm2colors/terminator/Material.config b/iterm2colors/terminator/Material.config similarity index 100% rename from old_work/iterm2colors/terminator/Material.config rename to iterm2colors/terminator/Material.config diff --git a/old_work/iterm2colors/terminator/MaterialDark.config b/iterm2colors/terminator/MaterialDark.config similarity index 100% rename from old_work/iterm2colors/terminator/MaterialDark.config rename to iterm2colors/terminator/MaterialDark.config diff --git a/old_work/iterm2colors/terminator/Mathias.config b/iterm2colors/terminator/Mathias.config similarity index 100% rename from old_work/iterm2colors/terminator/Mathias.config rename to iterm2colors/terminator/Mathias.config diff --git a/old_work/iterm2colors/terminator/Medallion.config b/iterm2colors/terminator/Medallion.config similarity index 100% rename from old_work/iterm2colors/terminator/Medallion.config rename to iterm2colors/terminator/Medallion.config diff --git a/old_work/iterm2colors/terminator/Misterioso.config b/iterm2colors/terminator/Misterioso.config similarity index 100% rename from old_work/iterm2colors/terminator/Misterioso.config rename to iterm2colors/terminator/Misterioso.config diff --git a/old_work/iterm2colors/terminator/Molokai.config b/iterm2colors/terminator/Molokai.config similarity index 100% rename from old_work/iterm2colors/terminator/Molokai.config rename to iterm2colors/terminator/Molokai.config diff --git a/old_work/iterm2colors/terminator/MonaLisa.config b/iterm2colors/terminator/MonaLisa.config similarity index 100% rename from old_work/iterm2colors/terminator/MonaLisa.config rename to iterm2colors/terminator/MonaLisa.config diff --git a/old_work/iterm2colors/terminator/Monokai Soda.config b/iterm2colors/terminator/Monokai Soda.config similarity index 100% rename from old_work/iterm2colors/terminator/Monokai Soda.config rename to iterm2colors/terminator/Monokai Soda.config diff --git a/old_work/iterm2colors/terminator/Monokai Vivid.config b/iterm2colors/terminator/Monokai Vivid.config similarity index 100% rename from old_work/iterm2colors/terminator/Monokai Vivid.config rename to iterm2colors/terminator/Monokai Vivid.config diff --git a/old_work/iterm2colors/terminator/N0tch2k.config b/iterm2colors/terminator/N0tch2k.config similarity index 100% rename from old_work/iterm2colors/terminator/N0tch2k.config rename to iterm2colors/terminator/N0tch2k.config diff --git a/old_work/iterm2colors/terminator/Neopolitan.config b/iterm2colors/terminator/Neopolitan.config similarity index 100% rename from old_work/iterm2colors/terminator/Neopolitan.config rename to iterm2colors/terminator/Neopolitan.config diff --git a/old_work/iterm2colors/terminator/Neutron.config b/iterm2colors/terminator/Neutron.config similarity index 100% rename from old_work/iterm2colors/terminator/Neutron.config rename to iterm2colors/terminator/Neutron.config diff --git a/old_work/iterm2colors/terminator/NightLion v1.config b/iterm2colors/terminator/NightLion v1.config similarity index 100% rename from old_work/iterm2colors/terminator/NightLion v1.config rename to iterm2colors/terminator/NightLion v1.config diff --git a/old_work/iterm2colors/terminator/NightLion v2.config b/iterm2colors/terminator/NightLion v2.config similarity index 100% rename from old_work/iterm2colors/terminator/NightLion v2.config rename to iterm2colors/terminator/NightLion v2.config diff --git a/old_work/iterm2colors/terminator/Novel.config b/iterm2colors/terminator/Novel.config similarity index 100% rename from old_work/iterm2colors/terminator/Novel.config rename to iterm2colors/terminator/Novel.config diff --git a/old_work/iterm2colors/terminator/Obsidian.config b/iterm2colors/terminator/Obsidian.config similarity index 100% rename from old_work/iterm2colors/terminator/Obsidian.config rename to iterm2colors/terminator/Obsidian.config diff --git a/old_work/iterm2colors/terminator/Ocean.config b/iterm2colors/terminator/Ocean.config similarity index 100% rename from old_work/iterm2colors/terminator/Ocean.config rename to iterm2colors/terminator/Ocean.config diff --git a/old_work/iterm2colors/terminator/OceanicMaterial.config b/iterm2colors/terminator/OceanicMaterial.config similarity index 100% rename from old_work/iterm2colors/terminator/OceanicMaterial.config rename to iterm2colors/terminator/OceanicMaterial.config diff --git a/old_work/iterm2colors/terminator/Ollie.config b/iterm2colors/terminator/Ollie.config similarity index 100% rename from old_work/iterm2colors/terminator/Ollie.config rename to iterm2colors/terminator/Ollie.config diff --git a/old_work/iterm2colors/terminator/OneHalfDark.config b/iterm2colors/terminator/OneHalfDark.config similarity index 100% rename from old_work/iterm2colors/terminator/OneHalfDark.config rename to iterm2colors/terminator/OneHalfDark.config diff --git a/old_work/iterm2colors/terminator/OneHalfLight.config b/iterm2colors/terminator/OneHalfLight.config similarity index 100% rename from old_work/iterm2colors/terminator/OneHalfLight.config rename to iterm2colors/terminator/OneHalfLight.config diff --git a/old_work/iterm2colors/terminator/Pandora.config b/iterm2colors/terminator/Pandora.config similarity index 100% rename from old_work/iterm2colors/terminator/Pandora.config rename to iterm2colors/terminator/Pandora.config diff --git a/old_work/iterm2colors/terminator/Paraiso Dark.config b/iterm2colors/terminator/Paraiso Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Paraiso Dark.config rename to iterm2colors/terminator/Paraiso Dark.config diff --git a/old_work/iterm2colors/terminator/Parasio Dark.config b/iterm2colors/terminator/Parasio Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Parasio Dark.config rename to iterm2colors/terminator/Parasio Dark.config diff --git a/old_work/iterm2colors/terminator/PaulMillr.config b/iterm2colors/terminator/PaulMillr.config similarity index 100% rename from old_work/iterm2colors/terminator/PaulMillr.config rename to iterm2colors/terminator/PaulMillr.config diff --git a/old_work/iterm2colors/terminator/PencilDark.config b/iterm2colors/terminator/PencilDark.config similarity index 100% rename from old_work/iterm2colors/terminator/PencilDark.config rename to iterm2colors/terminator/PencilDark.config diff --git a/old_work/iterm2colors/terminator/PencilLight.config b/iterm2colors/terminator/PencilLight.config similarity index 100% rename from old_work/iterm2colors/terminator/PencilLight.config rename to iterm2colors/terminator/PencilLight.config diff --git a/old_work/iterm2colors/terminator/Piatto Light.config b/iterm2colors/terminator/Piatto Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Piatto Light.config rename to iterm2colors/terminator/Piatto Light.config diff --git a/old_work/iterm2colors/terminator/Pnevma.config b/iterm2colors/terminator/Pnevma.config similarity index 100% rename from old_work/iterm2colors/terminator/Pnevma.config rename to iterm2colors/terminator/Pnevma.config diff --git a/old_work/iterm2colors/terminator/Pro.config b/iterm2colors/terminator/Pro.config similarity index 100% rename from old_work/iterm2colors/terminator/Pro.config rename to iterm2colors/terminator/Pro.config diff --git a/old_work/iterm2colors/terminator/Red Alert.config b/iterm2colors/terminator/Red Alert.config similarity index 100% rename from old_work/iterm2colors/terminator/Red Alert.config rename to iterm2colors/terminator/Red Alert.config diff --git a/old_work/iterm2colors/terminator/Red Sands.config b/iterm2colors/terminator/Red Sands.config similarity index 100% rename from old_work/iterm2colors/terminator/Red Sands.config rename to iterm2colors/terminator/Red Sands.config diff --git a/old_work/iterm2colors/terminator/Rippedcasts.config b/iterm2colors/terminator/Rippedcasts.config similarity index 100% rename from old_work/iterm2colors/terminator/Rippedcasts.config rename to iterm2colors/terminator/Rippedcasts.config diff --git a/old_work/iterm2colors/terminator/Royal.config b/iterm2colors/terminator/Royal.config similarity index 100% rename from old_work/iterm2colors/terminator/Royal.config rename to iterm2colors/terminator/Royal.config diff --git a/old_work/iterm2colors/terminator/Ryuuko.config b/iterm2colors/terminator/Ryuuko.config similarity index 100% rename from old_work/iterm2colors/terminator/Ryuuko.config rename to iterm2colors/terminator/Ryuuko.config diff --git a/old_work/iterm2colors/terminator/SeaShells.config b/iterm2colors/terminator/SeaShells.config similarity index 100% rename from old_work/iterm2colors/terminator/SeaShells.config rename to iterm2colors/terminator/SeaShells.config diff --git a/old_work/iterm2colors/terminator/Seafoam Pastel.config b/iterm2colors/terminator/Seafoam Pastel.config similarity index 100% rename from old_work/iterm2colors/terminator/Seafoam Pastel.config rename to iterm2colors/terminator/Seafoam Pastel.config diff --git a/old_work/iterm2colors/terminator/Seti.config b/iterm2colors/terminator/Seti.config similarity index 100% rename from old_work/iterm2colors/terminator/Seti.config rename to iterm2colors/terminator/Seti.config diff --git a/old_work/iterm2colors/terminator/Shaman.config b/iterm2colors/terminator/Shaman.config similarity index 100% rename from old_work/iterm2colors/terminator/Shaman.config rename to iterm2colors/terminator/Shaman.config diff --git a/old_work/iterm2colors/terminator/Slate.config b/iterm2colors/terminator/Slate.config similarity index 100% rename from old_work/iterm2colors/terminator/Slate.config rename to iterm2colors/terminator/Slate.config diff --git a/old_work/iterm2colors/terminator/Smyck.config b/iterm2colors/terminator/Smyck.config similarity index 100% rename from old_work/iterm2colors/terminator/Smyck.config rename to iterm2colors/terminator/Smyck.config diff --git a/old_work/iterm2colors/terminator/SoftServer.config b/iterm2colors/terminator/SoftServer.config similarity index 100% rename from old_work/iterm2colors/terminator/SoftServer.config rename to iterm2colors/terminator/SoftServer.config diff --git a/old_work/iterm2colors/terminator/Solarized Darcula.config b/iterm2colors/terminator/Solarized Darcula.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Darcula.config rename to iterm2colors/terminator/Solarized Darcula.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark - Patched.config b/iterm2colors/terminator/Solarized Dark - Patched.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark - Patched.config rename to iterm2colors/terminator/Solarized Dark - Patched.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config b/iterm2colors/terminator/Solarized Dark Higher Contrast.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config rename to iterm2colors/terminator/Solarized Dark Higher Contrast.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark.config b/iterm2colors/terminator/Solarized Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark.config rename to iterm2colors/terminator/Solarized Dark.config diff --git a/old_work/iterm2colors/terminator/Solarized Light.config b/iterm2colors/terminator/Solarized Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Light.config rename to iterm2colors/terminator/Solarized Light.config diff --git a/old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config b/iterm2colors/terminator/SpaceGray Eighties Dull.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config rename to iterm2colors/terminator/SpaceGray Eighties Dull.config diff --git a/old_work/iterm2colors/terminator/SpaceGray Eighties.config b/iterm2colors/terminator/SpaceGray Eighties.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray Eighties.config rename to iterm2colors/terminator/SpaceGray Eighties.config diff --git a/old_work/iterm2colors/terminator/SpaceGray.config b/iterm2colors/terminator/SpaceGray.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray.config rename to iterm2colors/terminator/SpaceGray.config diff --git a/old_work/iterm2colors/terminator/Spacedust.config b/iterm2colors/terminator/Spacedust.config similarity index 100% rename from old_work/iterm2colors/terminator/Spacedust.config rename to iterm2colors/terminator/Spacedust.config diff --git a/old_work/iterm2colors/terminator/Spiderman.config b/iterm2colors/terminator/Spiderman.config similarity index 100% rename from old_work/iterm2colors/terminator/Spiderman.config rename to iterm2colors/terminator/Spiderman.config diff --git a/old_work/iterm2colors/terminator/Spring.config b/iterm2colors/terminator/Spring.config similarity index 100% rename from old_work/iterm2colors/terminator/Spring.config rename to iterm2colors/terminator/Spring.config diff --git a/old_work/iterm2colors/terminator/Square.config b/iterm2colors/terminator/Square.config similarity index 100% rename from old_work/iterm2colors/terminator/Square.config rename to iterm2colors/terminator/Square.config diff --git a/old_work/iterm2colors/terminator/Sundried.config b/iterm2colors/terminator/Sundried.config similarity index 100% rename from old_work/iterm2colors/terminator/Sundried.config rename to iterm2colors/terminator/Sundried.config diff --git a/old_work/iterm2colors/terminator/Symfonic.config b/iterm2colors/terminator/Symfonic.config similarity index 100% rename from old_work/iterm2colors/terminator/Symfonic.config rename to iterm2colors/terminator/Symfonic.config diff --git a/old_work/iterm2colors/terminator/Teerb.config b/iterm2colors/terminator/Teerb.config similarity index 100% rename from old_work/iterm2colors/terminator/Teerb.config rename to iterm2colors/terminator/Teerb.config diff --git a/old_work/iterm2colors/terminator/Terminal Basic.config b/iterm2colors/terminator/Terminal Basic.config similarity index 100% rename from old_work/iterm2colors/terminator/Terminal Basic.config rename to iterm2colors/terminator/Terminal Basic.config diff --git a/old_work/iterm2colors/terminator/Thayer Bright.config b/iterm2colors/terminator/Thayer Bright.config similarity index 100% rename from old_work/iterm2colors/terminator/Thayer Bright.config rename to iterm2colors/terminator/Thayer Bright.config diff --git a/old_work/iterm2colors/terminator/The Hulk.config b/iterm2colors/terminator/The Hulk.config similarity index 100% rename from old_work/iterm2colors/terminator/The Hulk.config rename to iterm2colors/terminator/The Hulk.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Blue.config b/iterm2colors/terminator/Tomorrow Night Blue.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Blue.config rename to iterm2colors/terminator/Tomorrow Night Blue.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Bright.config b/iterm2colors/terminator/Tomorrow Night Bright.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Bright.config rename to iterm2colors/terminator/Tomorrow Night Bright.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Eighties.config b/iterm2colors/terminator/Tomorrow Night Eighties.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Eighties.config rename to iterm2colors/terminator/Tomorrow Night Eighties.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night.config b/iterm2colors/terminator/Tomorrow Night.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night.config rename to iterm2colors/terminator/Tomorrow Night.config diff --git a/old_work/iterm2colors/terminator/Tomorrow.config b/iterm2colors/terminator/Tomorrow.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow.config rename to iterm2colors/terminator/Tomorrow.config diff --git a/old_work/iterm2colors/terminator/ToyChest.config b/iterm2colors/terminator/ToyChest.config similarity index 100% rename from old_work/iterm2colors/terminator/ToyChest.config rename to iterm2colors/terminator/ToyChest.config diff --git a/old_work/iterm2colors/terminator/Treehouse.config b/iterm2colors/terminator/Treehouse.config similarity index 100% rename from old_work/iterm2colors/terminator/Treehouse.config rename to iterm2colors/terminator/Treehouse.config diff --git a/old_work/iterm2colors/terminator/Twilight.config b/iterm2colors/terminator/Twilight.config similarity index 100% rename from old_work/iterm2colors/terminator/Twilight.config rename to iterm2colors/terminator/Twilight.config diff --git a/old_work/iterm2colors/terminator/Ubuntu.config b/iterm2colors/terminator/Ubuntu.config similarity index 100% rename from old_work/iterm2colors/terminator/Ubuntu.config rename to iterm2colors/terminator/Ubuntu.config diff --git a/old_work/iterm2colors/terminator/UnderTheSea.config b/iterm2colors/terminator/UnderTheSea.config similarity index 100% rename from old_work/iterm2colors/terminator/UnderTheSea.config rename to iterm2colors/terminator/UnderTheSea.config diff --git a/old_work/iterm2colors/terminator/Urple.config b/iterm2colors/terminator/Urple.config similarity index 100% rename from old_work/iterm2colors/terminator/Urple.config rename to iterm2colors/terminator/Urple.config diff --git a/old_work/iterm2colors/terminator/Vaughn.config b/iterm2colors/terminator/Vaughn.config similarity index 100% rename from old_work/iterm2colors/terminator/Vaughn.config rename to iterm2colors/terminator/Vaughn.config diff --git a/old_work/iterm2colors/terminator/VibrantInk.config b/iterm2colors/terminator/VibrantInk.config similarity index 100% rename from old_work/iterm2colors/terminator/VibrantInk.config rename to iterm2colors/terminator/VibrantInk.config diff --git a/old_work/iterm2colors/terminator/Violet Dark.config b/iterm2colors/terminator/Violet Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Violet Dark.config rename to iterm2colors/terminator/Violet Dark.config diff --git a/old_work/iterm2colors/terminator/Violet Light.config b/iterm2colors/terminator/Violet Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Violet Light.config rename to iterm2colors/terminator/Violet Light.config diff --git a/old_work/iterm2colors/terminator/WarmNeon.config b/iterm2colors/terminator/WarmNeon.config similarity index 100% rename from old_work/iterm2colors/terminator/WarmNeon.config rename to iterm2colors/terminator/WarmNeon.config diff --git a/old_work/iterm2colors/terminator/Wez.config b/iterm2colors/terminator/Wez.config similarity index 100% rename from old_work/iterm2colors/terminator/Wez.config rename to iterm2colors/terminator/Wez.config diff --git a/old_work/iterm2colors/terminator/WildCherry.config b/iterm2colors/terminator/WildCherry.config similarity index 100% rename from old_work/iterm2colors/terminator/WildCherry.config rename to iterm2colors/terminator/WildCherry.config diff --git a/old_work/iterm2colors/terminator/Wombat.config b/iterm2colors/terminator/Wombat.config similarity index 100% rename from old_work/iterm2colors/terminator/Wombat.config rename to iterm2colors/terminator/Wombat.config diff --git a/old_work/iterm2colors/terminator/Wryan.config b/iterm2colors/terminator/Wryan.config similarity index 100% rename from old_work/iterm2colors/terminator/Wryan.config rename to iterm2colors/terminator/Wryan.config diff --git a/old_work/iterm2colors/terminator/Zenburn.config b/iterm2colors/terminator/Zenburn.config similarity index 100% rename from old_work/iterm2colors/terminator/Zenburn.config rename to iterm2colors/terminator/Zenburn.config diff --git a/old_work/iterm2colors/terminator/ayu.config b/iterm2colors/terminator/ayu.config similarity index 100% rename from old_work/iterm2colors/terminator/ayu.config rename to iterm2colors/terminator/ayu.config diff --git a/old_work/iterm2colors/terminator/ayu_light.config b/iterm2colors/terminator/ayu_light.config similarity index 100% rename from old_work/iterm2colors/terminator/ayu_light.config rename to iterm2colors/terminator/ayu_light.config diff --git a/old_work/iterm2colors/terminator/deep.config b/iterm2colors/terminator/deep.config similarity index 100% rename from old_work/iterm2colors/terminator/deep.config rename to iterm2colors/terminator/deep.config diff --git a/old_work/iterm2colors/terminator/idleToes.config b/iterm2colors/terminator/idleToes.config similarity index 100% rename from old_work/iterm2colors/terminator/idleToes.config rename to iterm2colors/terminator/idleToes.config diff --git a/old_work/iterm2colors/termite/3024 b/iterm2colors/termite/3024 similarity index 100% rename from old_work/iterm2colors/termite/3024 rename to iterm2colors/termite/3024 diff --git a/old_work/iterm2colors/termite/3024 Night b/iterm2colors/termite/3024 Night similarity index 100% rename from old_work/iterm2colors/termite/3024 Night rename to iterm2colors/termite/3024 Night diff --git a/old_work/iterm2colors/termite/AdventureTime b/iterm2colors/termite/AdventureTime similarity index 100% rename from old_work/iterm2colors/termite/AdventureTime rename to iterm2colors/termite/AdventureTime diff --git a/old_work/iterm2colors/termite/Afterglow b/iterm2colors/termite/Afterglow similarity index 100% rename from old_work/iterm2colors/termite/Afterglow rename to iterm2colors/termite/Afterglow diff --git a/old_work/iterm2colors/termite/AlienBlood b/iterm2colors/termite/AlienBlood similarity index 100% rename from old_work/iterm2colors/termite/AlienBlood rename to iterm2colors/termite/AlienBlood diff --git a/old_work/iterm2colors/termite/Argonaut b/iterm2colors/termite/Argonaut similarity index 100% rename from old_work/iterm2colors/termite/Argonaut rename to iterm2colors/termite/Argonaut diff --git a/old_work/iterm2colors/termite/Arthur b/iterm2colors/termite/Arthur similarity index 100% rename from old_work/iterm2colors/termite/Arthur rename to iterm2colors/termite/Arthur diff --git a/old_work/iterm2colors/termite/AtelierSulphurpool b/iterm2colors/termite/AtelierSulphurpool similarity index 100% rename from old_work/iterm2colors/termite/AtelierSulphurpool rename to iterm2colors/termite/AtelierSulphurpool diff --git a/old_work/iterm2colors/termite/Atom b/iterm2colors/termite/Atom similarity index 100% rename from old_work/iterm2colors/termite/Atom rename to iterm2colors/termite/Atom diff --git a/old_work/iterm2colors/termite/AtomOneLight b/iterm2colors/termite/AtomOneLight similarity index 100% rename from old_work/iterm2colors/termite/AtomOneLight rename to iterm2colors/termite/AtomOneLight diff --git a/old_work/iterm2colors/termite/Batman b/iterm2colors/termite/Batman similarity index 100% rename from old_work/iterm2colors/termite/Batman rename to iterm2colors/termite/Batman diff --git a/old_work/iterm2colors/termite/Belafonte Day b/iterm2colors/termite/Belafonte Day similarity index 100% rename from old_work/iterm2colors/termite/Belafonte Day rename to iterm2colors/termite/Belafonte Day diff --git a/old_work/iterm2colors/termite/Belafonte Night b/iterm2colors/termite/Belafonte Night similarity index 100% rename from old_work/iterm2colors/termite/Belafonte Night rename to iterm2colors/termite/Belafonte Night diff --git a/old_work/iterm2colors/termite/BirdsOfParadise b/iterm2colors/termite/BirdsOfParadise similarity index 100% rename from old_work/iterm2colors/termite/BirdsOfParadise rename to iterm2colors/termite/BirdsOfParadise diff --git a/old_work/iterm2colors/termite/Blazer b/iterm2colors/termite/Blazer similarity index 100% rename from old_work/iterm2colors/termite/Blazer rename to iterm2colors/termite/Blazer diff --git a/old_work/iterm2colors/termite/Borland b/iterm2colors/termite/Borland similarity index 100% rename from old_work/iterm2colors/termite/Borland rename to iterm2colors/termite/Borland diff --git a/old_work/iterm2colors/termite/Broadcast b/iterm2colors/termite/Broadcast similarity index 100% rename from old_work/iterm2colors/termite/Broadcast rename to iterm2colors/termite/Broadcast diff --git a/old_work/iterm2colors/termite/Brogrammer b/iterm2colors/termite/Brogrammer similarity index 100% rename from old_work/iterm2colors/termite/Brogrammer rename to iterm2colors/termite/Brogrammer diff --git a/old_work/iterm2colors/termite/C64 b/iterm2colors/termite/C64 similarity index 100% rename from old_work/iterm2colors/termite/C64 rename to iterm2colors/termite/C64 diff --git a/old_work/iterm2colors/termite/CLRS b/iterm2colors/termite/CLRS similarity index 100% rename from old_work/iterm2colors/termite/CLRS rename to iterm2colors/termite/CLRS diff --git a/old_work/iterm2colors/termite/Chalk b/iterm2colors/termite/Chalk similarity index 100% rename from old_work/iterm2colors/termite/Chalk rename to iterm2colors/termite/Chalk diff --git a/old_work/iterm2colors/termite/Chalkboard b/iterm2colors/termite/Chalkboard similarity index 100% rename from old_work/iterm2colors/termite/Chalkboard rename to iterm2colors/termite/Chalkboard diff --git a/old_work/iterm2colors/termite/Ciapre b/iterm2colors/termite/Ciapre similarity index 100% rename from old_work/iterm2colors/termite/Ciapre rename to iterm2colors/termite/Ciapre diff --git a/old_work/iterm2colors/termite/Cobalt Neon b/iterm2colors/termite/Cobalt Neon similarity index 100% rename from old_work/iterm2colors/termite/Cobalt Neon rename to iterm2colors/termite/Cobalt Neon diff --git a/old_work/iterm2colors/termite/Cobalt2 b/iterm2colors/termite/Cobalt2 similarity index 100% rename from old_work/iterm2colors/termite/Cobalt2 rename to iterm2colors/termite/Cobalt2 diff --git a/old_work/iterm2colors/termite/CrayonPonyFish b/iterm2colors/termite/CrayonPonyFish similarity index 100% rename from old_work/iterm2colors/termite/CrayonPonyFish rename to iterm2colors/termite/CrayonPonyFish diff --git a/old_work/iterm2colors/termite/Dark Pastel b/iterm2colors/termite/Dark Pastel similarity index 100% rename from old_work/iterm2colors/termite/Dark Pastel rename to iterm2colors/termite/Dark Pastel diff --git a/old_work/iterm2colors/termite/Darkside b/iterm2colors/termite/Darkside similarity index 100% rename from old_work/iterm2colors/termite/Darkside rename to iterm2colors/termite/Darkside diff --git a/old_work/iterm2colors/termite/Desert b/iterm2colors/termite/Desert similarity index 100% rename from old_work/iterm2colors/termite/Desert rename to iterm2colors/termite/Desert diff --git a/old_work/iterm2colors/termite/DimmedMonokai b/iterm2colors/termite/DimmedMonokai similarity index 100% rename from old_work/iterm2colors/termite/DimmedMonokai rename to iterm2colors/termite/DimmedMonokai diff --git a/old_work/iterm2colors/termite/DotGov b/iterm2colors/termite/DotGov similarity index 100% rename from old_work/iterm2colors/termite/DotGov rename to iterm2colors/termite/DotGov diff --git a/old_work/iterm2colors/termite/Dracula b/iterm2colors/termite/Dracula similarity index 100% rename from old_work/iterm2colors/termite/Dracula rename to iterm2colors/termite/Dracula diff --git a/old_work/iterm2colors/termite/ENCOM b/iterm2colors/termite/ENCOM similarity index 100% rename from old_work/iterm2colors/termite/ENCOM rename to iterm2colors/termite/ENCOM diff --git a/old_work/iterm2colors/termite/Earthsong b/iterm2colors/termite/Earthsong similarity index 100% rename from old_work/iterm2colors/termite/Earthsong rename to iterm2colors/termite/Earthsong diff --git a/old_work/iterm2colors/termite/Elemental b/iterm2colors/termite/Elemental similarity index 100% rename from old_work/iterm2colors/termite/Elemental rename to iterm2colors/termite/Elemental diff --git a/old_work/iterm2colors/termite/Espresso b/iterm2colors/termite/Espresso similarity index 100% rename from old_work/iterm2colors/termite/Espresso rename to iterm2colors/termite/Espresso diff --git a/old_work/iterm2colors/termite/Espresso Libre b/iterm2colors/termite/Espresso Libre similarity index 100% rename from old_work/iterm2colors/termite/Espresso Libre rename to iterm2colors/termite/Espresso Libre diff --git a/old_work/iterm2colors/termite/Fideloper b/iterm2colors/termite/Fideloper similarity index 100% rename from old_work/iterm2colors/termite/Fideloper rename to iterm2colors/termite/Fideloper diff --git a/old_work/iterm2colors/termite/FishTank b/iterm2colors/termite/FishTank similarity index 100% rename from old_work/iterm2colors/termite/FishTank rename to iterm2colors/termite/FishTank diff --git a/old_work/iterm2colors/termite/Flat b/iterm2colors/termite/Flat similarity index 100% rename from old_work/iterm2colors/termite/Flat rename to iterm2colors/termite/Flat diff --git a/old_work/iterm2colors/termite/Flatland b/iterm2colors/termite/Flatland similarity index 100% rename from old_work/iterm2colors/termite/Flatland rename to iterm2colors/termite/Flatland diff --git a/old_work/iterm2colors/termite/Floraverse b/iterm2colors/termite/Floraverse similarity index 100% rename from old_work/iterm2colors/termite/Floraverse rename to iterm2colors/termite/Floraverse diff --git a/old_work/iterm2colors/termite/FrontEndDelight b/iterm2colors/termite/FrontEndDelight similarity index 100% rename from old_work/iterm2colors/termite/FrontEndDelight rename to iterm2colors/termite/FrontEndDelight diff --git a/old_work/iterm2colors/termite/FunForrest b/iterm2colors/termite/FunForrest similarity index 100% rename from old_work/iterm2colors/termite/FunForrest rename to iterm2colors/termite/FunForrest diff --git a/old_work/iterm2colors/termite/Galaxy b/iterm2colors/termite/Galaxy similarity index 100% rename from old_work/iterm2colors/termite/Galaxy rename to iterm2colors/termite/Galaxy diff --git a/old_work/iterm2colors/termite/Github b/iterm2colors/termite/Github similarity index 100% rename from old_work/iterm2colors/termite/Github rename to iterm2colors/termite/Github diff --git a/old_work/iterm2colors/termite/Grape b/iterm2colors/termite/Grape similarity index 100% rename from old_work/iterm2colors/termite/Grape rename to iterm2colors/termite/Grape diff --git a/old_work/iterm2colors/termite/Grass b/iterm2colors/termite/Grass similarity index 100% rename from old_work/iterm2colors/termite/Grass rename to iterm2colors/termite/Grass diff --git a/old_work/iterm2colors/termite/Hardcore b/iterm2colors/termite/Hardcore similarity index 100% rename from old_work/iterm2colors/termite/Hardcore rename to iterm2colors/termite/Hardcore diff --git a/old_work/iterm2colors/termite/Harper b/iterm2colors/termite/Harper similarity index 100% rename from old_work/iterm2colors/termite/Harper rename to iterm2colors/termite/Harper diff --git a/old_work/iterm2colors/termite/Highway b/iterm2colors/termite/Highway similarity index 100% rename from old_work/iterm2colors/termite/Highway rename to iterm2colors/termite/Highway diff --git a/old_work/iterm2colors/termite/Hipster Green b/iterm2colors/termite/Hipster Green similarity index 100% rename from old_work/iterm2colors/termite/Hipster Green rename to iterm2colors/termite/Hipster Green diff --git a/old_work/iterm2colors/termite/Homebrew b/iterm2colors/termite/Homebrew similarity index 100% rename from old_work/iterm2colors/termite/Homebrew rename to iterm2colors/termite/Homebrew diff --git a/old_work/iterm2colors/termite/Hurtado b/iterm2colors/termite/Hurtado similarity index 100% rename from old_work/iterm2colors/termite/Hurtado rename to iterm2colors/termite/Hurtado diff --git a/old_work/iterm2colors/termite/Hybrid b/iterm2colors/termite/Hybrid similarity index 100% rename from old_work/iterm2colors/termite/Hybrid rename to iterm2colors/termite/Hybrid diff --git a/old_work/iterm2colors/termite/IC_Green_PPL b/iterm2colors/termite/IC_Green_PPL similarity index 100% rename from old_work/iterm2colors/termite/IC_Green_PPL rename to iterm2colors/termite/IC_Green_PPL diff --git a/old_work/iterm2colors/termite/IC_Orange_PPL b/iterm2colors/termite/IC_Orange_PPL similarity index 100% rename from old_work/iterm2colors/termite/IC_Orange_PPL rename to iterm2colors/termite/IC_Orange_PPL diff --git a/old_work/iterm2colors/termite/IR_Black b/iterm2colors/termite/IR_Black similarity index 100% rename from old_work/iterm2colors/termite/IR_Black rename to iterm2colors/termite/IR_Black diff --git a/old_work/iterm2colors/termite/Jackie Brown b/iterm2colors/termite/Jackie Brown similarity index 100% rename from old_work/iterm2colors/termite/Jackie Brown rename to iterm2colors/termite/Jackie Brown diff --git a/old_work/iterm2colors/termite/Japanesque b/iterm2colors/termite/Japanesque similarity index 100% rename from old_work/iterm2colors/termite/Japanesque rename to iterm2colors/termite/Japanesque diff --git a/old_work/iterm2colors/termite/Jellybeans b/iterm2colors/termite/Jellybeans similarity index 100% rename from old_work/iterm2colors/termite/Jellybeans rename to iterm2colors/termite/Jellybeans diff --git a/old_work/iterm2colors/termite/Kibble b/iterm2colors/termite/Kibble similarity index 100% rename from old_work/iterm2colors/termite/Kibble rename to iterm2colors/termite/Kibble diff --git a/old_work/iterm2colors/termite/Later This Evening b/iterm2colors/termite/Later This Evening similarity index 100% rename from old_work/iterm2colors/termite/Later This Evening rename to iterm2colors/termite/Later This Evening diff --git a/old_work/iterm2colors/termite/Lavandula b/iterm2colors/termite/Lavandula similarity index 100% rename from old_work/iterm2colors/termite/Lavandula rename to iterm2colors/termite/Lavandula diff --git a/old_work/iterm2colors/termite/LiquidCarbon b/iterm2colors/termite/LiquidCarbon similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbon rename to iterm2colors/termite/LiquidCarbon diff --git a/old_work/iterm2colors/termite/LiquidCarbonTransparent b/iterm2colors/termite/LiquidCarbonTransparent similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbonTransparent rename to iterm2colors/termite/LiquidCarbonTransparent diff --git a/old_work/iterm2colors/termite/LiquidCarbonTransparentInverse b/iterm2colors/termite/LiquidCarbonTransparentInverse similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbonTransparentInverse rename to iterm2colors/termite/LiquidCarbonTransparentInverse diff --git a/old_work/iterm2colors/termite/Man Page b/iterm2colors/termite/Man Page similarity index 100% rename from old_work/iterm2colors/termite/Man Page rename to iterm2colors/termite/Man Page diff --git a/old_work/iterm2colors/termite/Material b/iterm2colors/termite/Material similarity index 100% rename from old_work/iterm2colors/termite/Material rename to iterm2colors/termite/Material diff --git a/old_work/iterm2colors/termite/MaterialDark b/iterm2colors/termite/MaterialDark similarity index 100% rename from old_work/iterm2colors/termite/MaterialDark rename to iterm2colors/termite/MaterialDark diff --git a/old_work/iterm2colors/termite/Mathias b/iterm2colors/termite/Mathias similarity index 100% rename from old_work/iterm2colors/termite/Mathias rename to iterm2colors/termite/Mathias diff --git a/old_work/iterm2colors/termite/Medallion b/iterm2colors/termite/Medallion similarity index 100% rename from old_work/iterm2colors/termite/Medallion rename to iterm2colors/termite/Medallion diff --git a/old_work/iterm2colors/termite/Misterioso b/iterm2colors/termite/Misterioso similarity index 100% rename from old_work/iterm2colors/termite/Misterioso rename to iterm2colors/termite/Misterioso diff --git a/old_work/iterm2colors/termite/Molokai b/iterm2colors/termite/Molokai similarity index 100% rename from old_work/iterm2colors/termite/Molokai rename to iterm2colors/termite/Molokai diff --git a/old_work/iterm2colors/termite/MonaLisa b/iterm2colors/termite/MonaLisa similarity index 100% rename from old_work/iterm2colors/termite/MonaLisa rename to iterm2colors/termite/MonaLisa diff --git a/old_work/iterm2colors/termite/Monokai Soda b/iterm2colors/termite/Monokai Soda similarity index 100% rename from old_work/iterm2colors/termite/Monokai Soda rename to iterm2colors/termite/Monokai Soda diff --git a/old_work/iterm2colors/termite/N0tch2k b/iterm2colors/termite/N0tch2k similarity index 100% rename from old_work/iterm2colors/termite/N0tch2k rename to iterm2colors/termite/N0tch2k diff --git a/old_work/iterm2colors/termite/Neopolitan b/iterm2colors/termite/Neopolitan similarity index 100% rename from old_work/iterm2colors/termite/Neopolitan rename to iterm2colors/termite/Neopolitan diff --git a/old_work/iterm2colors/termite/Neutron b/iterm2colors/termite/Neutron similarity index 100% rename from old_work/iterm2colors/termite/Neutron rename to iterm2colors/termite/Neutron diff --git a/old_work/iterm2colors/termite/NightLion v1 b/iterm2colors/termite/NightLion v1 similarity index 100% rename from old_work/iterm2colors/termite/NightLion v1 rename to iterm2colors/termite/NightLion v1 diff --git a/old_work/iterm2colors/termite/NightLion v2 b/iterm2colors/termite/NightLion v2 similarity index 100% rename from old_work/iterm2colors/termite/NightLion v2 rename to iterm2colors/termite/NightLion v2 diff --git a/old_work/iterm2colors/termite/Novel b/iterm2colors/termite/Novel similarity index 100% rename from old_work/iterm2colors/termite/Novel rename to iterm2colors/termite/Novel diff --git a/old_work/iterm2colors/termite/Obsidian b/iterm2colors/termite/Obsidian similarity index 100% rename from old_work/iterm2colors/termite/Obsidian rename to iterm2colors/termite/Obsidian diff --git a/old_work/iterm2colors/termite/Ocean b/iterm2colors/termite/Ocean similarity index 100% rename from old_work/iterm2colors/termite/Ocean rename to iterm2colors/termite/Ocean diff --git a/old_work/iterm2colors/termite/OceanicMaterial b/iterm2colors/termite/OceanicMaterial similarity index 100% rename from old_work/iterm2colors/termite/OceanicMaterial rename to iterm2colors/termite/OceanicMaterial diff --git a/old_work/iterm2colors/termite/Ollie b/iterm2colors/termite/Ollie similarity index 100% rename from old_work/iterm2colors/termite/Ollie rename to iterm2colors/termite/Ollie diff --git a/old_work/iterm2colors/termite/Paraiso Dark b/iterm2colors/termite/Paraiso Dark similarity index 100% rename from old_work/iterm2colors/termite/Paraiso Dark rename to iterm2colors/termite/Paraiso Dark diff --git a/old_work/iterm2colors/termite/Parasio Dark b/iterm2colors/termite/Parasio Dark similarity index 100% rename from old_work/iterm2colors/termite/Parasio Dark rename to iterm2colors/termite/Parasio Dark diff --git a/old_work/iterm2colors/termite/PaulMillr b/iterm2colors/termite/PaulMillr similarity index 100% rename from old_work/iterm2colors/termite/PaulMillr rename to iterm2colors/termite/PaulMillr diff --git a/old_work/iterm2colors/termite/PencilDark b/iterm2colors/termite/PencilDark similarity index 100% rename from old_work/iterm2colors/termite/PencilDark rename to iterm2colors/termite/PencilDark diff --git a/old_work/iterm2colors/termite/PencilLight b/iterm2colors/termite/PencilLight similarity index 100% rename from old_work/iterm2colors/termite/PencilLight rename to iterm2colors/termite/PencilLight diff --git a/old_work/iterm2colors/termite/Piatto Light b/iterm2colors/termite/Piatto Light similarity index 100% rename from old_work/iterm2colors/termite/Piatto Light rename to iterm2colors/termite/Piatto Light diff --git a/old_work/iterm2colors/termite/Pnevma b/iterm2colors/termite/Pnevma similarity index 100% rename from old_work/iterm2colors/termite/Pnevma rename to iterm2colors/termite/Pnevma diff --git a/old_work/iterm2colors/termite/Pro b/iterm2colors/termite/Pro similarity index 100% rename from old_work/iterm2colors/termite/Pro rename to iterm2colors/termite/Pro diff --git a/old_work/iterm2colors/termite/Red Alert b/iterm2colors/termite/Red Alert similarity index 100% rename from old_work/iterm2colors/termite/Red Alert rename to iterm2colors/termite/Red Alert diff --git a/old_work/iterm2colors/termite/Red Sands b/iterm2colors/termite/Red Sands similarity index 100% rename from old_work/iterm2colors/termite/Red Sands rename to iterm2colors/termite/Red Sands diff --git a/old_work/iterm2colors/termite/Rippedcasts b/iterm2colors/termite/Rippedcasts similarity index 100% rename from old_work/iterm2colors/termite/Rippedcasts rename to iterm2colors/termite/Rippedcasts diff --git a/old_work/iterm2colors/termite/Royal b/iterm2colors/termite/Royal similarity index 100% rename from old_work/iterm2colors/termite/Royal rename to iterm2colors/termite/Royal diff --git a/old_work/iterm2colors/termite/SeaShells b/iterm2colors/termite/SeaShells similarity index 100% rename from old_work/iterm2colors/termite/SeaShells rename to iterm2colors/termite/SeaShells diff --git a/old_work/iterm2colors/termite/Seafoam Pastel b/iterm2colors/termite/Seafoam Pastel similarity index 100% rename from old_work/iterm2colors/termite/Seafoam Pastel rename to iterm2colors/termite/Seafoam Pastel diff --git a/old_work/iterm2colors/termite/Seti b/iterm2colors/termite/Seti similarity index 100% rename from old_work/iterm2colors/termite/Seti rename to iterm2colors/termite/Seti diff --git a/old_work/iterm2colors/termite/Shaman b/iterm2colors/termite/Shaman similarity index 100% rename from old_work/iterm2colors/termite/Shaman rename to iterm2colors/termite/Shaman diff --git a/old_work/iterm2colors/termite/Slate b/iterm2colors/termite/Slate similarity index 100% rename from old_work/iterm2colors/termite/Slate rename to iterm2colors/termite/Slate diff --git a/old_work/iterm2colors/termite/Smyck b/iterm2colors/termite/Smyck similarity index 100% rename from old_work/iterm2colors/termite/Smyck rename to iterm2colors/termite/Smyck diff --git a/old_work/iterm2colors/termite/SoftServer b/iterm2colors/termite/SoftServer similarity index 100% rename from old_work/iterm2colors/termite/SoftServer rename to iterm2colors/termite/SoftServer diff --git a/old_work/iterm2colors/termite/Solarized Darcula b/iterm2colors/termite/Solarized Darcula similarity index 100% rename from old_work/iterm2colors/termite/Solarized Darcula rename to iterm2colors/termite/Solarized Darcula diff --git a/old_work/iterm2colors/termite/Solarized Dark b/iterm2colors/termite/Solarized Dark similarity index 100% rename from old_work/iterm2colors/termite/Solarized Dark rename to iterm2colors/termite/Solarized Dark diff --git a/old_work/iterm2colors/termite/Solarized Dark Higher Contrast b/iterm2colors/termite/Solarized Dark Higher Contrast similarity index 100% rename from old_work/iterm2colors/termite/Solarized Dark Higher Contrast rename to iterm2colors/termite/Solarized Dark Higher Contrast diff --git a/old_work/iterm2colors/termite/Solarized Light b/iterm2colors/termite/Solarized Light similarity index 100% rename from old_work/iterm2colors/termite/Solarized Light rename to iterm2colors/termite/Solarized Light diff --git a/old_work/iterm2colors/termite/SpaceGray b/iterm2colors/termite/SpaceGray similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray rename to iterm2colors/termite/SpaceGray diff --git a/old_work/iterm2colors/termite/SpaceGray Eighties b/iterm2colors/termite/SpaceGray Eighties similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray Eighties rename to iterm2colors/termite/SpaceGray Eighties diff --git a/old_work/iterm2colors/termite/SpaceGray Eighties Dull b/iterm2colors/termite/SpaceGray Eighties Dull similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray Eighties Dull rename to iterm2colors/termite/SpaceGray Eighties Dull diff --git a/old_work/iterm2colors/termite/Spacedust b/iterm2colors/termite/Spacedust similarity index 100% rename from old_work/iterm2colors/termite/Spacedust rename to iterm2colors/termite/Spacedust diff --git a/old_work/iterm2colors/termite/Spiderman b/iterm2colors/termite/Spiderman similarity index 100% rename from old_work/iterm2colors/termite/Spiderman rename to iterm2colors/termite/Spiderman diff --git a/old_work/iterm2colors/termite/Spring b/iterm2colors/termite/Spring similarity index 100% rename from old_work/iterm2colors/termite/Spring rename to iterm2colors/termite/Spring diff --git a/old_work/iterm2colors/termite/Square b/iterm2colors/termite/Square similarity index 100% rename from old_work/iterm2colors/termite/Square rename to iterm2colors/termite/Square diff --git a/old_work/iterm2colors/termite/Sundried b/iterm2colors/termite/Sundried similarity index 100% rename from old_work/iterm2colors/termite/Sundried rename to iterm2colors/termite/Sundried diff --git a/old_work/iterm2colors/termite/Symfonic b/iterm2colors/termite/Symfonic similarity index 100% rename from old_work/iterm2colors/termite/Symfonic rename to iterm2colors/termite/Symfonic diff --git a/old_work/iterm2colors/termite/Teerb b/iterm2colors/termite/Teerb similarity index 100% rename from old_work/iterm2colors/termite/Teerb rename to iterm2colors/termite/Teerb diff --git a/old_work/iterm2colors/termite/Terminal Basic b/iterm2colors/termite/Terminal Basic similarity index 100% rename from old_work/iterm2colors/termite/Terminal Basic rename to iterm2colors/termite/Terminal Basic diff --git a/old_work/iterm2colors/termite/Thayer Bright b/iterm2colors/termite/Thayer Bright similarity index 100% rename from old_work/iterm2colors/termite/Thayer Bright rename to iterm2colors/termite/Thayer Bright diff --git a/old_work/iterm2colors/termite/The Hulk b/iterm2colors/termite/The Hulk similarity index 100% rename from old_work/iterm2colors/termite/The Hulk rename to iterm2colors/termite/The Hulk diff --git a/old_work/iterm2colors/termite/Tomorrow b/iterm2colors/termite/Tomorrow similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow rename to iterm2colors/termite/Tomorrow diff --git a/old_work/iterm2colors/termite/Tomorrow Night b/iterm2colors/termite/Tomorrow Night similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night rename to iterm2colors/termite/Tomorrow Night diff --git a/old_work/iterm2colors/termite/Tomorrow Night Blue b/iterm2colors/termite/Tomorrow Night Blue similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Blue rename to iterm2colors/termite/Tomorrow Night Blue diff --git a/old_work/iterm2colors/termite/Tomorrow Night Bright b/iterm2colors/termite/Tomorrow Night Bright similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Bright rename to iterm2colors/termite/Tomorrow Night Bright diff --git a/old_work/iterm2colors/termite/Tomorrow Night Eighties b/iterm2colors/termite/Tomorrow Night Eighties similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Eighties rename to iterm2colors/termite/Tomorrow Night Eighties diff --git a/old_work/iterm2colors/termite/ToyChest b/iterm2colors/termite/ToyChest similarity index 100% rename from old_work/iterm2colors/termite/ToyChest rename to iterm2colors/termite/ToyChest diff --git a/old_work/iterm2colors/termite/Treehouse b/iterm2colors/termite/Treehouse similarity index 100% rename from old_work/iterm2colors/termite/Treehouse rename to iterm2colors/termite/Treehouse diff --git a/old_work/iterm2colors/termite/Twilight b/iterm2colors/termite/Twilight similarity index 100% rename from old_work/iterm2colors/termite/Twilight rename to iterm2colors/termite/Twilight diff --git a/old_work/iterm2colors/termite/Urple b/iterm2colors/termite/Urple similarity index 100% rename from old_work/iterm2colors/termite/Urple rename to iterm2colors/termite/Urple diff --git a/old_work/iterm2colors/termite/Vaughn b/iterm2colors/termite/Vaughn similarity index 100% rename from old_work/iterm2colors/termite/Vaughn rename to iterm2colors/termite/Vaughn diff --git a/old_work/iterm2colors/termite/VibrantInk b/iterm2colors/termite/VibrantInk similarity index 100% rename from old_work/iterm2colors/termite/VibrantInk rename to iterm2colors/termite/VibrantInk diff --git a/old_work/iterm2colors/termite/WarmNeon b/iterm2colors/termite/WarmNeon similarity index 100% rename from old_work/iterm2colors/termite/WarmNeon rename to iterm2colors/termite/WarmNeon diff --git a/old_work/iterm2colors/termite/Wez b/iterm2colors/termite/Wez similarity index 100% rename from old_work/iterm2colors/termite/Wez rename to iterm2colors/termite/Wez diff --git a/old_work/iterm2colors/termite/WildCherry b/iterm2colors/termite/WildCherry similarity index 100% rename from old_work/iterm2colors/termite/WildCherry rename to iterm2colors/termite/WildCherry diff --git a/old_work/iterm2colors/termite/Wombat b/iterm2colors/termite/Wombat similarity index 100% rename from old_work/iterm2colors/termite/Wombat rename to iterm2colors/termite/Wombat diff --git a/old_work/iterm2colors/termite/Wryan b/iterm2colors/termite/Wryan similarity index 100% rename from old_work/iterm2colors/termite/Wryan rename to iterm2colors/termite/Wryan diff --git a/old_work/iterm2colors/termite/Zenburn b/iterm2colors/termite/Zenburn similarity index 100% rename from old_work/iterm2colors/termite/Zenburn rename to iterm2colors/termite/Zenburn diff --git a/old_work/iterm2colors/termite/idleToes b/iterm2colors/termite/idleToes similarity index 100% rename from old_work/iterm2colors/termite/idleToes rename to iterm2colors/termite/idleToes diff --git a/old_work/iterm2colors/tools/genMD.py b/iterm2colors/tools/genMD.py similarity index 100% rename from old_work/iterm2colors/tools/genMD.py rename to iterm2colors/tools/genMD.py diff --git a/old_work/iterm2colors/tools/iterm2terminal.swift b/iterm2colors/tools/iterm2terminal.swift similarity index 100% rename from old_work/iterm2colors/tools/iterm2terminal.swift rename to iterm2colors/tools/iterm2terminal.swift diff --git a/old_work/iterm2colors/tools/iterm2xrdb b/iterm2colors/tools/iterm2xrdb similarity index 100% rename from old_work/iterm2colors/tools/iterm2xrdb rename to iterm2colors/tools/iterm2xrdb diff --git a/old_work/iterm2colors/tools/preview.rb b/iterm2colors/tools/preview.rb similarity index 100% rename from old_work/iterm2colors/tools/preview.rb rename to iterm2colors/tools/preview.rb diff --git a/old_work/iterm2colors/tools/screenshotTable.sh b/iterm2colors/tools/screenshotTable.sh similarity index 100% rename from old_work/iterm2colors/tools/screenshotTable.sh rename to iterm2colors/tools/screenshotTable.sh diff --git a/old_work/iterm2colors/tools/update_all.py b/iterm2colors/tools/update_all.py similarity index 100% rename from old_work/iterm2colors/tools/update_all.py rename to iterm2colors/tools/update_all.py diff --git a/old_work/iterm2colors/tools/xrdb2Xresources.py b/iterm2colors/tools/xrdb2Xresources.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2Xresources.py rename to iterm2colors/tools/xrdb2Xresources.py diff --git a/old_work/iterm2colors/tools/xrdb2hterm b/iterm2colors/tools/xrdb2hterm similarity index 100% rename from old_work/iterm2colors/tools/xrdb2hterm rename to iterm2colors/tools/xrdb2hterm diff --git a/old_work/iterm2colors/tools/xrdb2konsole.py b/iterm2colors/tools/xrdb2konsole.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2konsole.py rename to iterm2colors/tools/xrdb2konsole.py diff --git a/old_work/iterm2colors/tools/xrdb2putty.py b/iterm2colors/tools/xrdb2putty.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2putty.py rename to iterm2colors/tools/xrdb2putty.py diff --git a/old_work/iterm2colors/tools/xrdb2terminator.py b/iterm2colors/tools/xrdb2terminator.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2terminator.py rename to iterm2colors/tools/xrdb2terminator.py diff --git a/old_work/iterm2colors/tools/xrdb2xfce_terminal.py b/iterm2colors/tools/xrdb2xfce_terminal.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2xfce_terminal.py rename to iterm2colors/tools/xrdb2xfce_terminal.py diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme b/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme rename to iterm2colors/xfce4terminal/colorschemes/3024 Day.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme b/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme rename to iterm2colors/xfce4terminal/colorschemes/3024 Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme b/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme rename to iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme b/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme rename to iterm2colors/xfce4terminal/colorschemes/Afterglow.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme b/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme rename to iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme b/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme rename to iterm2colors/xfce4terminal/colorschemes/Argonaut.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme b/iterm2colors/xfce4terminal/colorschemes/Arthur.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme rename to iterm2colors/xfce4terminal/colorschemes/Arthur.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme b/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme rename to iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme b/iterm2colors/xfce4terminal/colorschemes/Atom.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme rename to iterm2colors/xfce4terminal/colorschemes/Atom.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme b/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme rename to iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme b/iterm2colors/xfce4terminal/colorschemes/Batman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme rename to iterm2colors/xfce4terminal/colorschemes/Batman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme b/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme rename to iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme b/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme rename to iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme b/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme rename to iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme b/iterm2colors/xfce4terminal/colorschemes/Blazer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme rename to iterm2colors/xfce4terminal/colorschemes/Blazer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme b/iterm2colors/xfce4terminal/colorschemes/Borland.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme rename to iterm2colors/xfce4terminal/colorschemes/Borland.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme b/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme rename to iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme b/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme rename to iterm2colors/xfce4terminal/colorschemes/Broadcast.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme b/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme rename to iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme b/iterm2colors/xfce4terminal/colorschemes/C64.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme rename to iterm2colors/xfce4terminal/colorschemes/C64.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme b/iterm2colors/xfce4terminal/colorschemes/CLRS.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme rename to iterm2colors/xfce4terminal/colorschemes/CLRS.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme b/iterm2colors/xfce4terminal/colorschemes/Chalk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme rename to iterm2colors/xfce4terminal/colorschemes/Chalk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme b/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme rename to iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme b/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme rename to iterm2colors/xfce4terminal/colorschemes/Ciapre.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme b/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme rename to iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme b/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme rename to iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme b/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme rename to iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme b/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme rename to iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme b/iterm2colors/xfce4terminal/colorschemes/Darkside.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme rename to iterm2colors/xfce4terminal/colorschemes/Darkside.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme b/iterm2colors/xfce4terminal/colorschemes/Desert.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme rename to iterm2colors/xfce4terminal/colorschemes/Desert.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme b/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme rename to iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme b/iterm2colors/xfce4terminal/colorschemes/DotGov.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme rename to iterm2colors/xfce4terminal/colorschemes/DotGov.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme b/iterm2colors/xfce4terminal/colorschemes/Dracula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme rename to iterm2colors/xfce4terminal/colorschemes/Dracula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme b/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme rename to iterm2colors/xfce4terminal/colorschemes/ENCOM.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme b/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme rename to iterm2colors/xfce4terminal/colorschemes/Earthsong.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme b/iterm2colors/xfce4terminal/colorschemes/Elemental.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme rename to iterm2colors/xfce4terminal/colorschemes/Elemental.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme b/iterm2colors/xfce4terminal/colorschemes/Elementary.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme rename to iterm2colors/xfce4terminal/colorschemes/Elementary.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme b/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme rename to iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme b/iterm2colors/xfce4terminal/colorschemes/Espresso.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme rename to iterm2colors/xfce4terminal/colorschemes/Espresso.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme b/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme rename to iterm2colors/xfce4terminal/colorschemes/Fideloper.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme b/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme rename to iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme b/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme rename to iterm2colors/xfce4terminal/colorschemes/Firewatch.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme b/iterm2colors/xfce4terminal/colorschemes/FishTank.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme rename to iterm2colors/xfce4terminal/colorschemes/FishTank.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme b/iterm2colors/xfce4terminal/colorschemes/Flat.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme rename to iterm2colors/xfce4terminal/colorschemes/Flat.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme b/iterm2colors/xfce4terminal/colorschemes/Flatland.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme rename to iterm2colors/xfce4terminal/colorschemes/Flatland.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme b/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme rename to iterm2colors/xfce4terminal/colorschemes/Floraverse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme b/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme rename to iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme b/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme rename to iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme b/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme rename to iterm2colors/xfce4terminal/colorschemes/FunForrest.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme b/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme rename to iterm2colors/xfce4terminal/colorschemes/Galaxy.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme b/iterm2colors/xfce4terminal/colorschemes/Github.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme rename to iterm2colors/xfce4terminal/colorschemes/Github.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme b/iterm2colors/xfce4terminal/colorschemes/Glacier.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme rename to iterm2colors/xfce4terminal/colorschemes/Glacier.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme b/iterm2colors/xfce4terminal/colorschemes/Grape.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme rename to iterm2colors/xfce4terminal/colorschemes/Grape.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme b/iterm2colors/xfce4terminal/colorschemes/Grass.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme rename to iterm2colors/xfce4terminal/colorschemes/Grass.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme b/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme rename to iterm2colors/xfce4terminal/colorschemes/Hardcore.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme b/iterm2colors/xfce4terminal/colorschemes/Harper.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme rename to iterm2colors/xfce4terminal/colorschemes/Harper.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme b/iterm2colors/xfce4terminal/colorschemes/Highway.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme rename to iterm2colors/xfce4terminal/colorschemes/Highway.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme b/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme rename to iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme b/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme rename to iterm2colors/xfce4terminal/colorschemes/Homebrew.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme b/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme rename to iterm2colors/xfce4terminal/colorschemes/Hurtado.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme b/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme rename to iterm2colors/xfce4terminal/colorschemes/Hybrid.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme b/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme rename to iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme b/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme rename to iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme b/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme rename to iterm2colors/xfce4terminal/colorschemes/IR_Black.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme b/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme rename to iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme b/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme rename to iterm2colors/xfce4terminal/colorschemes/Japanesque.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme b/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme rename to iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme b/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme rename to iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme b/iterm2colors/xfce4terminal/colorschemes/Kibble.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme rename to iterm2colors/xfce4terminal/colorschemes/Kibble.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme b/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme rename to iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme b/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme rename to iterm2colors/xfce4terminal/colorschemes/Lavandula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme b/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme rename to iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme b/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme rename to iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme b/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme rename to iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme b/iterm2colors/xfce4terminal/colorschemes/Man Page.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme rename to iterm2colors/xfce4terminal/colorschemes/Man Page.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme b/iterm2colors/xfce4terminal/colorschemes/Material.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme rename to iterm2colors/xfce4terminal/colorschemes/Material.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme b/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme rename to iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme b/iterm2colors/xfce4terminal/colorschemes/Mathias.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme rename to iterm2colors/xfce4terminal/colorschemes/Mathias.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme b/iterm2colors/xfce4terminal/colorschemes/Medallion.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme rename to iterm2colors/xfce4terminal/colorschemes/Medallion.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme b/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme rename to iterm2colors/xfce4terminal/colorschemes/Misterioso.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme b/iterm2colors/xfce4terminal/colorschemes/Molokai.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme rename to iterm2colors/xfce4terminal/colorschemes/Molokai.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme b/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme rename to iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme b/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme rename to iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme b/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme rename to iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme b/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme rename to iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme b/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme rename to iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme b/iterm2colors/xfce4terminal/colorschemes/Neutron.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme rename to iterm2colors/xfce4terminal/colorschemes/Neutron.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme b/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme rename to iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme b/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme rename to iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme b/iterm2colors/xfce4terminal/colorschemes/Novel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme rename to iterm2colors/xfce4terminal/colorschemes/Novel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme b/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme rename to iterm2colors/xfce4terminal/colorschemes/Obsidian.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme b/iterm2colors/xfce4terminal/colorschemes/Ocean.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme rename to iterm2colors/xfce4terminal/colorschemes/Ocean.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme b/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme rename to iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme b/iterm2colors/xfce4terminal/colorschemes/Ollie.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme rename to iterm2colors/xfce4terminal/colorschemes/Ollie.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme b/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme rename to iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme b/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme rename to iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme b/iterm2colors/xfce4terminal/colorschemes/Pandora.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme rename to iterm2colors/xfce4terminal/colorschemes/Pandora.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme b/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme rename to iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme b/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme rename to iterm2colors/xfce4terminal/colorschemes/PencilDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme b/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme rename to iterm2colors/xfce4terminal/colorschemes/PencilLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme b/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme rename to iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme b/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme rename to iterm2colors/xfce4terminal/colorschemes/Pnevma.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme b/iterm2colors/xfce4terminal/colorschemes/Pro.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme rename to iterm2colors/xfce4terminal/colorschemes/Pro.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme b/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme rename to iterm2colors/xfce4terminal/colorschemes/Red Alert.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme b/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme rename to iterm2colors/xfce4terminal/colorschemes/Red Sands.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme b/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme rename to iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme b/iterm2colors/xfce4terminal/colorschemes/Royal.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme rename to iterm2colors/xfce4terminal/colorschemes/Royal.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme b/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme rename to iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme b/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme rename to iterm2colors/xfce4terminal/colorschemes/SeaShells.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme b/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme rename to iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme b/iterm2colors/xfce4terminal/colorschemes/Seti.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme rename to iterm2colors/xfce4terminal/colorschemes/Seti.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme b/iterm2colors/xfce4terminal/colorschemes/Shaman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme rename to iterm2colors/xfce4terminal/colorschemes/Shaman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme b/iterm2colors/xfce4terminal/colorschemes/Slate.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme rename to iterm2colors/xfce4terminal/colorschemes/Slate.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme b/iterm2colors/xfce4terminal/colorschemes/Smyck.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme rename to iterm2colors/xfce4terminal/colorschemes/Smyck.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme b/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme rename to iterm2colors/xfce4terminal/colorschemes/SoftServer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme b/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme rename to iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme b/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme rename to iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme b/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme rename to iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme b/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme rename to iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme b/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme rename to iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme b/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme rename to iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme b/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme rename to iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme b/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme rename to iterm2colors/xfce4terminal/colorschemes/Spacedust.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme b/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme rename to iterm2colors/xfce4terminal/colorschemes/Spiderman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme b/iterm2colors/xfce4terminal/colorschemes/Spring.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme rename to iterm2colors/xfce4terminal/colorschemes/Spring.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme b/iterm2colors/xfce4terminal/colorschemes/Square.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme rename to iterm2colors/xfce4terminal/colorschemes/Square.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme b/iterm2colors/xfce4terminal/colorschemes/Sundried.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme rename to iterm2colors/xfce4terminal/colorschemes/Sundried.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme b/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme rename to iterm2colors/xfce4terminal/colorschemes/Symfonic.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme b/iterm2colors/xfce4terminal/colorschemes/Teerb.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme rename to iterm2colors/xfce4terminal/colorschemes/Teerb.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme b/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme rename to iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme b/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme rename to iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme b/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme rename to iterm2colors/xfce4terminal/colorschemes/The Hulk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme b/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme rename to iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme b/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme rename to iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme b/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme rename to iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme b/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme rename to iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme b/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme rename to iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme b/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme rename to iterm2colors/xfce4terminal/colorschemes/ToyChest.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme b/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme rename to iterm2colors/xfce4terminal/colorschemes/Treehouse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme b/iterm2colors/xfce4terminal/colorschemes/Twilight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme rename to iterm2colors/xfce4terminal/colorschemes/Twilight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme b/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme rename to iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme b/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme rename to iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme b/iterm2colors/xfce4terminal/colorschemes/Urple.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme rename to iterm2colors/xfce4terminal/colorschemes/Urple.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme b/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme rename to iterm2colors/xfce4terminal/colorschemes/Vaughn.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme b/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme rename to iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme b/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme rename to iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme b/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme rename to iterm2colors/xfce4terminal/colorschemes/Violet Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme b/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme rename to iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme b/iterm2colors/xfce4terminal/colorschemes/Wez.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme rename to iterm2colors/xfce4terminal/colorschemes/Wez.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme b/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme rename to iterm2colors/xfce4terminal/colorschemes/WildCherry.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme b/iterm2colors/xfce4terminal/colorschemes/Wombat.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme rename to iterm2colors/xfce4terminal/colorschemes/Wombat.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme b/iterm2colors/xfce4terminal/colorschemes/Wryan.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme rename to iterm2colors/xfce4terminal/colorschemes/Wryan.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme b/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme rename to iterm2colors/xfce4terminal/colorschemes/Zenburn.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme b/iterm2colors/xfce4terminal/colorschemes/ayu.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme rename to iterm2colors/xfce4terminal/colorschemes/ayu.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme b/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme rename to iterm2colors/xfce4terminal/colorschemes/ayu_light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme b/iterm2colors/xfce4terminal/colorschemes/deep.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme rename to iterm2colors/xfce4terminal/colorschemes/deep.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme b/iterm2colors/xfce4terminal/colorschemes/idleToes.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme rename to iterm2colors/xfce4terminal/colorschemes/idleToes.theme diff --git a/old_work/iterm2colors/xrdb/3024 Day.xrdb b/iterm2colors/xrdb/3024 Day.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/3024 Day.xrdb rename to iterm2colors/xrdb/3024 Day.xrdb diff --git a/old_work/iterm2colors/xrdb/3024 Night.xrdb b/iterm2colors/xrdb/3024 Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/3024 Night.xrdb rename to iterm2colors/xrdb/3024 Night.xrdb diff --git a/old_work/iterm2colors/xrdb/AdventureTime.xrdb b/iterm2colors/xrdb/AdventureTime.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AdventureTime.xrdb rename to iterm2colors/xrdb/AdventureTime.xrdb diff --git a/old_work/iterm2colors/xrdb/Afterglow.xrdb b/iterm2colors/xrdb/Afterglow.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Afterglow.xrdb rename to iterm2colors/xrdb/Afterglow.xrdb diff --git a/old_work/iterm2colors/xrdb/AlienBlood.xrdb b/iterm2colors/xrdb/AlienBlood.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AlienBlood.xrdb rename to iterm2colors/xrdb/AlienBlood.xrdb diff --git a/old_work/iterm2colors/xrdb/Argonaut.xrdb b/iterm2colors/xrdb/Argonaut.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Argonaut.xrdb rename to iterm2colors/xrdb/Argonaut.xrdb diff --git a/old_work/iterm2colors/xrdb/Arthur.xrdb b/iterm2colors/xrdb/Arthur.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Arthur.xrdb rename to iterm2colors/xrdb/Arthur.xrdb diff --git a/old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb b/iterm2colors/xrdb/AtelierSulphurpool.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb rename to iterm2colors/xrdb/AtelierSulphurpool.xrdb diff --git a/old_work/iterm2colors/xrdb/Atom.xrdb b/iterm2colors/xrdb/Atom.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Atom.xrdb rename to iterm2colors/xrdb/Atom.xrdb diff --git a/old_work/iterm2colors/xrdb/AtomOneLight.xrdb b/iterm2colors/xrdb/AtomOneLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AtomOneLight.xrdb rename to iterm2colors/xrdb/AtomOneLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Batman.xrdb b/iterm2colors/xrdb/Batman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Batman.xrdb rename to iterm2colors/xrdb/Batman.xrdb diff --git a/old_work/iterm2colors/xrdb/Belafonte Day.xrdb b/iterm2colors/xrdb/Belafonte Day.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Belafonte Day.xrdb rename to iterm2colors/xrdb/Belafonte Day.xrdb diff --git a/old_work/iterm2colors/xrdb/Belafonte Night.xrdb b/iterm2colors/xrdb/Belafonte Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Belafonte Night.xrdb rename to iterm2colors/xrdb/Belafonte Night.xrdb diff --git a/old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb b/iterm2colors/xrdb/BirdsOfParadise.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb rename to iterm2colors/xrdb/BirdsOfParadise.xrdb diff --git a/old_work/iterm2colors/xrdb/Blazer.xrdb b/iterm2colors/xrdb/Blazer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Blazer.xrdb rename to iterm2colors/xrdb/Blazer.xrdb diff --git a/old_work/iterm2colors/xrdb/Borland.xrdb b/iterm2colors/xrdb/Borland.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Borland.xrdb rename to iterm2colors/xrdb/Borland.xrdb diff --git a/old_work/iterm2colors/xrdb/Bright Lights.xrdb b/iterm2colors/xrdb/Bright Lights.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Bright Lights.xrdb rename to iterm2colors/xrdb/Bright Lights.xrdb diff --git a/old_work/iterm2colors/xrdb/Broadcast.xrdb b/iterm2colors/xrdb/Broadcast.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Broadcast.xrdb rename to iterm2colors/xrdb/Broadcast.xrdb diff --git a/old_work/iterm2colors/xrdb/Brogrammer.xrdb b/iterm2colors/xrdb/Brogrammer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Brogrammer.xrdb rename to iterm2colors/xrdb/Brogrammer.xrdb diff --git a/old_work/iterm2colors/xrdb/C64.xrdb b/iterm2colors/xrdb/C64.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/C64.xrdb rename to iterm2colors/xrdb/C64.xrdb diff --git a/old_work/iterm2colors/xrdb/CLRS.xrdb b/iterm2colors/xrdb/CLRS.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/CLRS.xrdb rename to iterm2colors/xrdb/CLRS.xrdb diff --git a/old_work/iterm2colors/xrdb/Chalk.xrdb b/iterm2colors/xrdb/Chalk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Chalk.xrdb rename to iterm2colors/xrdb/Chalk.xrdb diff --git a/old_work/iterm2colors/xrdb/Chalkboard.xrdb b/iterm2colors/xrdb/Chalkboard.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Chalkboard.xrdb rename to iterm2colors/xrdb/Chalkboard.xrdb diff --git a/old_work/iterm2colors/xrdb/Ciapre.xrdb b/iterm2colors/xrdb/Ciapre.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ciapre.xrdb rename to iterm2colors/xrdb/Ciapre.xrdb diff --git a/old_work/iterm2colors/xrdb/Cobalt Neon.xrdb b/iterm2colors/xrdb/Cobalt Neon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Cobalt Neon.xrdb rename to iterm2colors/xrdb/Cobalt Neon.xrdb diff --git a/old_work/iterm2colors/xrdb/Cobalt2.xrdb b/iterm2colors/xrdb/Cobalt2.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Cobalt2.xrdb rename to iterm2colors/xrdb/Cobalt2.xrdb diff --git a/old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb b/iterm2colors/xrdb/CrayonPonyFish.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb rename to iterm2colors/xrdb/CrayonPonyFish.xrdb diff --git a/old_work/iterm2colors/xrdb/Dark Pastel.xrdb b/iterm2colors/xrdb/Dark Pastel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Dark Pastel.xrdb rename to iterm2colors/xrdb/Dark Pastel.xrdb diff --git a/old_work/iterm2colors/xrdb/Darkside.xrdb b/iterm2colors/xrdb/Darkside.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Darkside.xrdb rename to iterm2colors/xrdb/Darkside.xrdb diff --git a/old_work/iterm2colors/xrdb/Desert.xrdb b/iterm2colors/xrdb/Desert.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Desert.xrdb rename to iterm2colors/xrdb/Desert.xrdb diff --git a/old_work/iterm2colors/xrdb/DimmedMonokai.xrdb b/iterm2colors/xrdb/DimmedMonokai.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/DimmedMonokai.xrdb rename to iterm2colors/xrdb/DimmedMonokai.xrdb diff --git a/old_work/iterm2colors/xrdb/DotGov.xrdb b/iterm2colors/xrdb/DotGov.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/DotGov.xrdb rename to iterm2colors/xrdb/DotGov.xrdb diff --git a/old_work/iterm2colors/xrdb/Dracula.xrdb b/iterm2colors/xrdb/Dracula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Dracula.xrdb rename to iterm2colors/xrdb/Dracula.xrdb diff --git a/old_work/iterm2colors/xrdb/Duotone Dark.xrdb b/iterm2colors/xrdb/Duotone Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Duotone Dark.xrdb rename to iterm2colors/xrdb/Duotone Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/ENCOM.xrdb b/iterm2colors/xrdb/ENCOM.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ENCOM.xrdb rename to iterm2colors/xrdb/ENCOM.xrdb diff --git a/old_work/iterm2colors/xrdb/Earthsong.xrdb b/iterm2colors/xrdb/Earthsong.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Earthsong.xrdb rename to iterm2colors/xrdb/Earthsong.xrdb diff --git a/old_work/iterm2colors/xrdb/Elemental.xrdb b/iterm2colors/xrdb/Elemental.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Elemental.xrdb rename to iterm2colors/xrdb/Elemental.xrdb diff --git a/old_work/iterm2colors/xrdb/Elementary.xrdb b/iterm2colors/xrdb/Elementary.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Elementary.xrdb rename to iterm2colors/xrdb/Elementary.xrdb diff --git a/old_work/iterm2colors/xrdb/Espresso Libre.xrdb b/iterm2colors/xrdb/Espresso Libre.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Espresso Libre.xrdb rename to iterm2colors/xrdb/Espresso Libre.xrdb diff --git a/old_work/iterm2colors/xrdb/Espresso.xrdb b/iterm2colors/xrdb/Espresso.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Espresso.xrdb rename to iterm2colors/xrdb/Espresso.xrdb diff --git a/old_work/iterm2colors/xrdb/Fideloper.xrdb b/iterm2colors/xrdb/Fideloper.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Fideloper.xrdb rename to iterm2colors/xrdb/Fideloper.xrdb diff --git a/old_work/iterm2colors/xrdb/FirefoxDev.xrdb b/iterm2colors/xrdb/FirefoxDev.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FirefoxDev.xrdb rename to iterm2colors/xrdb/FirefoxDev.xrdb diff --git a/old_work/iterm2colors/xrdb/Firewatch.xrdb b/iterm2colors/xrdb/Firewatch.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Firewatch.xrdb rename to iterm2colors/xrdb/Firewatch.xrdb diff --git a/old_work/iterm2colors/xrdb/FishTank.xrdb b/iterm2colors/xrdb/FishTank.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FishTank.xrdb rename to iterm2colors/xrdb/FishTank.xrdb diff --git a/old_work/iterm2colors/xrdb/Flat.xrdb b/iterm2colors/xrdb/Flat.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Flat.xrdb rename to iterm2colors/xrdb/Flat.xrdb diff --git a/old_work/iterm2colors/xrdb/Flatland.xrdb b/iterm2colors/xrdb/Flatland.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Flatland.xrdb rename to iterm2colors/xrdb/Flatland.xrdb diff --git a/old_work/iterm2colors/xrdb/Floraverse.xrdb b/iterm2colors/xrdb/Floraverse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Floraverse.xrdb rename to iterm2colors/xrdb/Floraverse.xrdb diff --git a/old_work/iterm2colors/xrdb/ForestBlue.xrdb b/iterm2colors/xrdb/ForestBlue.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ForestBlue.xrdb rename to iterm2colors/xrdb/ForestBlue.xrdb diff --git a/old_work/iterm2colors/xrdb/FrontEndDelight.xrdb b/iterm2colors/xrdb/FrontEndDelight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FrontEndDelight.xrdb rename to iterm2colors/xrdb/FrontEndDelight.xrdb diff --git a/old_work/iterm2colors/xrdb/FunForrest.xrdb b/iterm2colors/xrdb/FunForrest.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FunForrest.xrdb rename to iterm2colors/xrdb/FunForrest.xrdb diff --git a/old_work/iterm2colors/xrdb/Galaxy.xrdb b/iterm2colors/xrdb/Galaxy.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Galaxy.xrdb rename to iterm2colors/xrdb/Galaxy.xrdb diff --git a/old_work/iterm2colors/xrdb/Github.xrdb b/iterm2colors/xrdb/Github.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Github.xrdb rename to iterm2colors/xrdb/Github.xrdb diff --git a/old_work/iterm2colors/xrdb/Glacier.xrdb b/iterm2colors/xrdb/Glacier.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Glacier.xrdb rename to iterm2colors/xrdb/Glacier.xrdb diff --git a/old_work/iterm2colors/xrdb/Grape.xrdb b/iterm2colors/xrdb/Grape.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Grape.xrdb rename to iterm2colors/xrdb/Grape.xrdb diff --git a/old_work/iterm2colors/xrdb/Grass.xrdb b/iterm2colors/xrdb/Grass.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Grass.xrdb rename to iterm2colors/xrdb/Grass.xrdb diff --git a/old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb b/iterm2colors/xrdb/Gruvbox Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb rename to iterm2colors/xrdb/Gruvbox Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Hardcore.xrdb b/iterm2colors/xrdb/Hardcore.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hardcore.xrdb rename to iterm2colors/xrdb/Hardcore.xrdb diff --git a/old_work/iterm2colors/xrdb/Harper.xrdb b/iterm2colors/xrdb/Harper.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Harper.xrdb rename to iterm2colors/xrdb/Harper.xrdb diff --git a/old_work/iterm2colors/xrdb/Highway.xrdb b/iterm2colors/xrdb/Highway.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Highway.xrdb rename to iterm2colors/xrdb/Highway.xrdb diff --git a/old_work/iterm2colors/xrdb/Hipster Green.xrdb b/iterm2colors/xrdb/Hipster Green.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hipster Green.xrdb rename to iterm2colors/xrdb/Hipster Green.xrdb diff --git a/old_work/iterm2colors/xrdb/Homebrew.xrdb b/iterm2colors/xrdb/Homebrew.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Homebrew.xrdb rename to iterm2colors/xrdb/Homebrew.xrdb diff --git a/old_work/iterm2colors/xrdb/Hurtado.xrdb b/iterm2colors/xrdb/Hurtado.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hurtado.xrdb rename to iterm2colors/xrdb/Hurtado.xrdb diff --git a/old_work/iterm2colors/xrdb/Hybrid.xrdb b/iterm2colors/xrdb/Hybrid.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hybrid.xrdb rename to iterm2colors/xrdb/Hybrid.xrdb diff --git a/old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb b/iterm2colors/xrdb/IC_Green_PPL.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb rename to iterm2colors/xrdb/IC_Green_PPL.xrdb diff --git a/old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb b/iterm2colors/xrdb/IC_Orange_PPL.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb rename to iterm2colors/xrdb/IC_Orange_PPL.xrdb diff --git a/old_work/iterm2colors/xrdb/IR_Black.xrdb b/iterm2colors/xrdb/IR_Black.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IR_Black.xrdb rename to iterm2colors/xrdb/IR_Black.xrdb diff --git a/old_work/iterm2colors/xrdb/Jackie Brown.xrdb b/iterm2colors/xrdb/Jackie Brown.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Jackie Brown.xrdb rename to iterm2colors/xrdb/Jackie Brown.xrdb diff --git a/old_work/iterm2colors/xrdb/Japanesque.xrdb b/iterm2colors/xrdb/Japanesque.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Japanesque.xrdb rename to iterm2colors/xrdb/Japanesque.xrdb diff --git a/old_work/iterm2colors/xrdb/Jellybeans.xrdb b/iterm2colors/xrdb/Jellybeans.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Jellybeans.xrdb rename to iterm2colors/xrdb/Jellybeans.xrdb diff --git a/old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb b/iterm2colors/xrdb/JetBrains Darcula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb rename to iterm2colors/xrdb/JetBrains Darcula.xrdb diff --git a/old_work/iterm2colors/xrdb/Kibble.xrdb b/iterm2colors/xrdb/Kibble.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Kibble.xrdb rename to iterm2colors/xrdb/Kibble.xrdb diff --git a/old_work/iterm2colors/xrdb/Later This Evening.xrdb b/iterm2colors/xrdb/Later This Evening.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Later This Evening.xrdb rename to iterm2colors/xrdb/Later This Evening.xrdb diff --git a/old_work/iterm2colors/xrdb/Lavandula.xrdb b/iterm2colors/xrdb/Lavandula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Lavandula.xrdb rename to iterm2colors/xrdb/Lavandula.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbon.xrdb b/iterm2colors/xrdb/LiquidCarbon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbon.xrdb rename to iterm2colors/xrdb/LiquidCarbon.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb b/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb rename to iterm2colors/xrdb/LiquidCarbonTransparent.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb b/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb rename to iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb diff --git a/old_work/iterm2colors/xrdb/Man Page.xrdb b/iterm2colors/xrdb/Man Page.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Man Page.xrdb rename to iterm2colors/xrdb/Man Page.xrdb diff --git a/old_work/iterm2colors/xrdb/Material.xrdb b/iterm2colors/xrdb/Material.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Material.xrdb rename to iterm2colors/xrdb/Material.xrdb diff --git a/old_work/iterm2colors/xrdb/MaterialDark.xrdb b/iterm2colors/xrdb/MaterialDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/MaterialDark.xrdb rename to iterm2colors/xrdb/MaterialDark.xrdb diff --git a/old_work/iterm2colors/xrdb/Mathias.xrdb b/iterm2colors/xrdb/Mathias.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Mathias.xrdb rename to iterm2colors/xrdb/Mathias.xrdb diff --git a/old_work/iterm2colors/xrdb/Medallion.xrdb b/iterm2colors/xrdb/Medallion.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Medallion.xrdb rename to iterm2colors/xrdb/Medallion.xrdb diff --git a/old_work/iterm2colors/xrdb/Misterioso.xrdb b/iterm2colors/xrdb/Misterioso.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Misterioso.xrdb rename to iterm2colors/xrdb/Misterioso.xrdb diff --git a/old_work/iterm2colors/xrdb/Molokai.xrdb b/iterm2colors/xrdb/Molokai.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Molokai.xrdb rename to iterm2colors/xrdb/Molokai.xrdb diff --git a/old_work/iterm2colors/xrdb/MonaLisa.xrdb b/iterm2colors/xrdb/MonaLisa.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/MonaLisa.xrdb rename to iterm2colors/xrdb/MonaLisa.xrdb diff --git a/old_work/iterm2colors/xrdb/Monokai Soda.xrdb b/iterm2colors/xrdb/Monokai Soda.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Monokai Soda.xrdb rename to iterm2colors/xrdb/Monokai Soda.xrdb diff --git a/old_work/iterm2colors/xrdb/Monokai Vivid.xrdb b/iterm2colors/xrdb/Monokai Vivid.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Monokai Vivid.xrdb rename to iterm2colors/xrdb/Monokai Vivid.xrdb diff --git a/old_work/iterm2colors/xrdb/N0tch2k.xrdb b/iterm2colors/xrdb/N0tch2k.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/N0tch2k.xrdb rename to iterm2colors/xrdb/N0tch2k.xrdb diff --git a/old_work/iterm2colors/xrdb/Neopolitan.xrdb b/iterm2colors/xrdb/Neopolitan.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Neopolitan.xrdb rename to iterm2colors/xrdb/Neopolitan.xrdb diff --git a/old_work/iterm2colors/xrdb/Neutron.xrdb b/iterm2colors/xrdb/Neutron.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Neutron.xrdb rename to iterm2colors/xrdb/Neutron.xrdb diff --git a/old_work/iterm2colors/xrdb/NightLion v1.xrdb b/iterm2colors/xrdb/NightLion v1.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/NightLion v1.xrdb rename to iterm2colors/xrdb/NightLion v1.xrdb diff --git a/old_work/iterm2colors/xrdb/NightLion v2.xrdb b/iterm2colors/xrdb/NightLion v2.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/NightLion v2.xrdb rename to iterm2colors/xrdb/NightLion v2.xrdb diff --git a/old_work/iterm2colors/xrdb/Novel.xrdb b/iterm2colors/xrdb/Novel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Novel.xrdb rename to iterm2colors/xrdb/Novel.xrdb diff --git a/old_work/iterm2colors/xrdb/Obsidian.xrdb b/iterm2colors/xrdb/Obsidian.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Obsidian.xrdb rename to iterm2colors/xrdb/Obsidian.xrdb diff --git a/old_work/iterm2colors/xrdb/Ocean.xrdb b/iterm2colors/xrdb/Ocean.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ocean.xrdb rename to iterm2colors/xrdb/Ocean.xrdb diff --git a/old_work/iterm2colors/xrdb/OceanicMaterial.xrdb b/iterm2colors/xrdb/OceanicMaterial.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OceanicMaterial.xrdb rename to iterm2colors/xrdb/OceanicMaterial.xrdb diff --git a/old_work/iterm2colors/xrdb/Ollie.xrdb b/iterm2colors/xrdb/Ollie.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ollie.xrdb rename to iterm2colors/xrdb/Ollie.xrdb diff --git a/old_work/iterm2colors/xrdb/OneHalfDark.xrdb b/iterm2colors/xrdb/OneHalfDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OneHalfDark.xrdb rename to iterm2colors/xrdb/OneHalfDark.xrdb diff --git a/old_work/iterm2colors/xrdb/OneHalfLight.xrdb b/iterm2colors/xrdb/OneHalfLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OneHalfLight.xrdb rename to iterm2colors/xrdb/OneHalfLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Pandora.xrdb b/iterm2colors/xrdb/Pandora.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pandora.xrdb rename to iterm2colors/xrdb/Pandora.xrdb diff --git a/old_work/iterm2colors/xrdb/Paraiso Dark.xrdb b/iterm2colors/xrdb/Paraiso Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Paraiso Dark.xrdb rename to iterm2colors/xrdb/Paraiso Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Parasio Dark.xrdb b/iterm2colors/xrdb/Parasio Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Parasio Dark.xrdb rename to iterm2colors/xrdb/Parasio Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/PaulMillr.xrdb b/iterm2colors/xrdb/PaulMillr.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PaulMillr.xrdb rename to iterm2colors/xrdb/PaulMillr.xrdb diff --git a/old_work/iterm2colors/xrdb/PencilDark.xrdb b/iterm2colors/xrdb/PencilDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PencilDark.xrdb rename to iterm2colors/xrdb/PencilDark.xrdb diff --git a/old_work/iterm2colors/xrdb/PencilLight.xrdb b/iterm2colors/xrdb/PencilLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PencilLight.xrdb rename to iterm2colors/xrdb/PencilLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Piatto Light.xrdb b/iterm2colors/xrdb/Piatto Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Piatto Light.xrdb rename to iterm2colors/xrdb/Piatto Light.xrdb diff --git a/old_work/iterm2colors/xrdb/Pnevma.xrdb b/iterm2colors/xrdb/Pnevma.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pnevma.xrdb rename to iterm2colors/xrdb/Pnevma.xrdb diff --git a/old_work/iterm2colors/xrdb/Pro.xrdb b/iterm2colors/xrdb/Pro.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pro.xrdb rename to iterm2colors/xrdb/Pro.xrdb diff --git a/old_work/iterm2colors/xrdb/Red Alert.xrdb b/iterm2colors/xrdb/Red Alert.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Red Alert.xrdb rename to iterm2colors/xrdb/Red Alert.xrdb diff --git a/old_work/iterm2colors/xrdb/Red Sands.xrdb b/iterm2colors/xrdb/Red Sands.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Red Sands.xrdb rename to iterm2colors/xrdb/Red Sands.xrdb diff --git a/old_work/iterm2colors/xrdb/Rippedcasts.xrdb b/iterm2colors/xrdb/Rippedcasts.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Rippedcasts.xrdb rename to iterm2colors/xrdb/Rippedcasts.xrdb diff --git a/old_work/iterm2colors/xrdb/Royal.xrdb b/iterm2colors/xrdb/Royal.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Royal.xrdb rename to iterm2colors/xrdb/Royal.xrdb diff --git a/old_work/iterm2colors/xrdb/Ryuuko.xrdb b/iterm2colors/xrdb/Ryuuko.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ryuuko.xrdb rename to iterm2colors/xrdb/Ryuuko.xrdb diff --git a/old_work/iterm2colors/xrdb/SeaShells.xrdb b/iterm2colors/xrdb/SeaShells.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SeaShells.xrdb rename to iterm2colors/xrdb/SeaShells.xrdb diff --git a/old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb b/iterm2colors/xrdb/Seafoam Pastel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb rename to iterm2colors/xrdb/Seafoam Pastel.xrdb diff --git a/old_work/iterm2colors/xrdb/Seti.xrdb b/iterm2colors/xrdb/Seti.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Seti.xrdb rename to iterm2colors/xrdb/Seti.xrdb diff --git a/old_work/iterm2colors/xrdb/Shaman.xrdb b/iterm2colors/xrdb/Shaman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Shaman.xrdb rename to iterm2colors/xrdb/Shaman.xrdb diff --git a/old_work/iterm2colors/xrdb/Slate.xrdb b/iterm2colors/xrdb/Slate.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Slate.xrdb rename to iterm2colors/xrdb/Slate.xrdb diff --git a/old_work/iterm2colors/xrdb/Smyck.xrdb b/iterm2colors/xrdb/Smyck.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Smyck.xrdb rename to iterm2colors/xrdb/Smyck.xrdb diff --git a/old_work/iterm2colors/xrdb/SoftServer.xrdb b/iterm2colors/xrdb/SoftServer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SoftServer.xrdb rename to iterm2colors/xrdb/SoftServer.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Darcula.xrdb b/iterm2colors/xrdb/Solarized Darcula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Darcula.xrdb rename to iterm2colors/xrdb/Solarized Darcula.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb b/iterm2colors/xrdb/Solarized Dark - Patched.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb rename to iterm2colors/xrdb/Solarized Dark - Patched.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb b/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb rename to iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark.xrdb b/iterm2colors/xrdb/Solarized Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark.xrdb rename to iterm2colors/xrdb/Solarized Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Light.xrdb b/iterm2colors/xrdb/Solarized Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Light.xrdb rename to iterm2colors/xrdb/Solarized Light.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb b/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb rename to iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb b/iterm2colors/xrdb/SpaceGray Eighties.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb rename to iterm2colors/xrdb/SpaceGray Eighties.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray.xrdb b/iterm2colors/xrdb/SpaceGray.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray.xrdb rename to iterm2colors/xrdb/SpaceGray.xrdb diff --git a/old_work/iterm2colors/xrdb/Spacedust.xrdb b/iterm2colors/xrdb/Spacedust.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spacedust.xrdb rename to iterm2colors/xrdb/Spacedust.xrdb diff --git a/old_work/iterm2colors/xrdb/Spiderman.xrdb b/iterm2colors/xrdb/Spiderman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spiderman.xrdb rename to iterm2colors/xrdb/Spiderman.xrdb diff --git a/old_work/iterm2colors/xrdb/Spring.xrdb b/iterm2colors/xrdb/Spring.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spring.xrdb rename to iterm2colors/xrdb/Spring.xrdb diff --git a/old_work/iterm2colors/xrdb/Square.xrdb b/iterm2colors/xrdb/Square.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Square.xrdb rename to iterm2colors/xrdb/Square.xrdb diff --git a/old_work/iterm2colors/xrdb/Sundried.xrdb b/iterm2colors/xrdb/Sundried.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Sundried.xrdb rename to iterm2colors/xrdb/Sundried.xrdb diff --git a/old_work/iterm2colors/xrdb/Symfonic.xrdb b/iterm2colors/xrdb/Symfonic.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Symfonic.xrdb rename to iterm2colors/xrdb/Symfonic.xrdb diff --git a/old_work/iterm2colors/xrdb/Teerb.xrdb b/iterm2colors/xrdb/Teerb.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Teerb.xrdb rename to iterm2colors/xrdb/Teerb.xrdb diff --git a/old_work/iterm2colors/xrdb/Terminal Basic.xrdb b/iterm2colors/xrdb/Terminal Basic.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Terminal Basic.xrdb rename to iterm2colors/xrdb/Terminal Basic.xrdb diff --git a/old_work/iterm2colors/xrdb/Thayer Bright.xrdb b/iterm2colors/xrdb/Thayer Bright.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Thayer Bright.xrdb rename to iterm2colors/xrdb/Thayer Bright.xrdb diff --git a/old_work/iterm2colors/xrdb/The Hulk.xrdb b/iterm2colors/xrdb/The Hulk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/The Hulk.xrdb rename to iterm2colors/xrdb/The Hulk.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb b/iterm2colors/xrdb/Tomorrow Night Blue.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb rename to iterm2colors/xrdb/Tomorrow Night Blue.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb b/iterm2colors/xrdb/Tomorrow Night Bright.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb rename to iterm2colors/xrdb/Tomorrow Night Bright.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb b/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb rename to iterm2colors/xrdb/Tomorrow Night Eighties.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night.xrdb b/iterm2colors/xrdb/Tomorrow Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night.xrdb rename to iterm2colors/xrdb/Tomorrow Night.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow.xrdb b/iterm2colors/xrdb/Tomorrow.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow.xrdb rename to iterm2colors/xrdb/Tomorrow.xrdb diff --git a/old_work/iterm2colors/xrdb/ToyChest.xrdb b/iterm2colors/xrdb/ToyChest.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ToyChest.xrdb rename to iterm2colors/xrdb/ToyChest.xrdb diff --git a/old_work/iterm2colors/xrdb/Treehouse.xrdb b/iterm2colors/xrdb/Treehouse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Treehouse.xrdb rename to iterm2colors/xrdb/Treehouse.xrdb diff --git a/old_work/iterm2colors/xrdb/Twilight.xrdb b/iterm2colors/xrdb/Twilight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Twilight.xrdb rename to iterm2colors/xrdb/Twilight.xrdb diff --git a/old_work/iterm2colors/xrdb/Ubuntu.xrdb b/iterm2colors/xrdb/Ubuntu.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ubuntu.xrdb rename to iterm2colors/xrdb/Ubuntu.xrdb diff --git a/old_work/iterm2colors/xrdb/UnderTheSea.xrdb b/iterm2colors/xrdb/UnderTheSea.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/UnderTheSea.xrdb rename to iterm2colors/xrdb/UnderTheSea.xrdb diff --git a/old_work/iterm2colors/xrdb/Urple.xrdb b/iterm2colors/xrdb/Urple.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Urple.xrdb rename to iterm2colors/xrdb/Urple.xrdb diff --git a/old_work/iterm2colors/xrdb/Vaughn.xrdb b/iterm2colors/xrdb/Vaughn.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Vaughn.xrdb rename to iterm2colors/xrdb/Vaughn.xrdb diff --git a/old_work/iterm2colors/xrdb/VibrantInk.xrdb b/iterm2colors/xrdb/VibrantInk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/VibrantInk.xrdb rename to iterm2colors/xrdb/VibrantInk.xrdb diff --git a/old_work/iterm2colors/xrdb/Violet Dark.xrdb b/iterm2colors/xrdb/Violet Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Violet Dark.xrdb rename to iterm2colors/xrdb/Violet Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Violet Light.xrdb b/iterm2colors/xrdb/Violet Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Violet Light.xrdb rename to iterm2colors/xrdb/Violet Light.xrdb diff --git a/old_work/iterm2colors/xrdb/WarmNeon.xrdb b/iterm2colors/xrdb/WarmNeon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/WarmNeon.xrdb rename to iterm2colors/xrdb/WarmNeon.xrdb diff --git a/old_work/iterm2colors/xrdb/Wez.xrdb b/iterm2colors/xrdb/Wez.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wez.xrdb rename to iterm2colors/xrdb/Wez.xrdb diff --git a/old_work/iterm2colors/xrdb/WildCherry.xrdb b/iterm2colors/xrdb/WildCherry.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/WildCherry.xrdb rename to iterm2colors/xrdb/WildCherry.xrdb diff --git a/old_work/iterm2colors/xrdb/Wombat.xrdb b/iterm2colors/xrdb/Wombat.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wombat.xrdb rename to iterm2colors/xrdb/Wombat.xrdb diff --git a/old_work/iterm2colors/xrdb/Wryan.xrdb b/iterm2colors/xrdb/Wryan.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wryan.xrdb rename to iterm2colors/xrdb/Wryan.xrdb diff --git a/old_work/iterm2colors/xrdb/Zenburn.xrdb b/iterm2colors/xrdb/Zenburn.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Zenburn.xrdb rename to iterm2colors/xrdb/Zenburn.xrdb diff --git a/old_work/iterm2colors/xrdb/ayu.xrdb b/iterm2colors/xrdb/ayu.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ayu.xrdb rename to iterm2colors/xrdb/ayu.xrdb diff --git a/old_work/iterm2colors/xrdb/ayu_light.xrdb b/iterm2colors/xrdb/ayu_light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ayu_light.xrdb rename to iterm2colors/xrdb/ayu_light.xrdb diff --git a/old_work/iterm2colors/xrdb/deep.xrdb b/iterm2colors/xrdb/deep.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/deep.xrdb rename to iterm2colors/xrdb/deep.xrdb diff --git a/old_work/iterm2colors/xrdb/idleToes.xrdb b/iterm2colors/xrdb/idleToes.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/idleToes.xrdb rename to iterm2colors/xrdb/idleToes.xrdb diff --git a/old_work/8/st-0.8.1/README b/old_work/8/st-0.8.1/README deleted file mode 100644 index 6a846ed..0000000 --- a/old_work/8/st-0.8.1/README +++ /dev/null @@ -1,34 +0,0 @@ -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/old_work/FAQ b/old_work/FAQ deleted file mode 100644 index 3502c60..0000000 --- a/old_work/FAQ +++ /dev/null @@ -1,167 +0,0 @@ -## 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 deleted file mode 100644 index bf28b1e..0000000 --- a/old_work/LEGACY +++ /dev/null @@ -1,17 +0,0 @@ -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 deleted file mode 100644 index e61610a..0000000 --- a/old_work/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 9e52d13..0000000 --- a/old_work/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# 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/old_work/TODO b/old_work/TODO deleted file mode 100644 index 5f74cd5..0000000 --- a/old_work/TODO +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index ba3fb3f..0000000 --- a/old_work/arg.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 deleted file mode 100644 index 846e23c..0000000 --- a/old_work/config.def.h +++ /dev/null @@ -1,460 +0,0 @@ -/* 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/old_work/config.h b/old_work/config.h deleted file mode 100644 index a3680f5..0000000 --- a/old_work/config.h +++ /dev/null @@ -1,870 +0,0 @@ -/* 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 deleted file mode 100644 index 5806157..0000000 --- a/old_work/config.mk +++ /dev/null @@ -1,28 +0,0 @@ -# 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/old_work/st.1 b/old_work/st.1 deleted file mode 100644 index 1e3f1d4..0000000 --- a/old_work/st.1 +++ /dev/null @@ -1,179 +0,0 @@ -.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 deleted file mode 100644 index a31527b..0000000 --- a/old_work/st.c +++ /dev/null @@ -1,4527 +0,0 @@ -/* 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 deleted file mode 100644 index d979946..0000000 --- a/old_work/st.info +++ /dev/null @@ -1,213 +0,0 @@ -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/st-0.8.4-patches/st-alpha-0.8.2.diff b/st-0.8.4-patches/st-alpha-0.8.2.diff deleted file mode 100644 index dad6615..0000000 --- a/st-0.8.4-patches/st-alpha-0.8.2.diff +++ /dev/null @@ -1,163 +0,0 @@ -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 deleted file mode 100644 index 96aadbb..0000000 --- a/st-0.8.4-patches/st-alpha-20190116-3be4cf1.diff +++ /dev/null @@ -1,200 +0,0 @@ -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 deleted file mode 100644 index 4736325..0000000 --- a/st-0.8.4-patches/st-appsync-20200618-b27a383.diff +++ /dev/null @@ -1,259 +0,0 @@ -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 deleted file mode 100644 index d544f74..0000000 --- a/st-0.8.4-patches/st-blinking_cursor-20200531-a2a7044.diff +++ /dev/null @@ -1,150 +0,0 @@ -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 deleted file mode 100644 index 04a868c..0000000 --- a/st-0.8.4-patches/st-boxdraw_v2-0.8.3.diff +++ /dev/null @@ -1,600 +0,0 @@ -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 deleted file mode 100644 index c1e0e9e..0000000 --- a/st-0.8.4-patches/st-clipboard-0.8.3.diff +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 3b643da..0000000 --- a/st-0.8.4-patches/st-colors-at-launch-0.8.4.diff +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index c62847b..0000000 --- a/st-0.8.4-patches/st-cyclefonts-0.8.4.diff +++ /dev/null @@ -1,82 +0,0 @@ -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 deleted file mode 100644 index c7a2950..0000000 --- a/st-0.8.4-patches/st-font2-20190416-ba72400.diff +++ /dev/null @@ -1,167 +0,0 @@ -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 deleted file mode 100644 index 4895a66..0000000 --- a/st-0.8.4-patches/st-hidecursor-0.8.3.diff +++ /dev/null @@ -1,88 +0,0 @@ -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 deleted file mode 100644 index 01e9231..0000000 --- a/st-0.8.4-patches/st-nordtheme-0.8.2.diff +++ /dev/null @@ -1,100 +0,0 @@ -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 deleted file mode 100644 index 5a4e341..0000000 --- a/st-0.8.4-patches/st-osc_10_11_12-20200418-66520e1.diff +++ /dev/null @@ -1,72 +0,0 @@ -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 deleted file mode 100644 index ea64f22..0000000 --- a/st-0.8.4-patches/st-solarized-both-0.8.4.diff +++ /dev/null @@ -1,192 +0,0 @@ -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 deleted file mode 100644 index ee89ecc..0000000 --- a/st-0.8.4-patches/st-themed_cursor-0.8.1.diff +++ /dev/null @@ -1,68 +0,0 @@ -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 deleted file mode 100644 index e7eb7e3..0000000 --- a/st-0.8.4-patches/st-visualbell2-enhanced-2020-05-13-045a0fa.diff +++ /dev/null @@ -1,93 +0,0 @@ -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 deleted file mode 100644 index 78ba00a..0000000 --- a/st-0.8.4-patches/st-xresources-20200604-9ba7ecf.diff +++ /dev/null @@ -1,184 +0,0 @@ -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/old_work/st-alpha-20160727-308bfbf.diff b/st-alpha-20160727-308bfbf.diff similarity index 100% rename from old_work/st-alpha-20160727-308bfbf.diff rename to st-alpha-20160727-308bfbf.diff diff --git a/old_work/st-delkey-20160727-308bfbf.diff b/st-delkey-20160727-308bfbf.diff similarity index 100% rename from old_work/st-delkey-20160727-308bfbf.diff rename to st-delkey-20160727-308bfbf.diff diff --git a/old_work/st-no_bold_colors-20160727-308bfbf.diff b/st-no_bold_colors-20160727-308bfbf.diff similarity index 100% rename from old_work/st-no_bold_colors-20160727-308bfbf.diff rename to st-no_bold_colors-20160727-308bfbf.diff diff --git a/st-scripts/foot-to-st.py b/st-scripts/foot-to-st.py deleted file mode 100644 index 60ddd26..0000000 --- a/st-scripts/foot-to-st.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/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 deleted file mode 100755 index 866bdd6..0000000 --- a/st-scripts/menu-st-footcolorpic.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 deleted file mode 100644 index 3ade1ff..0000000 --- a/st-scripts/stcolors/autumn +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index eeaab2f..0000000 --- a/st-scripts/stcolors/blizzard-orb +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 0d0abd6..0000000 --- a/st-scripts/stcolors/bloodmoon +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index c7b13e4..0000000 --- a/st-scripts/stcolors/bluepanels +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index c61c4e5..0000000 --- a/st-scripts/stcolors/brightly +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 833793f..0000000 --- a/st-scripts/stcolors/cheezecake +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 0defb0d..0000000 --- a/st-scripts/stcolors/cinderdontneedcontrast +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 025d133..0000000 --- a/st-scripts/stcolors/coolbeans +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index d1fd5bc..0000000 --- a/st-scripts/stcolors/derp +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 8581802..0000000 --- a/st-scripts/stcolors/doomidarkocean2 +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index b34e365..0000000 --- a/st-scripts/stcolors/flowerz +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 269bbf6..0000000 --- a/st-scripts/stcolors/jeenz +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 6e561d4..0000000 --- a/st-scripts/stcolors/jmbi-greenbg +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index b6669e0..0000000 --- a/st-scripts/stcolors/leatherface +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 345ebb5..0000000 --- a/st-scripts/stcolors/lightsnapple +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index c47346f..0000000 --- a/st-scripts/stcolors/mostly-awful +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 89e5497..0000000 --- a/st-scripts/stcolors/n-vert +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index add93a3..0000000 --- a/st-scripts/stcolors/navy-and-ivory +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 37e2da1..0000000 --- a/st-scripts/stcolors/omgbeckylookatthatbruiseitissobright +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 379e400..0000000 --- a/st-scripts/stcolors/petals-dark-as-fuck +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index ac47d80..0000000 --- a/st-scripts/stcolors/plastic-toys +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 12bbd52..0000000 --- a/st-scripts/stcolors/purpariso +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 021090e..0000000 --- a/st-scripts/stcolors/rosewould +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index c260bdd..0000000 --- a/st-scripts/stcolors/sea-fox +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 5906b52..0000000 --- a/st-scripts/stcolors/sour-candy +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 5dab692..0000000 --- a/st-scripts/stcolors/sourceror +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index 7aa8102..0000000 --- a/st-scripts/stcolors/tango +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index f0adcaf..0000000 --- a/st-scripts/stcolors/visibone +++ /dev/null @@ -1,2 +0,0 @@ --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 deleted file mode 100644 index d840c8b..0000000 --- a/st-scripts/stcolors/woodlands +++ /dev/null @@ -1,2 +0,0 @@ --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/old_work/st-solarized-both-20160727-308bfbf.diff b/st-solarized-both-20160727-308bfbf.diff similarity index 100% rename from old_work/st-solarized-both-20160727-308bfbf.diff rename to st-solarized-both-20160727-308bfbf.diff diff --git a/st.1 b/st.1 index 39120b4..1e3f1d4 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/ttyS0 on Linux for serial port +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 /dev/ttyS0 115200'). Arguments before the last one are +(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 -/dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for -example 'st -l /dev/ttyS0 cs7 115200'. See +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 @@ -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 compatibility, +This option is only intended for compability, and all the remaining arguments are used as a command even without it. .SH SHORTCUTS @@ -142,22 +142,25 @@ Print the full screen to the Print the selection to the .I iofile. .TP -.B Ctrl-Shift-Page Up +.B Alt-Shift-Page Up Increase font size. .TP -.B Ctrl-Shift-Page Down +.B Alt-Shift-Page Down Decrease font size. .TP -.B Ctrl-Shift-Home +.B Alt-Shift-Home Reset to default font size. .TP -.B Ctrl-Shift-y +.B Shift-Insert Paste from primary selection (middle mouse button). .TP -.B Ctrl-Shift-c +.B Alt-Shift-Insert +Paste from clipboard selection. +.TP +.B Alt-Shift-c Copy the selected text to the clipboard selection. .TP -.B Ctrl-Shift-v +.B Alt-Shift-v Paste from the clipboard selection. .SH CUSTOMIZATION .B st @@ -170,8 +173,7 @@ See the LICENSE file for the terms of redistribution. .SH SEE ALSO .BR tabbed (1), .BR utmp (1), -.BR stty (1), -.BR scroll (1) +.BR stty (1) .SH BUGS See the TODO file in the distribution. diff --git a/st.c b/st.c index 211bc6f..a31527b 100644 --- a/st.c +++ b/st.c @@ -3,22 +3,40 @@ #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 "st.h" -#include "win.h" +#include "arg.h" + +char *argv0; + +#define Glyph Glyph_ +#define Font Font_ #if defined(__linux) #include @@ -28,6 +46,11 @@ #include #endif + +/* XEMBED messages */ +#define XEMBED_FOCUS_IN 4 +#define XEMBED_FOCUS_OUT 5 + /* Arbitrary sizes */ #define UTF_INVALID 0xFFFD #define UTF_SIZ 4 @@ -35,22 +58,53 @@ #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 IS_SET(flag) ((term.mode & (flag)) != 0) -#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f) +#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) (u && wcschr(worddelimiters, u)) +#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))) -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, +#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 { @@ -64,6 +118,32 @@ 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, @@ -81,9 +161,48 @@ 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; @@ -91,6 +210,88 @@ 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; @@ -106,56 +307,72 @@ typedef struct { int x, y; } nb, ne, ob, oe; + char *primary, *clipboard; + Atom xtarget; int alt; + struct timespec tclick1; + struct timespec tclick2; } Selection; -/* 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 */ - 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; +typedef union { + int i; + uint ui; + float f; + const void *v; +} Arg; -/* CSI Escape sequence structs */ -/* ESC '[' [[ [] [;]] []] */ typedef struct { - 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; + uint mod; + KeySym keysym; + void (*func)(const Arg *); + const Arg arg; +} Shortcut; -/* STR Escape sequence structs */ -/* ESC type [[ [] [;]] ] ESC '\' */ +/* 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 { - 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; + int height; + int width; + int ascent; + int descent; + short lbearing; + short rbearing; + XftFont *match; + FcFontSet *set; + FcPattern *pattern; +} Font; -static void execsh(char *, char **); -static void stty(char **); +/* 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 ttywriteraw(const char *, size_t); +static void run(void); static void csidump(void); static void csihandle(void); @@ -167,6 +384,7 @@ 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); @@ -180,83 +398,175 @@ 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 void drawregion(int, int, int, int); +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(const char *, Rune *, size_t); +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 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}; -#include -static int su = 0; -struct timespec sutv; +/* Font Ring Cache */ +enum { + FRC_NORMAL, + FRC_ITALIC, + FRC_BOLD, + FRC_ITALICBOLD +}; -static void -tsync_begin() -{ - clock_gettime(CLOCK_MONOTONIC, &sutv); - su = 1; -} +typedef struct { + XftFont *font; + int flags; + Rune unicodep; +} Fontcache; -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; -} +/* 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) @@ -278,10 +588,10 @@ xwrite(int fd, const char *s, size_t len) void * xmalloc(size_t len) { - void *p; + void *p = malloc(len); - if (!(p = malloc(len))) - die("malloc: %s\n", strerror(errno)); + if (!p) + die("Out of memory\n"); return p; } @@ -290,7 +600,7 @@ void * xrealloc(void *p, size_t len) { if ((p = realloc(p, len)) == NULL) - die("realloc: %s\n", strerror(errno)); + die("Out of memory\n"); return p; } @@ -299,13 +609,13 @@ char * xstrdup(char *s) { if ((s = strdup(s)) == NULL) - die("strdup: %s\n", strerror(errno)); + die("Out of memory\n"); return s; } size_t -utf8decode(const char *c, Rune *u, size_t clen) +utf8decode(char *c, Rune *u, size_t clen) { size_t i, j, len, type; Rune udecoded; @@ -363,6 +673,23 @@ 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) { @@ -374,66 +701,37 @@ 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 @@ -450,52 +748,6 @@ 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) { @@ -527,8 +779,7 @@ selnormalize(void) int selected(int x, int y) { - if (sel.mode == SEL_EMPTY || sel.ob.x == -1 || - sel.alt != IS_SET(MODE_ALTSCREEN)) + if (sel.mode == SEL_EMPTY) return 0; if (sel.type == SEL_RECTANGULAR) @@ -613,6 +864,141 @@ 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) { @@ -660,8 +1046,7 @@ getsel(void) * st. * FIXME: Fix the computer world. */ - if ((y < sel.ne.y || lastx >= linelen) && - (!(last->mode & ATTR_WRAP) || sel.type == SEL_RECTANGULAR)) + if ((y < sel.ne.y || lastx >= linelen) && !(last->mode & ATTR_WRAP)) *ptr++ = '\n'; } *ptr = 0; @@ -669,7 +1054,148 @@ getsel(void) } void -selclear(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; @@ -678,6 +1204,120 @@ selclear(void) 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, ...) { @@ -690,36 +1330,32 @@ die(const char *errstr, ...) } void -execsh(char *cmd, char **args) +execsh(void) { - char *sh, *prog, *arg; + 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)); + 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 : cmd; + sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; - if (args) { - prog = args[0]; - arg = NULL; - } else if (scroll) { - prog = scroll; - arg = utmp ? utmp : sh; - } else if (utmp) { + if (opt_cmd) + prog = opt_cmd[0]; + else if (utmp) prog = utmp; - arg = NULL; - } else { + else prog = sh; - arg = NULL; - } - DEFAULT(args, ((char *[]) {prog, arg, NULL})); + args = (opt_cmd) ? opt_cmd : (char *[]) {prog, NULL}; + + snprintf(buf, sizeof(buf), "%lu", xw.win); unsetenv("COLUMNS"); unsetenv("LINES"); @@ -729,6 +1365,7 @@ execsh(char *cmd, char **args) 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); @@ -748,20 +1385,19 @@ 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 exited with status %d\n", WEXITSTATUS(stat)); - else if (WIFSIGNALED(stat)) - die("child terminated due to signal %d\n", WTERMSIG(stat)); - _exit(0); + if (!WIFEXITED(stat) || WEXITSTATUS(stat)) + die("child finished with error '%d'\n", stat); + exit(0); } + void -stty(char **args) +stty(void) { char cmd[_POSIX_ARG_MAX], **p, *q, *s; size_t n, siz; @@ -771,7 +1407,7 @@ stty(char **args) memcpy(cmd, stty_args, n); q = cmd + n; siz = sizeof(cmd) - n; - for (p = args; p && (s = *p); ++p) { + for (p = opt_cmd; p && (s = *p); ++p) { if ((n = strlen(s)) > siz-1) die("stty parameter length too long\n"); *q++ = ' '; @@ -781,40 +1417,40 @@ stty(char **args) } *q = '\0'; if (system(cmd) != 0) - perror("Couldn't call stty"); + perror("Couldn't call stty"); } -int -ttynew(char *line, char *cmd, char *out, char **args) +void +ttynew(void) { int m, s; + struct winsize w = {term.row, term.col, 0, 0}; - if (out) { + if (opt_io) { term.mode |= MODE_PRINT; - iofd = (!strcmp(out, "-")) ? - 1 : open(out, O_WRONLY | O_CREAT, 0666); + iofd = (!strcmp(opt_io, "-")) ? + 1 : open(opt_io, O_WRONLY | O_CREAT, 0666); if (iofd < 0) { fprintf(stderr, "Error opening %s:%s\n", - out, strerror(errno)); + opt_io, strerror(errno)); } } - if (line) { - if ((cmdfd = open(line, O_RDWR)) < 0) - die("open line '%s' failed: %s\n", - line, 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(args); - return cmdfd; + stty(); + return; } /* seems to work fine on linux, openbsd and freebsd */ - if (openpty(&m, &s, NULL, NULL, NULL) < 0) + if (openpty(&m, &s, NULL, NULL, &w) < 0) die("openpty failed: %s\n", strerror(errno)); switch (pid = fork()) { case -1: - die("fork failed: %s\n", strerror(errno)); + die("fork failed\n"); break; case 0: close(iofd); @@ -826,84 +1462,47 @@ ttynew(char *line, char *cmd, char *out, char **args) die("ioctl TIOCSCTTY failed: %s\n", strerror(errno)); close(s); close(m); -#ifdef __OpenBSD__ - if (pledge("stdio getpw proc exec", NULL) == -1) - die("pledge\n"); -#endif - execsh(cmd, args); + execsh(); 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; - int ret, written; + char *ptr; + int charsize; /* size of utf8 char in bytes */ + Rune unicodep; + int ret; /* append read bytes to unprocessed bytes */ - ret = twrite_aborted ? 1 : read(cmdfd, buf+buflen, LEN(buf)-buflen); + if ((ret = read(cmdfd, buf+buflen, LEN(buf)-buflen)) < 0) + die("Couldn't read from shell: %s\n", strerror(errno)); - 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; + /* 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, 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) +ttywrite(const char *s, size_t n) { fd_set wfd, rfd; ssize_t r; @@ -938,7 +1537,7 @@ ttywriteraw(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) @@ -960,25 +1559,33 @@ write_error: } void -ttyresize(int tw, int th) +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 = tw; - w.ws_ypixel = th; + 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)); } -void -ttyhangup() -{ - /* Send SIGHUP to shell */ - kill(pid, SIGHUP); -} - int tattrset(int attr) { @@ -1024,7 +1631,6 @@ tsetdirtattr(int attr) void tfulldirt(void) { - tsync_end(); tsetdirt(0, term.row-1); } @@ -1058,7 +1664,7 @@ treset(void) term.tabs[i] = 1; term.top = 0; term.bot = term.row - 1; - term.mode = MODE_WRAP|MODE_UTF8; + term.mode = MODE_WRAP; memset(term.trantbl, CS_USA, sizeof(term.trantbl)); term.charset = 0; @@ -1075,6 +1681,8 @@ tnew(int col, int row) { term = (Term){ .c = { .attr = { .fg = defaultfg, .bg = defaultbg } } }; tresize(col, row); + term.numlock = 1; + treset(); } @@ -1135,17 +1743,27 @@ selscroll(int orig, int n) if (sel.ob.x == -1) return; - 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 { - selnormalize(); + 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(); } } @@ -1250,9 +1868,6 @@ 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 @@ -1276,7 +1891,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(); + selclear(NULL); gp->fg = term.c.attr.fg; gp->bg = term.c.attr.bg; gp->mode = 0; @@ -1477,8 +2092,7 @@ tsetattr(int *attr, int l) } else { fprintf(stderr, "erresc(default): gfx attr %d unknown\n", - attr[i]); - csidump(); + attr[i]), csidump(); } break; } @@ -1504,16 +2118,20 @@ tsetscroll(int t, int b) void tsetmode(int priv, int set, int *args, int narg) { - int alt, *lim; + int *lim, mode; + int alt; for (lim = args + narg; args < lim; ++args) { if (priv) { switch (*args) { case 1: /* DECCKM -- Cursor key */ - xsetmode(set, MODE_APPCURSOR); + MODBIT(term.mode, set, MODE_APPCURSOR); break; case 5: /* DECSCNM -- Reverse video */ - xsetmode(set, MODE_REVERSE); + 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); @@ -1533,36 +2151,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 */ - xsetmode(!set, MODE_HIDE); + MODBIT(term.mode, !set, MODE_HIDE); break; case 9: /* X10 mouse compatibility mode */ xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEX10); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEX10); break; case 1000: /* 1000: report button press */ xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEBTN); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEBTN); break; case 1002: /* 1002: report motion on button press */ xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMOTION); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEMOTION); break; case 1003: /* 1003: enable all mouse motions */ xsetpointermotion(set); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMANY); + MODBIT(term.mode, 0, MODE_MOUSE); + MODBIT(term.mode, set, MODE_MOUSEMANY); break; case 1004: /* 1004: send focus events to tty */ - xsetmode(set, MODE_FOCUS); + MODBIT(term.mode, set, MODE_FOCUS); break; case 1006: /* 1006: extended reporting mode */ - xsetmode(set, MODE_MOUSESGR); + MODBIT(term.mode, set, MODE_MOUSESGR); break; case 1034: - xsetmode(set, MODE_8BIT); + MODBIT(term.mode, set, MODE_8BIT); break; case 1049: /* swap screen & set/restore cursor as xterm */ if (!allowaltscreen) @@ -1587,7 +2205,7 @@ tsetmode(int priv, int set, int *args, int narg) tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); break; case 2004: /* 2004: bracketed paste mode */ - xsetmode(set, MODE_BRCKTPASTE); + MODBIT(term.mode, set, MODE_BRCKTPASTE); break; /* Not implemented mouse modes. See comments there. */ case 1001: /* mouse highlight mode; can hang the @@ -1598,7 +2216,6 @@ 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", @@ -1609,8 +2226,8 @@ tsetmode(int priv, int set, int *args, int narg) switch (*args) { case 0: /* Error (IGNORED) */ break; - case 2: - xsetmode(set, MODE_KBDLOCK); + case 2: /* KAM -- keyboard action */ + MODBIT(term.mode, set, MODE_KBDLOCK); break; case 4: /* IRM -- Insertion-replacement */ MODBIT(term.mode, set, MODE_INSERT); @@ -1678,13 +2295,7 @@ csihandle(void) break; case 'c': /* DA -- Device Attributes */ if (csiescseq.arg[0] == 0) - 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); + ttywrite(vtiden, sizeof(vtiden) - 1); break; case 'C': /* CUF -- Cursor Forward */ case 'a': /* HPR -- Cursor Forward */ @@ -1731,6 +2342,7 @@ 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); @@ -1809,9 +2421,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, 0); + ttywrite(buf, len); } break; case 'r': /* DECSTBM -- Set Scrolling Region */ @@ -1833,8 +2445,11 @@ csihandle(void) case ' ': switch (csiescseq.mode[1]) { case 'q': /* DECSCUSR -- Set Cursor Style */ - if (xsetcursor(csiescseq.arg[0])) + DEFAULT(csiescseq.arg[0], 1); + if (!BETWEEN(csiescseq.arg[0], 0, 6)) { goto unknown; + } + xw.cursor = csiescseq.arg[0]; break; default: goto unknown; @@ -1846,25 +2461,25 @@ csihandle(void) void csidump(void) { - size_t i; + int i; uint c; - fprintf(stderr, "ESC["); + printf("ESC["); for (i = 0; i < csiescseq.len; i++) { c = csiescseq.buf[i] & 0xff; if (isprint(c)) { - putc(c, stderr); + putchar(c); } else if (c == '\n') { - fprintf(stderr, "(\\n)"); + printf("(\\n)"); } else if (c == '\r') { - fprintf(stderr, "(\\r)"); + printf("(\\r)"); } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); + printf("(\\e)"); } else { - fprintf(stderr, "(%02x)", c); + printf("(%02x)", c); } } - putc('\n', stderr); + putchar('\n'); } void @@ -1876,7 +2491,7 @@ csireset(void) void strhandle(void) { - char *p = NULL, *dec; + char *p = NULL; int j, narg, par; term.esc &= ~(ESC_STR_END|ESC_STR); @@ -1892,17 +2507,6 @@ 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; @@ -1911,10 +2515,7 @@ strhandle(void) case 104: /* color reset, here p = NULL */ j = (narg > 1) ? atoi(strescseq.args[1]) : -1; if (xsetcolorname(j, 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)"); + fprintf(stderr, "erresc: invalid color %s\n", p); } else { /* * TODO if defaultbg color is changed, borders @@ -1929,12 +2530,6 @@ 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; @@ -1969,37 +2564,33 @@ strparse(void) void strdump(void) { - size_t i; + int i; uint c; - fprintf(stderr, "ESC%c", strescseq.type); + printf("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)) { - putc(c, stderr); + putchar(c); } else if (c == '\n') { - fprintf(stderr, "(\\n)"); + printf("(\\n)"); } else if (c == '\r') { - fprintf(stderr, "(\\r)"); + printf("(\\r)"); } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); + printf("(\\e)"); } else { - fprintf(stderr, "(%02x)", c); + printf("(%02x)", c); } } - fprintf(stderr, "ESC\\\n"); + printf("ESC\\\n"); } void strreset(void) { - strescseq = (STREscape){ - .buf = xrealloc(strescseq.buf, STR_BUF_SIZ), - .siz = STR_BUF_SIZ, - }; + memset(&strescseq, 0, sizeof(strescseq)); } void @@ -2013,29 +2604,30 @@ void tprinter(char *s, size_t len) { if (iofd != -1 && xwrite(iofd, s, len) < 0) { - perror("Error writing to output file"); + 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 +// 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) @@ -2057,7 +2649,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); @@ -2090,12 +2682,19 @@ tputtab(int n) } void -tdefutf8(char ascii) +techo(Rune u) { - if (ascii == 'G') - term.mode |= MODE_UTF8; - else if (ascii == '@') - term.mode &= ~MODE_UTF8; + 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 @@ -2171,7 +2770,19 @@ tcontrolcode(uchar ascii) /* backwards compatibility to xterm */ strhandle(); } else { - xbell(); + 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 */ @@ -2185,7 +2796,6 @@ tcontrolcode(uchar ascii) return; case '\032': /* SUB */ tsetchar('?', &term.c.attr, term.c.x, term.c.y); - /* FALLTHROUGH */ case '\030': /* CAN */ csireset(); break; @@ -2228,7 +2838,7 @@ tcontrolcode(uchar ascii) case 0x99: /* TODO: SGCI */ break; case 0x9a: /* DECID -- Identify Terminal */ - ttywrite(vtiden, strlen(vtiden), 0); + ttywrite(vtiden, sizeof(vtiden) - 1); break; case 0x9b: /* TODO: CSI */ case 0x9c: /* TODO: ST */ @@ -2258,9 +2868,6 @@ 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 */ @@ -2300,18 +2907,18 @@ eschandle(uchar ascii) } break; case 'Z': /* DECID -- Identify Terminal */ - ttywrite(vtiden, strlen(vtiden), 0); + ttywrite(vtiden, sizeof(vtiden) - 1); break; - case 'c': /* RIS -- Reset to initial state */ + case 'c': /* RIS -- Reset to inital state */ treset(); - resettitle(); + xresettitle(); xloadcols(); break; case '=': /* DECPAM -- Application keypad */ - xsetmode(1, MODE_APPKEYPAD); + term.mode |= MODE_APPKEYPAD; break; case '>': /* DECPNM -- Normal keypad */ - xsetmode(0, MODE_APPKEYPAD); + term.mode &= ~MODE_APPKEYPAD; break; case '7': /* DECSC -- Save Cursor */ tcursor(CURSOR_SAVE); @@ -2340,13 +2947,10 @@ tputc(Rune u) Glyph *gp; control = ISCONTROL(u); - 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; + 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)) @@ -2363,35 +2967,28 @@ tputc(Rune u) ISCONTROLC1(u)) { term.esc &= ~(ESC_START|ESC_STR); term.esc |= ESC_STR_END; - goto check_control_code; + } 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; } - - 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 @@ -2402,8 +2999,6 @@ check_control_code: /* * control codes are not shown ever */ - if (!term.esc) - term.lastc = 0; return; } else if (term.esc & ESC_START) { if (term.esc & ESC_CSI) { @@ -2416,8 +3011,6 @@ check_control_code: csihandle(); } return; - } else if (term.esc & ESC_UTF8) { - tdefutf8(u); } else if (term.esc & ESC_ALTCHARSET) { tdeftran(u); } else if (term.esc & ESC_TEST) { @@ -2434,8 +3027,8 @@ check_control_code: */ return; } - if (selected(term.c.x, term.c.y)) - selclear(); + 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)) { @@ -2453,7 +3046,6 @@ check_control_code: } tsetchar(u, &term.c.attr, term.c.x, term.c.y); - term.lastc = u; if (width == 2) { gp->mode |= ATTR_WIDE; @@ -2469,45 +3061,6 @@ check_control_code: } } -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) { @@ -2542,6 +3095,9 @@ 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)); @@ -2555,7 +3111,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)); } @@ -2591,49 +3147,902 @@ tresize(int col, int row) } void -resettitle(void) +xresize(int col, int row) { - xsettitle(NULL); + 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 -drawregion(int x1, int y1, int x2, int y2) +xloadcols(void) { - int y; + int i; + static int loaded; + Color *cp; - for (y = y1; y < y2; y++) { - if (!term.dirty[y]) - continue; + if (loaded) { + for (cp = dc.col; cp < &dc.col[LEN(dc.col)]; ++cp) + XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); + } - term.dirty[y] = 0; - xdrawline(term.line[y], x1, y, x2); + 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 -draw(void) +xinit(void) { - int cx = term.c.x, ocx = term.ocx, ocy = term.ocy; + XGCValues gcvalues; + Cursor cursor; + Window parent; + pid_t thispid = getpid(); + XColor xmousefg, xmousebg; - if (!xstartdraw()) + 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; - /* 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--; + /* 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; +} - 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 +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 @@ -2642,3 +4051,477 @@ 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 deleted file mode 100644 index bca2cb5..0000000 --- a/st.h +++ /dev/null @@ -1,136 +0,0 @@ -/* 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 b32b446..d979946 100644 --- a/st.info +++ b/st.info @@ -1,4 +1,4 @@ -st-mono| simpleterm monocolor, +st| simpleterm, acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, am, bce, @@ -10,7 +10,7 @@ st-mono| simpleterm monocolor, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, - colors#2, + colors#8, cols#80, cr=^M, csr=\E[%i%p1%d;%p2%dr, @@ -25,7 +25,6 @@ st-mono| simpleterm monocolor, 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, @@ -54,7 +53,7 @@ st-mono| simpleterm monocolor, ka3=\E[5~, kc1=\E[4~, kc3=\E[6~, - kbs=\177, + kbs=\010, kcbt=\E[Z, kb2=\EOu, kcub1=\EOD, @@ -74,7 +73,7 @@ st-mono| simpleterm monocolor, kri=\E[1;2A, kclr=\E[3;5~, kdl1=\E[3;2~, - kdch1=\E[3~, + kdch1=\177~, kich1=\E[2~, kend=\E[4~, kf1=\EOP, @@ -143,12 +142,14 @@ st-mono| simpleterm monocolor, 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, @@ -158,7 +159,6 @@ st-mono| simpleterm monocolor, rc=\E8, rev=\E[7m, ri=\EM, - rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmcup=\E[?1049l, @@ -169,8 +169,13 @@ st-mono| simpleterm monocolor, rs1=\Ec, rs2=\E[4l\E>\E[?1034l, sc=\E7, - sitm=\E[3m, + 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, @@ -181,35 +186,13 @@ st-mono| simpleterm monocolor, 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, @@ -228,13 +211,3 @@ 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 deleted file mode 100644 index a6ef1b9..0000000 --- a/win.h +++ /dev/null @@ -1,39 +0,0 @@ -/* 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 deleted file mode 100644 index 4599b00..0000000 --- a/x.c +++ /dev/null @@ -1,2113 +0,0 @@ -/* 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; -} diff --git a/old_work/xrdb b/xrdb similarity index 100% rename from old_work/xrdb rename to xrdb diff --git a/old_work/xrdb2st.py b/xrdb2st.py similarity index 100% rename from old_work/xrdb2st.py rename to xrdb2st.py