diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index b185e1c..56322c8 --- a/.gitignore +++ b/.gitignore @@ -1,235 +1,3 @@ -# -*- mode: gitignore; -*- -# Created by https://www.gitignore.io/api/sublimetext,emacs,git,python,c - -### C ### -# Prerequisites -*.d - -# Object files -*.o -*.ko -*.obj -*.elf - -# Linker output -*.ilk -*.map -*.exp - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ -*.su -*.idb -*.pdb - -# Kernel Module Compile Results -*.mod* -*.cmd -modules.order -Module.symvers -Mkfile.old -dkms.conf - -### Emacs ### -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - -### Git ### -*.orig - -### Python ### -# Byte-compiled / optimized / DLL files +*DS_Store +._* __pycache__/ -*.py[cod] -*$py.class - -# C extensions - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# dotenv -.env - -# virtualenv -.venv -venv/ -ENV/ - -# Spyder project settings -.spyderproject - -# Rope project settings -.ropeproject - -### SublimeText ### -# cache files for sublime text -*.tmlanguage.cache -*.tmPreferences.cache -*.stTheme.cache - -# workspace files are user-specific -*.sublime-workspace - -# project files should be checked into the repository, unless a significant -# proportion of contributors will probably not be using SublimeText -# *.sublime-project - -# sftp configuration file -sftp-config.json - -# Package control specific files -Package Control.last-run -Package Control.ca-list -Package Control.ca-bundle -Package Control.system-ca-bundle -Package Control.cache/ -Package Control.ca-certs/ -Package Control.merged-ca-bundle -Package Control.user-ca-bundle -oscrypto-ca-bundle.crt -bh_unicode_properties.cache - -# Sublime-github package stores a github token in this file -# https://packagecontrol.io/packages/sublime-github -GitHub.sublime-settings - -# End of https://www.gitignore.io/api/sublimetext,emacs,git,python,c - -/st - -/st.o - -*.o diff --git a/FAQ b/FAQ deleted file mode 100644 index 0f9609d..0000000 --- a/FAQ +++ /dev/null @@ -1,250 +0,0 @@ -## Why does st not handle utmp entries? - -Use the excellent tool of [utmp](https://git.suckless.org/utmp/) for this task. - - -## Some _random program_ complains that st is unknown/not recognised/unsupported/whatever! - -It means that st doesn’t have any terminfo entry on your system. Chances are -you did not `make install`. If you just want to test it without installing it, -you can manually run `tic -sx 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. - - -## 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. - - -## 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] https://st.suckless.org/patches/delkey - - -## Why do images not work in st using the w3m image hack? - -w3mimg uses a hack that draws an image on top of the terminal emulator Drawable -window. The hack relies on the terminal to use a single buffer to draw its -contents directly. - -st uses double-buffered drawing so the image is quickly replaced and may show a -short flicker effect. - -Below is a patch example to change st double-buffering to a single Drawable -buffer. - -diff --git a/x.c b/x.c ---- a/x.c -+++ b/x.c -@@ -732,10 +732,6 @@ xresize(int col, int row) - win.tw = col * win.cw; - win.th = row * win.ch; - -- XFreePixmap(xw.dpy, xw.buf); -- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, -- DefaultDepth(xw.dpy, xw.scr)); -- XftDrawChange(xw.draw, xw.buf); - xclear(0, 0, win.w, win.h); - - /* resize to new width */ -@@ -1148,8 +1144,7 @@ xinit(int cols, int rows) - gcvalues.graphics_exposures = False; - dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, - &gcvalues); -- xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h, -- DefaultDepth(xw.dpy, xw.scr)); -+ xw.buf = xw.win; - XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); - XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h); - -@@ -1632,8 +1627,6 @@ xdrawline(Line line, int x1, int y1, int x2) - void - xfinishdraw(void) - { -- XCopyArea(xw.dpy, xw.buf, xw.win, dc.gc, 0, 0, win.w, -- win.h, 0, 0); - XSetForeground(xw.dpy, dc.gc, - dc.col[IS_SET(MODE_REVERSE)? - defaultfg : defaultbg].pixel); - - -## BadLength X error in Xft when trying to render emoji - -Xft makes st crash when rendering color emojis with the following error: - -"X Error of failed request: BadLength (poly request too large or internal Xlib length error)" - Major opcode of failed request: 139 (RENDER) - Minor opcode of failed request: 20 (RenderAddGlyphs) - Serial number of failed request: 1595 - Current serial number in output stream: 1818" - -This is a known bug in Xft (not st) which happens on some platforms and -combination of particular fonts and fontconfig settings. - -See also: -https://gitlab.freedesktop.org/xorg/lib/libxft/issues/6 -https://bugs.freedesktop.org/show_bug.cgi?id=107534 -https://bugzilla.redhat.com/show_bug.cgi?id=1498269 - -The solution is to remove color emoji fonts or disable this in the fontconfig -XML configuration. As an ugly workaround (which may work only on newer -fontconfig versions (FC_COLOR)), the following code can be used to mask color -fonts: - - FcPatternAddBool(fcpattern, FC_COLOR, FcFalse); - -Please don't bother reporting this bug to st, but notify the upstream Xft -developers about fixing this bug. diff --git a/LEGACY b/LEGACY deleted file mode 100644 index bf28b1e..0000000 --- a/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/LICENSE b/LICENSE deleted file mode 100644 index d80eb47..0000000 --- a/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -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> -© 2013 Eon S. Jeon -© 2013 Alexander Sedov -© 2013 Mark Edgar -© 2013-2014 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/Makefile b/Makefile deleted file mode 100644 index 6dfa212..0000000 --- a/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# 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) - -all: options st - -options: - @echo st build options: - @echo "CFLAGS = $(STCFLAGS)" - @echo "LDFLAGS = $(STLDFLAGS)" - @echo "CC = $(CC)" - -config.h: - cp config.def.h config.h - -.c.o: - $(CC) $(STCFLAGS) -c $< - -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 - -st: $(OBJ) - $(CC) -o $@ $(OBJ) $(STLDFLAGS) - -clean: - 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) - -install: st - mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -f st $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/st - mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 - chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 - tic -sx st.info - @echo Please see the README file regarding the terminfo entry of st. - -uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/st - rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 - -.PHONY: all options clean dist install uninstall diff --git a/README b/README deleted file mode 100644 index f1e24cd..0000000 --- a/README +++ /dev/null @@ -1,38 +0,0 @@ -Truck's version; is patched. - -Scripts for i3 in st-scripts. - -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/iterm2colors/README.md b/README.md similarity index 100% rename from old_work/iterm2colors/README.md rename to README.md diff --git a/TODO b/TODO deleted file mode 100644 index 5f74cd5..0000000 --- a/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/iterm2colors/Xresources/3024 Day b/Xresources/3024 Day similarity index 100% rename from old_work/iterm2colors/Xresources/3024 Day rename to Xresources/3024 Day diff --git a/old_work/iterm2colors/Xresources/3024 Night b/Xresources/3024 Night similarity index 100% rename from old_work/iterm2colors/Xresources/3024 Night rename to Xresources/3024 Night diff --git a/old_work/iterm2colors/Xresources/AdventureTime b/Xresources/AdventureTime similarity index 100% rename from old_work/iterm2colors/Xresources/AdventureTime rename to Xresources/AdventureTime diff --git a/old_work/iterm2colors/Xresources/Afterglow b/Xresources/Afterglow similarity index 100% rename from old_work/iterm2colors/Xresources/Afterglow rename to Xresources/Afterglow diff --git a/old_work/iterm2colors/Xresources/AlienBlood b/Xresources/AlienBlood similarity index 100% rename from old_work/iterm2colors/Xresources/AlienBlood rename to Xresources/AlienBlood diff --git a/old_work/iterm2colors/Xresources/Argonaut b/Xresources/Argonaut similarity index 100% rename from old_work/iterm2colors/Xresources/Argonaut rename to Xresources/Argonaut diff --git a/old_work/iterm2colors/Xresources/Arthur b/Xresources/Arthur similarity index 100% rename from old_work/iterm2colors/Xresources/Arthur rename to Xresources/Arthur diff --git a/old_work/iterm2colors/Xresources/AtelierSulphurpool b/Xresources/AtelierSulphurpool similarity index 100% rename from old_work/iterm2colors/Xresources/AtelierSulphurpool rename to Xresources/AtelierSulphurpool diff --git a/old_work/iterm2colors/Xresources/Atom b/Xresources/Atom similarity index 100% rename from old_work/iterm2colors/Xresources/Atom rename to Xresources/Atom diff --git a/old_work/iterm2colors/Xresources/AtomOneLight b/Xresources/AtomOneLight similarity index 100% rename from old_work/iterm2colors/Xresources/AtomOneLight rename to Xresources/AtomOneLight diff --git a/old_work/iterm2colors/Xresources/Batman b/Xresources/Batman similarity index 100% rename from old_work/iterm2colors/Xresources/Batman rename to Xresources/Batman diff --git a/old_work/iterm2colors/Xresources/Belafonte Day b/Xresources/Belafonte Day similarity index 100% rename from old_work/iterm2colors/Xresources/Belafonte Day rename to Xresources/Belafonte Day diff --git a/old_work/iterm2colors/Xresources/Belafonte Night b/Xresources/Belafonte Night similarity index 100% rename from old_work/iterm2colors/Xresources/Belafonte Night rename to Xresources/Belafonte Night diff --git a/old_work/iterm2colors/Xresources/BirdsOfParadise b/Xresources/BirdsOfParadise similarity index 100% rename from old_work/iterm2colors/Xresources/BirdsOfParadise rename to Xresources/BirdsOfParadise diff --git a/old_work/iterm2colors/Xresources/Blazer b/Xresources/Blazer similarity index 100% rename from old_work/iterm2colors/Xresources/Blazer rename to Xresources/Blazer diff --git a/old_work/iterm2colors/Xresources/Borland b/Xresources/Borland similarity index 100% rename from old_work/iterm2colors/Xresources/Borland rename to Xresources/Borland diff --git a/old_work/iterm2colors/Xresources/Bright Lights b/Xresources/Bright Lights similarity index 100% rename from old_work/iterm2colors/Xresources/Bright Lights rename to Xresources/Bright Lights diff --git a/old_work/iterm2colors/Xresources/Broadcast b/Xresources/Broadcast similarity index 100% rename from old_work/iterm2colors/Xresources/Broadcast rename to Xresources/Broadcast diff --git a/old_work/iterm2colors/Xresources/Brogrammer b/Xresources/Brogrammer similarity index 100% rename from old_work/iterm2colors/Xresources/Brogrammer rename to Xresources/Brogrammer diff --git a/old_work/iterm2colors/Xresources/C64 b/Xresources/C64 similarity index 100% rename from old_work/iterm2colors/Xresources/C64 rename to Xresources/C64 diff --git a/old_work/iterm2colors/Xresources/CLRS b/Xresources/CLRS similarity index 100% rename from old_work/iterm2colors/Xresources/CLRS rename to Xresources/CLRS diff --git a/old_work/iterm2colors/Xresources/Chalk b/Xresources/Chalk similarity index 100% rename from old_work/iterm2colors/Xresources/Chalk rename to Xresources/Chalk diff --git a/old_work/iterm2colors/Xresources/Chalkboard b/Xresources/Chalkboard similarity index 100% rename from old_work/iterm2colors/Xresources/Chalkboard rename to Xresources/Chalkboard diff --git a/old_work/iterm2colors/Xresources/Ciapre b/Xresources/Ciapre similarity index 100% rename from old_work/iterm2colors/Xresources/Ciapre rename to Xresources/Ciapre diff --git a/old_work/iterm2colors/Xresources/Cobalt Neon b/Xresources/Cobalt Neon similarity index 100% rename from old_work/iterm2colors/Xresources/Cobalt Neon rename to Xresources/Cobalt Neon diff --git a/old_work/iterm2colors/Xresources/Cobalt2 b/Xresources/Cobalt2 similarity index 100% rename from old_work/iterm2colors/Xresources/Cobalt2 rename to Xresources/Cobalt2 diff --git a/old_work/iterm2colors/Xresources/CrayonPonyFish b/Xresources/CrayonPonyFish similarity index 100% rename from old_work/iterm2colors/Xresources/CrayonPonyFish rename to Xresources/CrayonPonyFish diff --git a/old_work/iterm2colors/Xresources/Dark Pastel b/Xresources/Dark Pastel similarity index 100% rename from old_work/iterm2colors/Xresources/Dark Pastel rename to Xresources/Dark Pastel diff --git a/old_work/iterm2colors/Xresources/Darkside b/Xresources/Darkside similarity index 100% rename from old_work/iterm2colors/Xresources/Darkside rename to Xresources/Darkside diff --git a/old_work/iterm2colors/Xresources/Desert b/Xresources/Desert similarity index 100% rename from old_work/iterm2colors/Xresources/Desert rename to Xresources/Desert diff --git a/old_work/iterm2colors/Xresources/DimmedMonokai b/Xresources/DimmedMonokai similarity index 100% rename from old_work/iterm2colors/Xresources/DimmedMonokai rename to Xresources/DimmedMonokai diff --git a/old_work/iterm2colors/Xresources/DotGov b/Xresources/DotGov similarity index 100% rename from old_work/iterm2colors/Xresources/DotGov rename to Xresources/DotGov diff --git a/old_work/iterm2colors/Xresources/Dracula b/Xresources/Dracula similarity index 100% rename from old_work/iterm2colors/Xresources/Dracula rename to Xresources/Dracula diff --git a/old_work/iterm2colors/Xresources/Duotone Dark b/Xresources/Duotone Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Duotone Dark rename to Xresources/Duotone Dark diff --git a/old_work/iterm2colors/Xresources/ENCOM b/Xresources/ENCOM similarity index 100% rename from old_work/iterm2colors/Xresources/ENCOM rename to Xresources/ENCOM diff --git a/old_work/iterm2colors/Xresources/Earthsong b/Xresources/Earthsong similarity index 100% rename from old_work/iterm2colors/Xresources/Earthsong rename to Xresources/Earthsong diff --git a/old_work/iterm2colors/Xresources/Elemental b/Xresources/Elemental similarity index 100% rename from old_work/iterm2colors/Xresources/Elemental rename to Xresources/Elemental diff --git a/old_work/iterm2colors/Xresources/Elementary b/Xresources/Elementary similarity index 100% rename from old_work/iterm2colors/Xresources/Elementary rename to Xresources/Elementary diff --git a/old_work/iterm2colors/Xresources/Espresso b/Xresources/Espresso similarity index 100% rename from old_work/iterm2colors/Xresources/Espresso rename to Xresources/Espresso diff --git a/old_work/iterm2colors/Xresources/Espresso Libre b/Xresources/Espresso Libre similarity index 100% rename from old_work/iterm2colors/Xresources/Espresso Libre rename to Xresources/Espresso Libre diff --git a/old_work/iterm2colors/Xresources/Fideloper b/Xresources/Fideloper similarity index 100% rename from old_work/iterm2colors/Xresources/Fideloper rename to Xresources/Fideloper diff --git a/old_work/iterm2colors/Xresources/FirefoxDev b/Xresources/FirefoxDev similarity index 100% rename from old_work/iterm2colors/Xresources/FirefoxDev rename to Xresources/FirefoxDev diff --git a/old_work/iterm2colors/Xresources/Firewatch b/Xresources/Firewatch similarity index 100% rename from old_work/iterm2colors/Xresources/Firewatch rename to Xresources/Firewatch diff --git a/old_work/iterm2colors/Xresources/FishTank b/Xresources/FishTank similarity index 100% rename from old_work/iterm2colors/Xresources/FishTank rename to Xresources/FishTank diff --git a/old_work/iterm2colors/Xresources/Flat b/Xresources/Flat similarity index 100% rename from old_work/iterm2colors/Xresources/Flat rename to Xresources/Flat diff --git a/old_work/iterm2colors/Xresources/Flatland b/Xresources/Flatland similarity index 100% rename from old_work/iterm2colors/Xresources/Flatland rename to Xresources/Flatland diff --git a/old_work/iterm2colors/Xresources/Floraverse b/Xresources/Floraverse similarity index 100% rename from old_work/iterm2colors/Xresources/Floraverse rename to Xresources/Floraverse diff --git a/old_work/iterm2colors/Xresources/ForestBlue b/Xresources/ForestBlue similarity index 100% rename from old_work/iterm2colors/Xresources/ForestBlue rename to Xresources/ForestBlue diff --git a/old_work/iterm2colors/Xresources/FrontEndDelight b/Xresources/FrontEndDelight similarity index 100% rename from old_work/iterm2colors/Xresources/FrontEndDelight rename to Xresources/FrontEndDelight diff --git a/old_work/iterm2colors/Xresources/FunForrest b/Xresources/FunForrest similarity index 100% rename from old_work/iterm2colors/Xresources/FunForrest rename to Xresources/FunForrest diff --git a/old_work/iterm2colors/Xresources/Galaxy b/Xresources/Galaxy similarity index 100% rename from old_work/iterm2colors/Xresources/Galaxy rename to Xresources/Galaxy diff --git a/old_work/iterm2colors/Xresources/Github b/Xresources/Github similarity index 100% rename from old_work/iterm2colors/Xresources/Github rename to Xresources/Github diff --git a/old_work/iterm2colors/Xresources/Glacier b/Xresources/Glacier similarity index 100% rename from old_work/iterm2colors/Xresources/Glacier rename to Xresources/Glacier diff --git a/old_work/iterm2colors/Xresources/Grape b/Xresources/Grape similarity index 100% rename from old_work/iterm2colors/Xresources/Grape rename to Xresources/Grape diff --git a/old_work/iterm2colors/Xresources/Grass b/Xresources/Grass similarity index 100% rename from old_work/iterm2colors/Xresources/Grass rename to Xresources/Grass diff --git a/old_work/iterm2colors/Xresources/Gruvbox Dark b/Xresources/Gruvbox Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Gruvbox Dark rename to Xresources/Gruvbox Dark diff --git a/old_work/iterm2colors/Xresources/Hardcore b/Xresources/Hardcore similarity index 100% rename from old_work/iterm2colors/Xresources/Hardcore rename to Xresources/Hardcore diff --git a/old_work/iterm2colors/Xresources/Harper b/Xresources/Harper similarity index 100% rename from old_work/iterm2colors/Xresources/Harper rename to Xresources/Harper diff --git a/old_work/iterm2colors/Xresources/Highway b/Xresources/Highway similarity index 100% rename from old_work/iterm2colors/Xresources/Highway rename to Xresources/Highway diff --git a/old_work/iterm2colors/Xresources/Hipster Green b/Xresources/Hipster Green similarity index 100% rename from old_work/iterm2colors/Xresources/Hipster Green rename to Xresources/Hipster Green diff --git a/old_work/iterm2colors/Xresources/Homebrew b/Xresources/Homebrew similarity index 100% rename from old_work/iterm2colors/Xresources/Homebrew rename to Xresources/Homebrew diff --git a/old_work/iterm2colors/Xresources/Hurtado b/Xresources/Hurtado similarity index 100% rename from old_work/iterm2colors/Xresources/Hurtado rename to Xresources/Hurtado diff --git a/old_work/iterm2colors/Xresources/Hybrid b/Xresources/Hybrid similarity index 100% rename from old_work/iterm2colors/Xresources/Hybrid rename to Xresources/Hybrid diff --git a/old_work/iterm2colors/Xresources/IC_Green_PPL b/Xresources/IC_Green_PPL similarity index 100% rename from old_work/iterm2colors/Xresources/IC_Green_PPL rename to Xresources/IC_Green_PPL diff --git a/old_work/iterm2colors/Xresources/IC_Orange_PPL b/Xresources/IC_Orange_PPL similarity index 100% rename from old_work/iterm2colors/Xresources/IC_Orange_PPL rename to Xresources/IC_Orange_PPL diff --git a/old_work/iterm2colors/Xresources/IR_Black b/Xresources/IR_Black similarity index 100% rename from old_work/iterm2colors/Xresources/IR_Black rename to Xresources/IR_Black diff --git a/old_work/iterm2colors/Xresources/Jackie Brown b/Xresources/Jackie Brown similarity index 100% rename from old_work/iterm2colors/Xresources/Jackie Brown rename to Xresources/Jackie Brown diff --git a/old_work/iterm2colors/Xresources/Japanesque b/Xresources/Japanesque similarity index 100% rename from old_work/iterm2colors/Xresources/Japanesque rename to Xresources/Japanesque diff --git a/old_work/iterm2colors/Xresources/Jellybeans b/Xresources/Jellybeans similarity index 100% rename from old_work/iterm2colors/Xresources/Jellybeans rename to Xresources/Jellybeans diff --git a/old_work/iterm2colors/Xresources/JetBrains Darcula b/Xresources/JetBrains Darcula similarity index 100% rename from old_work/iterm2colors/Xresources/JetBrains Darcula rename to Xresources/JetBrains Darcula diff --git a/old_work/iterm2colors/Xresources/Kibble b/Xresources/Kibble similarity index 100% rename from old_work/iterm2colors/Xresources/Kibble rename to Xresources/Kibble diff --git a/old_work/iterm2colors/Xresources/Later This Evening b/Xresources/Later This Evening similarity index 100% rename from old_work/iterm2colors/Xresources/Later This Evening rename to Xresources/Later This Evening diff --git a/old_work/iterm2colors/Xresources/Lavandula b/Xresources/Lavandula similarity index 100% rename from old_work/iterm2colors/Xresources/Lavandula rename to Xresources/Lavandula diff --git a/old_work/iterm2colors/Xresources/LiquidCarbon b/Xresources/LiquidCarbon similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbon rename to Xresources/LiquidCarbon diff --git a/old_work/iterm2colors/Xresources/LiquidCarbonTransparent b/Xresources/LiquidCarbonTransparent similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbonTransparent rename to Xresources/LiquidCarbonTransparent diff --git a/old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse b/Xresources/LiquidCarbonTransparentInverse similarity index 100% rename from old_work/iterm2colors/Xresources/LiquidCarbonTransparentInverse rename to Xresources/LiquidCarbonTransparentInverse diff --git a/old_work/iterm2colors/Xresources/Man Page b/Xresources/Man Page similarity index 100% rename from old_work/iterm2colors/Xresources/Man Page rename to Xresources/Man Page diff --git a/old_work/iterm2colors/Xresources/Material b/Xresources/Material similarity index 100% rename from old_work/iterm2colors/Xresources/Material rename to Xresources/Material diff --git a/old_work/iterm2colors/Xresources/MaterialDark b/Xresources/MaterialDark similarity index 100% rename from old_work/iterm2colors/Xresources/MaterialDark rename to Xresources/MaterialDark diff --git a/old_work/iterm2colors/Xresources/Mathias b/Xresources/Mathias similarity index 100% rename from old_work/iterm2colors/Xresources/Mathias rename to Xresources/Mathias diff --git a/old_work/iterm2colors/Xresources/Medallion b/Xresources/Medallion similarity index 100% rename from old_work/iterm2colors/Xresources/Medallion rename to Xresources/Medallion diff --git a/old_work/iterm2colors/Xresources/Misterioso b/Xresources/Misterioso similarity index 100% rename from old_work/iterm2colors/Xresources/Misterioso rename to Xresources/Misterioso diff --git a/old_work/iterm2colors/Xresources/Molokai b/Xresources/Molokai similarity index 100% rename from old_work/iterm2colors/Xresources/Molokai rename to Xresources/Molokai diff --git a/old_work/iterm2colors/Xresources/MonaLisa b/Xresources/MonaLisa similarity index 100% rename from old_work/iterm2colors/Xresources/MonaLisa rename to Xresources/MonaLisa diff --git a/old_work/iterm2colors/Xresources/Monokai Soda b/Xresources/Monokai Soda similarity index 100% rename from old_work/iterm2colors/Xresources/Monokai Soda rename to Xresources/Monokai Soda diff --git a/old_work/iterm2colors/Xresources/Monokai Vivid b/Xresources/Monokai Vivid similarity index 100% rename from old_work/iterm2colors/Xresources/Monokai Vivid rename to Xresources/Monokai Vivid diff --git a/old_work/iterm2colors/Xresources/N0tch2k b/Xresources/N0tch2k similarity index 100% rename from old_work/iterm2colors/Xresources/N0tch2k rename to Xresources/N0tch2k diff --git a/old_work/iterm2colors/Xresources/Neopolitan b/Xresources/Neopolitan similarity index 100% rename from old_work/iterm2colors/Xresources/Neopolitan rename to Xresources/Neopolitan diff --git a/old_work/iterm2colors/Xresources/Neutron b/Xresources/Neutron similarity index 100% rename from old_work/iterm2colors/Xresources/Neutron rename to Xresources/Neutron diff --git a/old_work/iterm2colors/Xresources/NightLion v1 b/Xresources/NightLion v1 similarity index 100% rename from old_work/iterm2colors/Xresources/NightLion v1 rename to Xresources/NightLion v1 diff --git a/old_work/iterm2colors/Xresources/NightLion v2 b/Xresources/NightLion v2 similarity index 100% rename from old_work/iterm2colors/Xresources/NightLion v2 rename to Xresources/NightLion v2 diff --git a/old_work/iterm2colors/Xresources/Novel b/Xresources/Novel similarity index 100% rename from old_work/iterm2colors/Xresources/Novel rename to Xresources/Novel diff --git a/old_work/iterm2colors/Xresources/Obsidian b/Xresources/Obsidian similarity index 100% rename from old_work/iterm2colors/Xresources/Obsidian rename to Xresources/Obsidian diff --git a/old_work/iterm2colors/Xresources/Ocean b/Xresources/Ocean similarity index 100% rename from old_work/iterm2colors/Xresources/Ocean rename to Xresources/Ocean diff --git a/old_work/iterm2colors/Xresources/OceanicMaterial b/Xresources/OceanicMaterial similarity index 100% rename from old_work/iterm2colors/Xresources/OceanicMaterial rename to Xresources/OceanicMaterial diff --git a/old_work/iterm2colors/Xresources/Ollie b/Xresources/Ollie similarity index 100% rename from old_work/iterm2colors/Xresources/Ollie rename to Xresources/Ollie diff --git a/old_work/iterm2colors/Xresources/OneHalfDark b/Xresources/OneHalfDark similarity index 100% rename from old_work/iterm2colors/Xresources/OneHalfDark rename to Xresources/OneHalfDark diff --git a/old_work/iterm2colors/Xresources/OneHalfLight b/Xresources/OneHalfLight similarity index 100% rename from old_work/iterm2colors/Xresources/OneHalfLight rename to Xresources/OneHalfLight diff --git a/old_work/iterm2colors/Xresources/Pandora b/Xresources/Pandora similarity index 100% rename from old_work/iterm2colors/Xresources/Pandora rename to Xresources/Pandora diff --git a/old_work/iterm2colors/Xresources/Paraiso Dark b/Xresources/Paraiso Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Paraiso Dark rename to Xresources/Paraiso Dark diff --git a/old_work/iterm2colors/Xresources/Parasio Dark b/Xresources/Parasio Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Parasio Dark rename to Xresources/Parasio Dark diff --git a/old_work/iterm2colors/Xresources/PaulMillr b/Xresources/PaulMillr similarity index 100% rename from old_work/iterm2colors/Xresources/PaulMillr rename to Xresources/PaulMillr diff --git a/old_work/iterm2colors/Xresources/PencilDark b/Xresources/PencilDark similarity index 100% rename from old_work/iterm2colors/Xresources/PencilDark rename to Xresources/PencilDark diff --git a/old_work/iterm2colors/Xresources/PencilLight b/Xresources/PencilLight similarity index 100% rename from old_work/iterm2colors/Xresources/PencilLight rename to Xresources/PencilLight diff --git a/old_work/iterm2colors/Xresources/Piatto Light b/Xresources/Piatto Light similarity index 100% rename from old_work/iterm2colors/Xresources/Piatto Light rename to Xresources/Piatto Light diff --git a/old_work/iterm2colors/Xresources/Pnevma b/Xresources/Pnevma similarity index 100% rename from old_work/iterm2colors/Xresources/Pnevma rename to Xresources/Pnevma diff --git a/old_work/iterm2colors/Xresources/Pro b/Xresources/Pro similarity index 100% rename from old_work/iterm2colors/Xresources/Pro rename to Xresources/Pro diff --git a/old_work/iterm2colors/Xresources/Red Alert b/Xresources/Red Alert similarity index 100% rename from old_work/iterm2colors/Xresources/Red Alert rename to Xresources/Red Alert diff --git a/old_work/iterm2colors/Xresources/Red Sands b/Xresources/Red Sands similarity index 100% rename from old_work/iterm2colors/Xresources/Red Sands rename to Xresources/Red Sands diff --git a/old_work/iterm2colors/Xresources/Rippedcasts b/Xresources/Rippedcasts similarity index 100% rename from old_work/iterm2colors/Xresources/Rippedcasts rename to Xresources/Rippedcasts diff --git a/old_work/iterm2colors/Xresources/Royal b/Xresources/Royal similarity index 100% rename from old_work/iterm2colors/Xresources/Royal rename to Xresources/Royal diff --git a/old_work/iterm2colors/Xresources/Ryuuko b/Xresources/Ryuuko similarity index 100% rename from old_work/iterm2colors/Xresources/Ryuuko rename to Xresources/Ryuuko diff --git a/old_work/iterm2colors/Xresources/SeaShells b/Xresources/SeaShells similarity index 100% rename from old_work/iterm2colors/Xresources/SeaShells rename to Xresources/SeaShells diff --git a/old_work/iterm2colors/Xresources/Seafoam Pastel b/Xresources/Seafoam Pastel similarity index 100% rename from old_work/iterm2colors/Xresources/Seafoam Pastel rename to Xresources/Seafoam Pastel diff --git a/old_work/iterm2colors/Xresources/Seti b/Xresources/Seti similarity index 100% rename from old_work/iterm2colors/Xresources/Seti rename to Xresources/Seti diff --git a/old_work/iterm2colors/Xresources/Shaman b/Xresources/Shaman similarity index 100% rename from old_work/iterm2colors/Xresources/Shaman rename to Xresources/Shaman diff --git a/old_work/iterm2colors/Xresources/Slate b/Xresources/Slate similarity index 100% rename from old_work/iterm2colors/Xresources/Slate rename to Xresources/Slate diff --git a/old_work/iterm2colors/Xresources/Smyck b/Xresources/Smyck similarity index 100% rename from old_work/iterm2colors/Xresources/Smyck rename to Xresources/Smyck diff --git a/old_work/iterm2colors/Xresources/SoftServer b/Xresources/SoftServer similarity index 100% rename from old_work/iterm2colors/Xresources/SoftServer rename to Xresources/SoftServer diff --git a/old_work/iterm2colors/Xresources/Solarized Darcula b/Xresources/Solarized Darcula similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Darcula rename to Xresources/Solarized Darcula diff --git a/old_work/iterm2colors/Xresources/Solarized Dark b/Xresources/Solarized Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark rename to Xresources/Solarized Dark diff --git a/old_work/iterm2colors/Xresources/Solarized Dark - Patched b/Xresources/Solarized Dark - Patched similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark - Patched rename to Xresources/Solarized Dark - Patched diff --git a/old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast b/Xresources/Solarized Dark Higher Contrast similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Dark Higher Contrast rename to Xresources/Solarized Dark Higher Contrast diff --git a/old_work/iterm2colors/Xresources/Solarized Light b/Xresources/Solarized Light similarity index 100% rename from old_work/iterm2colors/Xresources/Solarized Light rename to Xresources/Solarized Light diff --git a/old_work/iterm2colors/Xresources/SpaceGray b/Xresources/SpaceGray similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray rename to Xresources/SpaceGray diff --git a/old_work/iterm2colors/Xresources/SpaceGray Eighties b/Xresources/SpaceGray Eighties similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray Eighties rename to Xresources/SpaceGray Eighties diff --git a/old_work/iterm2colors/Xresources/SpaceGray Eighties Dull b/Xresources/SpaceGray Eighties Dull similarity index 100% rename from old_work/iterm2colors/Xresources/SpaceGray Eighties Dull rename to Xresources/SpaceGray Eighties Dull diff --git a/old_work/iterm2colors/Xresources/Spacedust b/Xresources/Spacedust similarity index 100% rename from old_work/iterm2colors/Xresources/Spacedust rename to Xresources/Spacedust diff --git a/old_work/iterm2colors/Xresources/Spiderman b/Xresources/Spiderman similarity index 100% rename from old_work/iterm2colors/Xresources/Spiderman rename to Xresources/Spiderman diff --git a/old_work/iterm2colors/Xresources/Spring b/Xresources/Spring similarity index 100% rename from old_work/iterm2colors/Xresources/Spring rename to Xresources/Spring diff --git a/old_work/iterm2colors/Xresources/Square b/Xresources/Square similarity index 100% rename from old_work/iterm2colors/Xresources/Square rename to Xresources/Square diff --git a/old_work/iterm2colors/Xresources/Sundried b/Xresources/Sundried similarity index 100% rename from old_work/iterm2colors/Xresources/Sundried rename to Xresources/Sundried diff --git a/old_work/iterm2colors/Xresources/Symfonic b/Xresources/Symfonic similarity index 100% rename from old_work/iterm2colors/Xresources/Symfonic rename to Xresources/Symfonic diff --git a/old_work/iterm2colors/Xresources/Teerb b/Xresources/Teerb similarity index 100% rename from old_work/iterm2colors/Xresources/Teerb rename to Xresources/Teerb diff --git a/old_work/iterm2colors/Xresources/Terminal Basic b/Xresources/Terminal Basic similarity index 100% rename from old_work/iterm2colors/Xresources/Terminal Basic rename to Xresources/Terminal Basic diff --git a/old_work/iterm2colors/Xresources/Thayer Bright b/Xresources/Thayer Bright similarity index 100% rename from old_work/iterm2colors/Xresources/Thayer Bright rename to Xresources/Thayer Bright diff --git a/old_work/iterm2colors/Xresources/The Hulk b/Xresources/The Hulk similarity index 100% rename from old_work/iterm2colors/Xresources/The Hulk rename to Xresources/The Hulk diff --git a/old_work/iterm2colors/Xresources/Tomorrow b/Xresources/Tomorrow similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow rename to Xresources/Tomorrow diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night b/Xresources/Tomorrow Night similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night rename to Xresources/Tomorrow Night diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Blue b/Xresources/Tomorrow Night Blue similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Blue rename to Xresources/Tomorrow Night Blue diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Bright b/Xresources/Tomorrow Night Bright similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Bright rename to Xresources/Tomorrow Night Bright diff --git a/old_work/iterm2colors/Xresources/Tomorrow Night Eighties b/Xresources/Tomorrow Night Eighties similarity index 100% rename from old_work/iterm2colors/Xresources/Tomorrow Night Eighties rename to Xresources/Tomorrow Night Eighties diff --git a/old_work/iterm2colors/Xresources/ToyChest b/Xresources/ToyChest similarity index 100% rename from old_work/iterm2colors/Xresources/ToyChest rename to Xresources/ToyChest diff --git a/old_work/iterm2colors/Xresources/Treehouse b/Xresources/Treehouse similarity index 100% rename from old_work/iterm2colors/Xresources/Treehouse rename to Xresources/Treehouse diff --git a/old_work/iterm2colors/Xresources/Twilight b/Xresources/Twilight similarity index 100% rename from old_work/iterm2colors/Xresources/Twilight rename to Xresources/Twilight diff --git a/old_work/iterm2colors/Xresources/Ubuntu b/Xresources/Ubuntu similarity index 100% rename from old_work/iterm2colors/Xresources/Ubuntu rename to Xresources/Ubuntu diff --git a/old_work/iterm2colors/Xresources/UnderTheSea b/Xresources/UnderTheSea similarity index 100% rename from old_work/iterm2colors/Xresources/UnderTheSea rename to Xresources/UnderTheSea diff --git a/old_work/iterm2colors/Xresources/Urple b/Xresources/Urple similarity index 100% rename from old_work/iterm2colors/Xresources/Urple rename to Xresources/Urple diff --git a/old_work/iterm2colors/Xresources/Vaughn b/Xresources/Vaughn similarity index 100% rename from old_work/iterm2colors/Xresources/Vaughn rename to Xresources/Vaughn diff --git a/old_work/iterm2colors/Xresources/VibrantInk b/Xresources/VibrantInk similarity index 100% rename from old_work/iterm2colors/Xresources/VibrantInk rename to Xresources/VibrantInk diff --git a/old_work/iterm2colors/Xresources/Violet Dark b/Xresources/Violet Dark similarity index 100% rename from old_work/iterm2colors/Xresources/Violet Dark rename to Xresources/Violet Dark diff --git a/old_work/iterm2colors/Xresources/Violet Light b/Xresources/Violet Light similarity index 100% rename from old_work/iterm2colors/Xresources/Violet Light rename to Xresources/Violet Light diff --git a/old_work/iterm2colors/Xresources/WarmNeon b/Xresources/WarmNeon similarity index 100% rename from old_work/iterm2colors/Xresources/WarmNeon rename to Xresources/WarmNeon diff --git a/old_work/iterm2colors/Xresources/Wez b/Xresources/Wez similarity index 100% rename from old_work/iterm2colors/Xresources/Wez rename to Xresources/Wez diff --git a/old_work/iterm2colors/Xresources/WildCherry b/Xresources/WildCherry similarity index 100% rename from old_work/iterm2colors/Xresources/WildCherry rename to Xresources/WildCherry diff --git a/old_work/iterm2colors/Xresources/Wombat b/Xresources/Wombat similarity index 100% rename from old_work/iterm2colors/Xresources/Wombat rename to Xresources/Wombat diff --git a/old_work/iterm2colors/Xresources/Wryan b/Xresources/Wryan similarity index 100% rename from old_work/iterm2colors/Xresources/Wryan rename to Xresources/Wryan diff --git a/old_work/iterm2colors/Xresources/Zenburn b/Xresources/Zenburn similarity index 100% rename from old_work/iterm2colors/Xresources/Zenburn rename to Xresources/Zenburn diff --git a/old_work/iterm2colors/Xresources/ayu b/Xresources/ayu similarity index 100% rename from old_work/iterm2colors/Xresources/ayu rename to Xresources/ayu diff --git a/old_work/iterm2colors/Xresources/ayu_light b/Xresources/ayu_light similarity index 100% rename from old_work/iterm2colors/Xresources/ayu_light rename to Xresources/ayu_light diff --git a/old_work/iterm2colors/Xresources/deep b/Xresources/deep similarity index 100% rename from old_work/iterm2colors/Xresources/deep rename to Xresources/deep diff --git a/old_work/iterm2colors/Xresources/idleToes b/Xresources/idleToes similarity index 100% rename from old_work/iterm2colors/Xresources/idleToes rename to Xresources/idleToes diff --git a/arg.h b/arg.h deleted file mode 100644 index a22e019..0000000 --- a/arg.h +++ /dev/null @@ -1,50 +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;\ - }\ - int i_;\ - for (i_ = 1, brk_ = 0, argv_ = argv;\ - argv[0][i_] && !brk_;\ - i_++) {\ - if (argv_ != argv)\ - break;\ - argc_ = argv[0][i_];\ - switch (argc_) - -#define ARGEND }\ - } - -#define ARGC() argc_ - -#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ - ((x), abort(), (char *)0) :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ - (argc--, argv++, argv[0]))) - -#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ - (char *)0 :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ - (argc--, argv++, argv[0]))) - -#endif diff --git a/old_work/iterm2colors/backgrounds/solarized_darcula.jpg b/backgrounds/solarized_darcula.jpg similarity index 100% rename from old_work/iterm2colors/backgrounds/solarized_darcula.jpg rename to backgrounds/solarized_darcula.jpg 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 deleted file mode 100644 index 82df958..0000000 --- a/config.def.h +++ /dev/null @@ -1,501 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; -static int borderpx = 2; - -/* - * What program is execed by st depends of these precedence rules: - * 1: program passed with -e - * 2: scroll and/or utmp - * 3: SHELL environment variable - * 4: value of shell in /etc/passwd - * 5: value of shell in config.h - */ -static char *shell = "/bin/zsh"; -char *utmp = NULL; -/* scroll program: to enable use a string like "scroll" */ -char *scroll = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -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: L" `'\"()[]{}" - */ -//wchar_t *worddelimiters = L" "; -wchar_t *worddelimiters = L" `'\"()[]{}"; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -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; - -/* - * 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; - -/* - * 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 - */ -static int bellvolume = 0; - -/* default TERM value */ -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 - */ -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 */ - "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", - "black", -}; - - -/* - * 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; - -/* - * 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 cursorstyle = 1; -static Rune stcursor = 0x2603; /* snowman (U+2603) */ - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default shape of the mouse cursor - */ - -static char* mouseshape = "xterm"; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forcemousemod = ShiftMask; - -/* - * Internal mouse shortcuts. - * Beware that overloading Button1 will disable the selection. - */ -static MouseShortcut mshortcuts[] = { - /* mask button function argument release */ - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, -}; - -/* Internal keyboard shortcuts. */ -#define MODKEY Mod1Mask -#define TERMMOD (ControlMask|ShiftMask) - -static Shortcut shortcuts[] = { - /* mask keysym function argument */ - { 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} }, - { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { TERMMOD, XK_Num_Lock, numlock, {.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 - * - * 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; - -/* - * 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}, -}; - -/* - * Selection types' masks. - * Use the same masks as usual. - * Button1Mask is always unset, to make masks match between ButtonPress. - * ButtonRelease and MotionNotify. - * If no match is found, regular selection is used. - */ -static uint selmasks[] = { - [SEL_RECTANGULAR] = Mod1Mask, -}; - -/* - * Printable characters in ASCII, used to estimate the advance width - * of single wide characters. - */ -static char ascii_printable[] = - " !\"#$%&'()*+,-./0123456789:;<=>?" - "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - "`abcdefghijklmnopqrstuvwxyz{|}~"; diff --git a/config.h b/config.h deleted file mode 100644 index 68aaf22..0000000 --- a/config.h +++ /dev/null @@ -1,502 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "Monofur Nerd Font:pixelsize=18:antialias=true:autohint=true"; -static int borderpx = 2; - -/* - * What program is execed by st depends of these precedence rules: - * 1: program passed with -e - * 2: scroll and/or utmp - * 3: SHELL environment variable - * 4: value of shell in /etc/passwd - * 5: value of shell in config.h - */ -static char *shell = "/bin/zsh"; -char *utmp = NULL; -/* scroll program: to enable use a string like "scroll" */ -char *scroll = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -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: L" `'\"()[]{}" - */ -//wchar_t *worddelimiters = L" "; -wchar_t *worddelimiters = L" `'\"()[]{}"; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -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; - -/* - * 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; - -/* - * 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 - */ -static int bellvolume = 0; - -/* default TERM value */ -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 - */ -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 */ - "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", - "#F0F0A0", - "black", -}; - - -/* - * 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; - -/* - * 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 cursorstyle = 1; -static Rune stcursor = 0x2603; /* snowman (U+2603) */ - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default shape of the mouse cursor - */ - -static char* mouseshape = "xterm"; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). - * Note that if you want to use ShiftMask with selmasks, set this to an other - * modifier, set to 0 to not use it. - */ -static uint forcemousemod = ShiftMask; - -/* - * Internal mouse shortcuts. - * Beware that overloading Button1 will disable the selection. - */ -static MouseShortcut mshortcuts[] = { - /* mask button function argument release */ - { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, - { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, - { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, - { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, - { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, -}; - -/* Internal keyboard shortcuts. */ -#define MODKEY Mod1Mask -#define TERMMOD (ControlMask|ShiftMask) - -static Shortcut shortcuts[] = { - /* mask keysym function argument */ - { 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} }, - { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { TERMMOD, XK_Num_Lock, numlock, {.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 - * - * 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; - -/* - * 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}, -}; - -/* - * Selection types' masks. - * Use the same masks as usual. - * Button1Mask is always unset, to make masks match between ButtonPress. - * ButtonRelease and MotionNotify. - * If no match is found, regular selection is used. - */ -static uint selmasks[] = { - [SEL_RECTANGULAR] = Mod1Mask, -}; - -/* - * Printable characters in ASCII, used to estimate the advance width - * of single wide characters. - */ -static char ascii_printable[] = - " !\"#$%&'()*+,-./0123456789:;<=>?" - "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - "`abcdefghijklmnopqrstuvwxyz{|}~"; diff --git a/config.mk b/config.mk deleted file mode 100644 index 8e87e12..0000000 --- a/config.mk +++ /dev/null @@ -1,35 +0,0 @@ -# st version -VERSION = 0.8.4 - -# Customize below to fit your system - -# paths -PREFIX = /usr/local -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` - -# 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` - -# compiler and linker -# CC = c99 diff --git a/old_work/iterm2colors/konsole/3024 Day.colorscheme b/konsole/3024 Day.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/3024 Day.colorscheme rename to konsole/3024 Day.colorscheme diff --git a/old_work/iterm2colors/konsole/3024 Night.colorscheme b/konsole/3024 Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/3024 Night.colorscheme rename to konsole/3024 Night.colorscheme diff --git a/old_work/iterm2colors/konsole/AdventureTime.colorscheme b/konsole/AdventureTime.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AdventureTime.colorscheme rename to konsole/AdventureTime.colorscheme diff --git a/old_work/iterm2colors/konsole/Afterglow.colorscheme b/konsole/Afterglow.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Afterglow.colorscheme rename to konsole/Afterglow.colorscheme diff --git a/old_work/iterm2colors/konsole/AlienBlood.colorscheme b/konsole/AlienBlood.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AlienBlood.colorscheme rename to konsole/AlienBlood.colorscheme diff --git a/old_work/iterm2colors/konsole/Argonaut.colorscheme b/konsole/Argonaut.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Argonaut.colorscheme rename to konsole/Argonaut.colorscheme diff --git a/old_work/iterm2colors/konsole/Arthur.colorscheme b/konsole/Arthur.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Arthur.colorscheme rename to konsole/Arthur.colorscheme diff --git a/old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme b/konsole/AtelierSulphurpool.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AtelierSulphurpool.colorscheme rename to konsole/AtelierSulphurpool.colorscheme diff --git a/old_work/iterm2colors/konsole/Atom.colorscheme b/konsole/Atom.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Atom.colorscheme rename to konsole/Atom.colorscheme diff --git a/old_work/iterm2colors/konsole/AtomOneLight.colorscheme b/konsole/AtomOneLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/AtomOneLight.colorscheme rename to konsole/AtomOneLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Batman.colorscheme b/konsole/Batman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Batman.colorscheme rename to konsole/Batman.colorscheme diff --git a/old_work/iterm2colors/konsole/Belafonte Day.colorscheme b/konsole/Belafonte Day.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Belafonte Day.colorscheme rename to konsole/Belafonte Day.colorscheme diff --git a/old_work/iterm2colors/konsole/Belafonte Night.colorscheme b/konsole/Belafonte Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Belafonte Night.colorscheme rename to konsole/Belafonte Night.colorscheme diff --git a/old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme b/konsole/BirdsOfParadise.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/BirdsOfParadise.colorscheme rename to konsole/BirdsOfParadise.colorscheme diff --git a/old_work/iterm2colors/konsole/Blazer.colorscheme b/konsole/Blazer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Blazer.colorscheme rename to konsole/Blazer.colorscheme diff --git a/old_work/iterm2colors/konsole/Borland.colorscheme b/konsole/Borland.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Borland.colorscheme rename to konsole/Borland.colorscheme diff --git a/old_work/iterm2colors/konsole/Bright Lights.colorscheme b/konsole/Bright Lights.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Bright Lights.colorscheme rename to konsole/Bright Lights.colorscheme diff --git a/old_work/iterm2colors/konsole/Broadcast.colorscheme b/konsole/Broadcast.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Broadcast.colorscheme rename to konsole/Broadcast.colorscheme diff --git a/old_work/iterm2colors/konsole/Brogrammer.colorscheme b/konsole/Brogrammer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Brogrammer.colorscheme rename to konsole/Brogrammer.colorscheme diff --git a/old_work/iterm2colors/konsole/C64.colorscheme b/konsole/C64.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/C64.colorscheme rename to konsole/C64.colorscheme diff --git a/old_work/iterm2colors/konsole/CLRS.colorscheme b/konsole/CLRS.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/CLRS.colorscheme rename to konsole/CLRS.colorscheme diff --git a/old_work/iterm2colors/konsole/Chalk.colorscheme b/konsole/Chalk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Chalk.colorscheme rename to konsole/Chalk.colorscheme diff --git a/old_work/iterm2colors/konsole/Chalkboard.colorscheme b/konsole/Chalkboard.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Chalkboard.colorscheme rename to konsole/Chalkboard.colorscheme diff --git a/old_work/iterm2colors/konsole/Ciapre.colorscheme b/konsole/Ciapre.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ciapre.colorscheme rename to konsole/Ciapre.colorscheme diff --git a/old_work/iterm2colors/konsole/Cobalt Neon.colorscheme b/konsole/Cobalt Neon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Cobalt Neon.colorscheme rename to konsole/Cobalt Neon.colorscheme diff --git a/old_work/iterm2colors/konsole/Cobalt2.colorscheme b/konsole/Cobalt2.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Cobalt2.colorscheme rename to konsole/Cobalt2.colorscheme diff --git a/old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme b/konsole/CrayonPonyFish.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/CrayonPonyFish.colorscheme rename to konsole/CrayonPonyFish.colorscheme diff --git a/old_work/iterm2colors/konsole/Dark Pastel.colorscheme b/konsole/Dark Pastel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Dark Pastel.colorscheme rename to konsole/Dark Pastel.colorscheme diff --git a/old_work/iterm2colors/konsole/Darkside.colorscheme b/konsole/Darkside.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Darkside.colorscheme rename to konsole/Darkside.colorscheme diff --git a/old_work/iterm2colors/konsole/Desert.colorscheme b/konsole/Desert.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Desert.colorscheme rename to konsole/Desert.colorscheme diff --git a/old_work/iterm2colors/konsole/DimmedMonokai.colorscheme b/konsole/DimmedMonokai.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/DimmedMonokai.colorscheme rename to konsole/DimmedMonokai.colorscheme diff --git a/old_work/iterm2colors/konsole/DotGov.colorscheme b/konsole/DotGov.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/DotGov.colorscheme rename to konsole/DotGov.colorscheme diff --git a/old_work/iterm2colors/konsole/Dracula.colorscheme b/konsole/Dracula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Dracula.colorscheme rename to konsole/Dracula.colorscheme diff --git a/old_work/iterm2colors/konsole/Duotone Dark.colorscheme b/konsole/Duotone Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Duotone Dark.colorscheme rename to konsole/Duotone Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/ENCOM.colorscheme b/konsole/ENCOM.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ENCOM.colorscheme rename to konsole/ENCOM.colorscheme diff --git a/old_work/iterm2colors/konsole/Earthsong.colorscheme b/konsole/Earthsong.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Earthsong.colorscheme rename to konsole/Earthsong.colorscheme diff --git a/old_work/iterm2colors/konsole/Elemental.colorscheme b/konsole/Elemental.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Elemental.colorscheme rename to konsole/Elemental.colorscheme diff --git a/old_work/iterm2colors/konsole/Elementary.colorscheme b/konsole/Elementary.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Elementary.colorscheme rename to konsole/Elementary.colorscheme diff --git a/old_work/iterm2colors/konsole/Espresso Libre.colorscheme b/konsole/Espresso Libre.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Espresso Libre.colorscheme rename to konsole/Espresso Libre.colorscheme diff --git a/old_work/iterm2colors/konsole/Espresso.colorscheme b/konsole/Espresso.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Espresso.colorscheme rename to konsole/Espresso.colorscheme diff --git a/old_work/iterm2colors/konsole/Fideloper.colorscheme b/konsole/Fideloper.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Fideloper.colorscheme rename to konsole/Fideloper.colorscheme diff --git a/old_work/iterm2colors/konsole/FirefoxDev.colorscheme b/konsole/FirefoxDev.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FirefoxDev.colorscheme rename to konsole/FirefoxDev.colorscheme diff --git a/old_work/iterm2colors/konsole/Firewatch.colorscheme b/konsole/Firewatch.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Firewatch.colorscheme rename to konsole/Firewatch.colorscheme diff --git a/old_work/iterm2colors/konsole/FishTank.colorscheme b/konsole/FishTank.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FishTank.colorscheme rename to konsole/FishTank.colorscheme diff --git a/old_work/iterm2colors/konsole/Flat.colorscheme b/konsole/Flat.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Flat.colorscheme rename to konsole/Flat.colorscheme diff --git a/old_work/iterm2colors/konsole/Flatland.colorscheme b/konsole/Flatland.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Flatland.colorscheme rename to konsole/Flatland.colorscheme diff --git a/old_work/iterm2colors/konsole/Floraverse.colorscheme b/konsole/Floraverse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Floraverse.colorscheme rename to konsole/Floraverse.colorscheme diff --git a/old_work/iterm2colors/konsole/ForestBlue.colorscheme b/konsole/ForestBlue.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ForestBlue.colorscheme rename to konsole/ForestBlue.colorscheme diff --git a/old_work/iterm2colors/konsole/FrontEndDelight.colorscheme b/konsole/FrontEndDelight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FrontEndDelight.colorscheme rename to konsole/FrontEndDelight.colorscheme diff --git a/old_work/iterm2colors/konsole/FunForrest.colorscheme b/konsole/FunForrest.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/FunForrest.colorscheme rename to konsole/FunForrest.colorscheme diff --git a/old_work/iterm2colors/konsole/Galaxy.colorscheme b/konsole/Galaxy.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Galaxy.colorscheme rename to konsole/Galaxy.colorscheme diff --git a/old_work/iterm2colors/konsole/Github.colorscheme b/konsole/Github.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Github.colorscheme rename to konsole/Github.colorscheme diff --git a/old_work/iterm2colors/konsole/Glacier.colorscheme b/konsole/Glacier.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Glacier.colorscheme rename to konsole/Glacier.colorscheme diff --git a/old_work/iterm2colors/konsole/Grape.colorscheme b/konsole/Grape.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Grape.colorscheme rename to konsole/Grape.colorscheme diff --git a/old_work/iterm2colors/konsole/Grass.colorscheme b/konsole/Grass.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Grass.colorscheme rename to konsole/Grass.colorscheme diff --git a/old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme b/konsole/Gruvbox Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Gruvbox Dark.colorscheme rename to konsole/Gruvbox Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Hardcore.colorscheme b/konsole/Hardcore.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hardcore.colorscheme rename to konsole/Hardcore.colorscheme diff --git a/old_work/iterm2colors/konsole/Harper.colorscheme b/konsole/Harper.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Harper.colorscheme rename to konsole/Harper.colorscheme diff --git a/old_work/iterm2colors/konsole/Highway.colorscheme b/konsole/Highway.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Highway.colorscheme rename to konsole/Highway.colorscheme diff --git a/old_work/iterm2colors/konsole/Hipster Green.colorscheme b/konsole/Hipster Green.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hipster Green.colorscheme rename to konsole/Hipster Green.colorscheme diff --git a/old_work/iterm2colors/konsole/Homebrew.colorscheme b/konsole/Homebrew.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Homebrew.colorscheme rename to konsole/Homebrew.colorscheme diff --git a/old_work/iterm2colors/konsole/Hurtado.colorscheme b/konsole/Hurtado.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hurtado.colorscheme rename to konsole/Hurtado.colorscheme diff --git a/old_work/iterm2colors/konsole/Hybrid.colorscheme b/konsole/Hybrid.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Hybrid.colorscheme rename to konsole/Hybrid.colorscheme diff --git a/old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme b/konsole/IC_Green_PPL.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IC_Green_PPL.colorscheme rename to konsole/IC_Green_PPL.colorscheme diff --git a/old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme b/konsole/IC_Orange_PPL.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IC_Orange_PPL.colorscheme rename to konsole/IC_Orange_PPL.colorscheme diff --git a/old_work/iterm2colors/konsole/IR_Black.colorscheme b/konsole/IR_Black.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/IR_Black.colorscheme rename to konsole/IR_Black.colorscheme diff --git a/old_work/iterm2colors/konsole/Jackie Brown.colorscheme b/konsole/Jackie Brown.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Jackie Brown.colorscheme rename to konsole/Jackie Brown.colorscheme diff --git a/old_work/iterm2colors/konsole/Japanesque.colorscheme b/konsole/Japanesque.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Japanesque.colorscheme rename to konsole/Japanesque.colorscheme diff --git a/old_work/iterm2colors/konsole/Jellybeans.colorscheme b/konsole/Jellybeans.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Jellybeans.colorscheme rename to konsole/Jellybeans.colorscheme diff --git a/old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme b/konsole/JetBrains Darcula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/JetBrains Darcula.colorscheme rename to konsole/JetBrains Darcula.colorscheme diff --git a/old_work/iterm2colors/konsole/Kibble.colorscheme b/konsole/Kibble.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Kibble.colorscheme rename to konsole/Kibble.colorscheme diff --git a/old_work/iterm2colors/konsole/Later This Evening.colorscheme b/konsole/Later This Evening.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Later This Evening.colorscheme rename to konsole/Later This Evening.colorscheme diff --git a/old_work/iterm2colors/konsole/Lavandula.colorscheme b/konsole/Lavandula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Lavandula.colorscheme rename to konsole/Lavandula.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbon.colorscheme b/konsole/LiquidCarbon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbon.colorscheme rename to konsole/LiquidCarbon.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme b/konsole/LiquidCarbonTransparent.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbonTransparent.colorscheme rename to konsole/LiquidCarbonTransparent.colorscheme diff --git a/old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme b/konsole/LiquidCarbonTransparentInverse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/LiquidCarbonTransparentInverse.colorscheme rename to konsole/LiquidCarbonTransparentInverse.colorscheme diff --git a/old_work/iterm2colors/konsole/Man Page.colorscheme b/konsole/Man Page.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Man Page.colorscheme rename to konsole/Man Page.colorscheme diff --git a/old_work/iterm2colors/konsole/Material.colorscheme b/konsole/Material.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Material.colorscheme rename to konsole/Material.colorscheme diff --git a/old_work/iterm2colors/konsole/MaterialDark.colorscheme b/konsole/MaterialDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/MaterialDark.colorscheme rename to konsole/MaterialDark.colorscheme diff --git a/old_work/iterm2colors/konsole/Mathias.colorscheme b/konsole/Mathias.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Mathias.colorscheme rename to konsole/Mathias.colorscheme diff --git a/old_work/iterm2colors/konsole/Medallion.colorscheme b/konsole/Medallion.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Medallion.colorscheme rename to konsole/Medallion.colorscheme diff --git a/old_work/iterm2colors/konsole/Misterioso.colorscheme b/konsole/Misterioso.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Misterioso.colorscheme rename to konsole/Misterioso.colorscheme diff --git a/old_work/iterm2colors/konsole/Molokai.colorscheme b/konsole/Molokai.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Molokai.colorscheme rename to konsole/Molokai.colorscheme diff --git a/old_work/iterm2colors/konsole/MonaLisa.colorscheme b/konsole/MonaLisa.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/MonaLisa.colorscheme rename to konsole/MonaLisa.colorscheme diff --git a/old_work/iterm2colors/konsole/Monokai Soda.colorscheme b/konsole/Monokai Soda.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Monokai Soda.colorscheme rename to konsole/Monokai Soda.colorscheme diff --git a/old_work/iterm2colors/konsole/Monokai Vivid.colorscheme b/konsole/Monokai Vivid.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Monokai Vivid.colorscheme rename to konsole/Monokai Vivid.colorscheme diff --git a/old_work/iterm2colors/konsole/N0tch2k.colorscheme b/konsole/N0tch2k.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/N0tch2k.colorscheme rename to konsole/N0tch2k.colorscheme diff --git a/old_work/iterm2colors/konsole/Neopolitan.colorscheme b/konsole/Neopolitan.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Neopolitan.colorscheme rename to konsole/Neopolitan.colorscheme diff --git a/old_work/iterm2colors/konsole/Neutron.colorscheme b/konsole/Neutron.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Neutron.colorscheme rename to konsole/Neutron.colorscheme diff --git a/old_work/iterm2colors/konsole/NightLion v1.colorscheme b/konsole/NightLion v1.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/NightLion v1.colorscheme rename to konsole/NightLion v1.colorscheme diff --git a/old_work/iterm2colors/konsole/NightLion v2.colorscheme b/konsole/NightLion v2.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/NightLion v2.colorscheme rename to konsole/NightLion v2.colorscheme diff --git a/old_work/iterm2colors/konsole/Novel.colorscheme b/konsole/Novel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Novel.colorscheme rename to konsole/Novel.colorscheme diff --git a/old_work/iterm2colors/konsole/Obsidian.colorscheme b/konsole/Obsidian.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Obsidian.colorscheme rename to konsole/Obsidian.colorscheme diff --git a/old_work/iterm2colors/konsole/Ocean.colorscheme b/konsole/Ocean.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ocean.colorscheme rename to konsole/Ocean.colorscheme diff --git a/old_work/iterm2colors/konsole/OceanicMaterial.colorscheme b/konsole/OceanicMaterial.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OceanicMaterial.colorscheme rename to konsole/OceanicMaterial.colorscheme diff --git a/old_work/iterm2colors/konsole/Ollie.colorscheme b/konsole/Ollie.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ollie.colorscheme rename to konsole/Ollie.colorscheme diff --git a/old_work/iterm2colors/konsole/OneHalfDark.colorscheme b/konsole/OneHalfDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OneHalfDark.colorscheme rename to konsole/OneHalfDark.colorscheme diff --git a/old_work/iterm2colors/konsole/OneHalfLight.colorscheme b/konsole/OneHalfLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/OneHalfLight.colorscheme rename to konsole/OneHalfLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Pandora.colorscheme b/konsole/Pandora.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pandora.colorscheme rename to konsole/Pandora.colorscheme diff --git a/old_work/iterm2colors/konsole/Paraiso Dark.colorscheme b/konsole/Paraiso Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Paraiso Dark.colorscheme rename to konsole/Paraiso Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Parasio Dark.colorscheme b/konsole/Parasio Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Parasio Dark.colorscheme rename to konsole/Parasio Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/PaulMillr.colorscheme b/konsole/PaulMillr.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PaulMillr.colorscheme rename to konsole/PaulMillr.colorscheme diff --git a/old_work/iterm2colors/konsole/PencilDark.colorscheme b/konsole/PencilDark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PencilDark.colorscheme rename to konsole/PencilDark.colorscheme diff --git a/old_work/iterm2colors/konsole/PencilLight.colorscheme b/konsole/PencilLight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/PencilLight.colorscheme rename to konsole/PencilLight.colorscheme diff --git a/old_work/iterm2colors/konsole/Piatto Light.colorscheme b/konsole/Piatto Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Piatto Light.colorscheme rename to konsole/Piatto Light.colorscheme diff --git a/old_work/iterm2colors/konsole/Pnevma.colorscheme b/konsole/Pnevma.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pnevma.colorscheme rename to konsole/Pnevma.colorscheme diff --git a/old_work/iterm2colors/konsole/Pro.colorscheme b/konsole/Pro.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Pro.colorscheme rename to konsole/Pro.colorscheme diff --git a/old_work/iterm2colors/konsole/Red Alert.colorscheme b/konsole/Red Alert.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Red Alert.colorscheme rename to konsole/Red Alert.colorscheme diff --git a/old_work/iterm2colors/konsole/Red Sands.colorscheme b/konsole/Red Sands.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Red Sands.colorscheme rename to konsole/Red Sands.colorscheme diff --git a/old_work/iterm2colors/konsole/Rippedcasts.colorscheme b/konsole/Rippedcasts.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Rippedcasts.colorscheme rename to konsole/Rippedcasts.colorscheme diff --git a/old_work/iterm2colors/konsole/Royal.colorscheme b/konsole/Royal.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Royal.colorscheme rename to konsole/Royal.colorscheme diff --git a/old_work/iterm2colors/konsole/Ryuuko.colorscheme b/konsole/Ryuuko.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ryuuko.colorscheme rename to konsole/Ryuuko.colorscheme diff --git a/old_work/iterm2colors/konsole/SeaShells.colorscheme b/konsole/SeaShells.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SeaShells.colorscheme rename to konsole/SeaShells.colorscheme diff --git a/old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme b/konsole/Seafoam Pastel.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Seafoam Pastel.colorscheme rename to konsole/Seafoam Pastel.colorscheme diff --git a/old_work/iterm2colors/konsole/Seti.colorscheme b/konsole/Seti.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Seti.colorscheme rename to konsole/Seti.colorscheme diff --git a/old_work/iterm2colors/konsole/Shaman.colorscheme b/konsole/Shaman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Shaman.colorscheme rename to konsole/Shaman.colorscheme diff --git a/old_work/iterm2colors/konsole/Slate.colorscheme b/konsole/Slate.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Slate.colorscheme rename to konsole/Slate.colorscheme diff --git a/old_work/iterm2colors/konsole/Smyck.colorscheme b/konsole/Smyck.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Smyck.colorscheme rename to konsole/Smyck.colorscheme diff --git a/old_work/iterm2colors/konsole/SoftServer.colorscheme b/konsole/SoftServer.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SoftServer.colorscheme rename to konsole/SoftServer.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Darcula.colorscheme b/konsole/Solarized Darcula.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Darcula.colorscheme rename to konsole/Solarized Darcula.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme b/konsole/Solarized Dark - Patched.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark - Patched.colorscheme rename to konsole/Solarized Dark - Patched.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme b/konsole/Solarized Dark Higher Contrast.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark Higher Contrast.colorscheme rename to konsole/Solarized Dark Higher Contrast.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Dark.colorscheme b/konsole/Solarized Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Dark.colorscheme rename to konsole/Solarized Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Solarized Light.colorscheme b/konsole/Solarized Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Solarized Light.colorscheme rename to konsole/Solarized Light.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme b/konsole/SpaceGray Eighties Dull.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray Eighties Dull.colorscheme rename to konsole/SpaceGray Eighties Dull.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme b/konsole/SpaceGray Eighties.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray Eighties.colorscheme rename to konsole/SpaceGray Eighties.colorscheme diff --git a/old_work/iterm2colors/konsole/SpaceGray.colorscheme b/konsole/SpaceGray.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/SpaceGray.colorscheme rename to konsole/SpaceGray.colorscheme diff --git a/old_work/iterm2colors/konsole/Spacedust.colorscheme b/konsole/Spacedust.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spacedust.colorscheme rename to konsole/Spacedust.colorscheme diff --git a/old_work/iterm2colors/konsole/Spiderman.colorscheme b/konsole/Spiderman.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spiderman.colorscheme rename to konsole/Spiderman.colorscheme diff --git a/old_work/iterm2colors/konsole/Spring.colorscheme b/konsole/Spring.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Spring.colorscheme rename to konsole/Spring.colorscheme diff --git a/old_work/iterm2colors/konsole/Square.colorscheme b/konsole/Square.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Square.colorscheme rename to konsole/Square.colorscheme diff --git a/old_work/iterm2colors/konsole/Sundried.colorscheme b/konsole/Sundried.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Sundried.colorscheme rename to konsole/Sundried.colorscheme diff --git a/old_work/iterm2colors/konsole/Symfonic.colorscheme b/konsole/Symfonic.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Symfonic.colorscheme rename to konsole/Symfonic.colorscheme diff --git a/old_work/iterm2colors/konsole/Teerb.colorscheme b/konsole/Teerb.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Teerb.colorscheme rename to konsole/Teerb.colorscheme diff --git a/old_work/iterm2colors/konsole/Terminal Basic.colorscheme b/konsole/Terminal Basic.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Terminal Basic.colorscheme rename to konsole/Terminal Basic.colorscheme diff --git a/old_work/iterm2colors/konsole/Thayer Bright.colorscheme b/konsole/Thayer Bright.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Thayer Bright.colorscheme rename to konsole/Thayer Bright.colorscheme diff --git a/old_work/iterm2colors/konsole/The Hulk.colorscheme b/konsole/The Hulk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/The Hulk.colorscheme rename to konsole/The Hulk.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme b/konsole/Tomorrow Night Blue.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Blue.colorscheme rename to konsole/Tomorrow Night Blue.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme b/konsole/Tomorrow Night Bright.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Bright.colorscheme rename to konsole/Tomorrow Night Bright.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme b/konsole/Tomorrow Night Eighties.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night Eighties.colorscheme rename to konsole/Tomorrow Night Eighties.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow Night.colorscheme b/konsole/Tomorrow Night.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow Night.colorscheme rename to konsole/Tomorrow Night.colorscheme diff --git a/old_work/iterm2colors/konsole/Tomorrow.colorscheme b/konsole/Tomorrow.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Tomorrow.colorscheme rename to konsole/Tomorrow.colorscheme diff --git a/old_work/iterm2colors/konsole/ToyChest.colorscheme b/konsole/ToyChest.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ToyChest.colorscheme rename to konsole/ToyChest.colorscheme diff --git a/old_work/iterm2colors/konsole/Treehouse.colorscheme b/konsole/Treehouse.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Treehouse.colorscheme rename to konsole/Treehouse.colorscheme diff --git a/old_work/iterm2colors/konsole/Twilight.colorscheme b/konsole/Twilight.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Twilight.colorscheme rename to konsole/Twilight.colorscheme diff --git a/old_work/iterm2colors/konsole/Ubuntu.colorscheme b/konsole/Ubuntu.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Ubuntu.colorscheme rename to konsole/Ubuntu.colorscheme diff --git a/old_work/iterm2colors/konsole/UnderTheSea.colorscheme b/konsole/UnderTheSea.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/UnderTheSea.colorscheme rename to konsole/UnderTheSea.colorscheme diff --git a/old_work/iterm2colors/konsole/Urple.colorscheme b/konsole/Urple.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Urple.colorscheme rename to konsole/Urple.colorscheme diff --git a/old_work/iterm2colors/konsole/Vaughn.colorscheme b/konsole/Vaughn.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Vaughn.colorscheme rename to konsole/Vaughn.colorscheme diff --git a/old_work/iterm2colors/konsole/VibrantInk.colorscheme b/konsole/VibrantInk.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/VibrantInk.colorscheme rename to konsole/VibrantInk.colorscheme diff --git a/old_work/iterm2colors/konsole/Violet Dark.colorscheme b/konsole/Violet Dark.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Violet Dark.colorscheme rename to konsole/Violet Dark.colorscheme diff --git a/old_work/iterm2colors/konsole/Violet Light.colorscheme b/konsole/Violet Light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Violet Light.colorscheme rename to konsole/Violet Light.colorscheme diff --git a/old_work/iterm2colors/konsole/WarmNeon.colorscheme b/konsole/WarmNeon.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/WarmNeon.colorscheme rename to konsole/WarmNeon.colorscheme diff --git a/old_work/iterm2colors/konsole/Wez.colorscheme b/konsole/Wez.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wez.colorscheme rename to konsole/Wez.colorscheme diff --git a/old_work/iterm2colors/konsole/WildCherry.colorscheme b/konsole/WildCherry.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/WildCherry.colorscheme rename to konsole/WildCherry.colorscheme diff --git a/old_work/iterm2colors/konsole/Wombat.colorscheme b/konsole/Wombat.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wombat.colorscheme rename to konsole/Wombat.colorscheme diff --git a/old_work/iterm2colors/konsole/Wryan.colorscheme b/konsole/Wryan.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Wryan.colorscheme rename to konsole/Wryan.colorscheme diff --git a/old_work/iterm2colors/konsole/Zenburn.colorscheme b/konsole/Zenburn.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/Zenburn.colorscheme rename to konsole/Zenburn.colorscheme diff --git a/old_work/iterm2colors/konsole/ayu.colorscheme b/konsole/ayu.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ayu.colorscheme rename to konsole/ayu.colorscheme diff --git a/old_work/iterm2colors/konsole/ayu_light.colorscheme b/konsole/ayu_light.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/ayu_light.colorscheme rename to konsole/ayu_light.colorscheme diff --git a/old_work/iterm2colors/konsole/deep.colorscheme b/konsole/deep.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/deep.colorscheme rename to konsole/deep.colorscheme diff --git a/old_work/iterm2colors/konsole/idleToes.colorscheme b/konsole/idleToes.colorscheme similarity index 100% rename from old_work/iterm2colors/konsole/idleToes.colorscheme rename to konsole/idleToes.colorscheme diff --git a/old_work/8/delkey.patch b/old_work/8/delkey.patch deleted file mode 100644 index b51045c..0000000 --- a/old_work/8/delkey.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index b41747f..1b52a86 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -261,7 +261,7 @@ static Key key[] = { - { 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_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}, -@@ -316,8 +316,7 @@ static Key key[] = { - { 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_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}, -diff --git a/st.info b/st.info -index b70fefa..d979946 100644 ---- a/st.info -+++ b/st.info -@@ -53,7 +53,7 @@ st| simpleterm, - ka3=\E[5~, - kc1=\E[4~, - kc3=\E[6~, -- kbs=\177, -+ kbs=\010, - kcbt=\E[Z, - kb2=\EOu, - kcub1=\EOD, -@@ -73,7 +73,7 @@ st| simpleterm, - 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, diff --git a/old_work/8/st-0.8.1.tar.gz b/old_work/8/st-0.8.1.tar.gz deleted file mode 100644 index 2a6e54a..0000000 Binary files a/old_work/8/st-0.8.1.tar.gz and /dev/null differ diff --git a/old_work/8/st-0.8.1/FAQ b/old_work/8/st-0.8.1/FAQ deleted file mode 100644 index 921c493..0000000 --- a/old_work/8/st-0.8.1/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 manually run `tic -sx 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/8/st-0.8.1/LEGACY b/old_work/8/st-0.8.1/LEGACY deleted file mode 100644 index bf28b1e..0000000 --- a/old_work/8/st-0.8.1/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/8/st-0.8.1/LICENSE b/old_work/8/st-0.8.1/LICENSE deleted file mode 100644 index c356c39..0000000 --- a/old_work/8/st-0.8.1/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -MIT/X Consortium License - -© 2014-2018 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> -© 2013 Eon S. Jeon -© 2013 Alexander Sedov -© 2013 Mark Edgar -© 2013-2014 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/8/st-0.8.1/Makefile b/old_work/8/st-0.8.1/Makefile deleted file mode 100644 index 0b3cecd..0000000 --- a/old_work/8/st-0.8.1/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# st - simple terminal -# See LICENSE file for copyright and license details. -.POSIX: - -include config.mk - -SRC = st.c x.c -OBJ = $(SRC:.c=.o) - -all: options st - -options: - @echo st build options: - @echo "CFLAGS = $(STCFLAGS)" - @echo "LDFLAGS = $(STLDFLAGS)" - @echo "CC = $(CC)" - -config.h: - cp config.def.h config.h - -.c.o: - $(CC) $(STCFLAGS) -c $< - -st.o: config.h st.h win.h -x.o: arg.h st.h win.h - -$(OBJ): config.h config.mk - -st: $(OBJ) - $(CC) -o $@ $(OBJ) $(STLDFLAGS) - -clean: - 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) - -install: st - mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -f st $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/st - mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 - chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 - tic -sx st.info - @echo Please see the README file regarding the terminfo entry of st. - -uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/st - rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 - -.PHONY: all options clean dist install uninstall 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/8/st-0.8.1/TODO b/old_work/8/st-0.8.1/TODO deleted file mode 100644 index 5f74cd5..0000000 --- a/old_work/8/st-0.8.1/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/8/st-0.8.1/arg.h b/old_work/8/st-0.8.1/arg.h deleted file mode 100644 index a22e019..0000000 --- a/old_work/8/st-0.8.1/arg.h +++ /dev/null @@ -1,50 +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;\ - }\ - int i_;\ - for (i_ = 1, brk_ = 0, argv_ = argv;\ - argv[0][i_] && !brk_;\ - i_++) {\ - if (argv_ != argv)\ - break;\ - argc_ = argv[0][i_];\ - switch (argc_) - -#define ARGEND }\ - } - -#define ARGC() argc_ - -#define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ - ((x), abort(), (char *)0) :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ - (argc--, argv++, argv[0]))) - -#define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ - (char *)0 :\ - (brk_ = 1, (argv[0][i_+1] != '\0')?\ - (&argv[0][i_+1]) :\ - (argc--, argv++, argv[0]))) - -#endif diff --git a/old_work/8/st-0.8.1/config.def.h b/old_work/8/st-0.8.1/config.def.h deleted file mode 100644 index dfaba5c..0000000 --- a/old_work/8/st-0.8.1/config.def.h +++ /dev/null @@ -1,501 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "Liberation Mono:pixelsize=12: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/sh"; -char *utmp = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -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: " `'\"()[]{}" - */ -char *worddelimiters = " "; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -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 */ -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 - */ -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 */ - "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", - "black", -}; - - -/* - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ -unsigned int defaultfg = 7; -unsigned int defaultbg = 257; -static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; - -/* - * Default shape of cursor - * 2: Block ("█") - * 4: Underline ("_") - * 6: Bar ("|") - * 7: Snowman ("☃") - */ -static unsigned int cursorshape = 2; - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default colour and shape of the mouse cursor - */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 7; -static unsigned int mousebg = 0; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * 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 }, - { "xfps", INTEGER, &xfps }, - { "actionfps", INTEGER, &actionfps }, - { "blinktimeout", INTEGER, &blinktimeout }, - { "bellvolume", INTEGER, &bellvolume }, - { "tabspaces", INTEGER, &tabspaces }, - { "cwscale", FLOAT, &cwscale }, - { "chscale", FLOAT, &chscale }, -}; - -/* - * 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 -#define TERMMOD (ControlMask|ShiftMask) - -static Shortcut shortcuts[] = { - /* mask keysym function argument */ - { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, - { ControlMask, XK_Print, toggleprinter, {.i = 0} }, - { ShiftMask, XK_Print, printscreen, {.i = 0} }, - { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, - { 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} }, - { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, - { TERMMOD, XK_I, iso14755, {.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 */ - { 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}, -}; - -/* - * 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/8/st-0.8.1/config.def.h.rej b/old_work/8/st-0.8.1/config.def.h.rej deleted file mode 100644 index 4bb2348..0000000 --- a/old_work/8/st-0.8.1/config.def.h.rej +++ /dev/null @@ -1,21 +0,0 @@ ---- config.def.h -+++ config.def.h -@@ -261,7 +261,7 @@ static Key key[] = { - { 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_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}, -@@ -316,8 +316,7 @@ static Key key[] = { - { 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_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}, diff --git a/old_work/8/st-0.8.1/config.h b/old_work/8/st-0.8.1/config.h deleted file mode 100644 index ec45dd1..0000000 --- a/old_work/8/st-0.8.1/config.h +++ /dev/null @@ -1,501 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -/* - * appearance - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ -static char *font = "Liberation Mono:pixelsize=12: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/sh"; -char *utmp = NULL; -char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; - -/* identification sequence returned in DA and DECID */ -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: " `'\"()[]{}" - */ -char *worddelimiters = " "; - -/* selection timeouts (in milliseconds) */ -static unsigned int doubleclicktimeout = 300; -static unsigned int tripleclicktimeout = 600; - -/* alt screens */ -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 */ -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 - */ -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 */ - "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", - "black", -}; - - -/* - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ -unsigned int defaultfg = 7; -unsigned int defaultbg = 257; -static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; - -/* - * Default shape of cursor - * 2: Block ("█") - * 4: Underline ("_") - * 6: Bar ("|") - * 7: Snowman ("☃") - */ -static unsigned int cursorshape = 7; - -/* - * Default columns and rows numbers - */ - -static unsigned int cols = 80; -static unsigned int rows = 24; - -/* - * Default colour and shape of the mouse cursor - */ -static unsigned int mouseshape = XC_xterm; -static unsigned int mousefg = 7; -static unsigned int mousebg = 0; - -/* - * Color used to display font attributes when fontconfig selected a font which - * doesn't match the ones requested. - */ -static unsigned int defaultattr = 11; - -/* - * 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[257] }, - { "foreground", STRING, &colorname[256] }, - { "cursorColor", STRING, &colorname[258] }, - { "termname", STRING, &termname }, - { "shell", STRING, &shell }, - { "xfps", INTEGER, &xfps }, - { "actionfps", INTEGER, &actionfps }, - { "blinktimeout", INTEGER, &blinktimeout }, - { "bellvolume", INTEGER, &bellvolume }, - { "tabspaces", INTEGER, &tabspaces }, - { "cwscale", FLOAT, &cwscale }, - { "chscale", FLOAT, &chscale }, -}; - -/* - * 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 -#define TERMMOD (ControlMask|ShiftMask) - -static Shortcut shortcuts[] = { - /* mask keysym function argument */ - { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, - { ControlMask, XK_Print, toggleprinter, {.i = 0} }, - { ShiftMask, XK_Print, printscreen, {.i = 0} }, - { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, - { 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} }, - { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, - { TERMMOD, XK_I, iso14755, {.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 */ - { 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}, -}; - -/* - * 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/8/st-0.8.1/config.mk b/old_work/8/st-0.8.1/config.mk deleted file mode 100644 index b1fa717..0000000 --- a/old_work/8/st-0.8.1/config.mk +++ /dev/null @@ -1,28 +0,0 @@ -# st version -VERSION = 0.8.1 - -# 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 -lXft -lXrender\ - `pkg-config --libs fontconfig` \ - `pkg-config --libs freetype2` - -# flags -CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS) -STLDFLAGS = $(LIBS) $(LDFLAGS) - -# compiler and linker -# CC = c99 - diff --git a/old_work/8/st-0.8.1/st b/old_work/8/st-0.8.1/st deleted file mode 100755 index 60cf816..0000000 Binary files a/old_work/8/st-0.8.1/st and /dev/null differ diff --git a/old_work/8/st-0.8.1/st.1 b/old_work/8/st-0.8.1/st.1 deleted file mode 100644 index 81bceff..0000000 --- a/old_work/8/st-0.8.1/st.1 +++ /dev/null @@ -1,180 +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/ttyS0 on Linux for serial port -0). -When this flag is given -remaining arguments are used as flags for -.BR stty(1). -By default st initializes the serial line to 8 bits, no parity, 1 stop bit -and a 38400 baud rate. The speed is set by appending it as last argument -(e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are -.BR stty(1) -flags. If you want to set odd parity on 115200 baud use for example 'st -l -/dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for -example 'st -l /dev/ttyS0 cs7 115200'. See -.BR stty(1) -for more arguments and cases. -.TP -.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 compatibility, -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 Ctrl-Shift-Page Up -Increase font size. -.TP -.B Ctrl-Shift-Page Down -Decrease font size. -.TP -.B Ctrl-Shift-Home -Reset to default font size. -.TP -.B Ctrl-Shift-y -Paste from primary selection (middle mouse button). -.TP -.B Ctrl-Shift-c -Copy the selected text to the clipboard selection. -.TP -.B Ctrl-Shift-v -Paste from the clipboard selection. -.TP -.B Ctrl-Shift-i -Launch dmenu to enter a unicode codepoint and send the corresponding glyph -to st. -.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/8/st-0.8.1/st.c b/old_work/8/st-0.8.1/st.c deleted file mode 100644 index 46c954b..0000000 --- a/old_work/8/st-0.8.1/st.c +++ /dev/null @@ -1,2618 +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 "st.h" -#include "win.h" - -#if defined(__linux) - #include -#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) - #include -#elif defined(__FreeBSD__) || defined(__DragonFly__) - #include -#endif - -/* 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 - -/* macros */ -#define IS_SET(flag) ((term.mode & (flag)) != 0) -#define NUMMAXLEN(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1) -#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) - -/* constants */ -#define ISO14755CMD "dmenu -w \"$WINDOWID\" -p codepoint: ] [;]] []] */ -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; - -static void execsh(char *, char **); -static void stty(char **); -static void sigchld(int); -static void ttywriteraw(const char *, size_t); - -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 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 tnewline(int); -static void tputtab(int); -static void tputc(Rune); -static void treset(void); -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 tsetmode(int, int, int *, int); -static int twrite(const char *, int, int); -static void tfulldirt(void); -static void tcontrolcode(uchar ); -static void tdectest(char ); -static void tdefutf8(char); -static int32_t tdefcolor(int *, int *, int); -static void tdeftran(char); -static void tstrsequence(uchar); - -static void drawregion(int, int, int, int); - -static void selnormalize(void); -static void selscroll(int, int); -static void selsnap(int *, int *, int); - -static size_t utf8decode(const char *, Rune *, size_t); -static Rune utf8decodebyte(char, size_t *); -static char utf8encodebyte(Rune, size_t); -static char *utf8strchr(char *, Rune); -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); - -/* Globals */ -static Term term; -static Selection sel; -static CSIEscape csiescseq; -static STREscape strescseq; -static int iofd = 1; -static int cmdfd; -static pid_t pid; - -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}; - -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(const 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; -} - -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)++); -} - -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)]; - - *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) -{ - sel.mode = SEL_IDLE; - sel.snap = 0; - sel.ob.x = -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 -selstart(int col, int row, int snap) -{ - selclear(); - sel.mode = SEL_EMPTY; - sel.type = SEL_REGULAR; - 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.alt = IS_SET(MODE_ALTSCREEN); - sel.oe.x = col; - sel.oe.y = row; - selnormalize(); - sel.type = type; - - if (oldey != sel.oe.y || oldex != sel.oe.x || oldtype != sel.type) - tsetdirt(MIN(sel.nb.y, oldsby), MAX(sel.ne.y, oldsey)); - - sel.mode = done ? SEL_IDLE : SEL_READY; -} - -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 || sel.ob.x == -1 || - sel.alt != IS_SET(MODE_ALTSCREEN)) - 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; - } -} - -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 -selclear(void) -{ - if (sel.ob.x == -1) - return; - sel.mode = SEL_IDLE; - sel.ob.x = -1; - tsetdirt(sel.nb.y, sel.ne.y); -} - -void -die(const char *errstr, ...) -{ - va_list ap; - - va_start(ap, errstr); - vfprintf(stderr, errstr, ap); - va_end(ap); - exit(1); -} - -void -execsh(char *cmd, char **args) -{ - char *sh, *prog; - const struct passwd *pw; - - 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 : cmd; - - if (args) - prog = args[0]; - else if (utmp) - prog = utmp; - else - prog = sh; - DEFAULT(args, ((char *[]) {prog, NULL})); - - 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); - - 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(char **args) -{ - 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 = args; 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"); -} - -int -ttynew(char *line, char *cmd, char *out, char **args) -{ - int m, s; - - if (out) { - term.mode |= MODE_PRINT; - iofd = (!strcmp(out, "-")) ? - 1 : open(out, O_WRONLY | O_CREAT, 0666); - if (iofd < 0) { - fprintf(stderr, "Error opening %s:%s\n", - out, strerror(errno)); - } - } - - if (line) { - if ((cmdfd = open(line, O_RDWR)) < 0) - die("open line failed: %s\n", strerror(errno)); - dup2(cmdfd, 0); - stty(args); - return cmdfd; - } - - /* seems to work fine on linux, openbsd and freebsd */ - if (openpty(&m, &s, NULL, NULL, NULL) < 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(cmd, args); - break; - default: - close(s); - cmdfd = m; - signal(SIGCHLD, sigchld); - break; - } - return cmdfd; -} - -size_t -ttyread(void) -{ - static char buf[BUFSIZ]; - static int buflen = 0; - int written; - 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)); - buflen += ret; - - written = twrite(buf, buflen, 0); - buflen -= written; - /* keep any uncomplete utf8 char for the next call */ - if (buflen > 0) - memmove(buf, buf + written, 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) -{ - 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 -ttyresize(int tw, int th) -{ - struct winsize w; - - w.ws_row = term.row; - w.ws_col = term.col; - w.ws_xpixel = tw; - w.ws_ypixel = th; - if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) - fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); -} - -void -ttyhangup() -{ - /* Send SIGHUP to shell */ - kill(pid, SIGHUP); -} - -int -tattrset(int attr) -{ - 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|MODE_UTF8; - 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); - 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(); - 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(); - 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 alt, *lim; - - for (lim = args + narg; args < lim; ++args) { - if (priv) { - switch (*args) { - case 1: /* DECCKM -- Cursor key */ - xsetmode(set, MODE_APPCURSOR); - break; - case 5: /* DECSCNM -- Reverse video */ - xsetmode(set, MODE_REVERSE); - 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 */ - xsetmode(!set, MODE_HIDE); - break; - case 9: /* X10 mouse compatibility mode */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEX10); - break; - case 1000: /* 1000: report button press */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEBTN); - break; - case 1002: /* 1002: report motion on button press */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMOTION); - break; - case 1003: /* 1003: enable all mouse motions */ - xsetpointermotion(set); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMANY); - break; - case 1004: /* 1004: send focus events to tty */ - xsetmode(set, MODE_FOCUS); - break; - case 1006: /* 1006: extended reporting mode */ - xsetmode(set, MODE_MOUSESGR); - break; - case 1034: - xsetmode(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 */ - xsetmode(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: - xsetmode(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, strlen(vtiden), 0); - 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 */ - 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, 0); - } - 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 */ - if (xsetcursor(csiescseq.arg[0])) - goto unknown; - break; - default: - goto unknown; - } - break; - } -} - -void -csidump(void) -{ - int i; - uint c; - - fprintf(stderr, "ESC["); - for (i = 0; i < csiescseq.len; i++) { - c = csiescseq.buf[i] & 0xff; - if (isprint(c)) { - putc(c, stderr); - } else if (c == '\n') { - fprintf(stderr, "(\\n)"); - } else if (c == '\r') { - fprintf(stderr, "(\\r)"); - } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); - } else { - fprintf(stderr, "(%02x)", c); - } - } - putc('\n', stderr); -} - -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 52: - if (narg > 2) { - char *dec; - - 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; - 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 */ - term.mode |= ESC_DCS; - 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; - - fprintf(stderr, "ESC%c", strescseq.type); - for (i = 0; i < strescseq.len; i++) { - c = strescseq.buf[i] & 0xff; - if (c == '\0') { - putc('\n', stderr); - return; - } else if (isprint(c)) { - putc(c, stderr); - } else if (c == '\n') { - fprintf(stderr, "(\\n)"); - } else if (c == '\r') { - fprintf(stderr, "(\\r)"); - } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); - } else { - fprintf(stderr, "(%02x)", c); - } - } - fprintf(stderr, "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) { - perror("Error writing to output file"); - close(iofd); - iofd = -1; - } -} - -void -iso14755(const Arg *arg) -{ - FILE *p; - char *us, *e, codepoint[9], uc[UTF_SIZ]; - unsigned long utf32; - - if (!(p = popen(ISO14755CMD, "r"))) - return; - - us = fgets(codepoint, sizeof(codepoint), p); - pclose(p); - - if (!us || *us == '\0' || *us == '-' || strlen(us) > 7) - return; - if ((utf32 = strtoul(us, &e, 16)) == ULONG_MAX || - (*e != '\n' && *e != '\0')) - return; - - ttywrite(uc, utf8encode(utf32, uc), 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 -tdefutf8(char ascii) -{ - if (ascii == 'G') - term.mode |= MODE_UTF8; - else if (ascii == '@') - term.mode &= ~MODE_UTF8; -} - -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) -{ - strreset(); - - switch (c) { - case 0x90: /* DCS -- Device Control String */ - c = 'P'; - term.esc |= ESC_DCS; - break; - case 0x9f: /* APC -- Application Program Command */ - c = '_'; - break; - case 0x9e: /* PM -- Privacy Message */ - c = '^'; - break; - case 0x9d: /* OSC -- Operating System Command */ - c = ']'; - break; - } - 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 { - xbell(); - } - 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, strlen(vtiden), 0); - 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 '%': - term.esc |= ESC_UTF8; - 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, strlen(vtiden), 0); - break; - case 'c': /* RIS -- Reset to inital state */ - treset(); - resettitle(); - xloadcols(); - break; - case '=': /* DECPAM -- Application keypad */ - xsetmode(1, MODE_APPKEYPAD); - break; - case '>': /* DECPNM -- Normal keypad */ - xsetmode(0, 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); - if (!IS_SET(MODE_UTF8) && !IS_SET(MODE_SIXEL)) { - c[0] = u; - width = len = 1; - } else { - 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|ESC_DCS); - if (IS_SET(MODE_SIXEL)) { - /* TODO: render sixel */; - term.mode &= ~MODE_SIXEL; - return; - } - term.esc |= ESC_STR_END; - goto check_control_code; - } - - - if (IS_SET(MODE_SIXEL)) { - /* TODO: implement sixel mode */ - return; - } - if (term.esc&ESC_DCS && strescseq.len == 0 && u == 'q') - term.mode |= MODE_SIXEL; - - if (strescseq.len+len >= sizeof(strescseq.buf)-1) { - /* - * 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; - } - - 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 - * 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_UTF8) { - tdefutf8(u); - } 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(); - - 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; - } -} - -int -twrite(const char *buf, int buflen, int show_ctrl) -{ - int charsize; - Rune u; - int n; - - for (n = 0; n < buflen; n += charsize) { - if (IS_SET(MODE_UTF8) && !IS_SET(MODE_SIXEL)) { - /* process a complete utf8 char */ - charsize = utf8decode(buf + n, &u, buflen - n); - if (charsize == 0) - break; - } else { - u = buf[n] & 0xFF; - charsize = 1; - } - 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) -{ - 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 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 -resettitle(void) -{ - xsettitle(NULL); -} - -void -drawregion(int x1, int y1, int x2, int y2) -{ - int y; - for (y = y1; y < y2; y++) { - if (!term.dirty[y]) - continue; - - term.dirty[y] = 0; - xdrawline(term.line[y], x1, y, x2); - } -} - -void -draw(void) -{ - int cx = term.c.x; - - if (!xstartdraw()) - 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--; - - 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(); -} - -void -redraw(void) -{ - tfulldirt(); - draw(); -} diff --git a/old_work/8/st-0.8.1/st.h b/old_work/8/st-0.8.1/st.h deleted file mode 100644 index 433c74f..0000000 --- a/old_work/8/st-0.8.1/st.h +++ /dev/null @@ -1,124 +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_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; -} Arg; - -void die(const char *, ...); -void redraw(void); -void draw(void); - -void iso14755(const Arg *); -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 *); - -/* config.h globals */ -extern char *utmp; -extern char *stty_args; -extern char *vtiden; -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/old_work/8/st-0.8.1/st.info b/old_work/8/st-0.8.1/st.info deleted file mode 100644 index 52fc617..0000000 --- a/old_work/8/st-0.8.1/st.info +++ /dev/null @@ -1,222 +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, - dim=\E[2m, - 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=\177, - 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=\E[3~, - 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~, - knp=\E[6~, - kmous=\E[M, - kpp=\E[5~, - lines#24, - mir, - msgr, - 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, -# XTerm extensions - rmxx=\E[29m, - smxx=\E[9m, -# tmux extensions, see TERMINFO EXTENSIONS in tmux(1) - Se, - Ss, - Tc, - Ms=\E]52;%p1%s;%p2%s\007, - -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, - -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/old_work/8/st-0.8.1/win.h b/old_work/8/st-0.8.1/win.h deleted file mode 100644 index 31f327d..0000000 --- a/old_work/8/st-0.8.1/win.h +++ /dev/null @@ -1,38 +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); diff --git a/old_work/8/st-0.8.1/x.c b/old_work/8/st-0.8.1/x.c deleted file mode 100644 index 0de60d5..0000000 --- a/old_work/8/st-0.8.1/x.c +++ /dev/null @@ -1,2083 +0,0 @@ -/* See LICENSE for license details. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static 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 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 */ -} 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 -#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 *); -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 *); - -/* 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; - XIM xim; - XIC xic; - 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 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 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[16]; -static int frclen = 0; -static char *usedfont = NULL; -static double usedfontsize = 0; -static double defaultfontsize = 0; - -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 */ - -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); - } -} - -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 | forceselmod); - - 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); -} - -void -bpress(XEvent *e) -{ - struct timespec now; - MouseShortcut *ms; - int snap; - - 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)) { - ttywrite(ms->s, strlen(ms->s), 1); - 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(); -} - -void -xsetsel(char *str) -{ - setsel(str, CurrentTime); -} - -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) - mousesel(e, 1); -} - -void -bmotion(XEvent *e) -{ - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { - 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; - - tresize(col, row); - xresize(col, row); - ttyresize(win.tw, win.th); -} - -void -xresize(int col, int row) -{ - win.tw = MAX(1, col * win.cw); - win.th = MAX(1, 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; - - dc.collen = MAX(LEN(colorname), 256); - dc.col = xmalloc(dc.collen * sizeof(Color)); - - if (loaded) { - for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp) - XftColorFree(xw.dpy, xw.vis, xw.cmap, cp); - } - - 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 (USE_ARGB) { - dc.col[defaultbg].color.alpha = (0xffff * alpha) / OPAQUE; - dc.col[defaultbg].pixel &= 0x00111111; - dc.col[defaultbg].pixel |= 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; -} - -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. - */ -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 : "st", - opt_class ? opt_class : "St"}; - XWMHints wm = {.flags = InputHint, .input = 1}; - XSizeHints *sizeh; - - sizeh = XAllocSizeHints(); - - sizeh->flags = PSize | PResizeInc | PBaseSize; - 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; - if (xw.isfixed) { - sizeh->flags |= PMaxSize | PMinSize; - 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("st: 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("st: 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("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. */ - 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("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 -xinit(int cols, int rows) -{ - XGCValues gcvalues; - Cursor cursor; - Window parent; - pid_t thispid = getpid(); - XColor xmousefg, xmousebg; - - 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 */ - 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 - | 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, - 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, (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); - - /* 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 ((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, 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); - 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(); - XMapWindow(xw.dpy, xw.win); - xhints(); - 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; -} - -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; - } - - /* 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); - 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); - - /* 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; - - 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 7: /* st extension: snowman (U+2603) */ - // g.u = 0x2592; - g.u = 0x25A7; - // g.u = 0x2603; - case 0: /* Blinking Block */ - case 1: /* Blinking Block (Default) */ - case 2: /* Steady Block */ - xdrawglyph(g, cx, cy); - break; - case 3: /* Blinking Underline */ - 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 */ - case 6: /* Steady bar */ - XftDrawRect(xw.draw, &drawcol, - borderpx + cx * win.cw, - borderpx + cy * win.ch, - cursorthickness, win.ch); - 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 -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) -{ - DEFAULT(cursor, 1); - if (!BETWEEN(cursor, 0, 6)) - return 1; - win.cursor = cursor; - 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) { - XSetICFocus(xw.xic); - win.mode |= MODE_FOCUSED; - xseturgency(0); - if (IS_SET(MODE_FOCUS)) - ttywrite("\033[I", 3, 0); - } else { - XUnsetICFocus(xw.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[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))) { - 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); -} - -void -run(void) -{ - XEvent ev; - int w = win.w, h = win.h; - fd_set rfd; - int xfd = XConnectionNumber(xw.dpy), xev, blinkset = 0, dodraw = 0; - int ttyfd; - 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); - - ttyfd = ttynew(opt_line, shell, opt_io, opt_cmd); - cresize(w, h); - - clock_gettime(CLOCK_MONOTONIC, &last); - lastblink = last; - - for (xev = actionfps;;) { - FD_ZERO(&rfd); - FD_SET(ttyfd, &rfd); - FD_SET(xfd, &rfd); - - if (pselect(MAX(xfd, ttyfd)+1, &rfd, NULL, NULL, tv, NULL) < 0) { - if (errno == EINTR) - continue; - die("select failed: %s\n", strerror(errno)); - } - if (FD_ISSET(ttyfd, &rfd)) { - ttyread(); - if (blinktimeout) { - blinkset = tattrset(ATTR_BLINK); - if (!blinkset) - MODBIT(win.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); - win.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); - } - - draw(); - XFlush(xw.dpy); - - if (xev && !FD_ISSET(xfd, &rfd)) - xev--; - if (!FD_ISSET(ttyfd, &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; - } - } - } - } -} - -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) -{ - 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[]) -{ - xw.l = xw.t = 0; - xw.isfixed = False; - win.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_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0]; - - 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); - xinit(cols, rows); - xsetenv(); - selinit(); - run(); - - return 0; -} diff --git a/old_work/8/st-0.8.1/x.c.rej b/old_work/8/st-0.8.1/x.c.rej deleted file mode 100644 index 8c6e806..0000000 --- a/old_work/8/st-0.8.1/x.c.rej +++ /dev/null @@ -1,31 +0,0 @@ ---- x.c -+++ x.c -@@ -1614,15 +1613,6 @@ xbell(void) - xseturgency(1); - if (bellvolume) - XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); -- -- /* visual bell*/ -- if (!bellon) { -- bellon = 1; -- MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); -- redraw(); -- XFlush(xw.dpy); -- MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); -- } - } - - void -@@ -1849,11 +1839,7 @@ run(void) - (handler[ev.type])(&ev); - } - -- if (bellon) { -- bellon = 0; -- redraw(); -- } -- else draw(); -+ draw(); - XFlush(xw.dpy); - - if (xev && !FD_ISSET(xfd, &rfd)) diff --git a/old_work/8/st-alpha-0.8.1.diff b/old_work/8/st-alpha-0.8.1.diff deleted file mode 100644 index aafa9a1..0000000 --- a/old_work/8/st-alpha-0.8.1.diff +++ /dev/null @@ -1,199 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 82b1b09..2c721e8 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 039c42c..b1fa717 100644 ---- a/config.mk -+++ b/config.mk -@@ -11,10 +11,10 @@ X11INC = /usr/X11R6/include - X11LIB = /usr/X11R6/lib - - # 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 dac64d8..433c74f 100644 ---- a/st.h -+++ b/st.h -@@ -119,5 +119,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 c0bd890..0562571 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; -@@ -686,7 +691,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); - -@@ -746,6 +751,13 @@ 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 = (0xffff * alpha) / OPAQUE; -+ dc.col[defaultbg].pixel &= 0x00111111; -+ dc.col[defaultbg].pixel |= alpha << 24; -+ } - loaded = 1; - } - -@@ -767,6 +779,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. - */ -@@ -1004,7 +1027,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()) -@@ -1014,7 +1070,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 */ -@@ -1037,16 +1097,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/old_work/8/st-clipboard-0.8.1.diff b/old_work/8/st-clipboard-0.8.1.diff deleted file mode 100644 index 604c480..0000000 --- a/old_work/8/st-clipboard-0.8.1.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/x.c b/x.c -index c343ba2..f2a4f65 100644 ---- a/x.c -+++ b/x.c -@@ -627,6 +627,8 @@ 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/old_work/8/st-visualbell-0.8.1.diff b/old_work/8/st-visualbell-0.8.1.diff deleted file mode 100644 index 9be7c3e..0000000 --- a/old_work/8/st-visualbell-0.8.1.diff +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/x.c b/x.c -index c343ba2..26bb9bb 100644 ---- a/x.c -+++ b/x.c -@@ -239,6 +239,7 @@ 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 */ - - void - clipcopy(const Arg *dummy) -@@ -1614,6 +1615,15 @@ xbell(void) - xseturgency(1); - if (bellvolume) - XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL); -+ -+ /* visual bell*/ -+ if (!bellon) { -+ bellon = 1; -+ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); -+ redraw(); -+ XFlush(xw.dpy); -+ MODBIT(win.mode, !IS_SET(MODE_REVERSE), MODE_REVERSE); -+ } - } - - void -@@ -1840,7 +1850,11 @@ run(void) - (handler[ev.type])(&ev); - } - -- draw(); -+ if (bellon) { -+ bellon = 0; -+ redraw(); -+ } -+ else draw(); - XFlush(xw.dpy); - - if (xev && !FD_ISSET(xfd, &rfd)) diff --git a/old_work/8/st-xresources-20180309-c5ba9c0.diff b/old_work/8/st-xresources-20180309-c5ba9c0.diff deleted file mode 100644 index 03da7fb..0000000 --- a/old_work/8/st-xresources-20180309-c5ba9c0.diff +++ /dev/null @@ -1,183 +0,0 @@ -From 9ba79c106145759de6b436dac2e4b8ff5a12bc2e Mon Sep 17 00:00:00 2001 -From: "Devin J. Pohly" -Date: Fri, 9 Mar 2018 14:56:34 -0600 -Subject: [PATCH] Port Xresources patch by @dcat to st-git - ---- - config.def.h | 35 +++++++++++++++++++++++++++ - x.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 109 insertions(+), 4 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 82b1b09..471fe57 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -150,6 +150,41 @@ static unsigned int mousebg = 0; - */ - static unsigned int defaultattr = 11; - -+/* -+ * 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 }, -+ { "xfps", INTEGER, &xfps }, -+ { "actionfps", INTEGER, &actionfps }, -+ { "blinktimeout", INTEGER, &blinktimeout }, -+ { "bellvolume", INTEGER, &bellvolume }, -+ { "tabspaces", INTEGER, &tabspaces }, -+ { "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 d43a529..7f29cc2 100644 ---- a/x.c -+++ b/x.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - static char *argv0; - #include "arg.h" -@@ -43,6 +44,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 -@@ -778,8 +792,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; - -@@ -999,8 +1013,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); - -@@ -1864,6 +1876,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) - { -@@ -1937,6 +2002,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.16.2 - 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/README.MD b/old_work/README.MD deleted file mode 100644 index 3362710..0000000 --- a/old_work/README.MD +++ /dev/null @@ -1,11 +0,0 @@ -Truck's st ---- - -This is st 0.7, patched by Truck, for having multiple colors. - -Fonts and so on are scriptable outside, but not colors. - -This has several colorschemes, which flip on printscreen, eject (osX) -or alt-control-backspace; which may be a bad idea given that is often -the X11 shutdown key. It does work on my macbook air/Ubuntu bit when I -do not have a decent keyboard (one with pageup/pagedown.) \ No newline at end of file diff --git a/old_work/README.st b/old_work/README.st deleted file mode 100644 index b38c88b..0000000 --- a/old_work/README.st +++ /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 -s st.info - -See the man page for additional details. - -Credits -------- -Based on Aurélien APTEL bt source code. - 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.def.h~ b/old_work/config.def.h~ deleted file mode 100644 index fe0b983..0000000 --- a/old_work/config.def.h~ +++ /dev/null @@ -1,444 +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/sh"; -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; - -/* 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", -}; - - -/* - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ -static unsigned int defaultfg = 7; -static unsigned int defaultbg = 0; -static unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; - -/* - * 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} }, -}; - -/* - * 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.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/conv/3024 Day.xrdb b/old_work/conv/3024 Day.xrdb deleted file mode 100644 index 3ab3319..0000000 --- a/old_work/conv/3024 Day.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#090300", // 0 - "#db2d20", // 1 - "#01a252", // 2 - "#fded02", // 3 - "#01a0e4", // 4 - "#a16a94", // 5 - "#b5e4f4", // 6 - "#a5a2a2", // 7 - "#5c5855", // 8 - "#e8bbd0", // 9 - "#3a3432", // 10 - "#4a4543", // 11 - "#807d7c", // 12 - "#d6d5d4", // 13 - "#cdab53", // 14 - "#f7f7f7", // 15 - [255] = 0, -//static unsigned int defaultbg = 15; -//static unsigned int defaultfg = 11; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/3024 Night.xrdb b/old_work/conv/3024 Night.xrdb deleted file mode 100644 index 179d6b3..0000000 --- a/old_work/conv/3024 Night.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#090300", // 0 - "#db2d20", // 1 - "#01a252", // 2 - "#fded02", // 3 - "#01a0e4", // 4 - "#a16a94", // 5 - "#b5e4f4", // 6 - "#a5a2a2", // 7 - "#5c5855", // 8 - "#e8bbd0", // 9 - "#3a3432", // 10 - "#4a4543", // 11 - "#807d7c", // 12 - "#d6d5d4", // 13 - "#cdab53", // 14 - "#f7f7f7", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/AdventureTime.xrdb b/old_work/conv/AdventureTime.xrdb deleted file mode 100644 index 8e48405..0000000 --- a/old_work/conv/AdventureTime.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#050404", // 0 - "#bd0013", // 1 - "#4ab118", // 2 - "#e7741e", // 3 - "#0f4ac6", // 4 - "#665993", // 5 - "#70a598", // 6 - "#f8dcc0", // 7 - "#4e7cbf", // 8 - "#fc5f5a", // 9 - "#9eff6e", // 10 - "#efc11a", // 11 - "#1997c6", // 12 - "#9b5953", // 13 - "#c8faf4", // 14 - "#f6f5fb", // 15 - [255] = 0, - "#1f1d45", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#efbf38" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Afterglow.xrdb b/old_work/conv/Afterglow.xrdb deleted file mode 100644 index 395eaac..0000000 --- a/old_work/conv/Afterglow.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#151515", // 0 - "#ac4142", // 1 - "#7e8e50", // 2 - "#e5b567", // 3 - "#6c99bb", // 4 - "#9f4e85", // 5 - "#7dd6cf", // 6 - "#d0d0d0", // 7 - "#505050", // 8 - "#ac4142", // 9 - "#7e8e50", // 10 - "#e5b567", // 11 - "#6c99bb", // 12 - "#9f4e85", // 13 - "#7dd6cf", // 14 - "#f5f5f5", // 15 - [255] = 0, - "#212121", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/AlienBlood.xrdb b/old_work/conv/AlienBlood.xrdb deleted file mode 100644 index cc5d5de..0000000 --- a/old_work/conv/AlienBlood.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Argonaut.xrdb b/old_work/conv/Argonaut.xrdb deleted file mode 100644 index 3a2e89b..0000000 --- a/old_work/conv/Argonaut.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#232323", // 0 - "#ff000f", // 1 - "#8ce10b", // 2 - "#ffb900", // 3 - "#008df8", // 4 - "#6d43a6", // 5 - "#00d8eb", // 6 - "#ffffff", // 7 - "#444444", // 8 - "#ff2740", // 9 - "#abe15b", // 10 - "#ffd242", // 11 - "#0092ff", // 12 - "#9a5feb", // 13 - "#67fff0", // 14 - "#ffffff", // 15 - [255] = 0, - "#0e1019", /* bg color */ -//static unsigned int defaultbg = 256; - "#fffaf4", /* fg color */ -//static unsigned int defaultfg = 257; - "#ff0018" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Arthur.xrdb b/old_work/conv/Arthur.xrdb deleted file mode 100644 index acd4201..0000000 --- a/old_work/conv/Arthur.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#3d352a", // 0 - "#cd5c5c", // 1 - "#86af80", // 2 - "#e8ae5b", // 3 - "#6495ed", // 4 - "#deb887", // 5 - "#b0c4de", // 6 - "#bbaa99", // 7 - "#554444", // 8 - "#cc5533", // 9 - "#88aa22", // 10 - "#ffa75d", // 11 - "#87ceeb", // 12 - "#996600", // 13 - "#b0c4de", // 14 - "#ddccbb", // 15 - [255] = 0, - "#1c1c1c", /* bg color */ -//static unsigned int defaultbg = 256; - "#ddeedd", /* fg color */ -//static unsigned int defaultfg = 257; - "#e2bbef" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/AtelierSulphurpool.xrdb b/old_work/conv/AtelierSulphurpool.xrdb deleted file mode 100644 index f715dfd..0000000 --- a/old_work/conv/AtelierSulphurpool.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#202746", // 0 - "#c94922", // 1 - "#ac9739", // 2 - "#c08b30", // 3 - "#3d8fd1", // 4 - "#6679cc", // 5 - "#22a2c9", // 6 - "#979db4", // 7 - "#6b7394", // 8 - "#c76b29", // 9 - "#293256", // 10 - "#5e6687", // 11 - "#898ea4", // 12 - "#dfe2f1", // 13 - "#9c637a", // 14 - "#f5f7ff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Atom.xrdb b/old_work/conv/Atom.xrdb deleted file mode 100644 index 9da5a08..0000000 --- a/old_work/conv/Atom.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#fd5ff1", // 1 - "#87c38a", // 2 - "#ffd7b1", // 3 - "#85befd", // 4 - "#b9b6fc", // 5 - "#85befd", // 6 - "#e0e0e0", // 7 - "#000000", // 8 - "#fd5ff1", // 9 - "#94fa36", // 10 - "#f5ffa8", // 11 - "#96cbfe", // 12 - "#b9b6fc", // 13 - "#85befd", // 14 - "#e0e0e0", // 15 - [255] = 0, - "#161719", /* bg color */ -//static unsigned int defaultbg = 256; - "#c5c8c6", /* fg color */ -//static unsigned int defaultfg = 257; - "#d0d0d0" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/AtomOneLight.xrdb b/old_work/conv/AtomOneLight.xrdb deleted file mode 100644 index 47ce5f7..0000000 --- a/old_work/conv/AtomOneLight.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#de3e35", // 1 - "#3f953a", // 2 - "#d2b67c", // 3 - "#2f5af3", // 4 - "#950095", // 5 - "#3f953a", // 6 - "#bbbbbb", // 7 - "#000000", // 8 - "#de3e35", // 9 - "#3f953a", // 10 - "#d2b67c", // 11 - "#2f5af3", // 12 - "#a00095", // 13 - "#3f953a", // 14 - "#ffffff", // 15 - [255] = 0, - "#f9f9f9", /* bg color */ -//static unsigned int defaultbg = 256; - "#2a2c33", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Batman.xrdb b/old_work/conv/Batman.xrdb deleted file mode 100644 index 1d7241d..0000000 --- a/old_work/conv/Batman.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#1b1d1e", // 0 - "#e6dc44", // 1 - "#c8be46", // 2 - "#f4fd22", // 3 - "#737174", // 4 - "#747271", // 5 - "#62605f", // 6 - "#c6c5bf", // 7 - "#505354", // 8 - "#fff78e", // 9 - "#fff27d", // 10 - "#feed6c", // 11 - "#919495", // 12 - "#9a9a9d", // 13 - "#a3a3a6", // 14 - "#dadbd6", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#6f6f6f", /* fg color */ -//static unsigned int defaultfg = 256; - "#fcef0c" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Belafonte Day.xrdb b/old_work/conv/Belafonte Day.xrdb deleted file mode 100644 index 59eb39d..0000000 --- a/old_work/conv/Belafonte Day.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#20111b", // 0 - "#be100e", // 1 - "#858162", // 2 - "#eaa549", // 3 - "#426a79", // 4 - "#97522c", // 5 - "#989a9c", // 6 - "#968c83", // 7 - "#5e5252", // 8 - "#be100e", // 9 - "#858162", // 10 - "#eaa549", // 11 - "#426a79", // 12 - "#97522c", // 13 - "#989a9c", // 14 - "#d5ccba", // 15 - [255] = 0, -//static unsigned int defaultbg = 15; - "#45373c", /* fg color */ -//static unsigned int defaultfg = 256; - "#45373c" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Belafonte Night.xrdb b/old_work/conv/Belafonte Night.xrdb deleted file mode 100644 index 47338c9..0000000 --- a/old_work/conv/Belafonte Night.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#20111b", // 0 - "#be100e", // 1 - "#858162", // 2 - "#eaa549", // 3 - "#426a79", // 4 - "#97522c", // 5 - "#989a9c", // 6 - "#968c83", // 7 - "#5e5252", // 8 - "#be100e", // 9 - "#858162", // 10 - "#eaa549", // 11 - "#426a79", // 12 - "#97522c", // 13 - "#989a9c", // 14 - "#d5ccba", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/BirdsOfParadise.xrdb b/old_work/conv/BirdsOfParadise.xrdb deleted file mode 100644 index e93e9e4..0000000 --- a/old_work/conv/BirdsOfParadise.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#573d26", // 0 - "#be2d26", // 1 - "#6ba18a", // 2 - "#e99d2a", // 3 - "#5a86ad", // 4 - "#ac80a6", // 5 - "#74a6ad", // 6 - "#e0dbb7", // 7 - "#9b6c4a", // 8 - "#e84627", // 9 - "#95d8ba", // 10 - "#d0d150", // 11 - "#b8d3ed", // 12 - "#d19ecb", // 13 - "#93cfd7", // 14 - "#fff9d5", // 15 - [255] = 0, - "#2a1f1d", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 0; -}, diff --git a/old_work/conv/Blazer.xrdb b/old_work/conv/Blazer.xrdb deleted file mode 100644 index 7d22eb4..0000000 --- a/old_work/conv/Blazer.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#b87a7a", // 1 - "#7ab87a", // 2 - "#b8b87a", // 3 - "#7a7ab8", // 4 - "#b87ab8", // 5 - "#7ab8b8", // 6 - "#d9d9d9", // 7 - "#262626", // 8 - "#dbbdbd", // 9 - "#bddbbd", // 10 - "#dbdbbd", // 11 - "#bdbddb", // 12 - "#dbbddb", // 13 - "#bddbdb", // 14 - "#ffffff", // 15 - [255] = 0, - "#0d1926", /* bg color */ -//static unsigned int defaultbg = 256; - "#d9e6f2", /* fg color */ -//static unsigned int defaultfg = 257; - "#d9e6f2" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Borland.xrdb b/old_work/conv/Borland.xrdb deleted file mode 100644 index 6f81ab8..0000000 --- a/old_work/conv/Borland.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#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; -}, diff --git a/old_work/conv/Bright Lights.xrdb b/old_work/conv/Bright Lights.xrdb deleted file mode 100644 index 2f9fa71..0000000 --- a/old_work/conv/Bright Lights.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#191919", // 0 - "#ff355b", // 1 - "#b7e876", // 2 - "#ffc251", // 3 - "#76d4ff", // 4 - "#ba76e7", // 5 - "#6cbfb5", // 6 - "#c2c8d7", // 7 - "#191919", // 8 - "#ff355b", // 9 - "#b7e876", // 10 - "#ffc251", // 11 - "#76d5ff", // 12 - "#ba76e7", // 13 - "#6cbfb5", // 14 - "#c2c8d7", // 15 - [255] = 0, -//static unsigned int defaultbg = 8; - "#b3c9d7", /* fg color */ -//static unsigned int defaultfg = 256; - "#f34b00" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Broadcast.xrdb b/old_work/conv/Broadcast.xrdb deleted file mode 100644 index bb7930b..0000000 --- a/old_work/conv/Broadcast.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#da4939", // 1 - "#519f50", // 2 - "#ffd24a", // 3 - "#6d9cbe", // 4 - "#d0d0ff", // 5 - "#6e9cbe", // 6 - "#ffffff", // 7 - "#323232", // 8 - "#ff7b6b", // 9 - "#83d182", // 10 - "#ffff7c", // 11 - "#9fcef0", // 12 - "#ffffff", // 13 - "#a0cef0", // 14 - "#ffffff", // 15 - [255] = 0, - "#2b2b2b", /* bg color */ -//static unsigned int defaultbg = 256; - "#e6e1dc", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Brogrammer.xrdb b/old_work/conv/Brogrammer.xrdb deleted file mode 100644 index 19e7d56..0000000 --- a/old_work/conv/Brogrammer.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#1f1f1f", // 0 - "#f81118", // 1 - "#2dc55e", // 2 - "#ecba0f", // 3 - "#2a84d2", // 4 - "#4e5ab7", // 5 - "#1081d6", // 6 - "#d6dbe5", // 7 - "#d6dbe5", // 8 - "#de352e", // 9 - "#1dd361", // 10 - "#f3bd09", // 11 - "#1081d6", // 12 - "#5350b9", // 13 - "#0f7ddb", // 14 - "#ffffff", // 15 - [255] = 0, - "#131313", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 8; - "#b9b9b9" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/C64.xrdb b/old_work/conv/C64.xrdb deleted file mode 100644 index 1f0367f..0000000 --- a/old_work/conv/C64.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#090300", // 0 - "#883932", // 1 - "#55a049", // 2 - "#bfce72", // 3 - "#40318d", // 4 - "#8b3f96", // 5 - "#67b6bd", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#883932", // 9 - "#55a049", // 10 - "#bfce72", // 11 - "#40318d", // 12 - "#8b3f96", // 13 - "#67b6bd", // 14 - "#f7f7f7", // 15 - [255] = 0, -//static unsigned int defaultbg = 4; - "#7869c4", /* fg color */ -//static unsigned int defaultfg = 256; - "#7869c4" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/CLRS.xrdb b/old_work/conv/CLRS.xrdb deleted file mode 100644 index f0dc864..0000000 --- a/old_work/conv/CLRS.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#f8282a", // 1 - "#328a5d", // 2 - "#fa701d", // 3 - "#135cd0", // 4 - "#9f00bd", // 5 - "#33c3c1", // 6 - "#b3b3b3", // 7 - "#555753", // 8 - "#fb0416", // 9 - "#2cc631", // 10 - "#fdd727", // 11 - "#1670ff", // 12 - "#e900b0", // 13 - "#3ad5ce", // 14 - "#eeeeec", // 15 - [255] = 0, - "#ffffff", /* bg color */ -//static unsigned int defaultbg = 256; - "#262626", /* fg color */ -//static unsigned int defaultfg = 257; - "#6fd3fc" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Chalk.xrdb b/old_work/conv/Chalk.xrdb deleted file mode 100644 index fe860ed..0000000 --- a/old_work/conv/Chalk.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#7d8b8f", // 0 - "#b23a52", // 1 - "#789b6a", // 2 - "#b9ac4a", // 3 - "#2a7fac", // 4 - "#bd4f5a", // 5 - "#44a799", // 6 - "#d2d8d9", // 7 - "#888888", // 8 - "#f24840", // 9 - "#80c470", // 10 - "#ffeb62", // 11 - "#4196ff", // 12 - "#fc5275", // 13 - "#53cdbd", // 14 - "#d2d8d9", // 15 - [255] = 0, - "#2b2d2e", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#708284" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Chalkboard.xrdb b/old_work/conv/Chalkboard.xrdb deleted file mode 100644 index b4e0832..0000000 --- a/old_work/conv/Chalkboard.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#c37372", // 1 - "#72c373", // 2 - "#c2c372", // 3 - "#7372c3", // 4 - "#c372c2", // 5 - "#72c2c3", // 6 - "#d9d9d9", // 7 - "#323232", // 8 - "#dbaaaa", // 9 - "#aadbaa", // 10 - "#dadbaa", // 11 - "#aaaadb", // 12 - "#dbaada", // 13 - "#aadadb", // 14 - "#ffffff", // 15 - [255] = 0, - "#29262f", /* bg color */ -//static unsigned int defaultbg = 256; - "#d9e6f2", /* fg color */ -//static unsigned int defaultfg = 257; - "#d9e6f2" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Ciapre.xrdb b/old_work/conv/Ciapre.xrdb deleted file mode 100644 index 230552f..0000000 --- a/old_work/conv/Ciapre.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#181818", // 0 - "#810009", // 1 - "#48513b", // 2 - "#cc8b3f", // 3 - "#576d8c", // 4 - "#724d7c", // 5 - "#5c4f4b", // 6 - "#aea47f", // 7 - "#555555", // 8 - "#ac3835", // 9 - "#a6a75d", // 10 - "#dcdf7c", // 11 - "#3097c6", // 12 - "#d33061", // 13 - "#f3dbb2", // 14 - "#f4f4f4", // 15 - [255] = 0, - "#191c27", /* bg color */ -//static unsigned int defaultbg = 256; - "#aea47a", /* fg color */ -//static unsigned int defaultfg = 257; - "#92805b" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Cobalt Neon.xrdb b/old_work/conv/Cobalt Neon.xrdb deleted file mode 100644 index 63325d9..0000000 --- a/old_work/conv/Cobalt Neon.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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, - "#142838", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 6; - "#c4206f" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Cobalt2.xrdb b/old_work/conv/Cobalt2.xrdb deleted file mode 100644 index 8120ab3..0000000 --- a/old_work/conv/Cobalt2.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff0000", // 1 - "#38de21", // 2 - "#ffe50a", // 3 - "#1460d2", // 4 - "#ff005d", // 5 - "#00bbbb", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#f40e17", // 9 - "#3bd01d", // 10 - "#edc809", // 11 - "#5555ff", // 12 - "#ff55ff", // 13 - "#6ae3fa", // 14 - "#ffffff", // 15 - [255] = 0, - "#132738", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#f0cc09" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/CrayonPonyFish.xrdb b/old_work/conv/CrayonPonyFish.xrdb deleted file mode 100644 index 63024ad..0000000 --- a/old_work/conv/CrayonPonyFish.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#2b1b1d", // 0 - "#91002b", // 1 - "#579524", // 2 - "#ab311b", // 3 - "#8c87b0", // 4 - "#692f50", // 5 - "#e8a866", // 6 - "#68525a", // 7 - "#3d2b2e", // 8 - "#c5255d", // 9 - "#8dff57", // 10 - "#c8381d", // 11 - "#cfc9ff", // 12 - "#fc6cba", // 13 - "#ffceaf", // 14 - "#b0949d", // 15 - [255] = 0, - "#150707", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Dark Pastel.xrdb b/old_work/conv/Dark Pastel.xrdb deleted file mode 100644 index d4716a2..0000000 --- a/old_work/conv/Dark Pastel.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#000000", // 0 - "#ff5555", // 1 - "#55ff55", // 2 - "#ffff55", // 3 - "#5555ff", // 4 - "#ff55ff", // 5 - "#55ffff", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#55ff55", // 10 - "#ffff55", // 11 - "#5555ff", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 15; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Darkside.xrdb b/old_work/conv/Darkside.xrdb deleted file mode 100644 index d73218e..0000000 --- a/old_work/conv/Darkside.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#e8341c", // 1 - "#68c256", // 2 - "#f2d42c", // 3 - "#1c98e8", // 4 - "#8e69c9", // 5 - "#1c98e8", // 6 - "#bababa", // 7 - "#000000", // 8 - "#e05a4f", // 9 - "#77b869", // 10 - "#efd64b", // 11 - "#387cd3", // 12 - "#957bbe", // 13 - "#3d97e2", // 14 - "#bababa", // 15 - [255] = 0, - "#222324", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Desert.xrdb b/old_work/conv/Desert.xrdb deleted file mode 100644 index 68db4ed..0000000 --- a/old_work/conv/Desert.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#4d4d4d", // 0 - "#ff2b2b", // 1 - "#98fb98", // 2 - "#f0e68c", // 3 - "#cd853f", // 4 - "#ffdead", // 5 - "#ffa0a0", // 6 - "#f5deb3", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#55ff55", // 10 - "#ffff55", // 11 - "#87ceff", // 12 - "#ff55ff", // 13 - "#ffd700", // 14 - "#ffffff", // 15 - [255] = 0, - "#333333", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#00ff00" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/DimmedMonokai.xrdb b/old_work/conv/DimmedMonokai.xrdb deleted file mode 100644 index 438f0c2..0000000 --- a/old_work/conv/DimmedMonokai.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#3a3d43", // 0 - "#be3f48", // 1 - "#879a3b", // 2 - "#c5a635", // 3 - "#4f76a1", // 4 - "#855c8d", // 5 - "#578fa4", // 6 - "#b9bcba", // 7 - "#888987", // 8 - "#fb001f", // 9 - "#0f722f", // 10 - "#c47033", // 11 - "#186de3", // 12 - "#fb0067", // 13 - "#2e706d", // 14 - "#fdffb9", // 15 - [255] = 0, - "#1f1f1f", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#f83e19" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/DotGov.xrdb b/old_work/conv/DotGov.xrdb deleted file mode 100644 index 505f5d1..0000000 --- a/old_work/conv/DotGov.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#191919", // 0 - "#bf091d", // 1 - "#3d9751", // 2 - "#f6bb34", // 3 - "#17b2e0", // 4 - "#7830b0", // 5 - "#8bd2ed", // 6 - "#ffffff", // 7 - "#191919", // 8 - "#bf091d", // 9 - "#3d9751", // 10 - "#f6bb34", // 11 - "#17b2e0", // 12 - "#7830b0", // 13 - "#8bd2ed", // 14 - "#ffffff", // 15 - [255] = 0, - "#262c35", /* bg color */ -//static unsigned int defaultbg = 256; - "#ebebeb", /* fg color */ -//static unsigned int defaultfg = 257; - "#d9002f" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Dracula.xrdb b/old_work/conv/Dracula.xrdb deleted file mode 100644 index d80b7bf..0000000 --- a/old_work/conv/Dracula.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff5555", // 1 - "#50fa7b", // 2 - "#f1fa8c", // 3 - "#bd93f9", // 4 - "#ff79c6", // 5 - "#8be9fd", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#50fa7b", // 10 - "#f1fa8c", // 11 - "#bd93f9", // 12 - "#ff79c6", // 13 - "#8be9fd", // 14 - "#ffffff", // 15 - [255] = 0, - "#1e1f29", /* bg color */ -//static unsigned int defaultbg = 256; - "#f8f8f2", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Duotone Dark.xrdb b/old_work/conv/Duotone Dark.xrdb deleted file mode 100644 index ab393f0..0000000 --- a/old_work/conv/Duotone Dark.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#1f1d27", // 0 - "#d9393e", // 1 - "#2dcd73", // 2 - "#d9b76e", // 3 - "#ffc284", // 4 - "#de8d40", // 5 - "#2488ff", // 6 - "#b7a1ff", // 7 - "#353147", // 8 - "#d9393e", // 9 - "#2dcd73", // 10 - "#d9b76e", // 11 - "#ffc284", // 12 - "#de8d40", // 13 - "#2488ff", // 14 - "#eae5ff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; - "#ff9839" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/ENCOM.xrdb b/old_work/conv/ENCOM.xrdb deleted file mode 100644 index 5615f38..0000000 --- a/old_work/conv/ENCOM.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#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; - "#00a595", /* fg color */ -//static unsigned int defaultfg = 256; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Earthsong.xrdb b/old_work/conv/Earthsong.xrdb deleted file mode 100644 index 8f35e92..0000000 --- a/old_work/conv/Earthsong.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#121418", // 0 - "#c94234", // 1 - "#85c54c", // 2 - "#f5ae2e", // 3 - "#1398b9", // 4 - "#d0633d", // 5 - "#509552", // 6 - "#e5c6aa", // 7 - "#675f54", // 8 - "#ff645a", // 9 - "#98e036", // 10 - "#e0d561", // 11 - "#5fdaff", // 12 - "#ff9269", // 13 - "#84f088", // 14 - "#f6f7ec", // 15 - [255] = 0, - "#292520", /* bg color */ -//static unsigned int defaultbg = 256; - "#e5c7a9", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Elemental.xrdb b/old_work/conv/Elemental.xrdb deleted file mode 100644 index e500b09..0000000 --- a/old_work/conv/Elemental.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#3c3c30", // 0 - "#98290f", // 1 - "#479a43", // 2 - "#7f7111", // 3 - "#497f7d", // 4 - "#7f4e2f", // 5 - "#387f58", // 6 - "#807974", // 7 - "#555445", // 8 - "#e0502a", // 9 - "#61e070", // 10 - "#d69927", // 11 - "#79d9d9", // 12 - "#cd7c54", // 13 - "#59d599", // 14 - "#fff1e9", // 15 - [255] = 0, - "#22211d", /* bg color */ -//static unsigned int defaultbg = 256; - "#807a74", /* fg color */ -//static unsigned int defaultfg = 257; - "#facb80" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Elementary.xrdb b/old_work/conv/Elementary.xrdb deleted file mode 100644 index 748b6ff..0000000 --- a/old_work/conv/Elementary.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#242424", // 0 - "#d71c15", // 1 - "#5aa513", // 2 - "#fdb40c", // 3 - "#063b8c", // 4 - "#e40038", // 5 - "#2595e1", // 6 - "#efefef", // 7 - "#4b4b4b", // 8 - "#fc1c18", // 9 - "#6bc219", // 10 - "#fec80e", // 11 - "#0955ff", // 12 - "#fb0050", // 13 - "#3ea8fc", // 14 - "#8c00ec", // 15 - [255] = 0, - "#181818", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Espresso Libre.xrdb b/old_work/conv/Espresso Libre.xrdb deleted file mode 100644 index 8c57d84..0000000 --- a/old_work/conv/Espresso Libre.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#cc0000", // 1 - "#1a921c", // 2 - "#f0e53a", // 3 - "#0066ff", // 4 - "#c5656b", // 5 - "#06989a", // 6 - "#d3d7cf", // 7 - "#555753", // 8 - "#ef2929", // 9 - "#9aff87", // 10 - "#fffb5c", // 11 - "#43a8ed", // 12 - "#ff818a", // 13 - "#34e2e2", // 14 - "#eeeeec", // 15 - [255] = 0, - "#2a211c", /* bg color */ -//static unsigned int defaultbg = 256; - "#b8a898", /* fg color */ -//static unsigned int defaultfg = 257; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Espresso.xrdb b/old_work/conv/Espresso.xrdb deleted file mode 100644 index a8c3bcf..0000000 --- a/old_work/conv/Espresso.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#353535", // 0 - "#d25252", // 1 - "#a5c261", // 2 - "#ffc66d", // 3 - "#6c99bb", // 4 - "#d197d9", // 5 - "#bed6ff", // 6 - "#eeeeec", // 7 - "#535353", // 8 - "#f00c0c", // 9 - "#c2e075", // 10 - "#e1e48b", // 11 - "#8ab7d9", // 12 - "#efb5f7", // 13 - "#dcf4ff", // 14 - "#ffffff", // 15 - [255] = 0, - "#323232", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#d6d6d6" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Fideloper.xrdb b/old_work/conv/Fideloper.xrdb deleted file mode 100644 index 50510fd..0000000 --- a/old_work/conv/Fideloper.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#292f33", // 0 - "#cb1e2d", // 1 - "#edb8ac", // 2 - "#b7ab9b", // 3 - "#2e78c2", // 4 - "#c0236f", // 5 - "#309186", // 6 - "#eae3ce", // 7 - "#092028", // 8 - "#d4605a", // 9 - "#d4605a", // 10 - "#a86671", // 11 - "#7c85c4", // 12 - "#5c5db2", // 13 - "#819090", // 14 - "#fcf4df", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#dbdae0", /* fg color */ -//static unsigned int defaultfg = 256; -//static unsigned int defaultcs = 9; -}, diff --git a/old_work/conv/FirefoxDev.xrdb b/old_work/conv/FirefoxDev.xrdb deleted file mode 100644 index b6e3b74..0000000 --- a/old_work/conv/FirefoxDev.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#002831", // 0 - "#e63853", // 1 - "#5eb83c", // 2 - "#a57706", // 3 - "#359ddf", // 4 - "#d75cff", // 5 - "#4b73a2", // 6 - "#dcdcdc", // 7 - "#001e27", // 8 - "#e1003f", // 9 - "#1d9000", // 10 - "#cd9409", // 11 - "#006fc0", // 12 - "#a200da", // 13 - "#005794", // 14 - "#e2e2e2", // 15 - [255] = 0, - "#0e1011", /* bg color */ -//static unsigned int defaultbg = 256; - "#7c8fa4", /* fg color */ -//static unsigned int defaultfg = 257; - "#708284" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Firewatch.xrdb b/old_work/conv/Firewatch.xrdb deleted file mode 100644 index f2ca5dc..0000000 --- a/old_work/conv/Firewatch.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#585f6d", // 0 - "#d95360", // 1 - "#5ab977", // 2 - "#dfb563", // 3 - "#4d89c4", // 4 - "#d55119", // 5 - "#44a8b6", // 6 - "#e6e5ff", // 7 - "#585f6d", // 8 - "#d95360", // 9 - "#5ab977", // 10 - "#dfb563", // 11 - "#4c89c5", // 12 - "#d55119", // 13 - "#44a8b6", // 14 - "#e6e5ff", // 15 - [255] = 0, - "#1e2027", /* bg color */ -//static unsigned int defaultbg = 256; - "#9ba2b2", /* fg color */ -//static unsigned int defaultfg = 257; - "#f6f7ec" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/FishTank.xrdb b/old_work/conv/FishTank.xrdb deleted file mode 100644 index 881cf2e..0000000 --- a/old_work/conv/FishTank.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#03073c", // 0 - "#c6004a", // 1 - "#acf157", // 2 - "#fecd5e", // 3 - "#525fb8", // 4 - "#986f82", // 5 - "#968763", // 6 - "#ecf0fc", // 7 - "#6c5b30", // 8 - "#da4b8a", // 9 - "#dbffa9", // 10 - "#fee6a9", // 11 - "#b2befa", // 12 - "#fda5cd", // 13 - "#a5bd86", // 14 - "#f6ffec", // 15 - [255] = 0, - "#232537", /* bg color */ -//static unsigned int defaultbg = 256; - "#ecf0fe", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 3; -}, diff --git a/old_work/conv/Flat.xrdb b/old_work/conv/Flat.xrdb deleted file mode 100644 index cb3bc2b..0000000 --- a/old_work/conv/Flat.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#222d3f", // 0 - "#a82320", // 1 - "#32a548", // 2 - "#e58d11", // 3 - "#3167ac", // 4 - "#781aa0", // 5 - "#2c9370", // 6 - "#b0b6ba", // 7 - "#212c3c", // 8 - "#d4312e", // 9 - "#2d9440", // 10 - "#e5be0c", // 11 - "#3c7dd2", // 12 - "#8230a7", // 13 - "#35b387", // 14 - "#e7eced", // 15 - [255] = 0, - "#002240", /* bg color */ -//static unsigned int defaultbg = 256; - "#2cc55d", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/Flatland.xrdb b/old_work/conv/Flatland.xrdb deleted file mode 100644 index efda509..0000000 --- a/old_work/conv/Flatland.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#1d1d19", // 0 - "#f18339", // 1 - "#9fd364", // 2 - "#f4ef6d", // 3 - "#5096be", // 4 - "#695abc", // 5 - "#d63865", // 6 - "#ffffff", // 7 - "#1d1d19", // 8 - "#d22a24", // 9 - "#a7d42c", // 10 - "#ff8949", // 11 - "#61b9d0", // 12 - "#695abc", // 13 - "#d63865", // 14 - "#ffffff", // 15 - [255] = 0, - "#1d1f21", /* bg color */ -//static unsigned int defaultbg = 256; - "#b8dbef", /* fg color */ -//static unsigned int defaultfg = 257; - "#708284" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Floraverse.xrdb b/old_work/conv/Floraverse.xrdb deleted file mode 100644 index 906f3e7..0000000 --- a/old_work/conv/Floraverse.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#08002e", // 0 - "#64002c", // 1 - "#5d731a", // 2 - "#cd751c", // 3 - "#1d6da1", // 4 - "#b7077e", // 5 - "#42a38c", // 6 - "#f3e0b8", // 7 - "#331e4d", // 8 - "#d02063", // 9 - "#b4ce59", // 10 - "#fac357", // 11 - "#40a4cf", // 12 - "#f12aae", // 13 - "#62caa8", // 14 - "#fff5db", // 15 - [255] = 0, - "#0e0d15", /* bg color */ -//static unsigned int defaultbg = 256; - "#dbd1b9", /* fg color */ -//static unsigned int defaultfg = 257; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/ForestBlue.xrdb b/old_work/conv/ForestBlue.xrdb deleted file mode 100644 index 2c579cd..0000000 --- a/old_work/conv/ForestBlue.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#333333", // 0 - "#f8818e", // 1 - "#92d3a2", // 2 - "#1a8e63", // 3 - "#8ed0ce", // 4 - "#5e468c", // 5 - "#31658c", // 6 - "#e2d8cd", // 7 - "#3d3d3d", // 8 - "#fb3d66", // 9 - "#6bb48d", // 10 - "#30c85a", // 11 - "#39a7a2", // 12 - "#7e62b3", // 13 - "#6096bf", // 14 - "#e2d8cd", // 15 - [255] = 0, - "#051519", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#9e9ecb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/FrontEndDelight.xrdb b/old_work/conv/FrontEndDelight.xrdb deleted file mode 100644 index d9d920a..0000000 --- a/old_work/conv/FrontEndDelight.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#242526", // 0 - "#f8511b", // 1 - "#565747", // 2 - "#fa771d", // 3 - "#2c70b7", // 4 - "#f02e4f", // 5 - "#3ca1a6", // 6 - "#adadad", // 7 - "#5fac6d", // 8 - "#f74319", // 9 - "#74ec4c", // 10 - "#fdc325", // 11 - "#3393ca", // 12 - "#e75e4f", // 13 - "#4fbce6", // 14 - "#8c735b", // 15 - [255] = 0, - "#1b1c1d", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#cdcdcd" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/FunForrest.xrdb b/old_work/conv/FunForrest.xrdb deleted file mode 100644 index 80c42a0..0000000 --- a/old_work/conv/FunForrest.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#d6262b", // 1 - "#919c00", // 2 - "#be8a13", // 3 - "#4699a3", // 4 - "#8d4331", // 5 - "#da8213", // 6 - "#ddc265", // 7 - "#7f6a55", // 8 - "#e55a1c", // 9 - "#bfc65a", // 10 - "#ffcb1b", // 11 - "#7cc9cf", // 12 - "#d26349", // 13 - "#e6a96b", // 14 - "#ffeaa3", // 15 - [255] = 0, - "#251200", /* bg color */ -//static unsigned int defaultbg = 256; - "#dec165", /* fg color */ -//static unsigned int defaultfg = 257; - "#e5591c" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Galaxy.xrdb b/old_work/conv/Galaxy.xrdb deleted file mode 100644 index 3af1e08..0000000 --- a/old_work/conv/Galaxy.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#000000", // 0 - "#f9555f", // 1 - "#21b089", // 2 - "#fef02a", // 3 - "#589df6", // 4 - "#944d95", // 5 - "#1f9ee7", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#fa8c8f", // 9 - "#35bb9a", // 10 - "#ffff55", // 11 - "#589df6", // 12 - "#e75699", // 13 - "#3979bc", // 14 - "#ffffff", // 15 - [255] = 0, - "#1d2837", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Github.xrdb b/old_work/conv/Github.xrdb deleted file mode 100644 index caedfaa..0000000 --- a/old_work/conv/Github.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#3e3e3e", // 0 - "#970b16", // 1 - "#07962a", // 2 - "#f8eec7", // 3 - "#003e8a", // 4 - "#e94691", // 5 - "#89d1ec", // 6 - "#ffffff", // 7 - "#666666", // 8 - "#de0000", // 9 - "#87d5a2", // 10 - "#f1d007", // 11 - "#2e6cba", // 12 - "#ffa29f", // 13 - "#1cfafe", // 14 - "#ffffff", // 15 - [255] = 0, - "#f4f4f4", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 0; - "#3f3f3f" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Glacier.xrdb b/old_work/conv/Glacier.xrdb deleted file mode 100644 index b7d9380..0000000 --- a/old_work/conv/Glacier.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#2e343c", // 0 - "#bd0f2f", // 1 - "#35a770", // 2 - "#fb9435", // 3 - "#1f5872", // 4 - "#bd2523", // 5 - "#778397", // 6 - "#ffffff", // 7 - "#404a55", // 8 - "#bd0f2f", // 9 - "#49e998", // 10 - "#fddf6e", // 11 - "#2a8bc1", // 12 - "#ea4727", // 13 - "#a0b6d3", // 14 - "#ffffff", // 15 - [255] = 0, - "#0c1115", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#6c6c6c" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Grape.xrdb b/old_work/conv/Grape.xrdb deleted file mode 100644 index 04df3a9..0000000 --- a/old_work/conv/Grape.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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 */ -//static unsigned int defaultbg = 256; - "#9f9fa1", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Grass.xrdb b/old_work/conv/Grass.xrdb deleted file mode 100644 index 859a124..0000000 --- a/old_work/conv/Grass.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#bb0000", // 1 - "#00bb00", // 2 - "#e7b000", // 3 - "#0000a3", // 4 - "#950062", // 5 - "#00bbbb", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#bb0000", // 9 - "#00bb00", // 10 - "#e7b000", // 11 - "#0000bb", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, - "#13773d", /* bg color */ -//static unsigned int defaultbg = 256; - "#fff0a5", /* fg color */ -//static unsigned int defaultfg = 257; - "#8c2800" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Gruvbox Dark.xrdb b/old_work/conv/Gruvbox Dark.xrdb deleted file mode 100644 index 28edf92..0000000 --- a/old_work/conv/Gruvbox Dark.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#161819", // 0 - "#f73028", // 1 - "#aab01e", // 2 - "#f7b125", // 3 - "#719586", // 4 - "#c77089", // 5 - "#7db669", // 6 - "#faefbb", // 7 - "#7f7061", // 8 - "#be0f17", // 9 - "#868715", // 10 - "#cc881a", // 11 - "#377375", // 12 - "#a04b73", // 13 - "#578e57", // 14 - "#e6d4a3", // 15 - [255] = 0, - "#1e1e1e", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Hardcore.xrdb b/old_work/conv/Hardcore.xrdb deleted file mode 100644 index acc80c2..0000000 --- a/old_work/conv/Hardcore.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#1b1d1e", // 0 - "#f92672", // 1 - "#a6e22e", // 2 - "#fd971f", // 3 - "#66d9ef", // 4 - "#9e6ffe", // 5 - "#5e7175", // 6 - "#ccccc6", // 7 - "#505354", // 8 - "#ff669d", // 9 - "#beed5f", // 10 - "#e6db74", // 11 - "#66d9ef", // 12 - "#9e6ffe", // 13 - "#a3babf", // 14 - "#f8f8f2", // 15 - [255] = 0, - "#121212", /* bg color */ -//static unsigned int defaultbg = 256; - "#a0a0a0", /* fg color */ -//static unsigned int defaultfg = 257; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Harper.xrdb b/old_work/conv/Harper.xrdb deleted file mode 100644 index 4aee67f..0000000 --- a/old_work/conv/Harper.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#010101", // 0 - "#f8b63f", // 1 - "#7fb5e1", // 2 - "#d6da25", // 3 - "#489e48", // 4 - "#b296c6", // 5 - "#f5bfd7", // 6 - "#a8a49d", // 7 - "#726e6a", // 8 - "#f8b63f", // 9 - "#7fb5e1", // 10 - "#d6da25", // 11 - "#489e48", // 12 - "#b296c6", // 13 - "#f5bfd7", // 14 - "#fefbea", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Highway.xrdb b/old_work/conv/Highway.xrdb deleted file mode 100644 index 2828664..0000000 --- a/old_work/conv/Highway.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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 */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#e0d9b9" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Hipster Green.xrdb b/old_work/conv/Hipster Green.xrdb deleted file mode 100644 index dd0851c..0000000 --- a/old_work/conv/Hipster Green.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#b6214a", // 1 - "#00a600", // 2 - "#bfbf00", // 3 - "#246eb2", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#86a93e", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#100b05", /* bg color */ -//static unsigned int defaultbg = 256; - "#84c138", /* fg color */ -//static unsigned int defaultfg = 257; - "#23ff18" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Homebrew.xrdb b/old_work/conv/Homebrew.xrdb deleted file mode 100644 index 8dc19b3..0000000 --- a/old_work/conv/Homebrew.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#990000", // 1 - "#00a600", // 2 - "#999900", // 3 - "#0000b2", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#00d900", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#00ff00", /* fg color */ -//static unsigned int defaultfg = 256; - "#23ff18" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Hurtado.xrdb b/old_work/conv/Hurtado.xrdb deleted file mode 100644 index beab80d..0000000 --- a/old_work/conv/Hurtado.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#575757", // 0 - "#ff1b00", // 1 - "#a5e055", // 2 - "#fbe74a", // 3 - "#496487", // 4 - "#fd5ff1", // 5 - "#86e9fe", // 6 - "#cbcccb", // 7 - "#262626", // 8 - "#d51d00", // 9 - "#a5df55", // 10 - "#fbe84a", // 11 - "#89beff", // 12 - "#c001c1", // 13 - "#86eafe", // 14 - "#dbdbdb", // 15 - [255] = 0, - "#000000", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Hybrid.xrdb b/old_work/conv/Hybrid.xrdb deleted file mode 100644 index 6760ae7..0000000 --- a/old_work/conv/Hybrid.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#2a2e33", // 0 - "#b84d51", // 1 - "#b3bf5a", // 2 - "#e4b55e", // 3 - "#6e90b0", // 4 - "#a17eac", // 5 - "#7fbfb4", // 6 - "#b5b9b6", // 7 - "#1d1f22", // 8 - "#8d2e32", // 9 - "#798431", // 10 - "#e58a50", // 11 - "#4b6b88", // 12 - "#6e5079", // 13 - "#4d7b74", // 14 - "#5a626a", // 15 - [255] = 0, - "#161719", /* bg color */ -//static unsigned int defaultbg = 256; - "#b7bcba", /* fg color */ -//static unsigned int defaultfg = 257; - "#b7bcba" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/IC_Green_PPL.xrdb b/old_work/conv/IC_Green_PPL.xrdb deleted file mode 100644 index d718304..0000000 --- a/old_work/conv/IC_Green_PPL.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#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; -}, diff --git a/old_work/conv/IC_Orange_PPL.xrdb b/old_work/conv/IC_Orange_PPL.xrdb deleted file mode 100644 index ed483c1..0000000 --- a/old_work/conv/IC_Orange_PPL.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#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; -}, diff --git a/old_work/conv/IR_Black.xrdb b/old_work/conv/IR_Black.xrdb deleted file mode 100644 index 8a058d0..0000000 --- a/old_work/conv/IR_Black.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#4f4f4f", // 0 - "#fa6c60", // 1 - "#a8ff60", // 2 - "#fffeb7", // 3 - "#96cafe", // 4 - "#fa73fd", // 5 - "#c6c5fe", // 6 - "#efedef", // 7 - "#7b7b7b", // 8 - "#fcb6b0", // 9 - "#cfffab", // 10 - "#ffffcc", // 11 - "#b5dcff", // 12 - "#fb9cfe", // 13 - "#e0e0fe", // 14 - "#ffffff", // 15 - [255] = 0, - "#000000", /* bg color */ -//static unsigned int defaultbg = 256; - "#f1f1f1", /* fg color */ -//static unsigned int defaultfg = 257; - "#808080" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Jackie Brown.xrdb b/old_work/conv/Jackie Brown.xrdb deleted file mode 100644 index 47f9669..0000000 --- a/old_work/conv/Jackie Brown.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#2c1d16", // 0 - "#ef5734", // 1 - "#2baf2b", // 2 - "#bebf00", // 3 - "#246eb2", // 4 - "#d05ec1", // 5 - "#00acee", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#86a93e", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#ffcc2f", /* fg color */ -//static unsigned int defaultfg = 256; - "#23ff18" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Japanesque.xrdb b/old_work/conv/Japanesque.xrdb deleted file mode 100644 index 8fc6499..0000000 --- a/old_work/conv/Japanesque.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#343935", // 0 - "#cf3f61", // 1 - "#7bb75b", // 2 - "#e9b32a", // 3 - "#4c9ad4", // 4 - "#a57fc4", // 5 - "#389aad", // 6 - "#fafaf6", // 7 - "#595b59", // 8 - "#d18fa6", // 9 - "#767f2c", // 10 - "#78592f", // 11 - "#135979", // 12 - "#604291", // 13 - "#76bbca", // 14 - "#b2b5ae", // 15 - [255] = 0, - "#1e1e1e", /* bg color */ -//static unsigned int defaultbg = 256; - "#f7f6ec", /* fg color */ -//static unsigned int defaultfg = 257; - "#edcf4f" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Jellybeans.xrdb b/old_work/conv/Jellybeans.xrdb deleted file mode 100644 index c3c137a..0000000 --- a/old_work/conv/Jellybeans.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#929292", // 0 - "#e27373", // 1 - "#94b979", // 2 - "#ffba7b", // 3 - "#97bedc", // 4 - "#e1c0fa", // 5 - "#00988e", // 6 - "#dedede", // 7 - "#bdbdbd", // 8 - "#ffa1a1", // 9 - "#bddeab", // 10 - "#ffdca0", // 11 - "#b1d8f6", // 12 - "#fbdaff", // 13 - "#1ab2a8", // 14 - "#ffffff", // 15 - [255] = 0, - "#121212", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#ffa560" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/JetBrains Darcula.xrdb b/old_work/conv/JetBrains Darcula.xrdb deleted file mode 100644 index 1589277..0000000 --- a/old_work/conv/JetBrains Darcula.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#fa5355", // 1 - "#126e00", // 2 - "#c2c300", // 3 - "#4581eb", // 4 - "#fa54ff", // 5 - "#33c2c1", // 6 - "#adadad", // 7 - "#555555", // 8 - "#fb7172", // 9 - "#67ff4f", // 10 - "#ffff00", // 11 - "#6d9df1", // 12 - "#fb82ff", // 13 - "#60d3d1", // 14 - "#eeeeee", // 15 - [255] = 0, - "#202020", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Kibble.xrdb b/old_work/conv/Kibble.xrdb deleted file mode 100644 index a986423..0000000 --- a/old_work/conv/Kibble.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#4d4d4d", // 0 - "#c70031", // 1 - "#29cf13", // 2 - "#d8e30e", // 3 - "#3449d1", // 4 - "#8400ff", // 5 - "#0798ab", // 6 - "#e2d1e3", // 7 - "#5a5a5a", // 8 - "#f01578", // 9 - "#6ce05c", // 10 - "#f3f79e", // 11 - "#97a4f7", // 12 - "#c495f0", // 13 - "#68f2e0", // 14 - "#ffffff", // 15 - [255] = 0, - "#0e100a", /* bg color */ -//static unsigned int defaultbg = 256; - "#f7f7f7", /* fg color */ -//static unsigned int defaultfg = 257; - "#9fda9c" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Later This Evening.xrdb b/old_work/conv/Later This Evening.xrdb deleted file mode 100644 index c989fc4..0000000 --- a/old_work/conv/Later This Evening.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#2b2b2b", // 0 - "#d45a60", // 1 - "#afba67", // 2 - "#e5d289", // 3 - "#a0bad6", // 4 - "#c092d6", // 5 - "#91bfb7", // 6 - "#3c3d3d", // 7 - "#454747", // 8 - "#d3232f", // 9 - "#aabb39", // 10 - "#e5be39", // 11 - "#6699d6", // 12 - "#ab53d6", // 13 - "#5fc0ae", // 14 - "#c1c2c2", // 15 - [255] = 0, - "#222222", /* bg color */ -//static unsigned int defaultbg = 256; - "#959595", /* fg color */ -//static unsigned int defaultfg = 257; - "#424242" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Lavandula.xrdb b/old_work/conv/Lavandula.xrdb deleted file mode 100644 index da449ee..0000000 --- a/old_work/conv/Lavandula.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#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; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/LiquidCarbon.xrdb b/old_work/conv/LiquidCarbon.xrdb deleted file mode 100644 index 4b6c0de..0000000 --- a/old_work/conv/LiquidCarbon.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#ff3030", // 1 - "#559a70", // 2 - "#ccac00", // 3 - "#0099cc", // 4 - "#cc69c8", // 5 - "#7ac4cc", // 6 - "#bccccc", // 7 - "#000000", // 8 - "#ff3030", // 9 - "#559a70", // 10 - "#ccac00", // 11 - "#0099cc", // 12 - "#cc69c8", // 13 - "#7ac4cc", // 14 - "#bccccc", // 15 - [255] = 0, - "#303030", /* bg color */ -//static unsigned int defaultbg = 256; - "#afc2c2", /* fg color */ -//static unsigned int defaultfg = 257; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/LiquidCarbonTransparent.xrdb b/old_work/conv/LiquidCarbonTransparent.xrdb deleted file mode 100644 index ef3774a..0000000 --- a/old_work/conv/LiquidCarbonTransparent.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff3030", // 1 - "#559a70", // 2 - "#ccac00", // 3 - "#0099cc", // 4 - "#cc69c8", // 5 - "#7ac4cc", // 6 - "#bccccc", // 7 - "#000000", // 8 - "#ff3030", // 9 - "#559a70", // 10 - "#ccac00", // 11 - "#0099cc", // 12 - "#cc69c8", // 13 - "#7ac4cc", // 14 - "#bccccc", // 15 - [255] = 0, -//static unsigned int defaultbg = 8; - "#afc2c2", /* fg color */ -//static unsigned int defaultfg = 256; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/LiquidCarbonTransparentInverse.xrdb b/old_work/conv/LiquidCarbonTransparentInverse.xrdb deleted file mode 100644 index c2553de..0000000 --- a/old_work/conv/LiquidCarbonTransparentInverse.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#bccccd", // 0 - "#ff3030", // 1 - "#559a70", // 2 - "#ccac00", // 3 - "#0099cc", // 4 - "#cc69c8", // 5 - "#7ac4cc", // 6 - "#000000", // 7 - "#ffffff", // 8 - "#ff3030", // 9 - "#559a70", // 10 - "#ccac00", // 11 - "#0099cc", // 12 - "#cc69c8", // 13 - "#7ac4cc", // 14 - "#000000", // 15 - [255] = 0, -//static unsigned int defaultbg = 7; - "#afc2c2", /* fg color */ -//static unsigned int defaultfg = 256; -//static unsigned int defaultcs = 8; -}, diff --git a/old_work/conv/Man Page.xrdb b/old_work/conv/Man Page.xrdb deleted file mode 100644 index 5c2dee8..0000000 --- a/old_work/conv/Man Page.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#cc0000", // 1 - "#00a600", // 2 - "#999900", // 3 - "#0000b2", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#cccccc", // 7 - "#666666", // 8 - "#e50000", // 9 - "#00d900", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#fef49c", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 0; - "#7f7f7f" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Material.xrdb b/old_work/conv/Material.xrdb deleted file mode 100644 index e32ea44..0000000 --- a/old_work/conv/Material.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#212121", // 0 - "#b7141f", // 1 - "#457b24", // 2 - "#f6981e", // 3 - "#134eb2", // 4 - "#560088", // 5 - "#0e717c", // 6 - "#efefef", // 7 - "#424242", // 8 - "#e83b3f", // 9 - "#7aba3a", // 10 - "#ffea2e", // 11 - "#54a4f3", // 12 - "#aa4dbc", // 13 - "#26bbd1", // 14 - "#d9d9d9", // 15 - [255] = 0, - "#eaeaea", /* bg color */ -//static unsigned int defaultbg = 256; - "#232322", /* fg color */ -//static unsigned int defaultfg = 257; - "#16afca" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/MaterialDark.xrdb b/old_work/conv/MaterialDark.xrdb deleted file mode 100644 index 2fae0b9..0000000 --- a/old_work/conv/MaterialDark.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#212121", // 0 - "#b7141f", // 1 - "#457b24", // 2 - "#f6981e", // 3 - "#134eb2", // 4 - "#560088", // 5 - "#0e717c", // 6 - "#efefef", // 7 - "#424242", // 8 - "#e83b3f", // 9 - "#7aba3a", // 10 - "#ffea2e", // 11 - "#54a4f3", // 12 - "#aa4dbc", // 13 - "#26bbd1", // 14 - "#d9d9d9", // 15 - [255] = 0, - "#232322", /* bg color */ -//static unsigned int defaultbg = 256; - "#e5e5e5", /* fg color */ -//static unsigned int defaultfg = 257; - "#16afca" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Mathias.xrdb b/old_work/conv/Mathias.xrdb deleted file mode 100644 index 6eadca2..0000000 --- a/old_work/conv/Mathias.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#e52222", // 1 - "#a6e32d", // 2 - "#fc951e", // 3 - "#c48dff", // 4 - "#fa2573", // 5 - "#67d9f0", // 6 - "#f2f2f2", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#55ff55", // 10 - "#ffff55", // 11 - "#5555ff", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#bbbbbb", /* fg color */ -//static unsigned int defaultfg = 256; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Medallion.xrdb b/old_work/conv/Medallion.xrdb deleted file mode 100644 index 9884e36..0000000 --- a/old_work/conv/Medallion.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#b64c00", // 1 - "#7c8b16", // 2 - "#d3bd26", // 3 - "#616bb0", // 4 - "#8c5a90", // 5 - "#916c25", // 6 - "#cac29a", // 7 - "#5e5219", // 8 - "#ff9149", // 9 - "#b2ca3b", // 10 - "#ffe54a", // 11 - "#acb8ff", // 12 - "#ffa0ff", // 13 - "#ffbc51", // 14 - "#fed698", // 15 - [255] = 0, - "#1d1908", /* bg color */ -//static unsigned int defaultbg = 256; - "#cac296", /* fg color */ -//static unsigned int defaultfg = 257; - "#d3ba30" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Misterioso.xrdb b/old_work/conv/Misterioso.xrdb deleted file mode 100644 index ca13a73..0000000 --- a/old_work/conv/Misterioso.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#000000", // 0 - "#ff4242", // 1 - "#74af68", // 2 - "#ffad29", // 3 - "#338f86", // 4 - "#9414e6", // 5 - "#23d7d7", // 6 - "#e1e1e0", // 7 - "#555555", // 8 - "#ff3242", // 9 - "#74cd68", // 10 - "#ffb929", // 11 - "#23d7d7", // 12 - "#ff37ff", // 13 - "#00ede1", // 14 - "#ffffff", // 15 - [255] = 0, - "#2d3743", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 0; -}, diff --git a/old_work/conv/Molokai.xrdb b/old_work/conv/Molokai.xrdb deleted file mode 100644 index f288ced..0000000 --- a/old_work/conv/Molokai.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#121212", // 0 - "#fa2573", // 1 - "#98e123", // 2 - "#dfd460", // 3 - "#1080d0", // 4 - "#8700ff", // 5 - "#43a8d0", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#f6669d", // 9 - "#b1e05f", // 10 - "#fff26d", // 11 - "#00afff", // 12 - "#af87ff", // 13 - "#51ceff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/MonaLisa.xrdb b/old_work/conv/MonaLisa.xrdb deleted file mode 100644 index ad9cd5b..0000000 --- a/old_work/conv/MonaLisa.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#351b0e", // 0 - "#9b291c", // 1 - "#636232", // 2 - "#c36e28", // 3 - "#515c5d", // 4 - "#9b1d29", // 5 - "#588056", // 6 - "#f7d75c", // 7 - "#874228", // 8 - "#ff4331", // 9 - "#b4b264", // 10 - "#ff9566", // 11 - "#9eb2b4", // 12 - "#ff5b6a", // 13 - "#8acd8f", // 14 - "#ffe598", // 15 - [255] = 0, - "#120b0d", /* bg color */ -//static unsigned int defaultbg = 256; - "#f7d66a", /* fg color */ -//static unsigned int defaultfg = 257; - "#c46c32" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Monokai Soda.xrdb b/old_work/conv/Monokai Soda.xrdb deleted file mode 100644 index 3c75b8e..0000000 --- a/old_work/conv/Monokai Soda.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#1a1a1a", // 0 - "#f4005f", // 1 - "#98e024", // 2 - "#fa8419", // 3 - "#9d65ff", // 4 - "#f4005f", // 5 - "#58d1eb", // 6 - "#c4c5b5", // 7 - "#625e4c", // 8 - "#f4005f", // 9 - "#98e024", // 10 - "#e0d561", // 11 - "#9d65ff", // 12 - "#f4005f", // 13 - "#58d1eb", // 14 - "#f6f6ef", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; - "#f6f7ec" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/Monokai Vivid.xrdb b/old_work/conv/Monokai Vivid.xrdb deleted file mode 100644 index f9c686a..0000000 --- a/old_work/conv/Monokai Vivid.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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; - "#f9f9f9", /* fg color */ -//static unsigned int defaultfg = 256; - "#fb0007" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/N0tch2k.xrdb b/old_work/conv/N0tch2k.xrdb deleted file mode 100644 index 0bad353..0000000 --- a/old_work/conv/N0tch2k.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#383838", // 0 - "#a95551", // 1 - "#666666", // 2 - "#a98051", // 3 - "#657d3e", // 4 - "#767676", // 5 - "#c9c9c9", // 6 - "#d0b8a3", // 7 - "#474747", // 8 - "#a97775", // 9 - "#8c8c8c", // 10 - "#a99175", // 11 - "#98bd5e", // 12 - "#a3a3a3", // 13 - "#dcdcdc", // 14 - "#d8c8bb", // 15 - [255] = 0, - "#222222", /* bg color */ -//static unsigned int defaultbg = 256; - "#a0a0a0", /* fg color */ -//static unsigned int defaultfg = 257; - "#aa9175" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Neopolitan.xrdb b/old_work/conv/Neopolitan.xrdb deleted file mode 100644 index d17c21e..0000000 --- a/old_work/conv/Neopolitan.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#800000", // 1 - "#61ce3c", // 2 - "#fbde2d", // 3 - "#253b76", // 4 - "#ff0080", // 5 - "#8da6ce", // 6 - "#f8f8f8", // 7 - "#000000", // 8 - "#800000", // 9 - "#61ce3c", // 10 - "#fbde2d", // 11 - "#253b76", // 12 - "#ff0080", // 13 - "#8da6ce", // 14 - "#f8f8f8", // 15 - [255] = 0, - "#271f19", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffffff", /* fg color */ -//static unsigned int defaultfg = 257; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Neutron.xrdb b/old_work/conv/Neutron.xrdb deleted file mode 100644 index 2248f6b..0000000 --- a/old_work/conv/Neutron.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#23252b", // 0 - "#b54036", // 1 - "#5ab977", // 2 - "#deb566", // 3 - "#6a7c93", // 4 - "#a4799d", // 5 - "#3f94a8", // 6 - "#e6e8ef", // 7 - "#23252b", // 8 - "#b54036", // 9 - "#5ab977", // 10 - "#deb566", // 11 - "#6a7c93", // 12 - "#a4799d", // 13 - "#3f94a8", // 14 - "#ebedf2", // 15 - [255] = 0, - "#1c1e22", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#f6f7ec" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/NightLion v1.xrdb b/old_work/conv/NightLion v1.xrdb deleted file mode 100644 index d5a41c3..0000000 --- a/old_work/conv/NightLion v1.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#4c4c4c", // 0 - "#bb0000", // 1 - "#5fde8f", // 2 - "#f3f167", // 3 - "#276bd8", // 4 - "#bb00bb", // 5 - "#00dadf", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#55ff55", // 10 - "#ffff55", // 11 - "#5555ff", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, - "#000000", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/NightLion v2.xrdb b/old_work/conv/NightLion v2.xrdb deleted file mode 100644 index b84db83..0000000 --- a/old_work/conv/NightLion v2.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#4c4c4c", // 0 - "#bb0000", // 1 - "#04f623", // 2 - "#f3f167", // 3 - "#64d0f0", // 4 - "#ce6fdb", // 5 - "#00dadf", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#7df71d", // 10 - "#ffff55", // 11 - "#62cbe8", // 12 - "#ff9bf5", // 13 - "#00ccd8", // 14 - "#ffffff", // 15 - [255] = 0, - "#171717", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Novel.xrdb b/old_work/conv/Novel.xrdb deleted file mode 100644 index 38b1b4f..0000000 --- a/old_work/conv/Novel.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#cc0000", // 1 - "#009600", // 2 - "#d06b00", // 3 - "#0000cc", // 4 - "#cc00cc", // 5 - "#0087cc", // 6 - "#cccccc", // 7 - "#808080", // 8 - "#cc0000", // 9 - "#009600", // 10 - "#d06b00", // 11 - "#0000cc", // 12 - "#cc00cc", // 13 - "#0087cc", // 14 - "#ffffff", // 15 - [255] = 0, - "#dfdbc3", /* bg color */ -//static unsigned int defaultbg = 256; - "#3b2322", /* fg color */ -//static unsigned int defaultfg = 257; - "#73635a" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Obsidian.xrdb b/old_work/conv/Obsidian.xrdb deleted file mode 100644 index feb7e32..0000000 --- a/old_work/conv/Obsidian.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#a60001", // 1 - "#00bb00", // 2 - "#fecd22", // 3 - "#3a9bdb", // 4 - "#bb00bb", // 5 - "#00bbbb", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#ff0003", // 9 - "#93c863", // 10 - "#fef874", // 11 - "#a1d7ff", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, - "#283033", /* bg color */ -//static unsigned int defaultbg = 256; - "#cdcdcd", /* fg color */ -//static unsigned int defaultfg = 257; - "#c0cad0" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Ocean.xrdb b/old_work/conv/Ocean.xrdb deleted file mode 100644 index 932bbe1..0000000 --- a/old_work/conv/Ocean.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#990000", // 1 - "#00a600", // 2 - "#999900", // 3 - "#0000b2", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#00d900", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#224fbc", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffffff", /* fg color */ -//static unsigned int defaultfg = 257; - "#7f7f7f" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/OceanicMaterial.xrdb b/old_work/conv/OceanicMaterial.xrdb deleted file mode 100644 index faff28e..0000000 --- a/old_work/conv/OceanicMaterial.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#ee2b2a", // 1 - "#40a33f", // 2 - "#ffea2e", // 3 - "#1e80f0", // 4 - "#8800a0", // 5 - "#16afca", // 6 - "#a4a4a4", // 7 - "#777777", // 8 - "#dc5c60", // 9 - "#70be71", // 10 - "#fff163", // 11 - "#54a4f3", // 12 - "#aa4dbc", // 13 - "#42c7da", // 14 - "#ffffff", // 15 - [255] = 0, - "#1c262b", /* bg color */ -//static unsigned int defaultbg = 256; - "#c2c8d7", /* fg color */ -//static unsigned int defaultfg = 257; - "#b3b8c3" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Ollie.xrdb b/old_work/conv/Ollie.xrdb deleted file mode 100644 index 7b1c657..0000000 --- a/old_work/conv/Ollie.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ac2e31", // 1 - "#31ac61", // 2 - "#ac4300", // 3 - "#2d57ac", // 4 - "#b08528", // 5 - "#1fa6ac", // 6 - "#8a8eac", // 7 - "#5b3725", // 8 - "#ff3d48", // 9 - "#3bff99", // 10 - "#ff5e1e", // 11 - "#4488ff", // 12 - "#ffc21d", // 13 - "#1ffaff", // 14 - "#5b6ea7", // 15 - [255] = 0, - "#222125", /* bg color */ -//static unsigned int defaultbg = 256; - "#8a8dae", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/OneHalfDark.xrdb b/old_work/conv/OneHalfDark.xrdb deleted file mode 100644 index 1f4f29a..0000000 --- a/old_work/conv/OneHalfDark.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#282c34", // 0 - "#e06c75", // 1 - "#98c379", // 2 - "#e5c07b", // 3 - "#61afef", // 4 - "#c678dd", // 5 - "#56b6c2", // 6 - "#dcdfe4", // 7 - "#282c34", // 8 - "#e06c75", // 9 - "#98c379", // 10 - "#e5c07b", // 11 - "#61afef", // 12 - "#c678dd", // 13 - "#56b6c2", // 14 - "#dcdfe4", // 15 - [255] = 0, -//static unsigned int defaultbg = 8; -//static unsigned int defaultfg = 7; - "#a3b3cc" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/OneHalfLight.xrdb b/old_work/conv/OneHalfLight.xrdb deleted file mode 100644 index 6aced34..0000000 --- a/old_work/conv/OneHalfLight.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#383a42", // 0 - "#e45649", // 1 - "#50a14f", // 2 - "#c18401", // 3 - "#0184bc", // 4 - "#a626a4", // 5 - "#0997b3", // 6 - "#fafafa", // 7 - "#4f525e", // 8 - "#e06c75", // 9 - "#98c379", // 10 - "#e5c07b", // 11 - "#61afef", // 12 - "#c678dd", // 13 - "#56b6c2", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 7; -//static unsigned int defaultfg = 0; - "#bfceff" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/Pandora.xrdb b/old_work/conv/Pandora.xrdb deleted file mode 100644 index 8ed6ba5..0000000 --- a/old_work/conv/Pandora.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#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; -}, diff --git a/old_work/conv/Paraiso Dark.xrdb b/old_work/conv/Paraiso Dark.xrdb deleted file mode 100644 index 224db64..0000000 --- a/old_work/conv/Paraiso Dark.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#2f1e2e", // 0 - "#ef6155", // 1 - "#48b685", // 2 - "#fec418", // 3 - "#06b6ef", // 4 - "#815ba4", // 5 - "#5bc4bf", // 6 - "#a39e9b", // 7 - "#776e71", // 8 - "#ef6155", // 9 - "#48b685", // 10 - "#fec418", // 11 - "#06b6ef", // 12 - "#815ba4", // 13 - "#5bc4bf", // 14 - "#e7e9db", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Parasio Dark.xrdb b/old_work/conv/Parasio Dark.xrdb deleted file mode 100644 index 224db64..0000000 --- a/old_work/conv/Parasio Dark.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#2f1e2e", // 0 - "#ef6155", // 1 - "#48b685", // 2 - "#fec418", // 3 - "#06b6ef", // 4 - "#815ba4", // 5 - "#5bc4bf", // 6 - "#a39e9b", // 7 - "#776e71", // 8 - "#ef6155", // 9 - "#48b685", // 10 - "#fec418", // 11 - "#06b6ef", // 12 - "#815ba4", // 13 - "#5bc4bf", // 14 - "#e7e9db", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/PaulMillr.xrdb b/old_work/conv/PaulMillr.xrdb deleted file mode 100644 index a532c00..0000000 --- a/old_work/conv/PaulMillr.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#2a2a2a", // 0 - "#ff0000", // 1 - "#79ff0f", // 2 - "#e7bf00", // 3 - "#396bd7", // 4 - "#b449be", // 5 - "#66ccff", // 6 - "#bbbbbb", // 7 - "#666666", // 8 - "#ff0080", // 9 - "#66ff66", // 10 - "#f3d64e", // 11 - "#709aed", // 12 - "#db67e6", // 13 - "#7adff2", // 14 - "#ffffff", // 15 - [255] = 0, - "#000000", /* bg color */ -//static unsigned int defaultbg = 256; - "#f2f2f2", /* fg color */ -//static unsigned int defaultfg = 257; - "#4d4d4d" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/PencilDark.xrdb b/old_work/conv/PencilDark.xrdb deleted file mode 100644 index 9506526..0000000 --- a/old_work/conv/PencilDark.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#212121", // 0 - "#c30771", // 1 - "#10a778", // 2 - "#a89c14", // 3 - "#008ec4", // 4 - "#523c79", // 5 - "#20a5ba", // 6 - "#d9d9d9", // 7 - "#424242", // 8 - "#fb007a", // 9 - "#5fd7af", // 10 - "#f3e430", // 11 - "#20bbfc", // 12 - "#6855de", // 13 - "#4fb8cc", // 14 - "#f1f1f1", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 15; -//static unsigned int defaultcs = 12; -}, diff --git a/old_work/conv/PencilLight.xrdb b/old_work/conv/PencilLight.xrdb deleted file mode 100644 index 2513ffa..0000000 --- a/old_work/conv/PencilLight.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#212121", // 0 - "#c30771", // 1 - "#10a778", // 2 - "#a89c14", // 3 - "#008ec4", // 4 - "#523c79", // 5 - "#20a5ba", // 6 - "#d9d9d9", // 7 - "#424242", // 8 - "#fb007a", // 9 - "#5fd7af", // 10 - "#f3e430", // 11 - "#20bbfc", // 12 - "#6855de", // 13 - "#4fb8cc", // 14 - "#f1f1f1", // 15 - [255] = 0, -//static unsigned int defaultbg = 15; -//static unsigned int defaultfg = 8; -//static unsigned int defaultcs = 12; -}, diff --git a/old_work/conv/Piatto Light.xrdb b/old_work/conv/Piatto Light.xrdb deleted file mode 100644 index 53710bc..0000000 --- a/old_work/conv/Piatto Light.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#414141", // 0 - "#b23771", // 1 - "#66781e", // 2 - "#cd6f34", // 3 - "#3c5ea8", // 4 - "#a454b2", // 5 - "#66781e", // 6 - "#ffffff", // 7 - "#3f3f3f", // 8 - "#db3365", // 9 - "#829429", // 10 - "#cd6f34", // 11 - "#3c5ea8", // 12 - "#a454b2", // 13 - "#829429", // 14 - "#f2f2f2", // 15 - [255] = 0, -//static unsigned int defaultbg = 7; -//static unsigned int defaultfg = 0; - "#5e77c8" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/Pnevma.xrdb b/old_work/conv/Pnevma.xrdb deleted file mode 100644 index 967bd4e..0000000 --- a/old_work/conv/Pnevma.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#2f2e2d", // 0 - "#a36666", // 1 - "#90a57d", // 2 - "#d7af87", // 3 - "#7fa5bd", // 4 - "#c79ec4", // 5 - "#8adbb4", // 6 - "#d0d0d0", // 7 - "#4a4845", // 8 - "#d78787", // 9 - "#afbea2", // 10 - "#e4c9af", // 11 - "#a1bdce", // 12 - "#d7beda", // 13 - "#b1e7dd", // 14 - "#efefef", // 15 - [255] = 0, - "#1c1c1c", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/Pro.xrdb b/old_work/conv/Pro.xrdb deleted file mode 100644 index c08ad33..0000000 --- a/old_work/conv/Pro.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#990000", // 1 - "#00a600", // 2 - "#999900", // 3 - "#2009db", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#00d900", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#f2f2f2", /* fg color */ -//static unsigned int defaultfg = 256; - "#4d4d4d" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Red Alert.xrdb b/old_work/conv/Red Alert.xrdb deleted file mode 100644 index c4e4ad4..0000000 --- a/old_work/conv/Red Alert.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#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; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Red Sands.xrdb b/old_work/conv/Red Sands.xrdb deleted file mode 100644 index 99af0cd..0000000 --- a/old_work/conv/Red Sands.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff3f00", // 1 - "#00bb00", // 2 - "#e7b000", // 3 - "#0072ff", // 4 - "#bb00bb", // 5 - "#00bbbb", // 6 - "#bbbbbb", // 7 - "#555555", // 8 - "#bb0000", // 9 - "#00bb00", // 10 - "#e7b000", // 11 - "#0072ae", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, - "#7a251e", /* bg color */ -//static unsigned int defaultbg = 256; - "#d7c9a7", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Rippedcasts.xrdb b/old_work/conv/Rippedcasts.xrdb deleted file mode 100644 index 6642fd8..0000000 --- a/old_work/conv/Rippedcasts.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#cdaf95", // 1 - "#a8ff60", // 2 - "#bfbb1f", // 3 - "#75a5b0", // 4 - "#ff73fd", // 5 - "#5a647e", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#eecbad", // 9 - "#bcee68", // 10 - "#e5e500", // 11 - "#86bdc9", // 12 - "#e500e5", // 13 - "#8c9bc4", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#2b2b2b", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffffff", /* fg color */ -//static unsigned int defaultfg = 257; - "#7f7f7f" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Royal.xrdb b/old_work/conv/Royal.xrdb deleted file mode 100644 index 5e1570e..0000000 --- a/old_work/conv/Royal.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#241f2b", // 0 - "#91284c", // 1 - "#23801c", // 2 - "#b49d27", // 3 - "#6580b0", // 4 - "#674d96", // 5 - "#8aaabe", // 6 - "#524966", // 7 - "#312d3d", // 8 - "#d5356c", // 9 - "#2cd946", // 10 - "#fde83b", // 11 - "#90baf9", // 12 - "#a479e3", // 13 - "#acd4eb", // 14 - "#9e8cbd", // 15 - [255] = 0, - "#100815", /* bg color */ -//static unsigned int defaultbg = 256; - "#514968", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Ryuuko.xrdb b/old_work/conv/Ryuuko.xrdb deleted file mode 100644 index 10c9f6f..0000000 --- a/old_work/conv/Ryuuko.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#2c3941", // 0 - "#865f5b", // 1 - "#66907d", // 2 - "#b1a990", // 3 - "#6a8e95", // 4 - "#b18a73", // 5 - "#88b2ac", // 6 - "#ececec", // 7 - "#5d7079", // 8 - "#865f5b", // 9 - "#66907d", // 10 - "#b1a990", // 11 - "#6a8e95", // 12 - "#b18a73", // 13 - "#88b2ac", // 14 - "#ececec", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/SeaShells.xrdb b/old_work/conv/SeaShells.xrdb deleted file mode 100644 index 510f8ae..0000000 --- a/old_work/conv/SeaShells.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#17384c", // 0 - "#d15123", // 1 - "#027c9b", // 2 - "#fca02f", // 3 - "#1e4950", // 4 - "#68d4f1", // 5 - "#50a3b5", // 6 - "#deb88d", // 7 - "#434b53", // 8 - "#d48678", // 9 - "#628d98", // 10 - "#fdd39f", // 11 - "#1bbcdd", // 12 - "#bbe3ee", // 13 - "#87acb4", // 14 - "#fee4ce", // 15 - [255] = 0, - "#09141b", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 3; -}, diff --git a/old_work/conv/Seafoam Pastel.xrdb b/old_work/conv/Seafoam Pastel.xrdb deleted file mode 100644 index 00f6991..0000000 --- a/old_work/conv/Seafoam Pastel.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#757575", // 0 - "#825d4d", // 1 - "#728c62", // 2 - "#ada16d", // 3 - "#4d7b82", // 4 - "#8a7267", // 5 - "#729494", // 6 - "#e0e0e0", // 7 - "#8a8a8a", // 8 - "#cf937a", // 9 - "#98d9aa", // 10 - "#fae79d", // 11 - "#7ac3cf", // 12 - "#d6b2a1", // 13 - "#ade0e0", // 14 - "#e0e0e0", // 15 - [255] = 0, - "#243435", /* bg color */ -//static unsigned int defaultbg = 256; - "#d4e7d4", /* fg color */ -//static unsigned int defaultfg = 257; - "#57647a" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Seti.xrdb b/old_work/conv/Seti.xrdb deleted file mode 100644 index 8b4e33a..0000000 --- a/old_work/conv/Seti.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#323232", // 0 - "#c22832", // 1 - "#8ec43d", // 2 - "#e0c64f", // 3 - "#43a5d5", // 4 - "#8b57b5", // 5 - "#8ec43d", // 6 - "#eeeeee", // 7 - "#323232", // 8 - "#c22832", // 9 - "#8ec43d", // 10 - "#e0c64f", // 11 - "#43a5d5", // 12 - "#8b57b5", // 13 - "#8ec43d", // 14 - "#ffffff", // 15 - [255] = 0, - "#111213", /* bg color */ -//static unsigned int defaultbg = 256; - "#cacecd", /* fg color */ -//static unsigned int defaultfg = 257; - "#e3bf21" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Shaman.xrdb b/old_work/conv/Shaman.xrdb deleted file mode 100644 index c5ba48c..0000000 --- a/old_work/conv/Shaman.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#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; - "#4afcd6" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Slate.xrdb b/old_work/conv/Slate.xrdb deleted file mode 100644 index 8b02b92..0000000 --- a/old_work/conv/Slate.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#222222", // 0 - "#e2a8bf", // 1 - "#81d778", // 2 - "#c4c9c0", // 3 - "#264b49", // 4 - "#a481d3", // 5 - "#15ab9c", // 6 - "#02c5e0", // 7 - "#ffffff", // 8 - "#ffcdd9", // 9 - "#beffa8", // 10 - "#d0ccca", // 11 - "#7ab0d2", // 12 - "#c5a7d9", // 13 - "#8cdfe0", // 14 - "#e0e0e0", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#35b1d2", /* fg color */ -//static unsigned int defaultfg = 256; - "#87d3c4" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Smyck.xrdb b/old_work/conv/Smyck.xrdb deleted file mode 100644 index aba8479..0000000 --- a/old_work/conv/Smyck.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#b84131", // 1 - "#7da900", // 2 - "#c4a500", // 3 - "#62a3c4", // 4 - "#ba8acc", // 5 - "#207383", // 6 - "#a1a1a1", // 7 - "#7a7a7a", // 8 - "#d6837c", // 9 - "#c4f137", // 10 - "#fee14d", // 11 - "#8dcff0", // 12 - "#f79aff", // 13 - "#6ad9cf", // 14 - "#f7f7f7", // 15 - [255] = 0, - "#1b1b1b", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/SoftServer.xrdb b/old_work/conv/SoftServer.xrdb deleted file mode 100644 index b1265ca..0000000 --- a/old_work/conv/SoftServer.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#000000", // 0 - "#a2686a", // 1 - "#9aa56a", // 2 - "#a3906a", // 3 - "#6b8fa3", // 4 - "#6a71a3", // 5 - "#6ba58f", // 6 - "#99a3a2", // 7 - "#666c6c", // 8 - "#dd5c60", // 9 - "#bfdf55", // 10 - "#deb360", // 11 - "#62b1df", // 12 - "#606edf", // 13 - "#64e39c", // 14 - "#d2e0de", // 15 - [255] = 0, - "#242626", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Solarized Darcula.xrdb b/old_work/conv/Solarized Darcula.xrdb deleted file mode 100644 index 9cb1d23..0000000 --- a/old_work/conv/Solarized Darcula.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#25292a", // 0 - "#f24840", // 1 - "#629655", // 2 - "#b68800", // 3 - "#2075c7", // 4 - "#797fd4", // 5 - "#15968d", // 6 - "#d2d8d9", // 7 - "#25292a", // 8 - "#f24840", // 9 - "#629655", // 10 - "#b68800", // 11 - "#2075c7", // 12 - "#797fd4", // 13 - "#15968d", // 14 - "#d2d8d9", // 15 - [255] = 0, - "#3d3f41", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#708284" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Solarized Dark - Patched.xrdb b/old_work/conv/Solarized Dark - Patched.xrdb deleted file mode 100644 index f2dce07..0000000 --- a/old_work/conv/Solarized Dark - Patched.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#002831", // 0 - "#d11c24", // 1 - "#738a05", // 2 - "#a57706", // 3 - "#2176c7", // 4 - "#c61c6f", // 5 - "#259286", // 6 - "#eae3cb", // 7 - "#475b62", // 8 - "#bd3613", // 9 - "#475b62", // 10 - "#536870", // 11 - "#708284", // 12 - "#5956ba", // 13 - "#819090", // 14 - "#fcf4dc", // 15 - [255] = 0, - "#001e27", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 12; -//static unsigned int defaultcs = 12; -}, diff --git a/old_work/conv/Solarized Dark Higher Contrast.xrdb b/old_work/conv/Solarized Dark Higher Contrast.xrdb deleted file mode 100644 index 561736b..0000000 --- a/old_work/conv/Solarized Dark Higher Contrast.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#002831", // 0 - "#d11c24", // 1 - "#6cbe6c", // 2 - "#a57706", // 3 - "#2176c7", // 4 - "#c61c6f", // 5 - "#259286", // 6 - "#eae3cb", // 7 - "#006488", // 8 - "#f5163b", // 9 - "#51ef84", // 10 - "#b27e28", // 11 - "#178ec8", // 12 - "#e24d8e", // 13 - "#00b39e", // 14 - "#fcf4dc", // 15 - [255] = 0, - "#001e27", /* bg color */ -//static unsigned int defaultbg = 256; - "#9cc2c3", /* fg color */ -//static unsigned int defaultfg = 257; - "#f34b00" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Solarized Dark.xrdb b/old_work/conv/Solarized Dark.xrdb deleted file mode 100644 index 572f2f1..0000000 --- a/old_work/conv/Solarized Dark.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#002831", // 0 - "#d11c24", // 1 - "#738a05", // 2 - "#a57706", // 3 - "#2176c7", // 4 - "#c61c6f", // 5 - "#259286", // 6 - "#eae3cb", // 7 - "#001e27", // 8 - "#bd3613", // 9 - "#475b62", // 10 - "#536870", // 11 - "#708284", // 12 - "#5956ba", // 13 - "#819090", // 14 - "#fcf4dc", // 15 - [255] = 0, -//static unsigned int defaultbg = 8; -//static unsigned int defaultfg = 12; -//static unsigned int defaultcs = 12; -}, diff --git a/old_work/conv/Solarized Light.xrdb b/old_work/conv/Solarized Light.xrdb deleted file mode 100644 index dcc8893..0000000 --- a/old_work/conv/Solarized Light.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#002831", // 0 - "#d11c24", // 1 - "#738a05", // 2 - "#a57706", // 3 - "#2176c7", // 4 - "#c61c6f", // 5 - "#259286", // 6 - "#eae3cb", // 7 - "#001e27", // 8 - "#bd3613", // 9 - "#475b62", // 10 - "#536870", // 11 - "#708284", // 12 - "#5956ba", // 13 - "#819090", // 14 - "#fcf4dc", // 15 - [255] = 0, -//static unsigned int defaultbg = 15; -//static unsigned int defaultfg = 11; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/SpaceGray Eighties Dull.xrdb b/old_work/conv/SpaceGray Eighties Dull.xrdb deleted file mode 100644 index 9736c7e..0000000 --- a/old_work/conv/SpaceGray Eighties Dull.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#15171c", // 0 - "#b24a56", // 1 - "#92b477", // 2 - "#c6735a", // 3 - "#7c8fa5", // 4 - "#a5789e", // 5 - "#80cdcb", // 6 - "#b3b8c3", // 7 - "#555555", // 8 - "#ec5f67", // 9 - "#89e986", // 10 - "#fec254", // 11 - "#5486c0", // 12 - "#bf83c1", // 13 - "#58c2c1", // 14 - "#ffffff", // 15 - [255] = 0, - "#222222", /* bg color */ -//static unsigned int defaultbg = 256; - "#c9c6bc", /* fg color */ -//static unsigned int defaultfg = 257; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/SpaceGray Eighties.xrdb b/old_work/conv/SpaceGray Eighties.xrdb deleted file mode 100644 index 9f1213f..0000000 --- a/old_work/conv/SpaceGray Eighties.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#15171c", // 0 - "#ec5f67", // 1 - "#81a764", // 2 - "#fec254", // 3 - "#5486c0", // 4 - "#bf83c1", // 5 - "#57c2c1", // 6 - "#efece7", // 7 - "#555555", // 8 - "#ff6973", // 9 - "#93d493", // 10 - "#ffd256", // 11 - "#4d84d1", // 12 - "#ff55ff", // 13 - "#83e9e4", // 14 - "#ffffff", // 15 - [255] = 0, - "#222222", /* bg color */ -//static unsigned int defaultbg = 256; - "#bdbaae", /* fg color */ -//static unsigned int defaultfg = 257; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/SpaceGray.xrdb b/old_work/conv/SpaceGray.xrdb deleted file mode 100644 index d51d817..0000000 --- a/old_work/conv/SpaceGray.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#000000", // 0 - "#b04b57", // 1 - "#87b379", // 2 - "#e5c179", // 3 - "#7d8fa4", // 4 - "#a47996", // 5 - "#85a7a5", // 6 - "#b3b8c3", // 7 - "#000000", // 8 - "#b04b57", // 9 - "#87b379", // 10 - "#e5c179", // 11 - "#7d8fa4", // 12 - "#a47996", // 13 - "#85a7a5", // 14 - "#ffffff", // 15 - [255] = 0, - "#20242d", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Spacedust.xrdb b/old_work/conv/Spacedust.xrdb deleted file mode 100644 index c61510d..0000000 --- a/old_work/conv/Spacedust.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#6e5346", // 0 - "#e35b00", // 1 - "#5cab96", // 2 - "#e3cd7b", // 3 - "#0f548b", // 4 - "#e35b00", // 5 - "#06afc7", // 6 - "#f0f1ce", // 7 - "#684c31", // 8 - "#ff8a3a", // 9 - "#aecab8", // 10 - "#ffc878", // 11 - "#67a0ce", // 12 - "#ff8a3a", // 13 - "#83a7b4", // 14 - "#fefff1", // 15 - [255] = 0, - "#0a1e24", /* bg color */ -//static unsigned int defaultbg = 256; - "#ecf0c1", /* fg color */ -//static unsigned int defaultfg = 257; - "#708284" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Spiderman.xrdb b/old_work/conv/Spiderman.xrdb deleted file mode 100644 index 708ca6b..0000000 --- a/old_work/conv/Spiderman.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#1b1d1e", // 0 - "#e60813", // 1 - "#e22928", // 2 - "#e24756", // 3 - "#2c3fff", // 4 - "#2435db", // 5 - "#3256ff", // 6 - "#fffef6", // 7 - "#505354", // 8 - "#ff0325", // 9 - "#ff3338", // 10 - "#fe3a35", // 11 - "#1d50ff", // 12 - "#747cff", // 13 - "#6184ff", // 14 - "#fffff9", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#e3e3e3", /* fg color */ -//static unsigned int defaultfg = 256; -//static unsigned int defaultcs = 4; -}, diff --git a/old_work/conv/Spring.xrdb b/old_work/conv/Spring.xrdb deleted file mode 100644 index 81c5176..0000000 --- a/old_work/conv/Spring.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff4d83", // 1 - "#1f8c3b", // 2 - "#1fc95b", // 3 - "#1dd3ee", // 4 - "#8959a8", // 5 - "#3e999f", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#ff0021", // 9 - "#1fc231", // 10 - "#d5b807", // 11 - "#15a9fd", // 12 - "#8959a8", // 13 - "#3e999f", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 7; - "#4d4d4c", /* fg color */ -//static unsigned int defaultfg = 256; - "#4d4d4c" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Square.xrdb b/old_work/conv/Square.xrdb deleted file mode 100644 index 6749253..0000000 --- a/old_work/conv/Square.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#050505", // 0 - "#e9897c", // 1 - "#b6377d", // 2 - "#ecebbe", // 3 - "#a9cdeb", // 4 - "#75507b", // 5 - "#c9caec", // 6 - "#f2f2f2", // 7 - "#141414", // 8 - "#f99286", // 9 - "#c3f786", // 10 - "#fcfbcc", // 11 - "#b6defb", // 12 - "#ad7fa8", // 13 - "#d7d9fc", // 14 - "#e2e2e2", // 15 - [255] = 0, - "#1a1a1a", /* bg color */ -//static unsigned int defaultbg = 256; - "#acacab", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/Sundried.xrdb b/old_work/conv/Sundried.xrdb deleted file mode 100644 index f9907f0..0000000 --- a/old_work/conv/Sundried.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#302b2a", // 0 - "#a7463d", // 1 - "#587744", // 2 - "#9d602a", // 3 - "#485b98", // 4 - "#864651", // 5 - "#9c814f", // 6 - "#c9c9c9", // 7 - "#4d4e48", // 8 - "#aa000c", // 9 - "#128c21", // 10 - "#fc6a21", // 11 - "#7999f7", // 12 - "#fd8aa1", // 13 - "#fad484", // 14 - "#ffffff", // 15 - [255] = 0, - "#1a1818", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Symfonic.xrdb b/old_work/conv/Symfonic.xrdb deleted file mode 100644 index e4abe0b..0000000 --- a/old_work/conv/Symfonic.xrdb +++ /dev/null @@ -1,22 +0,0 @@ -{ - "#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; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 9; -}, diff --git a/old_work/conv/Teerb.xrdb b/old_work/conv/Teerb.xrdb deleted file mode 100644 index cc5a235..0000000 --- a/old_work/conv/Teerb.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#1c1c1c", // 0 - "#d68686", // 1 - "#aed686", // 2 - "#d7af87", // 3 - "#86aed6", // 4 - "#d6aed6", // 5 - "#8adbb4", // 6 - "#d0d0d0", // 7 - "#1c1c1c", // 8 - "#d68686", // 9 - "#aed686", // 10 - "#e4c9af", // 11 - "#86aed6", // 12 - "#d6aed6", // 13 - "#b1e7dd", // 14 - "#efefef", // 15 - [255] = 0, - "#262626", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/Terminal Basic.xrdb b/old_work/conv/Terminal Basic.xrdb deleted file mode 100644 index 0c87e06..0000000 --- a/old_work/conv/Terminal Basic.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#990000", // 1 - "#00a600", // 2 - "#999900", // 3 - "#0000b2", // 4 - "#b200b2", // 5 - "#00a6b2", // 6 - "#bfbfbf", // 7 - "#666666", // 8 - "#e50000", // 9 - "#00d900", // 10 - "#e5e500", // 11 - "#0000ff", // 12 - "#e500e5", // 13 - "#00e5e5", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#ffffff", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 0; - "#7f7f7f" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Thayer Bright.xrdb b/old_work/conv/Thayer Bright.xrdb deleted file mode 100644 index e14de17..0000000 --- a/old_work/conv/Thayer Bright.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#1b1d1e", // 0 - "#f92672", // 1 - "#4df840", // 2 - "#f4fd22", // 3 - "#2757d6", // 4 - "#8c54fe", // 5 - "#38c8b5", // 6 - "#ccccc6", // 7 - "#505354", // 8 - "#ff5995", // 9 - "#b6e354", // 10 - "#feed6c", // 11 - "#3f78ff", // 12 - "#9e6ffe", // 13 - "#23cfd5", // 14 - "#f8f8f2", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#f8f8f8", /* fg color */ -//static unsigned int defaultfg = 256; - "#fc971f" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/The Hulk.xrdb b/old_work/conv/The Hulk.xrdb deleted file mode 100644 index c35b6ff..0000000 --- a/old_work/conv/The Hulk.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#1b1d1e", // 0 - "#269d1b", // 1 - "#13ce30", // 2 - "#63e457", // 3 - "#2525f5", // 4 - "#641f74", // 5 - "#378ca9", // 6 - "#d9d8d1", // 7 - "#505354", // 8 - "#8dff2a", // 9 - "#48ff77", // 10 - "#3afe16", // 11 - "#506b95", // 12 - "#72589d", // 13 - "#4085a6", // 14 - "#e5e6e1", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#b5b5b5", /* fg color */ -//static unsigned int defaultfg = 256; - "#16b61b" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Tomorrow Night Blue.xrdb b/old_work/conv/Tomorrow Night Blue.xrdb deleted file mode 100644 index 18e5b76..0000000 --- a/old_work/conv/Tomorrow Night Blue.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#000000", // 0 - "#ff9da4", // 1 - "#d1f1a9", // 2 - "#ffeead", // 3 - "#bbdaff", // 4 - "#ebbbff", // 5 - "#99ffff", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#ff9da4", // 9 - "#d1f1a9", // 10 - "#ffeead", // 11 - "#bbdaff", // 12 - "#ebbbff", // 13 - "#99ffff", // 14 - "#ffffff", // 15 - [255] = 0, - "#002451", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; -//static unsigned int defaultcs = 7; -}, diff --git a/old_work/conv/Tomorrow Night Bright.xrdb b/old_work/conv/Tomorrow Night Bright.xrdb deleted file mode 100644 index 245c75d..0000000 --- a/old_work/conv/Tomorrow Night Bright.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#d54e53", // 1 - "#b9ca4a", // 2 - "#e7c547", // 3 - "#7aa6da", // 4 - "#c397d8", // 5 - "#70c0b1", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#d54e53", // 9 - "#b9ca4a", // 10 - "#e7c547", // 11 - "#7aa6da", // 12 - "#c397d8", // 13 - "#70c0b1", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 8; - "#eaeaea", /* fg color */ -//static unsigned int defaultfg = 256; - "#eaeaea" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Tomorrow Night Eighties.xrdb b/old_work/conv/Tomorrow Night Eighties.xrdb deleted file mode 100644 index 44daae1..0000000 --- a/old_work/conv/Tomorrow Night Eighties.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#f2777a", // 1 - "#99cc99", // 2 - "#ffcc66", // 3 - "#6699cc", // 4 - "#cc99cc", // 5 - "#66cccc", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#f2777a", // 9 - "#99cc99", // 10 - "#ffcc66", // 11 - "#6699cc", // 12 - "#cc99cc", // 13 - "#66cccc", // 14 - "#ffffff", // 15 - [255] = 0, - "#2d2d2d", /* bg color */ -//static unsigned int defaultbg = 256; - "#cccccc", /* fg color */ -//static unsigned int defaultfg = 257; - "#cccccc" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Tomorrow Night.xrdb b/old_work/conv/Tomorrow Night.xrdb deleted file mode 100644 index ca6aab6..0000000 --- a/old_work/conv/Tomorrow Night.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#cc6666", // 1 - "#b5bd68", // 2 - "#f0c674", // 3 - "#81a2be", // 4 - "#b294bb", // 5 - "#8abeb7", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#cc6666", // 9 - "#b5bd68", // 10 - "#f0c674", // 11 - "#81a2be", // 12 - "#b294bb", // 13 - "#8abeb7", // 14 - "#ffffff", // 15 - [255] = 0, - "#1d1f21", /* bg color */ -//static unsigned int defaultbg = 256; - "#c5c8c6", /* fg color */ -//static unsigned int defaultfg = 257; - "#c5c8c6" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Tomorrow.xrdb b/old_work/conv/Tomorrow.xrdb deleted file mode 100644 index b4c8da3..0000000 --- a/old_work/conv/Tomorrow.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#c82829", // 1 - "#718c00", // 2 - "#eab700", // 3 - "#4271ae", // 4 - "#8959a8", // 5 - "#3e999f", // 6 - "#ffffff", // 7 - "#000000", // 8 - "#c82829", // 9 - "#718c00", // 10 - "#eab700", // 11 - "#4271ae", // 12 - "#8959a8", // 13 - "#3e999f", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 7; - "#4d4d4c", /* fg color */ -//static unsigned int defaultfg = 256; - "#4d4d4c" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/ToyChest.xrdb b/old_work/conv/ToyChest.xrdb deleted file mode 100644 index 82e6e78..0000000 --- a/old_work/conv/ToyChest.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#2c3f58", // 0 - "#be2d26", // 1 - "#1a9172", // 2 - "#db8e27", // 3 - "#325d96", // 4 - "#8a5edc", // 5 - "#35a08f", // 6 - "#23d183", // 7 - "#336889", // 8 - "#dd5944", // 9 - "#31d07b", // 10 - "#e7d84b", // 11 - "#34a6da", // 12 - "#ae6bdc", // 13 - "#42c3ae", // 14 - "#d5d5d5", // 15 - [255] = 0, - "#24364b", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 10; -//static unsigned int defaultcs = 15; -}, diff --git a/old_work/conv/Treehouse.xrdb b/old_work/conv/Treehouse.xrdb deleted file mode 100644 index 88d3cab..0000000 --- a/old_work/conv/Treehouse.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#321300", // 0 - "#b2270e", // 1 - "#44a900", // 2 - "#aa820c", // 3 - "#58859a", // 4 - "#97363d", // 5 - "#b25a1e", // 6 - "#786b53", // 7 - "#433626", // 8 - "#ed5d20", // 9 - "#55f238", // 10 - "#f2b732", // 11 - "#85cfed", // 12 - "#e14c5a", // 13 - "#f07d14", // 14 - "#ffc800", // 15 - [255] = 0, - "#191919", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#fac814" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Twilight.xrdb b/old_work/conv/Twilight.xrdb deleted file mode 100644 index 161df5f..0000000 --- a/old_work/conv/Twilight.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#141414", // 0 - "#c06d44", // 1 - "#afb97a", // 2 - "#c2a86c", // 3 - "#44474a", // 4 - "#b4be7c", // 5 - "#778385", // 6 - "#ffffd4", // 7 - "#262626", // 8 - "#de7c4c", // 9 - "#ccd88c", // 10 - "#e2c47e", // 11 - "#5a5e62", // 12 - "#d0dc8e", // 13 - "#8a989b", // 14 - "#ffffd4", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 7; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/conv/Ubuntu.xrdb b/old_work/conv/Ubuntu.xrdb deleted file mode 100644 index f2cab48..0000000 --- a/old_work/conv/Ubuntu.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#2e3436", // 0 - "#cc0000", // 1 - "#4e9a06", // 2 - "#c4a000", // 3 - "#3465a4", // 4 - "#75507b", // 5 - "#06989a", // 6 - "#d3d7cf", // 7 - "#555753", // 8 - "#ef2929", // 9 - "#8ae234", // 10 - "#fce94f", // 11 - "#729fcf", // 12 - "#ad7fa8", // 13 - "#34e2e2", // 14 - "#eeeeec", // 15 - [255] = 0, - "#300a24", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 15; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/UnderTheSea.xrdb b/old_work/conv/UnderTheSea.xrdb deleted file mode 100644 index 0957aa3..0000000 --- a/old_work/conv/UnderTheSea.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#022026", // 0 - "#b2302d", // 1 - "#00a941", // 2 - "#59819c", // 3 - "#459a86", // 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, - "#011116", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffffff", /* fg color */ -//static unsigned int defaultfg = 257; - "#4afcd6" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Urple.xrdb b/old_work/conv/Urple.xrdb deleted file mode 100644 index d925f31..0000000 --- a/old_work/conv/Urple.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#b0425b", // 1 - "#37a415", // 2 - "#ad5c42", // 3 - "#564d9b", // 4 - "#6c3ca1", // 5 - "#808080", // 6 - "#87799c", // 7 - "#5d3225", // 8 - "#ff6388", // 9 - "#29e620", // 10 - "#f08161", // 11 - "#867aed", // 12 - "#a05eee", // 13 - "#eaeaea", // 14 - "#bfa3ff", // 15 - [255] = 0, - "#1b1b23", /* bg color */ -//static unsigned int defaultbg = 256; - "#877a9b", /* fg color */ -//static unsigned int defaultfg = 257; - "#a063eb" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Vaughn.xrdb b/old_work/conv/Vaughn.xrdb deleted file mode 100644 index 7ac40d4..0000000 --- a/old_work/conv/Vaughn.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#25234f", // 0 - "#705050", // 1 - "#60b48a", // 2 - "#dfaf8f", // 3 - "#5555ff", // 4 - "#f08cc3", // 5 - "#8cd0d3", // 6 - "#709080", // 7 - "#709080", // 8 - "#dca3a3", // 9 - "#60b48a", // 10 - "#f0dfaf", // 11 - "#5555ff", // 12 - "#ec93d3", // 13 - "#93e0e3", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#dcdccc", /* fg color */ -//static unsigned int defaultfg = 256; - "#ff5555" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/VibrantInk.xrdb b/old_work/conv/VibrantInk.xrdb deleted file mode 100644 index b9ff7ce..0000000 --- a/old_work/conv/VibrantInk.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#878787", // 0 - "#ff6600", // 1 - "#ccff04", // 2 - "#ffcc00", // 3 - "#44b4cc", // 4 - "#9933cc", // 5 - "#44b4cc", // 6 - "#f5f5f5", // 7 - "#555555", // 8 - "#ff0000", // 9 - "#00ff00", // 10 - "#ffff00", // 11 - "#0000ff", // 12 - "#ff00ff", // 13 - "#00ffff", // 14 - "#e5e5e5", // 15 - [255] = 0, - "#000000", /* bg color */ -//static unsigned int defaultbg = 256; - "#ffffff", /* fg color */ -//static unsigned int defaultfg = 257; - "#ffffff" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Violet Dark.xrdb b/old_work/conv/Violet Dark.xrdb deleted file mode 100644 index 0d66d9f..0000000 --- a/old_work/conv/Violet Dark.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#56595c", // 0 - "#c94c22", // 1 - "#85981c", // 2 - "#b4881d", // 3 - "#2e8bce", // 4 - "#d13a82", // 5 - "#32a198", // 6 - "#c9c6bd", // 7 - "#45484b", // 8 - "#bd3613", // 9 - "#738a04", // 10 - "#a57705", // 11 - "#2176c7", // 12 - "#c61c6f", // 13 - "#259286", // 14 - "#c9c6bd", // 15 - [255] = 0, - "#1c1d1f", /* bg color */ -//static unsigned int defaultbg = 256; - "#708284", /* fg color */ -//static unsigned int defaultfg = 257; - "#708284" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Violet Light.xrdb b/old_work/conv/Violet Light.xrdb deleted file mode 100644 index 881cfd4..0000000 --- a/old_work/conv/Violet Light.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#56595c", // 0 - "#c94c22", // 1 - "#85981c", // 2 - "#b4881d", // 3 - "#2e8bce", // 4 - "#d13a82", // 5 - "#32a198", // 6 - "#d3d0c9", // 7 - "#45484b", // 8 - "#bd3613", // 9 - "#738a04", // 10 - "#a57705", // 11 - "#2176c7", // 12 - "#c61c6f", // 13 - "#259286", // 14 - "#c9c6bd", // 15 - [255] = 0, - "#fcf4dc", /* bg color */ -//static unsigned int defaultbg = 256; - "#536870", /* fg color */ -//static unsigned int defaultfg = 257; - "#536870" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/WarmNeon.xrdb b/old_work/conv/WarmNeon.xrdb deleted file mode 100644 index 628e00c..0000000 --- a/old_work/conv/WarmNeon.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#e24346", // 1 - "#39b13a", // 2 - "#dae145", // 3 - "#4261c5", // 4 - "#f920fb", // 5 - "#2abbd4", // 6 - "#d0b8a3", // 7 - "#fefcfc", // 8 - "#e97071", // 9 - "#9cc090", // 10 - "#ddda7a", // 11 - "#7b91d6", // 12 - "#f674ba", // 13 - "#5ed1e5", // 14 - "#d8c8bb", // 15 - [255] = 0, - "#404040", /* bg color */ -//static unsigned int defaultbg = 256; - "#afdab6", /* fg color */ -//static unsigned int defaultfg = 257; - "#30ff24" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Wez.xrdb b/old_work/conv/Wez.xrdb deleted file mode 100644 index e88bb95..0000000 --- a/old_work/conv/Wez.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#cc5555", // 1 - "#55cc55", // 2 - "#cdcd55", // 3 - "#5555cc", // 4 - "#cc55cc", // 5 - "#7acaca", // 6 - "#cccccc", // 7 - "#555555", // 8 - "#ff5555", // 9 - "#55ff55", // 10 - "#ffff55", // 11 - "#5555ff", // 12 - "#ff55ff", // 13 - "#55ffff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; - "#b3b3b3", /* fg color */ -//static unsigned int defaultfg = 256; - "#53ae71" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/WildCherry.xrdb b/old_work/conv/WildCherry.xrdb deleted file mode 100644 index 5761909..0000000 --- a/old_work/conv/WildCherry.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000507", // 0 - "#d94085", // 1 - "#2ab250", // 2 - "#ffd16f", // 3 - "#883cdc", // 4 - "#ececec", // 5 - "#c1b8b7", // 6 - "#fff8de", // 7 - "#009cc9", // 8 - "#da6bac", // 9 - "#f4dca5", // 10 - "#eac066", // 11 - "#308cba", // 12 - "#ae636b", // 13 - "#ff919d", // 14 - "#e4838d", // 15 - [255] = 0, - "#1f1726", /* bg color */ -//static unsigned int defaultbg = 256; - "#dafaff", /* fg color */ -//static unsigned int defaultfg = 257; - "#dd00ff" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/Wombat.xrdb b/old_work/conv/Wombat.xrdb deleted file mode 100644 index aa11cf8..0000000 --- a/old_work/conv/Wombat.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#000000", // 0 - "#ff615a", // 1 - "#b1e969", // 2 - "#ebd99c", // 3 - "#5da9f6", // 4 - "#e86aff", // 5 - "#82fff7", // 6 - "#dedacf", // 7 - "#313131", // 8 - "#f58c80", // 9 - "#ddf88f", // 10 - "#eee5b2", // 11 - "#a5c7ff", // 12 - "#ddaaff", // 13 - "#b7fff9", // 14 - "#ffffff", // 15 - [255] = 0, - "#171717", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#bbbbbb" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/Wryan.xrdb b/old_work/conv/Wryan.xrdb deleted file mode 100644 index 19dca5f..0000000 --- a/old_work/conv/Wryan.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#333333", // 0 - "#8c4665", // 1 - "#287373", // 2 - "#7c7c99", // 3 - "#395573", // 4 - "#5e468c", // 5 - "#31658c", // 6 - "#899ca1", // 7 - "#3d3d3d", // 8 - "#bf4d80", // 9 - "#53a6a6", // 10 - "#9e9ecb", // 11 - "#477ab3", // 12 - "#7e62b3", // 13 - "#6096bf", // 14 - "#c0c0c0", // 15 - [255] = 0, - "#101010", /* bg color */ -//static unsigned int defaultbg = 256; - "#999993", /* fg color */ -//static unsigned int defaultfg = 257; -//static unsigned int defaultcs = 11; -}, diff --git a/old_work/conv/Zenburn.xrdb b/old_work/conv/Zenburn.xrdb deleted file mode 100644 index a5a30a6..0000000 --- a/old_work/conv/Zenburn.xrdb +++ /dev/null @@ -1,24 +0,0 @@ -{ - "#4d4d4d", // 0 - "#705050", // 1 - "#60b48a", // 2 - "#f0dfaf", // 3 - "#506070", // 4 - "#dc8cc3", // 5 - "#8cd0d3", // 6 - "#dcdccc", // 7 - "#709080", // 8 - "#dca3a3", // 9 - "#c3bf9f", // 10 - "#e0cf9f", // 11 - "#94bff3", // 12 - "#ec93d3", // 13 - "#93e0e3", // 14 - "#ffffff", // 15 - [255] = 0, - "#3f3f3f", /* bg color */ -//static unsigned int defaultbg = 256; -//static unsigned int defaultfg = 7; - "#73635a" /* cs color */ -//static unsigned int defaultcs = 257; -}, diff --git a/old_work/conv/ayu.xrdb b/old_work/conv/ayu.xrdb deleted file mode 100644 index 981d484..0000000 --- a/old_work/conv/ayu.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#ff3333", // 1 - "#b8cc52", // 2 - "#e7c547", // 3 - "#36a3d9", // 4 - "#f07178", // 5 - "#95e6cb", // 6 - "#ffffff", // 7 - "#323232", // 8 - "#ff6565", // 9 - "#eafe84", // 10 - "#fff779", // 11 - "#68d5ff", // 12 - "#ffa3aa", // 13 - "#c7fffd", // 14 - "#ffffff", // 15 - [255] = 0, - "#0f1419", /* bg color */ -//static unsigned int defaultbg = 256; - "#e6e1cf", /* fg color */ -//static unsigned int defaultfg = 257; - "#f29718" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/ayu_light.xrdb b/old_work/conv/ayu_light.xrdb deleted file mode 100644 index e214e8d..0000000 --- a/old_work/conv/ayu_light.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#ff3333", // 1 - "#86b300", // 2 - "#f29718", // 3 - "#41a6d9", // 4 - "#f07178", // 5 - "#4dbf99", // 6 - "#ffffff", // 7 - "#323232", // 8 - "#ff6565", // 9 - "#b8e532", // 10 - "#ffc94a", // 11 - "#73d8ff", // 12 - "#ffa3aa", // 13 - "#7ff1cb", // 14 - "#ffffff", // 15 - [255] = 0, - "#fafafa", /* bg color */ -//static unsigned int defaultbg = 256; - "#5c6773", /* fg color */ -//static unsigned int defaultfg = 257; - "#ff6a00" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/deep.xrdb b/old_work/conv/deep.xrdb deleted file mode 100644 index bec16a0..0000000 --- a/old_work/conv/deep.xrdb +++ /dev/null @@ -1,25 +0,0 @@ -{ - "#000000", // 0 - "#d70005", // 1 - "#1cd915", // 2 - "#d9bd26", // 3 - "#5665ff", // 4 - "#b052da", // 5 - "#50d2da", // 6 - "#e0e0e0", // 7 - "#535353", // 8 - "#fb0007", // 9 - "#22ff18", // 10 - "#fedc2b", // 11 - "#9fa9ff", // 12 - "#e09aff", // 13 - "#8df9ff", // 14 - "#ffffff", // 15 - [255] = 0, - "#090909", /* bg color */ -//static unsigned int defaultbg = 256; - "#cdcdcd", /* fg color */ -//static unsigned int defaultfg = 257; - "#d0d0d0" /* cs color */ -//static unsigned int defaultcs = 258; -}, diff --git a/old_work/conv/idleToes.xrdb b/old_work/conv/idleToes.xrdb deleted file mode 100644 index 31948fc..0000000 --- a/old_work/conv/idleToes.xrdb +++ /dev/null @@ -1,23 +0,0 @@ -{ - "#323232", // 0 - "#d25252", // 1 - "#7fe173", // 2 - "#ffc66d", // 3 - "#4099ff", // 4 - "#f680ff", // 5 - "#bed6ff", // 6 - "#eeeeec", // 7 - "#535353", // 8 - "#f07070", // 9 - "#9dff91", // 10 - "#ffe48b", // 11 - "#5eb7f7", // 12 - "#ff9dff", // 13 - "#dcf4ff", // 14 - "#ffffff", // 15 - [255] = 0, -//static unsigned int defaultbg = 0; -//static unsigned int defaultfg = 15; - "#d6d6d6" /* cs color */ -//static unsigned int defaultcs = 256; -}, diff --git a/old_work/iterm2colors/.gitignore b/old_work/iterm2colors/.gitignore deleted file mode 100755 index 56322c8..0000000 --- a/old_work/iterm2colors/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*DS_Store -._* -__pycache__/ diff --git a/old_work/st-alpha-20160727-308bfbf.diff b/old_work/st-alpha-20160727-308bfbf.diff deleted file mode 100644 index d0d97e1..0000000 --- a/old_work/st-alpha-20160727-308bfbf.diff +++ /dev/null @@ -1,188 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index b41747f..e22ebd2 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -82,6 +82,9 @@ static char termname[] = "st-256color"; - */ - static unsigned int tabspaces = 8; - -+/* bg opacity */ -+static const int alpha = 0xdd; -+ - /* 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 - */ - static unsigned int defaultfg = 7; --static unsigned int defaultbg = 0; -+static unsigned int defaultbg = 257; - static unsigned int defaultcs = 256; - static unsigned int defaultrcs = 257; - -diff --git a/config.mk b/config.mk -index 81e3e47..005b1c6 100644 ---- a/config.mk -+++ b/config.mk -@@ -14,7 +14,7 @@ X11LIB = /usr/X11R6/lib - 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 -lXft \ -+LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft -lXrender\ - `pkg-config --libs fontconfig` \ - `pkg-config --libs freetype2` - -diff --git a/st.c b/st.c -index 2594c65..f9ba75b 100644 ---- a/st.c -+++ b/st.c -@@ -61,6 +61,7 @@ char *argv0; - #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)) -@@ -81,6 +82,8 @@ char *argv0; - (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) -@@ -268,6 +271,7 @@ typedef struct { - 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; -@@ -3137,7 +3141,7 @@ xresize(int col, int row) - - XFreePixmap(xw.dpy, xw.buf); - xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, -- DefaultDepth(xw.dpy, xw.scr)); -+ xw.depth); - XftDrawChange(xw.draw, xw.buf); - xclear(0, 0, xw.w, xw.h); - } -@@ -3191,6 +3195,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 = (0xffff * alpha) / OPAQUE; //0xcccc; -+ dc.col[defaultbg].pixel &= 0x00111111; -+ dc.col[defaultbg].pixel |= alpha << 24; // 0xcc000000; -+ } -+ - loaded = 1; - } - -@@ -3212,6 +3224,16 @@ 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 * xw.cw, -+ borderpx + row1 * xw.ch, -+ (col2-col1+1) * xw.cw, -+ (row2-row1+1) * xw.ch); -+} -+ - /* - * Absolute coordinates. - */ -@@ -3443,7 +3465,38 @@ xinit(void) - 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()) -@@ -3453,7 +3506,10 @@ xinit(void) - 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 */ -@@ -3476,16 +3532,17 @@ xinit(void) - 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, XDefaultDepth(xw.dpy, xw.scr), InputOutput, -+ 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; -- dc.gc = XCreateGC(xw.dpy, parent, GCGraphicsExposures, -+ 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); -- xw.buf = XCreatePixmap(xw.dpy, xw.win, xw.w, xw.h, -- DefaultDepth(xw.dpy, xw.scr)); - XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel); - XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, xw.w, xw.h); - diff --git a/old_work/st-delkey-20160727-308bfbf.diff b/old_work/st-delkey-20160727-308bfbf.diff deleted file mode 100644 index b51045c..0000000 --- a/old_work/st-delkey-20160727-308bfbf.diff +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index b41747f..1b52a86 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -261,7 +261,7 @@ static Key key[] = { - { 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_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}, -@@ -316,8 +316,7 @@ static Key key[] = { - { 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_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}, -diff --git a/st.info b/st.info -index b70fefa..d979946 100644 ---- a/st.info -+++ b/st.info -@@ -53,7 +53,7 @@ st| simpleterm, - ka3=\E[5~, - kc1=\E[4~, - kc3=\E[6~, -- kbs=\177, -+ kbs=\010, - kcbt=\E[Z, - kb2=\EOu, - kcub1=\EOD, -@@ -73,7 +73,7 @@ st| simpleterm, - 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, diff --git a/old_work/st-no_bold_colors-20160727-308bfbf.diff b/old_work/st-no_bold_colors-20160727-308bfbf.diff deleted file mode 100644 index c381703..0000000 --- a/old_work/st-no_bold_colors-20160727-308bfbf.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/st.c b/st.c -index 2594c65..f6fe717 100644 ---- a/st.c -+++ b/st.c -@@ -3719,7 +3719,7 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i - - /* 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]; -+ fg = &dc.col[base.fg]; - - if (IS_SET(MODE_REVERSE)) { - if (fg == &dc.col[defaultfg]) { diff --git a/old_work/st-solarized-both-20160727-308bfbf.diff b/old_work/st-solarized-both-20160727-308bfbf.diff deleted file mode 100644 index c966579..0000000 --- a/old_work/st-solarized-both-20160727-308bfbf.diff +++ /dev/null @@ -1,189 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index b41747f..adaa9b8 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -84,42 +84,54 @@ static 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 - */ --static unsigned int defaultfg = 7; --static unsigned int defaultbg = 0; --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; - - /* - * Default shape of cursor -@@ -172,6 +184,7 @@ static Shortcut shortcuts[] = { - { 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} }, - }; - - /* -diff --git a/st.c b/st.c -index 2594c65..b4a3089 100644 ---- a/st.c -+++ b/st.c -@@ -328,6 +328,7 @@ typedef struct { - 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 *); -@@ -355,7 +356,7 @@ typedef struct { - - /* Drawing Context */ - typedef struct { -- Color col[MAX(LEN(colorname), 256)]; -+ Color col[MAX(MAX(LEN(colorname), LEN(altcolorname)), 256)]; - Font font, bfont, ifont, ibfont; - GC gc; - } DC; -@@ -533,6 +534,8 @@ static char *opt_name = NULL; - static char *opt_title = NULL; - static int oldbutton = 3; /* button event on startup: 3 = release */ - -+static int usealtcolors = 0; /* 1 to use alternate palette */ -+ - static char *usedfont = NULL; - static double usedfontsize = 0; - static double defaultfontsize = 0; -@@ -3148,6 +3151,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) - { -@@ -3166,7 +3174,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); -@@ -3186,8 +3194,8 @@ xloadcols(void) - - for (i = 0; i < LEN(dc.col); 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); - } -@@ -3514,13 +3522,13 @@ xinit(void) - 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; -@@ -4074,6 +4082,14 @@ numlock(const Arg *dummy) - term.numlock ^= 1; - } - -+void -+swapcolors(const Arg *dummy) -+{ -+ usealtcolors = !usealtcolors; -+ xloadcols(); -+ redraw(); -+} -+ - char* - kmap(KeySym k, uint state) - { 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/old_work/xrdb b/old_work/xrdb deleted file mode 120000 index 8bd5218..0000000 --- a/old_work/xrdb +++ /dev/null @@ -1 +0,0 @@ -iterm2colors/xrdb \ No newline at end of file diff --git a/old_work/xrdb2st.py b/old_work/xrdb2st.py deleted file mode 100755 index 4069a4e..0000000 --- a/old_work/xrdb2st.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -#coding:utf-8 -""" - Author: sir garbagetruck --<> - Purpose: convert xrdb defs into st array - Created: 25/01/17 -""" - -import argparse - -#---------------------------------------------------------------------- -def main(filename): - """the main chunk""" - - f = open(filename) - colors = {} - c2 = {} - print("{") - for i in f.readlines(): - (crap,color,rgb)=i.split(' ') - cbits = color.split('_') - rgb = rgb.rstrip() - try: - idx = int(cbits[1]) - colors[idx] = rgb - c2[rgb] = idx - except: -# print(color) - if color == 'Background_Color': - bg = rgb - if color == 'Cursor_Color': - cs = rgb - if color == 'Foreground_Color': - fg = rgb - pass - l = colors.keys() - for i in l: - print(' "'+colors[i]+'", // '+str(i)) - - x = 256 -# the 255 line - print(" [255] = 0,") - - try: - print("//static unsigned int defaultbg = " + str(c2[bg])) +';' - except: - print(' "'+bg+'", /* bg color */') - print("//static unsigned int defaultbg = " + str(x)) +';' - x=x+1 - try: - print("//static unsigned int defaultfg = " + str(c2[fg])) +';' - except: - print(' "'+fg+'", /* fg color */') - print("//static unsigned int defaultfg = " + str(x)) +';' - x=x+1 - - try: - print("//static unsigned int defaultcs = " + str(c2[cs])) +';' - except: - print(' "'+cs+'" /* cs color */') - print("//static unsigned int defaultcs = " + str(x)) +';' - - print("},") - - -if __name__ == '__main__': - parser = argparse.ArgumentParser() - parser.add_argument("file",help="the file to read") - args = parser.parse_args() - main(args.file) diff --git a/old_work/iterm2colors/putty/3024 Day.reg b/putty/3024 Day.reg similarity index 100% rename from old_work/iterm2colors/putty/3024 Day.reg rename to putty/3024 Day.reg diff --git a/old_work/iterm2colors/putty/3024 Night.reg b/putty/3024 Night.reg similarity index 100% rename from old_work/iterm2colors/putty/3024 Night.reg rename to putty/3024 Night.reg diff --git a/old_work/iterm2colors/putty/AdventureTime.reg b/putty/AdventureTime.reg similarity index 100% rename from old_work/iterm2colors/putty/AdventureTime.reg rename to putty/AdventureTime.reg diff --git a/old_work/iterm2colors/putty/Afterglow.reg b/putty/Afterglow.reg similarity index 100% rename from old_work/iterm2colors/putty/Afterglow.reg rename to putty/Afterglow.reg diff --git a/old_work/iterm2colors/putty/AlienBlood.reg b/putty/AlienBlood.reg similarity index 100% rename from old_work/iterm2colors/putty/AlienBlood.reg rename to putty/AlienBlood.reg diff --git a/old_work/iterm2colors/putty/Argonaut.reg b/putty/Argonaut.reg similarity index 100% rename from old_work/iterm2colors/putty/Argonaut.reg rename to putty/Argonaut.reg diff --git a/old_work/iterm2colors/putty/Arthur.reg b/putty/Arthur.reg similarity index 100% rename from old_work/iterm2colors/putty/Arthur.reg rename to putty/Arthur.reg diff --git a/old_work/iterm2colors/putty/AtelierSulphurpool.reg b/putty/AtelierSulphurpool.reg similarity index 100% rename from old_work/iterm2colors/putty/AtelierSulphurpool.reg rename to putty/AtelierSulphurpool.reg diff --git a/old_work/iterm2colors/putty/Atom.reg b/putty/Atom.reg similarity index 100% rename from old_work/iterm2colors/putty/Atom.reg rename to putty/Atom.reg diff --git a/old_work/iterm2colors/putty/AtomOneLight.reg b/putty/AtomOneLight.reg similarity index 100% rename from old_work/iterm2colors/putty/AtomOneLight.reg rename to putty/AtomOneLight.reg diff --git a/old_work/iterm2colors/putty/Batman.reg b/putty/Batman.reg similarity index 100% rename from old_work/iterm2colors/putty/Batman.reg rename to putty/Batman.reg diff --git a/old_work/iterm2colors/putty/Belafonte Day.reg b/putty/Belafonte Day.reg similarity index 100% rename from old_work/iterm2colors/putty/Belafonte Day.reg rename to putty/Belafonte Day.reg diff --git a/old_work/iterm2colors/putty/Belafonte Night.reg b/putty/Belafonte Night.reg similarity index 100% rename from old_work/iterm2colors/putty/Belafonte Night.reg rename to putty/Belafonte Night.reg diff --git a/old_work/iterm2colors/putty/BirdsOfParadise.reg b/putty/BirdsOfParadise.reg similarity index 100% rename from old_work/iterm2colors/putty/BirdsOfParadise.reg rename to putty/BirdsOfParadise.reg diff --git a/old_work/iterm2colors/putty/Blazer.reg b/putty/Blazer.reg similarity index 100% rename from old_work/iterm2colors/putty/Blazer.reg rename to putty/Blazer.reg diff --git a/old_work/iterm2colors/putty/Borland.reg b/putty/Borland.reg similarity index 100% rename from old_work/iterm2colors/putty/Borland.reg rename to putty/Borland.reg diff --git a/old_work/iterm2colors/putty/Bright Lights.reg b/putty/Bright Lights.reg similarity index 100% rename from old_work/iterm2colors/putty/Bright Lights.reg rename to putty/Bright Lights.reg diff --git a/old_work/iterm2colors/putty/Broadcast.reg b/putty/Broadcast.reg similarity index 100% rename from old_work/iterm2colors/putty/Broadcast.reg rename to putty/Broadcast.reg diff --git a/old_work/iterm2colors/putty/Brogrammer.reg b/putty/Brogrammer.reg similarity index 100% rename from old_work/iterm2colors/putty/Brogrammer.reg rename to putty/Brogrammer.reg diff --git a/old_work/iterm2colors/putty/C64.reg b/putty/C64.reg similarity index 100% rename from old_work/iterm2colors/putty/C64.reg rename to putty/C64.reg diff --git a/old_work/iterm2colors/putty/CLRS.reg b/putty/CLRS.reg similarity index 100% rename from old_work/iterm2colors/putty/CLRS.reg rename to putty/CLRS.reg diff --git a/old_work/iterm2colors/putty/Chalk.reg b/putty/Chalk.reg similarity index 100% rename from old_work/iterm2colors/putty/Chalk.reg rename to putty/Chalk.reg diff --git a/old_work/iterm2colors/putty/Chalkboard.reg b/putty/Chalkboard.reg similarity index 100% rename from old_work/iterm2colors/putty/Chalkboard.reg rename to putty/Chalkboard.reg diff --git a/old_work/iterm2colors/putty/Ciapre.reg b/putty/Ciapre.reg similarity index 100% rename from old_work/iterm2colors/putty/Ciapre.reg rename to putty/Ciapre.reg diff --git a/old_work/iterm2colors/putty/Cobalt Neon.reg b/putty/Cobalt Neon.reg similarity index 100% rename from old_work/iterm2colors/putty/Cobalt Neon.reg rename to putty/Cobalt Neon.reg diff --git a/old_work/iterm2colors/putty/Cobalt2.reg b/putty/Cobalt2.reg similarity index 100% rename from old_work/iterm2colors/putty/Cobalt2.reg rename to putty/Cobalt2.reg diff --git a/old_work/iterm2colors/putty/CrayonPonyFish.reg b/putty/CrayonPonyFish.reg similarity index 100% rename from old_work/iterm2colors/putty/CrayonPonyFish.reg rename to putty/CrayonPonyFish.reg diff --git a/old_work/iterm2colors/putty/Dark Pastel.reg b/putty/Dark Pastel.reg similarity index 100% rename from old_work/iterm2colors/putty/Dark Pastel.reg rename to putty/Dark Pastel.reg diff --git a/old_work/iterm2colors/putty/Darkside.reg b/putty/Darkside.reg similarity index 100% rename from old_work/iterm2colors/putty/Darkside.reg rename to putty/Darkside.reg diff --git a/old_work/iterm2colors/putty/Desert.reg b/putty/Desert.reg similarity index 100% rename from old_work/iterm2colors/putty/Desert.reg rename to putty/Desert.reg diff --git a/old_work/iterm2colors/putty/DimmedMonokai.reg b/putty/DimmedMonokai.reg similarity index 100% rename from old_work/iterm2colors/putty/DimmedMonokai.reg rename to putty/DimmedMonokai.reg diff --git a/old_work/iterm2colors/putty/DotGov.reg b/putty/DotGov.reg similarity index 100% rename from old_work/iterm2colors/putty/DotGov.reg rename to putty/DotGov.reg diff --git a/old_work/iterm2colors/putty/Dracula.reg b/putty/Dracula.reg similarity index 100% rename from old_work/iterm2colors/putty/Dracula.reg rename to putty/Dracula.reg diff --git a/old_work/iterm2colors/putty/Duotone Dark.reg b/putty/Duotone Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Duotone Dark.reg rename to putty/Duotone Dark.reg diff --git a/old_work/iterm2colors/putty/ENCOM.reg b/putty/ENCOM.reg similarity index 100% rename from old_work/iterm2colors/putty/ENCOM.reg rename to putty/ENCOM.reg diff --git a/old_work/iterm2colors/putty/Earthsong.reg b/putty/Earthsong.reg similarity index 100% rename from old_work/iterm2colors/putty/Earthsong.reg rename to putty/Earthsong.reg diff --git a/old_work/iterm2colors/putty/Elemental.reg b/putty/Elemental.reg similarity index 100% rename from old_work/iterm2colors/putty/Elemental.reg rename to putty/Elemental.reg diff --git a/old_work/iterm2colors/putty/Elementary.reg b/putty/Elementary.reg similarity index 100% rename from old_work/iterm2colors/putty/Elementary.reg rename to putty/Elementary.reg diff --git a/old_work/iterm2colors/putty/Espresso Libre.reg b/putty/Espresso Libre.reg similarity index 100% rename from old_work/iterm2colors/putty/Espresso Libre.reg rename to putty/Espresso Libre.reg diff --git a/old_work/iterm2colors/putty/Espresso.reg b/putty/Espresso.reg similarity index 100% rename from old_work/iterm2colors/putty/Espresso.reg rename to putty/Espresso.reg diff --git a/old_work/iterm2colors/putty/Fideloper.reg b/putty/Fideloper.reg similarity index 100% rename from old_work/iterm2colors/putty/Fideloper.reg rename to putty/Fideloper.reg diff --git a/old_work/iterm2colors/putty/FirefoxDev.reg b/putty/FirefoxDev.reg similarity index 100% rename from old_work/iterm2colors/putty/FirefoxDev.reg rename to putty/FirefoxDev.reg diff --git a/old_work/iterm2colors/putty/Firewatch.reg b/putty/Firewatch.reg similarity index 100% rename from old_work/iterm2colors/putty/Firewatch.reg rename to putty/Firewatch.reg diff --git a/old_work/iterm2colors/putty/FishTank.reg b/putty/FishTank.reg similarity index 100% rename from old_work/iterm2colors/putty/FishTank.reg rename to putty/FishTank.reg diff --git a/old_work/iterm2colors/putty/Flat.reg b/putty/Flat.reg similarity index 100% rename from old_work/iterm2colors/putty/Flat.reg rename to putty/Flat.reg diff --git a/old_work/iterm2colors/putty/Flatland.reg b/putty/Flatland.reg similarity index 100% rename from old_work/iterm2colors/putty/Flatland.reg rename to putty/Flatland.reg diff --git a/old_work/iterm2colors/putty/Floraverse.reg b/putty/Floraverse.reg similarity index 100% rename from old_work/iterm2colors/putty/Floraverse.reg rename to putty/Floraverse.reg diff --git a/old_work/iterm2colors/putty/ForestBlue.reg b/putty/ForestBlue.reg similarity index 100% rename from old_work/iterm2colors/putty/ForestBlue.reg rename to putty/ForestBlue.reg diff --git a/old_work/iterm2colors/putty/FrontEndDelight.reg b/putty/FrontEndDelight.reg similarity index 100% rename from old_work/iterm2colors/putty/FrontEndDelight.reg rename to putty/FrontEndDelight.reg diff --git a/old_work/iterm2colors/putty/FunForrest.reg b/putty/FunForrest.reg similarity index 100% rename from old_work/iterm2colors/putty/FunForrest.reg rename to putty/FunForrest.reg diff --git a/old_work/iterm2colors/putty/Galaxy.reg b/putty/Galaxy.reg similarity index 100% rename from old_work/iterm2colors/putty/Galaxy.reg rename to putty/Galaxy.reg diff --git a/old_work/iterm2colors/putty/Github.reg b/putty/Github.reg similarity index 100% rename from old_work/iterm2colors/putty/Github.reg rename to putty/Github.reg diff --git a/old_work/iterm2colors/putty/Glacier.reg b/putty/Glacier.reg similarity index 100% rename from old_work/iterm2colors/putty/Glacier.reg rename to putty/Glacier.reg diff --git a/old_work/iterm2colors/putty/Grape.reg b/putty/Grape.reg similarity index 100% rename from old_work/iterm2colors/putty/Grape.reg rename to putty/Grape.reg diff --git a/old_work/iterm2colors/putty/Grass.reg b/putty/Grass.reg similarity index 100% rename from old_work/iterm2colors/putty/Grass.reg rename to putty/Grass.reg diff --git a/old_work/iterm2colors/putty/Gruvbox Dark.reg b/putty/Gruvbox Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Gruvbox Dark.reg rename to putty/Gruvbox Dark.reg diff --git a/old_work/iterm2colors/putty/Hardcore.reg b/putty/Hardcore.reg similarity index 100% rename from old_work/iterm2colors/putty/Hardcore.reg rename to putty/Hardcore.reg diff --git a/old_work/iterm2colors/putty/Harper.reg b/putty/Harper.reg similarity index 100% rename from old_work/iterm2colors/putty/Harper.reg rename to putty/Harper.reg diff --git a/old_work/iterm2colors/putty/Highway.reg b/putty/Highway.reg similarity index 100% rename from old_work/iterm2colors/putty/Highway.reg rename to putty/Highway.reg diff --git a/old_work/iterm2colors/putty/Hipster Green.reg b/putty/Hipster Green.reg similarity index 100% rename from old_work/iterm2colors/putty/Hipster Green.reg rename to putty/Hipster Green.reg diff --git a/old_work/iterm2colors/putty/Homebrew.reg b/putty/Homebrew.reg similarity index 100% rename from old_work/iterm2colors/putty/Homebrew.reg rename to putty/Homebrew.reg diff --git a/old_work/iterm2colors/putty/Hurtado.reg b/putty/Hurtado.reg similarity index 100% rename from old_work/iterm2colors/putty/Hurtado.reg rename to putty/Hurtado.reg diff --git a/old_work/iterm2colors/putty/Hybrid.reg b/putty/Hybrid.reg similarity index 100% rename from old_work/iterm2colors/putty/Hybrid.reg rename to putty/Hybrid.reg diff --git a/old_work/iterm2colors/putty/IC_Green_PPL.reg b/putty/IC_Green_PPL.reg similarity index 100% rename from old_work/iterm2colors/putty/IC_Green_PPL.reg rename to putty/IC_Green_PPL.reg diff --git a/old_work/iterm2colors/putty/IC_Orange_PPL.reg b/putty/IC_Orange_PPL.reg similarity index 100% rename from old_work/iterm2colors/putty/IC_Orange_PPL.reg rename to putty/IC_Orange_PPL.reg diff --git a/old_work/iterm2colors/putty/IR_Black.reg b/putty/IR_Black.reg similarity index 100% rename from old_work/iterm2colors/putty/IR_Black.reg rename to putty/IR_Black.reg diff --git a/old_work/iterm2colors/putty/Jackie Brown.reg b/putty/Jackie Brown.reg similarity index 100% rename from old_work/iterm2colors/putty/Jackie Brown.reg rename to putty/Jackie Brown.reg diff --git a/old_work/iterm2colors/putty/Japanesque.reg b/putty/Japanesque.reg similarity index 100% rename from old_work/iterm2colors/putty/Japanesque.reg rename to putty/Japanesque.reg diff --git a/old_work/iterm2colors/putty/Jellybeans.reg b/putty/Jellybeans.reg similarity index 100% rename from old_work/iterm2colors/putty/Jellybeans.reg rename to putty/Jellybeans.reg diff --git a/old_work/iterm2colors/putty/JetBrains Darcula.reg b/putty/JetBrains Darcula.reg similarity index 100% rename from old_work/iterm2colors/putty/JetBrains Darcula.reg rename to putty/JetBrains Darcula.reg diff --git a/old_work/iterm2colors/putty/Kibble.reg b/putty/Kibble.reg similarity index 100% rename from old_work/iterm2colors/putty/Kibble.reg rename to putty/Kibble.reg diff --git a/old_work/iterm2colors/putty/Later This Evening.reg b/putty/Later This Evening.reg similarity index 100% rename from old_work/iterm2colors/putty/Later This Evening.reg rename to putty/Later This Evening.reg diff --git a/old_work/iterm2colors/putty/Lavandula.reg b/putty/Lavandula.reg similarity index 100% rename from old_work/iterm2colors/putty/Lavandula.reg rename to putty/Lavandula.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbon.reg b/putty/LiquidCarbon.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbon.reg rename to putty/LiquidCarbon.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbonTransparent.reg b/putty/LiquidCarbonTransparent.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbonTransparent.reg rename to putty/LiquidCarbonTransparent.reg diff --git a/old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg b/putty/LiquidCarbonTransparentInverse.reg similarity index 100% rename from old_work/iterm2colors/putty/LiquidCarbonTransparentInverse.reg rename to putty/LiquidCarbonTransparentInverse.reg diff --git a/old_work/iterm2colors/putty/Man Page.reg b/putty/Man Page.reg similarity index 100% rename from old_work/iterm2colors/putty/Man Page.reg rename to putty/Man Page.reg diff --git a/old_work/iterm2colors/putty/Material.reg b/putty/Material.reg similarity index 100% rename from old_work/iterm2colors/putty/Material.reg rename to putty/Material.reg diff --git a/old_work/iterm2colors/putty/MaterialDark.reg b/putty/MaterialDark.reg similarity index 100% rename from old_work/iterm2colors/putty/MaterialDark.reg rename to putty/MaterialDark.reg diff --git a/old_work/iterm2colors/putty/Mathias.reg b/putty/Mathias.reg similarity index 100% rename from old_work/iterm2colors/putty/Mathias.reg rename to putty/Mathias.reg diff --git a/old_work/iterm2colors/putty/Medallion.reg b/putty/Medallion.reg similarity index 100% rename from old_work/iterm2colors/putty/Medallion.reg rename to putty/Medallion.reg diff --git a/old_work/iterm2colors/putty/Misterioso.reg b/putty/Misterioso.reg similarity index 100% rename from old_work/iterm2colors/putty/Misterioso.reg rename to putty/Misterioso.reg diff --git a/old_work/iterm2colors/putty/Molokai.reg b/putty/Molokai.reg similarity index 100% rename from old_work/iterm2colors/putty/Molokai.reg rename to putty/Molokai.reg diff --git a/old_work/iterm2colors/putty/MonaLisa.reg b/putty/MonaLisa.reg similarity index 100% rename from old_work/iterm2colors/putty/MonaLisa.reg rename to putty/MonaLisa.reg diff --git a/old_work/iterm2colors/putty/Monokai Soda.reg b/putty/Monokai Soda.reg similarity index 100% rename from old_work/iterm2colors/putty/Monokai Soda.reg rename to putty/Monokai Soda.reg diff --git a/old_work/iterm2colors/putty/Monokai Vivid.reg b/putty/Monokai Vivid.reg similarity index 100% rename from old_work/iterm2colors/putty/Monokai Vivid.reg rename to putty/Monokai Vivid.reg diff --git a/old_work/iterm2colors/putty/N0tch2k.reg b/putty/N0tch2k.reg similarity index 100% rename from old_work/iterm2colors/putty/N0tch2k.reg rename to putty/N0tch2k.reg diff --git a/old_work/iterm2colors/putty/Neopolitan.reg b/putty/Neopolitan.reg similarity index 100% rename from old_work/iterm2colors/putty/Neopolitan.reg rename to putty/Neopolitan.reg diff --git a/old_work/iterm2colors/putty/Neutron.reg b/putty/Neutron.reg similarity index 100% rename from old_work/iterm2colors/putty/Neutron.reg rename to putty/Neutron.reg diff --git a/old_work/iterm2colors/putty/NightLion v1.reg b/putty/NightLion v1.reg similarity index 100% rename from old_work/iterm2colors/putty/NightLion v1.reg rename to putty/NightLion v1.reg diff --git a/old_work/iterm2colors/putty/NightLion v2.reg b/putty/NightLion v2.reg similarity index 100% rename from old_work/iterm2colors/putty/NightLion v2.reg rename to putty/NightLion v2.reg diff --git a/old_work/iterm2colors/putty/Novel.reg b/putty/Novel.reg similarity index 100% rename from old_work/iterm2colors/putty/Novel.reg rename to putty/Novel.reg diff --git a/old_work/iterm2colors/putty/Obsidian.reg b/putty/Obsidian.reg similarity index 100% rename from old_work/iterm2colors/putty/Obsidian.reg rename to putty/Obsidian.reg diff --git a/old_work/iterm2colors/putty/Ocean.reg b/putty/Ocean.reg similarity index 100% rename from old_work/iterm2colors/putty/Ocean.reg rename to putty/Ocean.reg diff --git a/old_work/iterm2colors/putty/OceanicMaterial.reg b/putty/OceanicMaterial.reg similarity index 100% rename from old_work/iterm2colors/putty/OceanicMaterial.reg rename to putty/OceanicMaterial.reg diff --git a/old_work/iterm2colors/putty/Ollie.reg b/putty/Ollie.reg similarity index 100% rename from old_work/iterm2colors/putty/Ollie.reg rename to putty/Ollie.reg diff --git a/old_work/iterm2colors/putty/OneHalfDark.reg b/putty/OneHalfDark.reg similarity index 100% rename from old_work/iterm2colors/putty/OneHalfDark.reg rename to putty/OneHalfDark.reg diff --git a/old_work/iterm2colors/putty/OneHalfLight.reg b/putty/OneHalfLight.reg similarity index 100% rename from old_work/iterm2colors/putty/OneHalfLight.reg rename to putty/OneHalfLight.reg diff --git a/old_work/iterm2colors/putty/Pandora.reg b/putty/Pandora.reg similarity index 100% rename from old_work/iterm2colors/putty/Pandora.reg rename to putty/Pandora.reg diff --git a/old_work/iterm2colors/putty/Paraiso Dark.reg b/putty/Paraiso Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Paraiso Dark.reg rename to putty/Paraiso Dark.reg diff --git a/old_work/iterm2colors/putty/Parasio Dark.reg b/putty/Parasio Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Parasio Dark.reg rename to putty/Parasio Dark.reg diff --git a/old_work/iterm2colors/putty/PaulMillr.reg b/putty/PaulMillr.reg similarity index 100% rename from old_work/iterm2colors/putty/PaulMillr.reg rename to putty/PaulMillr.reg diff --git a/old_work/iterm2colors/putty/PencilDark.reg b/putty/PencilDark.reg similarity index 100% rename from old_work/iterm2colors/putty/PencilDark.reg rename to putty/PencilDark.reg diff --git a/old_work/iterm2colors/putty/PencilLight.reg b/putty/PencilLight.reg similarity index 100% rename from old_work/iterm2colors/putty/PencilLight.reg rename to putty/PencilLight.reg diff --git a/old_work/iterm2colors/putty/Piatto Light.reg b/putty/Piatto Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Piatto Light.reg rename to putty/Piatto Light.reg diff --git a/old_work/iterm2colors/putty/Pnevma.reg b/putty/Pnevma.reg similarity index 100% rename from old_work/iterm2colors/putty/Pnevma.reg rename to putty/Pnevma.reg diff --git a/old_work/iterm2colors/putty/Pro.reg b/putty/Pro.reg similarity index 100% rename from old_work/iterm2colors/putty/Pro.reg rename to putty/Pro.reg diff --git a/old_work/iterm2colors/putty/Red Alert.reg b/putty/Red Alert.reg similarity index 100% rename from old_work/iterm2colors/putty/Red Alert.reg rename to putty/Red Alert.reg diff --git a/old_work/iterm2colors/putty/Red Sands.reg b/putty/Red Sands.reg similarity index 100% rename from old_work/iterm2colors/putty/Red Sands.reg rename to putty/Red Sands.reg diff --git a/old_work/iterm2colors/putty/Rippedcasts.reg b/putty/Rippedcasts.reg similarity index 100% rename from old_work/iterm2colors/putty/Rippedcasts.reg rename to putty/Rippedcasts.reg diff --git a/old_work/iterm2colors/putty/Royal.reg b/putty/Royal.reg similarity index 100% rename from old_work/iterm2colors/putty/Royal.reg rename to putty/Royal.reg diff --git a/old_work/iterm2colors/putty/Ryuuko.reg b/putty/Ryuuko.reg similarity index 100% rename from old_work/iterm2colors/putty/Ryuuko.reg rename to putty/Ryuuko.reg diff --git a/old_work/iterm2colors/putty/SeaShells.reg b/putty/SeaShells.reg similarity index 100% rename from old_work/iterm2colors/putty/SeaShells.reg rename to putty/SeaShells.reg diff --git a/old_work/iterm2colors/putty/Seafoam Pastel.reg b/putty/Seafoam Pastel.reg similarity index 100% rename from old_work/iterm2colors/putty/Seafoam Pastel.reg rename to putty/Seafoam Pastel.reg diff --git a/old_work/iterm2colors/putty/Seti.reg b/putty/Seti.reg similarity index 100% rename from old_work/iterm2colors/putty/Seti.reg rename to putty/Seti.reg diff --git a/old_work/iterm2colors/putty/Shaman.reg b/putty/Shaman.reg similarity index 100% rename from old_work/iterm2colors/putty/Shaman.reg rename to putty/Shaman.reg diff --git a/old_work/iterm2colors/putty/Slate.reg b/putty/Slate.reg similarity index 100% rename from old_work/iterm2colors/putty/Slate.reg rename to putty/Slate.reg diff --git a/old_work/iterm2colors/putty/Smyck.reg b/putty/Smyck.reg similarity index 100% rename from old_work/iterm2colors/putty/Smyck.reg rename to putty/Smyck.reg diff --git a/old_work/iterm2colors/putty/SoftServer.reg b/putty/SoftServer.reg similarity index 100% rename from old_work/iterm2colors/putty/SoftServer.reg rename to putty/SoftServer.reg diff --git a/old_work/iterm2colors/putty/Solarized Darcula.reg b/putty/Solarized Darcula.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Darcula.reg rename to putty/Solarized Darcula.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark - Patched.reg b/putty/Solarized Dark - Patched.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark - Patched.reg rename to putty/Solarized Dark - Patched.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg b/putty/Solarized Dark Higher Contrast.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark Higher Contrast.reg rename to putty/Solarized Dark Higher Contrast.reg diff --git a/old_work/iterm2colors/putty/Solarized Dark.reg b/putty/Solarized Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Dark.reg rename to putty/Solarized Dark.reg diff --git a/old_work/iterm2colors/putty/Solarized Light.reg b/putty/Solarized Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Solarized Light.reg rename to putty/Solarized Light.reg diff --git a/old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg b/putty/SpaceGray Eighties Dull.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray Eighties Dull.reg rename to putty/SpaceGray Eighties Dull.reg diff --git a/old_work/iterm2colors/putty/SpaceGray Eighties.reg b/putty/SpaceGray Eighties.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray Eighties.reg rename to putty/SpaceGray Eighties.reg diff --git a/old_work/iterm2colors/putty/SpaceGray.reg b/putty/SpaceGray.reg similarity index 100% rename from old_work/iterm2colors/putty/SpaceGray.reg rename to putty/SpaceGray.reg diff --git a/old_work/iterm2colors/putty/Spacedust.reg b/putty/Spacedust.reg similarity index 100% rename from old_work/iterm2colors/putty/Spacedust.reg rename to putty/Spacedust.reg diff --git a/old_work/iterm2colors/putty/Spiderman.reg b/putty/Spiderman.reg similarity index 100% rename from old_work/iterm2colors/putty/Spiderman.reg rename to putty/Spiderman.reg diff --git a/old_work/iterm2colors/putty/Spring.reg b/putty/Spring.reg similarity index 100% rename from old_work/iterm2colors/putty/Spring.reg rename to putty/Spring.reg diff --git a/old_work/iterm2colors/putty/Square.reg b/putty/Square.reg similarity index 100% rename from old_work/iterm2colors/putty/Square.reg rename to putty/Square.reg diff --git a/old_work/iterm2colors/putty/Sundried.reg b/putty/Sundried.reg similarity index 100% rename from old_work/iterm2colors/putty/Sundried.reg rename to putty/Sundried.reg diff --git a/old_work/iterm2colors/putty/Symfonic.reg b/putty/Symfonic.reg similarity index 100% rename from old_work/iterm2colors/putty/Symfonic.reg rename to putty/Symfonic.reg diff --git a/old_work/iterm2colors/putty/Teerb.reg b/putty/Teerb.reg similarity index 100% rename from old_work/iterm2colors/putty/Teerb.reg rename to putty/Teerb.reg diff --git a/old_work/iterm2colors/putty/Terminal Basic.reg b/putty/Terminal Basic.reg similarity index 100% rename from old_work/iterm2colors/putty/Terminal Basic.reg rename to putty/Terminal Basic.reg diff --git a/old_work/iterm2colors/putty/Thayer Bright.reg b/putty/Thayer Bright.reg similarity index 100% rename from old_work/iterm2colors/putty/Thayer Bright.reg rename to putty/Thayer Bright.reg diff --git a/old_work/iterm2colors/putty/The Hulk.reg b/putty/The Hulk.reg similarity index 100% rename from old_work/iterm2colors/putty/The Hulk.reg rename to putty/The Hulk.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Blue.reg b/putty/Tomorrow Night Blue.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Blue.reg rename to putty/Tomorrow Night Blue.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Bright.reg b/putty/Tomorrow Night Bright.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Bright.reg rename to putty/Tomorrow Night Bright.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night Eighties.reg b/putty/Tomorrow Night Eighties.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night Eighties.reg rename to putty/Tomorrow Night Eighties.reg diff --git a/old_work/iterm2colors/putty/Tomorrow Night.reg b/putty/Tomorrow Night.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow Night.reg rename to putty/Tomorrow Night.reg diff --git a/old_work/iterm2colors/putty/Tomorrow.reg b/putty/Tomorrow.reg similarity index 100% rename from old_work/iterm2colors/putty/Tomorrow.reg rename to putty/Tomorrow.reg diff --git a/old_work/iterm2colors/putty/ToyChest.reg b/putty/ToyChest.reg similarity index 100% rename from old_work/iterm2colors/putty/ToyChest.reg rename to putty/ToyChest.reg diff --git a/old_work/iterm2colors/putty/Treehouse.reg b/putty/Treehouse.reg similarity index 100% rename from old_work/iterm2colors/putty/Treehouse.reg rename to putty/Treehouse.reg diff --git a/old_work/iterm2colors/putty/Twilight.reg b/putty/Twilight.reg similarity index 100% rename from old_work/iterm2colors/putty/Twilight.reg rename to putty/Twilight.reg diff --git a/old_work/iterm2colors/putty/Ubuntu.reg b/putty/Ubuntu.reg similarity index 100% rename from old_work/iterm2colors/putty/Ubuntu.reg rename to putty/Ubuntu.reg diff --git a/old_work/iterm2colors/putty/UnderTheSea.reg b/putty/UnderTheSea.reg similarity index 100% rename from old_work/iterm2colors/putty/UnderTheSea.reg rename to putty/UnderTheSea.reg diff --git a/old_work/iterm2colors/putty/Urple.reg b/putty/Urple.reg similarity index 100% rename from old_work/iterm2colors/putty/Urple.reg rename to putty/Urple.reg diff --git a/old_work/iterm2colors/putty/Vaughn.reg b/putty/Vaughn.reg similarity index 100% rename from old_work/iterm2colors/putty/Vaughn.reg rename to putty/Vaughn.reg diff --git a/old_work/iterm2colors/putty/VibrantInk.reg b/putty/VibrantInk.reg similarity index 100% rename from old_work/iterm2colors/putty/VibrantInk.reg rename to putty/VibrantInk.reg diff --git a/old_work/iterm2colors/putty/Violet Dark.reg b/putty/Violet Dark.reg similarity index 100% rename from old_work/iterm2colors/putty/Violet Dark.reg rename to putty/Violet Dark.reg diff --git a/old_work/iterm2colors/putty/Violet Light.reg b/putty/Violet Light.reg similarity index 100% rename from old_work/iterm2colors/putty/Violet Light.reg rename to putty/Violet Light.reg diff --git a/old_work/iterm2colors/putty/WarmNeon.reg b/putty/WarmNeon.reg similarity index 100% rename from old_work/iterm2colors/putty/WarmNeon.reg rename to putty/WarmNeon.reg diff --git a/old_work/iterm2colors/putty/Wez.reg b/putty/Wez.reg similarity index 100% rename from old_work/iterm2colors/putty/Wez.reg rename to putty/Wez.reg diff --git a/old_work/iterm2colors/putty/WildCherry.reg b/putty/WildCherry.reg similarity index 100% rename from old_work/iterm2colors/putty/WildCherry.reg rename to putty/WildCherry.reg diff --git a/old_work/iterm2colors/putty/Wombat.reg b/putty/Wombat.reg similarity index 100% rename from old_work/iterm2colors/putty/Wombat.reg rename to putty/Wombat.reg diff --git a/old_work/iterm2colors/putty/Wryan.reg b/putty/Wryan.reg similarity index 100% rename from old_work/iterm2colors/putty/Wryan.reg rename to putty/Wryan.reg diff --git a/old_work/iterm2colors/putty/Zenburn.reg b/putty/Zenburn.reg similarity index 100% rename from old_work/iterm2colors/putty/Zenburn.reg rename to putty/Zenburn.reg diff --git a/old_work/iterm2colors/putty/ayu.reg b/putty/ayu.reg similarity index 100% rename from old_work/iterm2colors/putty/ayu.reg rename to putty/ayu.reg diff --git a/old_work/iterm2colors/putty/ayu_light.reg b/putty/ayu_light.reg similarity index 100% rename from old_work/iterm2colors/putty/ayu_light.reg rename to putty/ayu_light.reg diff --git a/old_work/iterm2colors/putty/deep.reg b/putty/deep.reg similarity index 100% rename from old_work/iterm2colors/putty/deep.reg rename to putty/deep.reg diff --git a/old_work/iterm2colors/putty/idleToes.reg b/putty/idleToes.reg similarity index 100% rename from old_work/iterm2colors/putty/idleToes.reg rename to putty/idleToes.reg diff --git a/old_work/iterm2colors/schemes/3024 Day.itermcolors b/schemes/3024 Day.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/3024 Day.itermcolors rename to schemes/3024 Day.itermcolors diff --git a/old_work/iterm2colors/schemes/3024 Night.itermcolors b/schemes/3024 Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/3024 Night.itermcolors rename to schemes/3024 Night.itermcolors diff --git a/old_work/iterm2colors/schemes/AdventureTime.itermcolors b/schemes/AdventureTime.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AdventureTime.itermcolors rename to schemes/AdventureTime.itermcolors diff --git a/old_work/iterm2colors/schemes/Afterglow.itermcolors b/schemes/Afterglow.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Afterglow.itermcolors rename to schemes/Afterglow.itermcolors diff --git a/old_work/iterm2colors/schemes/AlienBlood.itermcolors b/schemes/AlienBlood.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AlienBlood.itermcolors rename to schemes/AlienBlood.itermcolors diff --git a/old_work/iterm2colors/schemes/Argonaut.itermcolors b/schemes/Argonaut.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Argonaut.itermcolors rename to schemes/Argonaut.itermcolors diff --git a/old_work/iterm2colors/schemes/Arthur.itermcolors b/schemes/Arthur.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Arthur.itermcolors rename to schemes/Arthur.itermcolors diff --git a/old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors b/schemes/AtelierSulphurpool.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AtelierSulphurpool.itermcolors rename to schemes/AtelierSulphurpool.itermcolors diff --git a/old_work/iterm2colors/schemes/Atom.itermcolors b/schemes/Atom.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Atom.itermcolors rename to schemes/Atom.itermcolors diff --git a/old_work/iterm2colors/schemes/AtomOneLight.itermcolors b/schemes/AtomOneLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/AtomOneLight.itermcolors rename to schemes/AtomOneLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Batman.itermcolors b/schemes/Batman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Batman.itermcolors rename to schemes/Batman.itermcolors diff --git a/old_work/iterm2colors/schemes/Belafonte Day.itermcolors b/schemes/Belafonte Day.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Belafonte Day.itermcolors rename to schemes/Belafonte Day.itermcolors diff --git a/old_work/iterm2colors/schemes/Belafonte Night.itermcolors b/schemes/Belafonte Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Belafonte Night.itermcolors rename to schemes/Belafonte Night.itermcolors diff --git a/old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors b/schemes/BirdsOfParadise.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/BirdsOfParadise.itermcolors rename to schemes/BirdsOfParadise.itermcolors diff --git a/old_work/iterm2colors/schemes/Blazer.itermcolors b/schemes/Blazer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Blazer.itermcolors rename to schemes/Blazer.itermcolors diff --git a/old_work/iterm2colors/schemes/Borland.itermcolors b/schemes/Borland.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Borland.itermcolors rename to schemes/Borland.itermcolors diff --git a/old_work/iterm2colors/schemes/Bright Lights.itermcolors b/schemes/Bright Lights.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Bright Lights.itermcolors rename to schemes/Bright Lights.itermcolors diff --git a/old_work/iterm2colors/schemes/Broadcast.itermcolors b/schemes/Broadcast.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Broadcast.itermcolors rename to schemes/Broadcast.itermcolors diff --git a/old_work/iterm2colors/schemes/Brogrammer.itermcolors b/schemes/Brogrammer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Brogrammer.itermcolors rename to schemes/Brogrammer.itermcolors diff --git a/old_work/iterm2colors/schemes/C64.itermcolors b/schemes/C64.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/C64.itermcolors rename to schemes/C64.itermcolors diff --git a/old_work/iterm2colors/schemes/CLRS.itermcolors b/schemes/CLRS.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/CLRS.itermcolors rename to schemes/CLRS.itermcolors diff --git a/old_work/iterm2colors/schemes/Chalk.itermcolors b/schemes/Chalk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Chalk.itermcolors rename to schemes/Chalk.itermcolors diff --git a/old_work/iterm2colors/schemes/Chalkboard.itermcolors b/schemes/Chalkboard.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Chalkboard.itermcolors rename to schemes/Chalkboard.itermcolors diff --git a/old_work/iterm2colors/schemes/Ciapre.itermcolors b/schemes/Ciapre.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ciapre.itermcolors rename to schemes/Ciapre.itermcolors diff --git a/old_work/iterm2colors/schemes/Cobalt Neon.itermcolors b/schemes/Cobalt Neon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Cobalt Neon.itermcolors rename to schemes/Cobalt Neon.itermcolors diff --git a/old_work/iterm2colors/schemes/Cobalt2.itermcolors b/schemes/Cobalt2.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Cobalt2.itermcolors rename to schemes/Cobalt2.itermcolors diff --git a/old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors b/schemes/CrayonPonyFish.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/CrayonPonyFish.itermcolors rename to schemes/CrayonPonyFish.itermcolors diff --git a/old_work/iterm2colors/schemes/Dark Pastel.itermcolors b/schemes/Dark Pastel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Dark Pastel.itermcolors rename to schemes/Dark Pastel.itermcolors diff --git a/old_work/iterm2colors/schemes/Darkside.itermcolors b/schemes/Darkside.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Darkside.itermcolors rename to schemes/Darkside.itermcolors diff --git a/old_work/iterm2colors/schemes/Desert.itermcolors b/schemes/Desert.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Desert.itermcolors rename to schemes/Desert.itermcolors diff --git a/old_work/iterm2colors/schemes/DimmedMonokai.itermcolors b/schemes/DimmedMonokai.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/DimmedMonokai.itermcolors rename to schemes/DimmedMonokai.itermcolors diff --git a/old_work/iterm2colors/schemes/DotGov.itermcolors b/schemes/DotGov.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/DotGov.itermcolors rename to schemes/DotGov.itermcolors diff --git a/old_work/iterm2colors/schemes/Dracula.itermcolors b/schemes/Dracula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Dracula.itermcolors rename to schemes/Dracula.itermcolors diff --git a/old_work/iterm2colors/schemes/Duotone Dark.itermcolors b/schemes/Duotone Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Duotone Dark.itermcolors rename to schemes/Duotone Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/ENCOM.itermcolors b/schemes/ENCOM.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ENCOM.itermcolors rename to schemes/ENCOM.itermcolors diff --git a/old_work/iterm2colors/schemes/Earthsong.itermcolors b/schemes/Earthsong.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Earthsong.itermcolors rename to schemes/Earthsong.itermcolors diff --git a/old_work/iterm2colors/schemes/Elemental.itermcolors b/schemes/Elemental.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Elemental.itermcolors rename to schemes/Elemental.itermcolors diff --git a/old_work/iterm2colors/schemes/Elementary.itermcolors b/schemes/Elementary.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Elementary.itermcolors rename to schemes/Elementary.itermcolors diff --git a/old_work/iterm2colors/schemes/Espresso Libre.itermcolors b/schemes/Espresso Libre.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Espresso Libre.itermcolors rename to schemes/Espresso Libre.itermcolors diff --git a/old_work/iterm2colors/schemes/Espresso.itermcolors b/schemes/Espresso.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Espresso.itermcolors rename to schemes/Espresso.itermcolors diff --git a/old_work/iterm2colors/schemes/Fideloper.itermcolors b/schemes/Fideloper.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Fideloper.itermcolors rename to schemes/Fideloper.itermcolors diff --git a/old_work/iterm2colors/schemes/FirefoxDev.itermcolors b/schemes/FirefoxDev.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FirefoxDev.itermcolors rename to schemes/FirefoxDev.itermcolors diff --git a/old_work/iterm2colors/schemes/Firewatch.itermcolors b/schemes/Firewatch.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Firewatch.itermcolors rename to schemes/Firewatch.itermcolors diff --git a/old_work/iterm2colors/schemes/FishTank.itermcolors b/schemes/FishTank.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FishTank.itermcolors rename to schemes/FishTank.itermcolors diff --git a/old_work/iterm2colors/schemes/Flat.itermcolors b/schemes/Flat.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Flat.itermcolors rename to schemes/Flat.itermcolors diff --git a/old_work/iterm2colors/schemes/Flatland.itermcolors b/schemes/Flatland.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Flatland.itermcolors rename to schemes/Flatland.itermcolors diff --git a/old_work/iterm2colors/schemes/Floraverse.itermcolors b/schemes/Floraverse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Floraverse.itermcolors rename to schemes/Floraverse.itermcolors diff --git a/old_work/iterm2colors/schemes/ForestBlue.itermcolors b/schemes/ForestBlue.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ForestBlue.itermcolors rename to schemes/ForestBlue.itermcolors diff --git a/old_work/iterm2colors/schemes/FrontEndDelight.itermcolors b/schemes/FrontEndDelight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FrontEndDelight.itermcolors rename to schemes/FrontEndDelight.itermcolors diff --git a/old_work/iterm2colors/schemes/FunForrest.itermcolors b/schemes/FunForrest.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/FunForrest.itermcolors rename to schemes/FunForrest.itermcolors diff --git a/old_work/iterm2colors/schemes/Galaxy.itermcolors b/schemes/Galaxy.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Galaxy.itermcolors rename to schemes/Galaxy.itermcolors diff --git a/old_work/iterm2colors/schemes/Github.itermcolors b/schemes/Github.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Github.itermcolors rename to schemes/Github.itermcolors diff --git a/old_work/iterm2colors/schemes/Glacier.itermcolors b/schemes/Glacier.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Glacier.itermcolors rename to schemes/Glacier.itermcolors diff --git a/old_work/iterm2colors/schemes/Grape.itermcolors b/schemes/Grape.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Grape.itermcolors rename to schemes/Grape.itermcolors diff --git a/old_work/iterm2colors/schemes/Grass.itermcolors b/schemes/Grass.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Grass.itermcolors rename to schemes/Grass.itermcolors diff --git a/old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors b/schemes/Gruvbox Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Gruvbox Dark.itermcolors rename to schemes/Gruvbox Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Hardcore.itermcolors b/schemes/Hardcore.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hardcore.itermcolors rename to schemes/Hardcore.itermcolors diff --git a/old_work/iterm2colors/schemes/Harper.itermcolors b/schemes/Harper.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Harper.itermcolors rename to schemes/Harper.itermcolors diff --git a/old_work/iterm2colors/schemes/Highway.itermcolors b/schemes/Highway.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Highway.itermcolors rename to schemes/Highway.itermcolors diff --git a/old_work/iterm2colors/schemes/Hipster Green.itermcolors b/schemes/Hipster Green.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hipster Green.itermcolors rename to schemes/Hipster Green.itermcolors diff --git a/old_work/iterm2colors/schemes/Homebrew.itermcolors b/schemes/Homebrew.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Homebrew.itermcolors rename to schemes/Homebrew.itermcolors diff --git a/old_work/iterm2colors/schemes/Hurtado.itermcolors b/schemes/Hurtado.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hurtado.itermcolors rename to schemes/Hurtado.itermcolors diff --git a/old_work/iterm2colors/schemes/Hybrid.itermcolors b/schemes/Hybrid.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Hybrid.itermcolors rename to schemes/Hybrid.itermcolors diff --git a/old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors b/schemes/IC_Green_PPL.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IC_Green_PPL.itermcolors rename to schemes/IC_Green_PPL.itermcolors diff --git a/old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors b/schemes/IC_Orange_PPL.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IC_Orange_PPL.itermcolors rename to schemes/IC_Orange_PPL.itermcolors diff --git a/old_work/iterm2colors/schemes/IR_Black.itermcolors b/schemes/IR_Black.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/IR_Black.itermcolors rename to schemes/IR_Black.itermcolors diff --git a/old_work/iterm2colors/schemes/Jackie Brown.itermcolors b/schemes/Jackie Brown.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Jackie Brown.itermcolors rename to schemes/Jackie Brown.itermcolors diff --git a/old_work/iterm2colors/schemes/Japanesque.itermcolors b/schemes/Japanesque.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Japanesque.itermcolors rename to schemes/Japanesque.itermcolors diff --git a/old_work/iterm2colors/schemes/Jellybeans.itermcolors b/schemes/Jellybeans.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Jellybeans.itermcolors rename to schemes/Jellybeans.itermcolors diff --git a/old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors b/schemes/JetBrains Darcula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/JetBrains Darcula.itermcolors rename to schemes/JetBrains Darcula.itermcolors diff --git a/old_work/iterm2colors/schemes/Kibble.itermcolors b/schemes/Kibble.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Kibble.itermcolors rename to schemes/Kibble.itermcolors diff --git a/old_work/iterm2colors/schemes/Later This Evening.itermcolors b/schemes/Later This Evening.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Later This Evening.itermcolors rename to schemes/Later This Evening.itermcolors diff --git a/old_work/iterm2colors/schemes/Lavandula.itermcolors b/schemes/Lavandula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Lavandula.itermcolors rename to schemes/Lavandula.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbon.itermcolors b/schemes/LiquidCarbon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbon.itermcolors rename to schemes/LiquidCarbon.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors b/schemes/LiquidCarbonTransparent.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbonTransparent.itermcolors rename to schemes/LiquidCarbonTransparent.itermcolors diff --git a/old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors b/schemes/LiquidCarbonTransparentInverse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/LiquidCarbonTransparentInverse.itermcolors rename to schemes/LiquidCarbonTransparentInverse.itermcolors diff --git a/old_work/iterm2colors/schemes/Man Page.itermcolors b/schemes/Man Page.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Man Page.itermcolors rename to schemes/Man Page.itermcolors diff --git a/old_work/iterm2colors/schemes/Material.itermcolors b/schemes/Material.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Material.itermcolors rename to schemes/Material.itermcolors diff --git a/old_work/iterm2colors/schemes/MaterialDark.itermcolors b/schemes/MaterialDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/MaterialDark.itermcolors rename to schemes/MaterialDark.itermcolors diff --git a/old_work/iterm2colors/schemes/Mathias.itermcolors b/schemes/Mathias.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Mathias.itermcolors rename to schemes/Mathias.itermcolors diff --git a/old_work/iterm2colors/schemes/Medallion.itermcolors b/schemes/Medallion.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Medallion.itermcolors rename to schemes/Medallion.itermcolors diff --git a/old_work/iterm2colors/schemes/Misterioso.itermcolors b/schemes/Misterioso.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Misterioso.itermcolors rename to schemes/Misterioso.itermcolors diff --git a/old_work/iterm2colors/schemes/Molokai.itermcolors b/schemes/Molokai.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Molokai.itermcolors rename to schemes/Molokai.itermcolors diff --git a/old_work/iterm2colors/schemes/MonaLisa.itermcolors b/schemes/MonaLisa.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/MonaLisa.itermcolors rename to schemes/MonaLisa.itermcolors diff --git a/old_work/iterm2colors/schemes/Monokai Soda.itermcolors b/schemes/Monokai Soda.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Monokai Soda.itermcolors rename to schemes/Monokai Soda.itermcolors diff --git a/old_work/iterm2colors/schemes/Monokai Vivid.itermcolors b/schemes/Monokai Vivid.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Monokai Vivid.itermcolors rename to schemes/Monokai Vivid.itermcolors diff --git a/old_work/iterm2colors/schemes/N0tch2k.itermcolors b/schemes/N0tch2k.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/N0tch2k.itermcolors rename to schemes/N0tch2k.itermcolors diff --git a/old_work/iterm2colors/schemes/Neopolitan.itermcolors b/schemes/Neopolitan.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Neopolitan.itermcolors rename to schemes/Neopolitan.itermcolors diff --git a/old_work/iterm2colors/schemes/Neutron.itermcolors b/schemes/Neutron.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Neutron.itermcolors rename to schemes/Neutron.itermcolors diff --git a/old_work/iterm2colors/schemes/NightLion v1.itermcolors b/schemes/NightLion v1.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/NightLion v1.itermcolors rename to schemes/NightLion v1.itermcolors diff --git a/old_work/iterm2colors/schemes/NightLion v2.itermcolors b/schemes/NightLion v2.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/NightLion v2.itermcolors rename to schemes/NightLion v2.itermcolors diff --git a/old_work/iterm2colors/schemes/Novel.itermcolors b/schemes/Novel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Novel.itermcolors rename to schemes/Novel.itermcolors diff --git a/old_work/iterm2colors/schemes/Obsidian.itermcolors b/schemes/Obsidian.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Obsidian.itermcolors rename to schemes/Obsidian.itermcolors diff --git a/old_work/iterm2colors/schemes/Ocean.itermcolors b/schemes/Ocean.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ocean.itermcolors rename to schemes/Ocean.itermcolors diff --git a/old_work/iterm2colors/schemes/OceanicMaterial.itermcolors b/schemes/OceanicMaterial.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OceanicMaterial.itermcolors rename to schemes/OceanicMaterial.itermcolors diff --git a/old_work/iterm2colors/schemes/Ollie.itermcolors b/schemes/Ollie.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ollie.itermcolors rename to schemes/Ollie.itermcolors diff --git a/old_work/iterm2colors/schemes/OneHalfDark.itermcolors b/schemes/OneHalfDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OneHalfDark.itermcolors rename to schemes/OneHalfDark.itermcolors diff --git a/old_work/iterm2colors/schemes/OneHalfLight.itermcolors b/schemes/OneHalfLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/OneHalfLight.itermcolors rename to schemes/OneHalfLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Pandora.itermcolors b/schemes/Pandora.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pandora.itermcolors rename to schemes/Pandora.itermcolors diff --git a/old_work/iterm2colors/schemes/Parasio Dark.itermcolors b/schemes/Parasio Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Parasio Dark.itermcolors rename to schemes/Parasio Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/PaulMillr.itermcolors b/schemes/PaulMillr.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PaulMillr.itermcolors rename to schemes/PaulMillr.itermcolors diff --git a/old_work/iterm2colors/schemes/PencilDark.itermcolors b/schemes/PencilDark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PencilDark.itermcolors rename to schemes/PencilDark.itermcolors diff --git a/old_work/iterm2colors/schemes/PencilLight.itermcolors b/schemes/PencilLight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/PencilLight.itermcolors rename to schemes/PencilLight.itermcolors diff --git a/old_work/iterm2colors/schemes/Piatto Light.itermcolors b/schemes/Piatto Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Piatto Light.itermcolors rename to schemes/Piatto Light.itermcolors diff --git a/old_work/iterm2colors/schemes/Pnevma.itermcolors b/schemes/Pnevma.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pnevma.itermcolors rename to schemes/Pnevma.itermcolors diff --git a/old_work/iterm2colors/schemes/Pro.itermcolors b/schemes/Pro.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Pro.itermcolors rename to schemes/Pro.itermcolors diff --git a/old_work/iterm2colors/schemes/Red Alert.itermcolors b/schemes/Red Alert.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Red Alert.itermcolors rename to schemes/Red Alert.itermcolors diff --git a/old_work/iterm2colors/schemes/Red Sands.itermcolors b/schemes/Red Sands.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Red Sands.itermcolors rename to schemes/Red Sands.itermcolors diff --git a/old_work/iterm2colors/schemes/Rippedcasts.itermcolors b/schemes/Rippedcasts.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Rippedcasts.itermcolors rename to schemes/Rippedcasts.itermcolors diff --git a/old_work/iterm2colors/schemes/Royal.itermcolors b/schemes/Royal.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Royal.itermcolors rename to schemes/Royal.itermcolors diff --git a/old_work/iterm2colors/schemes/Ryuuko.itermcolors b/schemes/Ryuuko.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ryuuko.itermcolors rename to schemes/Ryuuko.itermcolors diff --git a/old_work/iterm2colors/schemes/SeaShells.itermcolors b/schemes/SeaShells.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SeaShells.itermcolors rename to schemes/SeaShells.itermcolors diff --git a/old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors b/schemes/Seafoam Pastel.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Seafoam Pastel.itermcolors rename to schemes/Seafoam Pastel.itermcolors diff --git a/old_work/iterm2colors/schemes/Seti.itermcolors b/schemes/Seti.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Seti.itermcolors rename to schemes/Seti.itermcolors diff --git a/old_work/iterm2colors/schemes/Shaman.itermcolors b/schemes/Shaman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Shaman.itermcolors rename to schemes/Shaman.itermcolors diff --git a/old_work/iterm2colors/schemes/Slate.itermcolors b/schemes/Slate.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Slate.itermcolors rename to schemes/Slate.itermcolors diff --git a/old_work/iterm2colors/schemes/Smyck.itermcolors b/schemes/Smyck.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Smyck.itermcolors rename to schemes/Smyck.itermcolors diff --git a/old_work/iterm2colors/schemes/SoftServer.itermcolors b/schemes/SoftServer.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SoftServer.itermcolors rename to schemes/SoftServer.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Darcula.itermcolors b/schemes/Solarized Darcula.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Darcula.itermcolors rename to schemes/Solarized Darcula.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors b/schemes/Solarized Dark - Patched.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark - Patched.itermcolors rename to schemes/Solarized Dark - Patched.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors b/schemes/Solarized Dark Higher Contrast.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark Higher Contrast.itermcolors rename to schemes/Solarized Dark Higher Contrast.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Dark.itermcolors b/schemes/Solarized Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Dark.itermcolors rename to schemes/Solarized Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Solarized Light.itermcolors b/schemes/Solarized Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Solarized Light.itermcolors rename to schemes/Solarized Light.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors b/schemes/SpaceGray Eighties Dull.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray Eighties Dull.itermcolors rename to schemes/SpaceGray Eighties Dull.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors b/schemes/SpaceGray Eighties.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray Eighties.itermcolors rename to schemes/SpaceGray Eighties.itermcolors diff --git a/old_work/iterm2colors/schemes/SpaceGray.itermcolors b/schemes/SpaceGray.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/SpaceGray.itermcolors rename to schemes/SpaceGray.itermcolors diff --git a/old_work/iterm2colors/schemes/Spacedust.itermcolors b/schemes/Spacedust.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spacedust.itermcolors rename to schemes/Spacedust.itermcolors diff --git a/old_work/iterm2colors/schemes/Spiderman.itermcolors b/schemes/Spiderman.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spiderman.itermcolors rename to schemes/Spiderman.itermcolors diff --git a/old_work/iterm2colors/schemes/Spring.itermcolors b/schemes/Spring.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Spring.itermcolors rename to schemes/Spring.itermcolors diff --git a/old_work/iterm2colors/schemes/Square.itermcolors b/schemes/Square.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Square.itermcolors rename to schemes/Square.itermcolors diff --git a/old_work/iterm2colors/schemes/Sundried.itermcolors b/schemes/Sundried.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Sundried.itermcolors rename to schemes/Sundried.itermcolors diff --git a/old_work/iterm2colors/schemes/Symfonic.itermcolors b/schemes/Symfonic.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Symfonic.itermcolors rename to schemes/Symfonic.itermcolors diff --git a/old_work/iterm2colors/schemes/Teerb.itermcolors b/schemes/Teerb.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Teerb.itermcolors rename to schemes/Teerb.itermcolors diff --git a/old_work/iterm2colors/schemes/Terminal Basic.itermcolors b/schemes/Terminal Basic.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Terminal Basic.itermcolors rename to schemes/Terminal Basic.itermcolors diff --git a/old_work/iterm2colors/schemes/Thayer Bright.itermcolors b/schemes/Thayer Bright.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Thayer Bright.itermcolors rename to schemes/Thayer Bright.itermcolors diff --git a/old_work/iterm2colors/schemes/The Hulk.itermcolors b/schemes/The Hulk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/The Hulk.itermcolors rename to schemes/The Hulk.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors b/schemes/Tomorrow Night Blue.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Blue.itermcolors rename to schemes/Tomorrow Night Blue.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors b/schemes/Tomorrow Night Bright.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Bright.itermcolors rename to schemes/Tomorrow Night Bright.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors b/schemes/Tomorrow Night Eighties.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night Eighties.itermcolors rename to schemes/Tomorrow Night Eighties.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow Night.itermcolors b/schemes/Tomorrow Night.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow Night.itermcolors rename to schemes/Tomorrow Night.itermcolors diff --git a/old_work/iterm2colors/schemes/Tomorrow.itermcolors b/schemes/Tomorrow.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Tomorrow.itermcolors rename to schemes/Tomorrow.itermcolors diff --git a/old_work/iterm2colors/schemes/ToyChest.itermcolors b/schemes/ToyChest.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ToyChest.itermcolors rename to schemes/ToyChest.itermcolors diff --git a/old_work/iterm2colors/schemes/Treehouse.itermcolors b/schemes/Treehouse.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Treehouse.itermcolors rename to schemes/Treehouse.itermcolors diff --git a/old_work/iterm2colors/schemes/Twilight.itermcolors b/schemes/Twilight.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Twilight.itermcolors rename to schemes/Twilight.itermcolors diff --git a/old_work/iterm2colors/schemes/Ubuntu.itermcolors b/schemes/Ubuntu.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Ubuntu.itermcolors rename to schemes/Ubuntu.itermcolors diff --git a/old_work/iterm2colors/schemes/UnderTheSea.itermcolors b/schemes/UnderTheSea.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/UnderTheSea.itermcolors rename to schemes/UnderTheSea.itermcolors diff --git a/old_work/iterm2colors/schemes/Urple.itermcolors b/schemes/Urple.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Urple.itermcolors rename to schemes/Urple.itermcolors diff --git a/old_work/iterm2colors/schemes/Vaughn.itermcolors b/schemes/Vaughn.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Vaughn.itermcolors rename to schemes/Vaughn.itermcolors diff --git a/old_work/iterm2colors/schemes/VibrantInk.itermcolors b/schemes/VibrantInk.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/VibrantInk.itermcolors rename to schemes/VibrantInk.itermcolors diff --git a/old_work/iterm2colors/schemes/Violet Dark.itermcolors b/schemes/Violet Dark.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Violet Dark.itermcolors rename to schemes/Violet Dark.itermcolors diff --git a/old_work/iterm2colors/schemes/Violet Light.itermcolors b/schemes/Violet Light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Violet Light.itermcolors rename to schemes/Violet Light.itermcolors diff --git a/old_work/iterm2colors/schemes/WarmNeon.itermcolors b/schemes/WarmNeon.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/WarmNeon.itermcolors rename to schemes/WarmNeon.itermcolors diff --git a/old_work/iterm2colors/schemes/Wez.itermcolors b/schemes/Wez.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wez.itermcolors rename to schemes/Wez.itermcolors diff --git a/old_work/iterm2colors/schemes/WildCherry.itermcolors b/schemes/WildCherry.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/WildCherry.itermcolors rename to schemes/WildCherry.itermcolors diff --git a/old_work/iterm2colors/schemes/Wombat.itermcolors b/schemes/Wombat.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wombat.itermcolors rename to schemes/Wombat.itermcolors diff --git a/old_work/iterm2colors/schemes/Wryan.itermcolors b/schemes/Wryan.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Wryan.itermcolors rename to schemes/Wryan.itermcolors diff --git a/old_work/iterm2colors/schemes/Zenburn.itermcolors b/schemes/Zenburn.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/Zenburn.itermcolors rename to schemes/Zenburn.itermcolors diff --git a/old_work/iterm2colors/schemes/ayu.itermcolors b/schemes/ayu.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ayu.itermcolors rename to schemes/ayu.itermcolors diff --git a/old_work/iterm2colors/schemes/ayu_light.itermcolors b/schemes/ayu_light.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/ayu_light.itermcolors rename to schemes/ayu_light.itermcolors diff --git a/old_work/iterm2colors/schemes/deep.itermcolors b/schemes/deep.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/deep.itermcolors rename to schemes/deep.itermcolors diff --git a/old_work/iterm2colors/schemes/idleToes.itermcolors b/schemes/idleToes.itermcolors similarity index 100% rename from old_work/iterm2colors/schemes/idleToes.itermcolors rename to schemes/idleToes.itermcolors diff --git a/old_work/iterm2colors/screenshots/3024_day.png b/screenshots/3024_day.png similarity index 100% rename from old_work/iterm2colors/screenshots/3024_day.png rename to screenshots/3024_day.png diff --git a/old_work/iterm2colors/screenshots/3024_night.png b/screenshots/3024_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/3024_night.png rename to screenshots/3024_night.png diff --git a/old_work/iterm2colors/screenshots/README.md b/screenshots/README.md similarity index 100% rename from old_work/iterm2colors/screenshots/README.md rename to screenshots/README.md diff --git a/old_work/iterm2colors/screenshots/adventure_time.png b/screenshots/adventure_time.png similarity index 100% rename from old_work/iterm2colors/screenshots/adventure_time.png rename to screenshots/adventure_time.png diff --git a/old_work/iterm2colors/screenshots/afterglow.png b/screenshots/afterglow.png similarity index 100% rename from old_work/iterm2colors/screenshots/afterglow.png rename to screenshots/afterglow.png diff --git a/old_work/iterm2colors/screenshots/alien_blood.png b/screenshots/alien_blood.png similarity index 100% rename from old_work/iterm2colors/screenshots/alien_blood.png rename to screenshots/alien_blood.png diff --git a/old_work/iterm2colors/screenshots/argonaut.png b/screenshots/argonaut.png similarity index 100% rename from old_work/iterm2colors/screenshots/argonaut.png rename to screenshots/argonaut.png diff --git a/old_work/iterm2colors/screenshots/arthur.png b/screenshots/arthur.png similarity index 100% rename from old_work/iterm2colors/screenshots/arthur.png rename to screenshots/arthur.png diff --git a/old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png b/screenshots/atelier-sulphurpool_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/atelier-sulphurpool_dark.png rename to screenshots/atelier-sulphurpool_dark.png diff --git a/old_work/iterm2colors/screenshots/atom.png b/screenshots/atom.png similarity index 100% rename from old_work/iterm2colors/screenshots/atom.png rename to screenshots/atom.png diff --git a/old_work/iterm2colors/screenshots/atom_one_light.png b/screenshots/atom_one_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/atom_one_light.png rename to screenshots/atom_one_light.png diff --git a/old_work/iterm2colors/screenshots/ayu.png b/screenshots/ayu.png similarity index 100% rename from old_work/iterm2colors/screenshots/ayu.png rename to screenshots/ayu.png diff --git a/old_work/iterm2colors/screenshots/ayu_light.png b/screenshots/ayu_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/ayu_light.png rename to screenshots/ayu_light.png diff --git a/old_work/iterm2colors/screenshots/batman.png b/screenshots/batman.png similarity index 100% rename from old_work/iterm2colors/screenshots/batman.png rename to screenshots/batman.png diff --git a/old_work/iterm2colors/screenshots/belafonte_day.png b/screenshots/belafonte_day.png similarity index 100% rename from old_work/iterm2colors/screenshots/belafonte_day.png rename to screenshots/belafonte_day.png diff --git a/old_work/iterm2colors/screenshots/belafonte_night.png b/screenshots/belafonte_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/belafonte_night.png rename to screenshots/belafonte_night.png diff --git a/old_work/iterm2colors/screenshots/birds_of_paradise.png b/screenshots/birds_of_paradise.png similarity index 100% rename from old_work/iterm2colors/screenshots/birds_of_paradise.png rename to screenshots/birds_of_paradise.png diff --git a/old_work/iterm2colors/screenshots/blazer.png b/screenshots/blazer.png similarity index 100% rename from old_work/iterm2colors/screenshots/blazer.png rename to screenshots/blazer.png diff --git a/old_work/iterm2colors/screenshots/borland.png b/screenshots/borland.png similarity index 100% rename from old_work/iterm2colors/screenshots/borland.png rename to screenshots/borland.png diff --git a/old_work/iterm2colors/screenshots/bright_lights.png b/screenshots/bright_lights.png similarity index 100% rename from old_work/iterm2colors/screenshots/bright_lights.png rename to screenshots/bright_lights.png diff --git a/old_work/iterm2colors/screenshots/broadcast.png b/screenshots/broadcast.png similarity index 100% rename from old_work/iterm2colors/screenshots/broadcast.png rename to screenshots/broadcast.png diff --git a/old_work/iterm2colors/screenshots/brogrammer.png b/screenshots/brogrammer.png similarity index 100% rename from old_work/iterm2colors/screenshots/brogrammer.png rename to screenshots/brogrammer.png diff --git a/old_work/iterm2colors/screenshots/c64.png b/screenshots/c64.png similarity index 100% rename from old_work/iterm2colors/screenshots/c64.png rename to screenshots/c64.png diff --git a/old_work/iterm2colors/screenshots/chalk.png b/screenshots/chalk.png similarity index 100% rename from old_work/iterm2colors/screenshots/chalk.png rename to screenshots/chalk.png diff --git a/old_work/iterm2colors/screenshots/chalkboard.png b/screenshots/chalkboard.png similarity index 100% rename from old_work/iterm2colors/screenshots/chalkboard.png rename to screenshots/chalkboard.png diff --git a/old_work/iterm2colors/screenshots/ciapre.png b/screenshots/ciapre.png similarity index 100% rename from old_work/iterm2colors/screenshots/ciapre.png rename to screenshots/ciapre.png diff --git a/old_work/iterm2colors/screenshots/clrs.png b/screenshots/clrs.png similarity index 100% rename from old_work/iterm2colors/screenshots/clrs.png rename to screenshots/clrs.png diff --git a/old_work/iterm2colors/screenshots/cobalt2.png b/screenshots/cobalt2.png similarity index 100% rename from old_work/iterm2colors/screenshots/cobalt2.png rename to screenshots/cobalt2.png diff --git a/old_work/iterm2colors/screenshots/cobalt_neon.png b/screenshots/cobalt_neon.png similarity index 100% rename from old_work/iterm2colors/screenshots/cobalt_neon.png rename to screenshots/cobalt_neon.png diff --git a/old_work/iterm2colors/screenshots/crayon_pony_fish.png b/screenshots/crayon_pony_fish.png similarity index 100% rename from old_work/iterm2colors/screenshots/crayon_pony_fish.png rename to screenshots/crayon_pony_fish.png diff --git a/old_work/iterm2colors/screenshots/dark_pastel.png b/screenshots/dark_pastel.png similarity index 100% rename from old_work/iterm2colors/screenshots/dark_pastel.png rename to screenshots/dark_pastel.png diff --git a/old_work/iterm2colors/screenshots/darkside.png b/screenshots/darkside.png similarity index 100% rename from old_work/iterm2colors/screenshots/darkside.png rename to screenshots/darkside.png diff --git a/old_work/iterm2colors/screenshots/deep.png b/screenshots/deep.png similarity index 100% rename from old_work/iterm2colors/screenshots/deep.png rename to screenshots/deep.png diff --git a/old_work/iterm2colors/screenshots/desert.png b/screenshots/desert.png similarity index 100% rename from old_work/iterm2colors/screenshots/desert.png rename to screenshots/desert.png diff --git a/old_work/iterm2colors/screenshots/dimmed_monokai.png b/screenshots/dimmed_monokai.png similarity index 100% rename from old_work/iterm2colors/screenshots/dimmed_monokai.png rename to screenshots/dimmed_monokai.png diff --git a/old_work/iterm2colors/screenshots/dot_gov.png b/screenshots/dot_gov.png similarity index 100% rename from old_work/iterm2colors/screenshots/dot_gov.png rename to screenshots/dot_gov.png diff --git a/old_work/iterm2colors/screenshots/dracula.png b/screenshots/dracula.png similarity index 100% rename from old_work/iterm2colors/screenshots/dracula.png rename to screenshots/dracula.png diff --git a/old_work/iterm2colors/screenshots/duotone_dark.png b/screenshots/duotone_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/duotone_dark.png rename to screenshots/duotone_dark.png diff --git a/old_work/iterm2colors/screenshots/earthsong.png b/screenshots/earthsong.png similarity index 100% rename from old_work/iterm2colors/screenshots/earthsong.png rename to screenshots/earthsong.png diff --git a/old_work/iterm2colors/screenshots/elemental.png b/screenshots/elemental.png similarity index 100% rename from old_work/iterm2colors/screenshots/elemental.png rename to screenshots/elemental.png diff --git a/old_work/iterm2colors/screenshots/elementary.png b/screenshots/elementary.png similarity index 100% rename from old_work/iterm2colors/screenshots/elementary.png rename to screenshots/elementary.png diff --git a/old_work/iterm2colors/screenshots/encom.png b/screenshots/encom.png similarity index 100% rename from old_work/iterm2colors/screenshots/encom.png rename to screenshots/encom.png diff --git a/old_work/iterm2colors/screenshots/espresso.png b/screenshots/espresso.png similarity index 100% rename from old_work/iterm2colors/screenshots/espresso.png rename to screenshots/espresso.png diff --git a/old_work/iterm2colors/screenshots/espresso_libre.png b/screenshots/espresso_libre.png similarity index 100% rename from old_work/iterm2colors/screenshots/espresso_libre.png rename to screenshots/espresso_libre.png diff --git a/old_work/iterm2colors/screenshots/fideloper.png b/screenshots/fideloper.png similarity index 100% rename from old_work/iterm2colors/screenshots/fideloper.png rename to screenshots/fideloper.png diff --git a/old_work/iterm2colors/screenshots/firefox_dev.png b/screenshots/firefox_dev.png similarity index 100% rename from old_work/iterm2colors/screenshots/firefox_dev.png rename to screenshots/firefox_dev.png diff --git a/old_work/iterm2colors/screenshots/firewatch.png b/screenshots/firewatch.png similarity index 100% rename from old_work/iterm2colors/screenshots/firewatch.png rename to screenshots/firewatch.png diff --git a/old_work/iterm2colors/screenshots/fish_tank.png b/screenshots/fish_tank.png similarity index 100% rename from old_work/iterm2colors/screenshots/fish_tank.png rename to screenshots/fish_tank.png diff --git a/old_work/iterm2colors/screenshots/flat.png b/screenshots/flat.png similarity index 100% rename from old_work/iterm2colors/screenshots/flat.png rename to screenshots/flat.png diff --git a/old_work/iterm2colors/screenshots/flatland.png b/screenshots/flatland.png similarity index 100% rename from old_work/iterm2colors/screenshots/flatland.png rename to screenshots/flatland.png diff --git a/old_work/iterm2colors/screenshots/floraverse.png b/screenshots/floraverse.png similarity index 100% rename from old_work/iterm2colors/screenshots/floraverse.png rename to screenshots/floraverse.png diff --git a/old_work/iterm2colors/screenshots/forest_blue.png b/screenshots/forest_blue.png similarity index 100% rename from old_work/iterm2colors/screenshots/forest_blue.png rename to screenshots/forest_blue.png diff --git a/old_work/iterm2colors/screenshots/front_end_delight.png b/screenshots/front_end_delight.png similarity index 100% rename from old_work/iterm2colors/screenshots/front_end_delight.png rename to screenshots/front_end_delight.png diff --git a/old_work/iterm2colors/screenshots/fun_forrest.png b/screenshots/fun_forrest.png similarity index 100% rename from old_work/iterm2colors/screenshots/fun_forrest.png rename to screenshots/fun_forrest.png diff --git a/old_work/iterm2colors/screenshots/galaxy.png b/screenshots/galaxy.png similarity index 100% rename from old_work/iterm2colors/screenshots/galaxy.png rename to screenshots/galaxy.png diff --git a/old_work/iterm2colors/screenshots/github.png b/screenshots/github.png similarity index 100% rename from old_work/iterm2colors/screenshots/github.png rename to screenshots/github.png diff --git a/old_work/iterm2colors/screenshots/glacier.png b/screenshots/glacier.png similarity index 100% rename from old_work/iterm2colors/screenshots/glacier.png rename to screenshots/glacier.png diff --git a/old_work/iterm2colors/screenshots/grape.png b/screenshots/grape.png similarity index 100% rename from old_work/iterm2colors/screenshots/grape.png rename to screenshots/grape.png diff --git a/old_work/iterm2colors/screenshots/grass.png b/screenshots/grass.png similarity index 100% rename from old_work/iterm2colors/screenshots/grass.png rename to screenshots/grass.png diff --git a/old_work/iterm2colors/screenshots/gruvbox_dark.png b/screenshots/gruvbox_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/gruvbox_dark.png rename to screenshots/gruvbox_dark.png diff --git a/old_work/iterm2colors/screenshots/hardcore.png b/screenshots/hardcore.png similarity index 100% rename from old_work/iterm2colors/screenshots/hardcore.png rename to screenshots/hardcore.png diff --git a/old_work/iterm2colors/screenshots/harper.png b/screenshots/harper.png similarity index 100% rename from old_work/iterm2colors/screenshots/harper.png rename to screenshots/harper.png diff --git a/old_work/iterm2colors/screenshots/highway.png b/screenshots/highway.png similarity index 100% rename from old_work/iterm2colors/screenshots/highway.png rename to screenshots/highway.png diff --git a/old_work/iterm2colors/screenshots/hipster_green.png b/screenshots/hipster_green.png similarity index 100% rename from old_work/iterm2colors/screenshots/hipster_green.png rename to screenshots/hipster_green.png diff --git a/old_work/iterm2colors/screenshots/homebrew.png b/screenshots/homebrew.png similarity index 100% rename from old_work/iterm2colors/screenshots/homebrew.png rename to screenshots/homebrew.png diff --git a/old_work/iterm2colors/screenshots/hurtado.png b/screenshots/hurtado.png similarity index 100% rename from old_work/iterm2colors/screenshots/hurtado.png rename to screenshots/hurtado.png diff --git a/old_work/iterm2colors/screenshots/hybrid.png b/screenshots/hybrid.png similarity index 100% rename from old_work/iterm2colors/screenshots/hybrid.png rename to screenshots/hybrid.png diff --git a/old_work/iterm2colors/screenshots/ic_green_ppl.png b/screenshots/ic_green_ppl.png similarity index 100% rename from old_work/iterm2colors/screenshots/ic_green_ppl.png rename to screenshots/ic_green_ppl.png diff --git a/old_work/iterm2colors/screenshots/ic_orange_ppl.png b/screenshots/ic_orange_ppl.png similarity index 100% rename from old_work/iterm2colors/screenshots/ic_orange_ppl.png rename to screenshots/ic_orange_ppl.png diff --git a/old_work/iterm2colors/screenshots/idleToes.png b/screenshots/idleToes.png similarity index 100% rename from old_work/iterm2colors/screenshots/idleToes.png rename to screenshots/idleToes.png diff --git a/old_work/iterm2colors/screenshots/ir_black.png b/screenshots/ir_black.png similarity index 100% rename from old_work/iterm2colors/screenshots/ir_black.png rename to screenshots/ir_black.png diff --git a/old_work/iterm2colors/screenshots/jackie_brown.png b/screenshots/jackie_brown.png similarity index 100% rename from old_work/iterm2colors/screenshots/jackie_brown.png rename to screenshots/jackie_brown.png diff --git a/old_work/iterm2colors/screenshots/japanesque.png b/screenshots/japanesque.png similarity index 100% rename from old_work/iterm2colors/screenshots/japanesque.png rename to screenshots/japanesque.png diff --git a/old_work/iterm2colors/screenshots/jellybeans.png b/screenshots/jellybeans.png similarity index 100% rename from old_work/iterm2colors/screenshots/jellybeans.png rename to screenshots/jellybeans.png diff --git a/old_work/iterm2colors/screenshots/jetbrains_darcula.png b/screenshots/jetbrains_darcula.png similarity index 100% rename from old_work/iterm2colors/screenshots/jetbrains_darcula.png rename to screenshots/jetbrains_darcula.png diff --git a/old_work/iterm2colors/screenshots/kibble.png b/screenshots/kibble.png similarity index 100% rename from old_work/iterm2colors/screenshots/kibble.png rename to screenshots/kibble.png diff --git a/old_work/iterm2colors/screenshots/later_this_evening.png b/screenshots/later_this_evening.png similarity index 100% rename from old_work/iterm2colors/screenshots/later_this_evening.png rename to screenshots/later_this_evening.png diff --git a/old_work/iterm2colors/screenshots/lavandula.png b/screenshots/lavandula.png similarity index 100% rename from old_work/iterm2colors/screenshots/lavandula.png rename to screenshots/lavandula.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon.png b/screenshots/liquid_carbon.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon.png rename to screenshots/liquid_carbon.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon_transparent.png b/screenshots/liquid_carbon_transparent.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon_transparent.png rename to screenshots/liquid_carbon_transparent.png diff --git a/old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png b/screenshots/liquid_carbon_transparent_inverse.png similarity index 100% rename from old_work/iterm2colors/screenshots/liquid_carbon_transparent_inverse.png rename to screenshots/liquid_carbon_transparent_inverse.png diff --git a/old_work/iterm2colors/screenshots/man_page.png b/screenshots/man_page.png similarity index 100% rename from old_work/iterm2colors/screenshots/man_page.png rename to screenshots/man_page.png diff --git a/old_work/iterm2colors/screenshots/material.png b/screenshots/material.png similarity index 100% rename from old_work/iterm2colors/screenshots/material.png rename to screenshots/material.png diff --git a/old_work/iterm2colors/screenshots/material_dark.png b/screenshots/material_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/material_dark.png rename to screenshots/material_dark.png diff --git a/old_work/iterm2colors/screenshots/mathias.png b/screenshots/mathias.png similarity index 100% rename from old_work/iterm2colors/screenshots/mathias.png rename to screenshots/mathias.png diff --git a/old_work/iterm2colors/screenshots/medallion.png b/screenshots/medallion.png similarity index 100% rename from old_work/iterm2colors/screenshots/medallion.png rename to screenshots/medallion.png diff --git a/old_work/iterm2colors/screenshots/misterioso.png b/screenshots/misterioso.png similarity index 100% rename from old_work/iterm2colors/screenshots/misterioso.png rename to screenshots/misterioso.png diff --git a/old_work/iterm2colors/screenshots/molokai.png b/screenshots/molokai.png similarity index 100% rename from old_work/iterm2colors/screenshots/molokai.png rename to screenshots/molokai.png diff --git a/old_work/iterm2colors/screenshots/mona_lisa.png b/screenshots/mona_lisa.png similarity index 100% rename from old_work/iterm2colors/screenshots/mona_lisa.png rename to screenshots/mona_lisa.png diff --git a/old_work/iterm2colors/screenshots/monokai_soda.png b/screenshots/monokai_soda.png similarity index 100% rename from old_work/iterm2colors/screenshots/monokai_soda.png rename to screenshots/monokai_soda.png diff --git a/old_work/iterm2colors/screenshots/monokai_vivid.png b/screenshots/monokai_vivid.png similarity index 100% rename from old_work/iterm2colors/screenshots/monokai_vivid.png rename to screenshots/monokai_vivid.png diff --git a/old_work/iterm2colors/screenshots/n0tch2k.png b/screenshots/n0tch2k.png similarity index 100% rename from old_work/iterm2colors/screenshots/n0tch2k.png rename to screenshots/n0tch2k.png diff --git a/old_work/iterm2colors/screenshots/neopolitan.png b/screenshots/neopolitan.png similarity index 100% rename from old_work/iterm2colors/screenshots/neopolitan.png rename to screenshots/neopolitan.png diff --git a/old_work/iterm2colors/screenshots/neutron.png b/screenshots/neutron.png similarity index 100% rename from old_work/iterm2colors/screenshots/neutron.png rename to screenshots/neutron.png diff --git a/old_work/iterm2colors/screenshots/nightlion_v1.png b/screenshots/nightlion_v1.png similarity index 100% rename from old_work/iterm2colors/screenshots/nightlion_v1.png rename to screenshots/nightlion_v1.png diff --git a/old_work/iterm2colors/screenshots/nightlion_v2.png b/screenshots/nightlion_v2.png similarity index 100% rename from old_work/iterm2colors/screenshots/nightlion_v2.png rename to screenshots/nightlion_v2.png diff --git a/old_work/iterm2colors/screenshots/novel.png b/screenshots/novel.png similarity index 100% rename from old_work/iterm2colors/screenshots/novel.png rename to screenshots/novel.png diff --git a/old_work/iterm2colors/screenshots/obsidian.png b/screenshots/obsidian.png similarity index 100% rename from old_work/iterm2colors/screenshots/obsidian.png rename to screenshots/obsidian.png diff --git a/old_work/iterm2colors/screenshots/ocean.png b/screenshots/ocean.png similarity index 100% rename from old_work/iterm2colors/screenshots/ocean.png rename to screenshots/ocean.png diff --git a/old_work/iterm2colors/screenshots/oceanic_material.png b/screenshots/oceanic_material.png similarity index 100% rename from old_work/iterm2colors/screenshots/oceanic_material.png rename to screenshots/oceanic_material.png diff --git a/old_work/iterm2colors/screenshots/ollie.png b/screenshots/ollie.png similarity index 100% rename from old_work/iterm2colors/screenshots/ollie.png rename to screenshots/ollie.png diff --git a/old_work/iterm2colors/screenshots/onehalfdark.png b/screenshots/onehalfdark.png similarity index 100% rename from old_work/iterm2colors/screenshots/onehalfdark.png rename to screenshots/onehalfdark.png diff --git a/old_work/iterm2colors/screenshots/onehalflight.png b/screenshots/onehalflight.png similarity index 100% rename from old_work/iterm2colors/screenshots/onehalflight.png rename to screenshots/onehalflight.png diff --git a/old_work/iterm2colors/screenshots/pandora.png b/screenshots/pandora.png similarity index 100% rename from old_work/iterm2colors/screenshots/pandora.png rename to screenshots/pandora.png diff --git a/old_work/iterm2colors/screenshots/paraiso_dark.png b/screenshots/paraiso_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/paraiso_dark.png rename to screenshots/paraiso_dark.png diff --git a/old_work/iterm2colors/screenshots/paul_millr.png b/screenshots/paul_millr.png similarity index 100% rename from old_work/iterm2colors/screenshots/paul_millr.png rename to screenshots/paul_millr.png diff --git a/old_work/iterm2colors/screenshots/pencil_dark.png b/screenshots/pencil_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/pencil_dark.png rename to screenshots/pencil_dark.png diff --git a/old_work/iterm2colors/screenshots/pencil_light.png b/screenshots/pencil_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/pencil_light.png rename to screenshots/pencil_light.png diff --git a/old_work/iterm2colors/screenshots/piatto_light.png b/screenshots/piatto_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/piatto_light.png rename to screenshots/piatto_light.png diff --git a/old_work/iterm2colors/screenshots/pnevma.png b/screenshots/pnevma.png similarity index 100% rename from old_work/iterm2colors/screenshots/pnevma.png rename to screenshots/pnevma.png diff --git a/old_work/iterm2colors/screenshots/pro.png b/screenshots/pro.png similarity index 100% rename from old_work/iterm2colors/screenshots/pro.png rename to screenshots/pro.png diff --git a/old_work/iterm2colors/screenshots/red_alert.png b/screenshots/red_alert.png similarity index 100% rename from old_work/iterm2colors/screenshots/red_alert.png rename to screenshots/red_alert.png diff --git a/old_work/iterm2colors/screenshots/red_sands.png b/screenshots/red_sands.png similarity index 100% rename from old_work/iterm2colors/screenshots/red_sands.png rename to screenshots/red_sands.png diff --git a/old_work/iterm2colors/screenshots/rippedcasts.png b/screenshots/rippedcasts.png similarity index 100% rename from old_work/iterm2colors/screenshots/rippedcasts.png rename to screenshots/rippedcasts.png diff --git a/old_work/iterm2colors/screenshots/royal.png b/screenshots/royal.png similarity index 100% rename from old_work/iterm2colors/screenshots/royal.png rename to screenshots/royal.png diff --git a/old_work/iterm2colors/screenshots/ryuuko.png b/screenshots/ryuuko.png similarity index 100% rename from old_work/iterm2colors/screenshots/ryuuko.png rename to screenshots/ryuuko.png diff --git a/old_work/iterm2colors/screenshots/sea_shells.png b/screenshots/sea_shells.png similarity index 100% rename from old_work/iterm2colors/screenshots/sea_shells.png rename to screenshots/sea_shells.png diff --git a/old_work/iterm2colors/screenshots/seafoam_pastel.png b/screenshots/seafoam_pastel.png similarity index 100% rename from old_work/iterm2colors/screenshots/seafoam_pastel.png rename to screenshots/seafoam_pastel.png diff --git a/old_work/iterm2colors/screenshots/seti.png b/screenshots/seti.png similarity index 100% rename from old_work/iterm2colors/screenshots/seti.png rename to screenshots/seti.png diff --git a/old_work/iterm2colors/screenshots/shaman.png b/screenshots/shaman.png similarity index 100% rename from old_work/iterm2colors/screenshots/shaman.png rename to screenshots/shaman.png diff --git a/old_work/iterm2colors/screenshots/slate.png b/screenshots/slate.png similarity index 100% rename from old_work/iterm2colors/screenshots/slate.png rename to screenshots/slate.png diff --git a/old_work/iterm2colors/screenshots/smyck.png b/screenshots/smyck.png similarity index 100% rename from old_work/iterm2colors/screenshots/smyck.png rename to screenshots/smyck.png diff --git a/old_work/iterm2colors/screenshots/soft_server.png b/screenshots/soft_server.png similarity index 100% rename from old_work/iterm2colors/screenshots/soft_server.png rename to screenshots/soft_server.png diff --git a/old_work/iterm2colors/screenshots/solarized_darcula.png b/screenshots/solarized_darcula.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_darcula.png rename to screenshots/solarized_darcula.png diff --git a/old_work/iterm2colors/screenshots/solarized_darcula_with_background.png b/screenshots/solarized_darcula_with_background.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_darcula_with_background.png rename to screenshots/solarized_darcula_with_background.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark.png b/screenshots/solarized_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark.png rename to screenshots/solarized_dark.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png b/screenshots/solarized_dark_higher_contrast.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark_higher_contrast.png rename to screenshots/solarized_dark_higher_contrast.png diff --git a/old_work/iterm2colors/screenshots/solarized_dark_patched.png b/screenshots/solarized_dark_patched.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_dark_patched.png rename to screenshots/solarized_dark_patched.png diff --git a/old_work/iterm2colors/screenshots/solarized_light.png b/screenshots/solarized_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/solarized_light.png rename to screenshots/solarized_light.png diff --git a/old_work/iterm2colors/screenshots/space_gray.png b/screenshots/space_gray.png similarity index 100% rename from old_work/iterm2colors/screenshots/space_gray.png rename to screenshots/space_gray.png diff --git a/old_work/iterm2colors/screenshots/spacedust.png b/screenshots/spacedust.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacedust.png rename to screenshots/spacedust.png diff --git a/old_work/iterm2colors/screenshots/spacegray_eighties.png b/screenshots/spacegray_eighties.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacegray_eighties.png rename to screenshots/spacegray_eighties.png diff --git a/old_work/iterm2colors/screenshots/spacegray_eighties_dull.png b/screenshots/spacegray_eighties_dull.png similarity index 100% rename from old_work/iterm2colors/screenshots/spacegray_eighties_dull.png rename to screenshots/spacegray_eighties_dull.png diff --git a/old_work/iterm2colors/screenshots/spiderman.png b/screenshots/spiderman.png similarity index 100% rename from old_work/iterm2colors/screenshots/spiderman.png rename to screenshots/spiderman.png diff --git a/old_work/iterm2colors/screenshots/spring.png b/screenshots/spring.png similarity index 100% rename from old_work/iterm2colors/screenshots/spring.png rename to screenshots/spring.png diff --git a/old_work/iterm2colors/screenshots/square.png b/screenshots/square.png similarity index 100% rename from old_work/iterm2colors/screenshots/square.png rename to screenshots/square.png diff --git a/old_work/iterm2colors/screenshots/sundried.png b/screenshots/sundried.png similarity index 100% rename from old_work/iterm2colors/screenshots/sundried.png rename to screenshots/sundried.png diff --git a/old_work/iterm2colors/screenshots/symfonic.png b/screenshots/symfonic.png similarity index 100% rename from old_work/iterm2colors/screenshots/symfonic.png rename to screenshots/symfonic.png diff --git a/old_work/iterm2colors/screenshots/teerb.png b/screenshots/teerb.png similarity index 100% rename from old_work/iterm2colors/screenshots/teerb.png rename to screenshots/teerb.png diff --git a/old_work/iterm2colors/screenshots/terminal_basic.png b/screenshots/terminal_basic.png similarity index 100% rename from old_work/iterm2colors/screenshots/terminal_basic.png rename to screenshots/terminal_basic.png diff --git a/old_work/iterm2colors/screenshots/thayer_bright.png b/screenshots/thayer_bright.png similarity index 100% rename from old_work/iterm2colors/screenshots/thayer_bright.png rename to screenshots/thayer_bright.png diff --git a/old_work/iterm2colors/screenshots/the_hulk.png b/screenshots/the_hulk.png similarity index 100% rename from old_work/iterm2colors/screenshots/the_hulk.png rename to screenshots/the_hulk.png diff --git a/old_work/iterm2colors/screenshots/tomorrow.png b/screenshots/tomorrow.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow.png rename to screenshots/tomorrow.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night.png b/screenshots/tomorrow_night.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night.png rename to screenshots/tomorrow_night.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_blue.png b/screenshots/tomorrow_night_blue.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_blue.png rename to screenshots/tomorrow_night_blue.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_bright.png b/screenshots/tomorrow_night_bright.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_bright.png rename to screenshots/tomorrow_night_bright.png diff --git a/old_work/iterm2colors/screenshots/tomorrow_night_eighties.png b/screenshots/tomorrow_night_eighties.png similarity index 100% rename from old_work/iterm2colors/screenshots/tomorrow_night_eighties.png rename to screenshots/tomorrow_night_eighties.png diff --git a/old_work/iterm2colors/screenshots/toy_chest.png b/screenshots/toy_chest.png similarity index 100% rename from old_work/iterm2colors/screenshots/toy_chest.png rename to screenshots/toy_chest.png diff --git a/old_work/iterm2colors/screenshots/treehouse.png b/screenshots/treehouse.png similarity index 100% rename from old_work/iterm2colors/screenshots/treehouse.png rename to screenshots/treehouse.png diff --git a/old_work/iterm2colors/screenshots/twilight.png b/screenshots/twilight.png similarity index 100% rename from old_work/iterm2colors/screenshots/twilight.png rename to screenshots/twilight.png diff --git a/old_work/iterm2colors/screenshots/ubuntu.png b/screenshots/ubuntu.png similarity index 100% rename from old_work/iterm2colors/screenshots/ubuntu.png rename to screenshots/ubuntu.png diff --git a/old_work/iterm2colors/screenshots/under_the_sea.png b/screenshots/under_the_sea.png similarity index 100% rename from old_work/iterm2colors/screenshots/under_the_sea.png rename to screenshots/under_the_sea.png diff --git a/old_work/iterm2colors/screenshots/urple.png b/screenshots/urple.png similarity index 100% rename from old_work/iterm2colors/screenshots/urple.png rename to screenshots/urple.png diff --git a/old_work/iterm2colors/screenshots/vaughn.png b/screenshots/vaughn.png similarity index 100% rename from old_work/iterm2colors/screenshots/vaughn.png rename to screenshots/vaughn.png diff --git a/old_work/iterm2colors/screenshots/vibrant_ink.png b/screenshots/vibrant_ink.png similarity index 100% rename from old_work/iterm2colors/screenshots/vibrant_ink.png rename to screenshots/vibrant_ink.png diff --git a/old_work/iterm2colors/screenshots/violet_dark.png b/screenshots/violet_dark.png similarity index 100% rename from old_work/iterm2colors/screenshots/violet_dark.png rename to screenshots/violet_dark.png diff --git a/old_work/iterm2colors/screenshots/violet_light.png b/screenshots/violet_light.png similarity index 100% rename from old_work/iterm2colors/screenshots/violet_light.png rename to screenshots/violet_light.png diff --git a/old_work/iterm2colors/screenshots/warm_neon.png b/screenshots/warm_neon.png similarity index 100% rename from old_work/iterm2colors/screenshots/warm_neon.png rename to screenshots/warm_neon.png diff --git a/old_work/iterm2colors/screenshots/wez.png b/screenshots/wez.png similarity index 100% rename from old_work/iterm2colors/screenshots/wez.png rename to screenshots/wez.png diff --git a/old_work/iterm2colors/screenshots/wild_cherry.png b/screenshots/wild_cherry.png similarity index 100% rename from old_work/iterm2colors/screenshots/wild_cherry.png rename to screenshots/wild_cherry.png diff --git a/old_work/iterm2colors/screenshots/wombat.png b/screenshots/wombat.png similarity index 100% rename from old_work/iterm2colors/screenshots/wombat.png rename to screenshots/wombat.png diff --git a/old_work/iterm2colors/screenshots/wryan.png b/screenshots/wryan.png similarity index 100% rename from old_work/iterm2colors/screenshots/wryan.png rename to screenshots/wryan.png diff --git a/old_work/iterm2colors/screenshots/zenburn.png b/screenshots/zenburn.png similarity index 100% rename from old_work/iterm2colors/screenshots/zenburn.png rename to screenshots/zenburn.png 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/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/st.1 b/st.1 deleted file mode 100644 index 39120b4..0000000 --- a/st.1 +++ /dev/null @@ -1,177 +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/ttyS0 on Linux for serial port -0). -When this flag is given -remaining arguments are used as flags for -.BR stty(1). -By default st initializes the serial line to 8 bits, no parity, 1 stop bit -and a 38400 baud rate. The speed is set by appending it as last argument -(e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are -.BR stty(1) -flags. If you want to set odd parity on 115200 baud use for example 'st -l -/dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for -example 'st -l /dev/ttyS0 cs7 115200'. See -.BR stty(1) -for more arguments and cases. -.TP -.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 compatibility, -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 Ctrl-Shift-Page Up -Increase font size. -.TP -.B Ctrl-Shift-Page Down -Decrease font size. -.TP -.B Ctrl-Shift-Home -Reset to default font size. -.TP -.B Ctrl-Shift-y -Paste from primary selection (middle mouse button). -.TP -.B Ctrl-Shift-c -Copy the selected text to the clipboard selection. -.TP -.B Ctrl-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), -.BR scroll (1) -.SH BUGS -See the TODO file in the distribution. - diff --git a/st.c b/st.c deleted file mode 100644 index 211bc6f..0000000 --- a/st.c +++ /dev/null @@ -1,2644 +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 "st.h" -#include "win.h" - -#if defined(__linux) - #include -#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) - #include -#elif defined(__FreeBSD__) || defined(__DragonFly__) - #include -#endif - -/* 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 - -/* macros */ -#define IS_SET(flag) ((term.mode & (flag)) != 0) -#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == 0x7f) -#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) -#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) -#define ISDELIM(u) (u && wcschr(worddelimiters, u)) - -enum term_mode { - MODE_WRAP = 1 << 0, - MODE_INSERT = 1 << 1, - MODE_ALTSCREEN = 1 << 2, - MODE_CRLF = 1 << 3, - MODE_ECHO = 1 << 4, - MODE_PRINT = 1 << 5, - MODE_UTF8 = 1 << 6, -}; - -enum cursor_movement { - CURSOR_SAVE, - CURSOR_LOAD -}; - -enum cursor_state { - CURSOR_DEFAULT = 0, - CURSOR_WRAPNEXT = 1, - CURSOR_ORIGIN = 2 -}; - -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 */ - ESC_UTF8 = 64, -}; - -typedef struct { - Glyph attr; /* current char attributes */ - int x; - int y; - char state; -} TCursor; - -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; - - int alt; -} 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; - -/* 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; - -/* STR Escape sequence structs */ -/* ESC type [[ [] [;]] ] ESC '\' */ -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; - -static void execsh(char *, char **); -static void stty(char **); -static void sigchld(int); -static void ttywriteraw(const char *, size_t); - -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 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 tnewline(int); -static void tputtab(int); -static void tputc(Rune); -static void treset(void); -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 tsetmode(int, int, int *, int); -static int twrite(const char *, int, int); -static void tfulldirt(void); -static void tcontrolcode(uchar ); -static void tdectest(char ); -static void tdefutf8(char); -static int32_t tdefcolor(int *, int *, int); -static void tdeftran(char); -static void tstrsequence(uchar); - -static void drawregion(int, int, int, int); - -static void selnormalize(void); -static void selscroll(int, int); -static void selsnap(int *, int *, int); - -static size_t utf8decode(const char *, Rune *, size_t); -static Rune utf8decodebyte(char, size_t *); -static char utf8encodebyte(Rune, size_t); -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); - -/* Globals */ -static Term term; -static Selection sel; -static CSIEscape csiescseq; -static STREscape strescseq; -static int iofd = 1; -static int cmdfd; -static pid_t pid; - -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; - -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) -{ - 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; - - if (!(p = malloc(len))) - die("malloc: %s\n", strerror(errno)); - - return p; -} - -void * -xrealloc(void *p, size_t len) -{ - if ((p = realloc(p, len)) == NULL) - die("realloc: %s\n", strerror(errno)); - - return p; -} - -char * -xstrdup(char *s) -{ - if ((s = strdup(s)) == NULL) - die("strdup: %s\n", strerror(errno)); - - return s; -} - -size_t -utf8decode(const 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]); -} - -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; -} - -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) -{ - sel.mode = SEL_IDLE; - sel.snap = 0; - sel.ob.x = -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 -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) -{ - 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 || sel.ob.x == -1 || - sel.alt != IS_SET(MODE_ALTSCREEN)) - 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; - } -} - -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) || sel.type == SEL_RECTANGULAR)) - *ptr++ = '\n'; - } - *ptr = 0; - return str; -} - -void -selclear(void) -{ - if (sel.ob.x == -1) - return; - sel.mode = SEL_IDLE; - sel.ob.x = -1; - tsetdirt(sel.nb.y, sel.ne.y); -} - -void -die(const char *errstr, ...) -{ - va_list ap; - - va_start(ap, errstr); - vfprintf(stderr, errstr, ap); - va_end(ap); - exit(1); -} - -void -execsh(char *cmd, char **args) -{ - char *sh, *prog, *arg; - const struct passwd *pw; - - 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 : cmd; - - if (args) { - prog = args[0]; - arg = NULL; - } else if (scroll) { - prog = scroll; - arg = utmp ? utmp : sh; - } else if (utmp) { - prog = utmp; - arg = NULL; - } else { - prog = sh; - arg = NULL; - } - DEFAULT(args, ((char *[]) {prog, arg, NULL})); - - 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); - - 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 exited with status %d\n", WEXITSTATUS(stat)); - else if (WIFSIGNALED(stat)) - die("child terminated due to signal %d\n", WTERMSIG(stat)); - _exit(0); -} - -void -stty(char **args) -{ - 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 = args; 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"); -} - -int -ttynew(char *line, char *cmd, char *out, char **args) -{ - int m, s; - - if (out) { - term.mode |= MODE_PRINT; - iofd = (!strcmp(out, "-")) ? - 1 : open(out, O_WRONLY | O_CREAT, 0666); - if (iofd < 0) { - fprintf(stderr, "Error opening %s:%s\n", - out, strerror(errno)); - } - } - - if (line) { - if ((cmdfd = open(line, O_RDWR)) < 0) - die("open line '%s' failed: %s\n", - line, strerror(errno)); - dup2(cmdfd, 0); - stty(args); - return cmdfd; - } - - /* seems to work fine on linux, openbsd and freebsd */ - if (openpty(&m, &s, NULL, NULL, NULL) < 0) - die("openpty failed: %s\n", strerror(errno)); - - switch (pid = fork()) { - case -1: - die("fork failed: %s\n", strerror(errno)); - 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); -#ifdef __OpenBSD__ - if (pledge("stdio getpw proc exec", NULL) == -1) - die("pledge\n"); -#endif - execsh(cmd, args); - break; - default: -#ifdef __OpenBSD__ - if (pledge("stdio rpath tty proc", NULL) == -1) - die("pledge\n"); -#endif - close(s); - cmdfd = m; - signal(SIGCHLD, sigchld); - break; - } - return cmdfd; -} - -static int twrite_aborted = 0; -int ttyread_pending() { return twrite_aborted; } - -size_t -ttyread(void) -{ - static char buf[BUFSIZ]; - static int buflen = 0; - int ret, written; - - /* append read bytes to unprocessed bytes */ - ret = twrite_aborted ? 1 : read(cmdfd, buf+buflen, LEN(buf)-buflen); - - 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; - } -} - -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) -{ - 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 -ttyresize(int tw, int th) -{ - struct winsize w; - - w.ws_row = term.row; - w.ws_col = term.col; - w.ws_xpixel = tw; - w.ws_ypixel = th; - if (ioctl(cmdfd, TIOCSWINSZ, &w) < 0) - fprintf(stderr, "Couldn't set window size: %s\n", strerror(errno)); -} - -void -ttyhangup() -{ - /* Send SIGHUP to shell */ - kill(pid, SIGHUP); -} - -int -tattrset(int attr) -{ - 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) -{ - tsync_end(); - 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|MODE_UTF8; - 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); - 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.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(); - } - } -} - -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; - - if (isboxdraw(u)) - term.line[y][x].mode |= ATTR_BOXDRAW; -} - -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(); - 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 alt, *lim; - - for (lim = args + narg; args < lim; ++args) { - if (priv) { - switch (*args) { - case 1: /* DECCKM -- Cursor key */ - xsetmode(set, MODE_APPCURSOR); - break; - case 5: /* DECSCNM -- Reverse video */ - xsetmode(set, MODE_REVERSE); - 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 */ - xsetmode(!set, MODE_HIDE); - break; - case 9: /* X10 mouse compatibility mode */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEX10); - break; - case 1000: /* 1000: report button press */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEBTN); - break; - case 1002: /* 1002: report motion on button press */ - xsetpointermotion(0); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMOTION); - break; - case 1003: /* 1003: enable all mouse motions */ - xsetpointermotion(set); - xsetmode(0, MODE_MOUSE); - xsetmode(set, MODE_MOUSEMANY); - break; - case 1004: /* 1004: send focus events to tty */ - xsetmode(set, MODE_FOCUS); - break; - case 1006: /* 1006: extended reporting mode */ - xsetmode(set, MODE_MOUSESGR); - break; - case 1034: - xsetmode(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 */ - xsetmode(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. */ - break; - default: - fprintf(stderr, - "erresc: unknown private set/reset mode %d\n", - *args); - break; - } - } else { - switch (*args) { - case 0: /* Error (IGNORED) */ - break; - case 2: - xsetmode(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, strlen(vtiden), 0); - break; - case 'b': /* REP -- if last char is printable print it more times */ - DEFAULT(csiescseq.arg[0], 1); - if (term.lastc) - while (csiescseq.arg[0]-- > 0) - tputc(term.lastc); - break; - case 'C': /* CUF -- Cursor Forward */ - case 'a': /* HPR -- Cursor Forward */ - 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 */ - 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, 0); - } - 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 */ - if (xsetcursor(csiescseq.arg[0])) - goto unknown; - break; - default: - goto unknown; - } - break; - } -} - -void -csidump(void) -{ - size_t i; - uint c; - - fprintf(stderr, "ESC["); - for (i = 0; i < csiescseq.len; i++) { - c = csiescseq.buf[i] & 0xff; - if (isprint(c)) { - putc(c, stderr); - } else if (c == '\n') { - fprintf(stderr, "(\\n)"); - } else if (c == '\r') { - fprintf(stderr, "(\\r)"); - } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); - } else { - fprintf(stderr, "(%02x)", c); - } - } - putc('\n', stderr); -} - -void -csireset(void) -{ - memset(&csiescseq, 0, sizeof(csiescseq)); -} - -void -strhandle(void) -{ - char *p = NULL, *dec; - 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 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; - p = strescseq.args[2]; - /* FALLTHROUGH */ - 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)"); - } 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 */ - /* 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; - } - - 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) -{ - size_t i; - uint c; - - fprintf(stderr, "ESC%c", strescseq.type); - for (i = 0; i < strescseq.len; i++) { - c = strescseq.buf[i] & 0xff; - if (c == '\0') { - putc('\n', stderr); - return; - } else if (isprint(c)) { - putc(c, stderr); - } else if (c == '\n') { - fprintf(stderr, "(\\n)"); - } else if (c == '\r') { - fprintf(stderr, "(\\r)"); - } else if (c == 0x1b) { - fprintf(stderr, "(\\e)"); - } else { - fprintf(stderr, "(%02x)", c); - } - } - fprintf(stderr, "ESC\\\n"); -} - -void -strreset(void) -{ - strescseq = (STREscape){ - .buf = xrealloc(strescseq.buf, STR_BUF_SIZ), - .siz = STR_BUF_SIZ, - }; -} - -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) { - perror("Error writing to output file"); - 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 -tdefutf8(char ascii) -{ - if (ascii == 'G') - term.mode |= MODE_UTF8; - else if (ascii == '@') - term.mode &= ~MODE_UTF8; -} - -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 { - xbell(); - } - 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); - /* FALLTHROUGH */ - 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, strlen(vtiden), 0); - 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 '%': - term.esc |= ESC_UTF8; - 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, strlen(vtiden), 0); - break; - case 'c': /* RIS -- Reset to initial state */ - treset(); - resettitle(); - xloadcols(); - break; - case '=': /* DECPAM -- Application keypad */ - xsetmode(1, MODE_APPKEYPAD); - break; - case '>': /* DECPNM -- Normal keypad */ - xsetmode(0, 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); - if (u < 127 || !IS_SET(MODE_UTF8)) { - c[0] = u; - width = len = 1; - } else { - len = utf8encode(u, c); - if (!control && (width = wcwidth(u)) == -1) - width = 1; - } - - if (IS_SET(MODE_PRINT)) - 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; - goto check_control_code; - } - - if (strescseq.len+len >= strescseq.siz) { - /* - * Here is a bug in terminals. If the user never sends - * some code to stop the str or esc command, then st - * will stop responding. But this is better than - * silently failing with unknown characters. At least - * then users will report back. - * - * In the case users ever get fixed, here is the code: - */ - /* - * term.esc = 0; - * strhandle(); - */ - if (strescseq.siz > (SIZE_MAX - UTF_SIZ) / 2) - return; - strescseq.siz *= 2; - strescseq.buf = xrealloc(strescseq.buf, strescseq.siz); - } - - memmove(&strescseq.buf[strescseq.len], c, len); - strescseq.len += len; - return; - } - -check_control_code: - /* - * Actions of control codes must be performed as soon they arrive - * because they can be embedded inside a control sequence, and - * they must not cause conflicts with sequences. - */ - if (control) { - tcontrolcode(u); - /* - * control codes are not shown ever - */ - if (!term.esc) - term.lastc = 0; - return; - } else if (term.esc & ESC_START) { - if (term.esc & ESC_CSI) { - 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_UTF8) { - tdefutf8(u); - } 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 (selected(term.c.x, term.c.y)) - selclear(); - - gp = &term.line[term.c.y][term.c.x]; - if (IS_SET(MODE_WRAP) && (term.c.state & CURSOR_WRAPNEXT)) { - 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); - term.lastc = u; - - 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; - } -} - -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) -{ - 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 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 -resettitle(void) -{ - xsettitle(NULL); -} - -void -drawregion(int x1, int y1, int x2, int y2) -{ - int y; - - for (y = y1; y < y2; y++) { - if (!term.dirty[y]) - continue; - - term.dirty[y] = 0; - xdrawline(term.line[y], x1, y, x2); - } -} - -void -draw(void) -{ - int cx = term.c.x, ocx = term.ocx, ocy = term.ocy; - - if (!xstartdraw()) - 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--; - - 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 -redraw(void) -{ - tfulldirt(); - draw(); -} 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 deleted file mode 100644 index b32b446..0000000 --- a/st.info +++ /dev/null @@ -1,240 +0,0 @@ -st-mono| simpleterm monocolor, - 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#2, - 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, - dim=\E[2m, - 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=\177, - 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=\E[3~, - 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~, - knp=\E[6~, - kmous=\E[M, - kpp=\E[5~, - lines#24, - mir, - msgr, - npc, - op=\E[39;49m, - pairs#64, - mc0=\E[i, - mc4=\E[4i, - mc5=\E[5i, - rc=\E8, - rev=\E[7m, - ri=\EM, - rin=\E[%p1%dT, - 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, - sitm=\E[3m, - sgr0=\E[0m, - 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, -# 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, - -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, - -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/old_work/iterm2colors/terminal/3024 Day.terminal b/terminal/3024 Day.terminal similarity index 100% rename from old_work/iterm2colors/terminal/3024 Day.terminal rename to terminal/3024 Day.terminal diff --git a/old_work/iterm2colors/terminal/3024 Night.terminal b/terminal/3024 Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/3024 Night.terminal rename to terminal/3024 Night.terminal diff --git a/old_work/iterm2colors/terminal/AdventureTime.terminal b/terminal/AdventureTime.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AdventureTime.terminal rename to terminal/AdventureTime.terminal diff --git a/old_work/iterm2colors/terminal/Afterglow.terminal b/terminal/Afterglow.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Afterglow.terminal rename to terminal/Afterglow.terminal diff --git a/old_work/iterm2colors/terminal/AlienBlood.terminal b/terminal/AlienBlood.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AlienBlood.terminal rename to terminal/AlienBlood.terminal diff --git a/old_work/iterm2colors/terminal/Argonaut.terminal b/terminal/Argonaut.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Argonaut.terminal rename to terminal/Argonaut.terminal diff --git a/old_work/iterm2colors/terminal/Arthur.terminal b/terminal/Arthur.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Arthur.terminal rename to terminal/Arthur.terminal diff --git a/old_work/iterm2colors/terminal/AtelierSulphurpool.terminal b/terminal/AtelierSulphurpool.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AtelierSulphurpool.terminal rename to terminal/AtelierSulphurpool.terminal diff --git a/old_work/iterm2colors/terminal/Atom.terminal b/terminal/Atom.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Atom.terminal rename to terminal/Atom.terminal diff --git a/old_work/iterm2colors/terminal/AtomOneLight.terminal b/terminal/AtomOneLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/AtomOneLight.terminal rename to terminal/AtomOneLight.terminal diff --git a/old_work/iterm2colors/terminal/Batman.terminal b/terminal/Batman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Batman.terminal rename to terminal/Batman.terminal diff --git a/old_work/iterm2colors/terminal/Belafonte Day.terminal b/terminal/Belafonte Day.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Belafonte Day.terminal rename to terminal/Belafonte Day.terminal diff --git a/old_work/iterm2colors/terminal/Belafonte Night.terminal b/terminal/Belafonte Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Belafonte Night.terminal rename to terminal/Belafonte Night.terminal diff --git a/old_work/iterm2colors/terminal/BirdsOfParadise.terminal b/terminal/BirdsOfParadise.terminal similarity index 100% rename from old_work/iterm2colors/terminal/BirdsOfParadise.terminal rename to terminal/BirdsOfParadise.terminal diff --git a/old_work/iterm2colors/terminal/Blazer.terminal b/terminal/Blazer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Blazer.terminal rename to terminal/Blazer.terminal diff --git a/old_work/iterm2colors/terminal/Borland.terminal b/terminal/Borland.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Borland.terminal rename to terminal/Borland.terminal diff --git a/old_work/iterm2colors/terminal/Bright Lights.terminal b/terminal/Bright Lights.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Bright Lights.terminal rename to terminal/Bright Lights.terminal diff --git a/old_work/iterm2colors/terminal/Broadcast.terminal b/terminal/Broadcast.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Broadcast.terminal rename to terminal/Broadcast.terminal diff --git a/old_work/iterm2colors/terminal/Brogrammer.terminal b/terminal/Brogrammer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Brogrammer.terminal rename to terminal/Brogrammer.terminal diff --git a/old_work/iterm2colors/terminal/C64.terminal b/terminal/C64.terminal similarity index 100% rename from old_work/iterm2colors/terminal/C64.terminal rename to terminal/C64.terminal diff --git a/old_work/iterm2colors/terminal/CLRS.terminal b/terminal/CLRS.terminal similarity index 100% rename from old_work/iterm2colors/terminal/CLRS.terminal rename to terminal/CLRS.terminal diff --git a/old_work/iterm2colors/terminal/Chalk.terminal b/terminal/Chalk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Chalk.terminal rename to terminal/Chalk.terminal diff --git a/old_work/iterm2colors/terminal/Chalkboard.terminal b/terminal/Chalkboard.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Chalkboard.terminal rename to terminal/Chalkboard.terminal diff --git a/old_work/iterm2colors/terminal/Ciapre.terminal b/terminal/Ciapre.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ciapre.terminal rename to terminal/Ciapre.terminal diff --git a/old_work/iterm2colors/terminal/Cobalt Neon.terminal b/terminal/Cobalt Neon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Cobalt Neon.terminal rename to terminal/Cobalt Neon.terminal diff --git a/old_work/iterm2colors/terminal/Cobalt2.terminal b/terminal/Cobalt2.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Cobalt2.terminal rename to terminal/Cobalt2.terminal diff --git a/old_work/iterm2colors/terminal/CrayonPonyFish.terminal b/terminal/CrayonPonyFish.terminal similarity index 100% rename from old_work/iterm2colors/terminal/CrayonPonyFish.terminal rename to terminal/CrayonPonyFish.terminal diff --git a/old_work/iterm2colors/terminal/Dark Pastel.terminal b/terminal/Dark Pastel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Dark Pastel.terminal rename to terminal/Dark Pastel.terminal diff --git a/old_work/iterm2colors/terminal/Darkside.terminal b/terminal/Darkside.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Darkside.terminal rename to terminal/Darkside.terminal diff --git a/old_work/iterm2colors/terminal/Desert.terminal b/terminal/Desert.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Desert.terminal rename to terminal/Desert.terminal diff --git a/old_work/iterm2colors/terminal/DimmedMonokai.terminal b/terminal/DimmedMonokai.terminal similarity index 100% rename from old_work/iterm2colors/terminal/DimmedMonokai.terminal rename to terminal/DimmedMonokai.terminal diff --git a/old_work/iterm2colors/terminal/DotGov.terminal b/terminal/DotGov.terminal similarity index 100% rename from old_work/iterm2colors/terminal/DotGov.terminal rename to terminal/DotGov.terminal diff --git a/old_work/iterm2colors/terminal/Dracula.terminal b/terminal/Dracula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Dracula.terminal rename to terminal/Dracula.terminal diff --git a/old_work/iterm2colors/terminal/Duotone Dark.terminal b/terminal/Duotone Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Duotone Dark.terminal rename to terminal/Duotone Dark.terminal diff --git a/old_work/iterm2colors/terminal/ENCOM.terminal b/terminal/ENCOM.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ENCOM.terminal rename to terminal/ENCOM.terminal diff --git a/old_work/iterm2colors/terminal/Earthsong.terminal b/terminal/Earthsong.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Earthsong.terminal rename to terminal/Earthsong.terminal diff --git a/old_work/iterm2colors/terminal/Elemental.terminal b/terminal/Elemental.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Elemental.terminal rename to terminal/Elemental.terminal diff --git a/old_work/iterm2colors/terminal/Espresso Libre.terminal b/terminal/Espresso Libre.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Espresso Libre.terminal rename to terminal/Espresso Libre.terminal diff --git a/old_work/iterm2colors/terminal/Espresso.terminal b/terminal/Espresso.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Espresso.terminal rename to terminal/Espresso.terminal diff --git a/old_work/iterm2colors/terminal/Fideloper.terminal b/terminal/Fideloper.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Fideloper.terminal rename to terminal/Fideloper.terminal diff --git a/old_work/iterm2colors/terminal/FishTank.terminal b/terminal/FishTank.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FishTank.terminal rename to terminal/FishTank.terminal diff --git a/old_work/iterm2colors/terminal/Flat.terminal b/terminal/Flat.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Flat.terminal rename to terminal/Flat.terminal diff --git a/old_work/iterm2colors/terminal/Flatland.terminal b/terminal/Flatland.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Flatland.terminal rename to terminal/Flatland.terminal diff --git a/old_work/iterm2colors/terminal/Floraverse.terminal b/terminal/Floraverse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Floraverse.terminal rename to terminal/Floraverse.terminal diff --git a/old_work/iterm2colors/terminal/FrontEndDelight.terminal b/terminal/FrontEndDelight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FrontEndDelight.terminal rename to terminal/FrontEndDelight.terminal diff --git a/old_work/iterm2colors/terminal/FunForrest.terminal b/terminal/FunForrest.terminal similarity index 100% rename from old_work/iterm2colors/terminal/FunForrest.terminal rename to terminal/FunForrest.terminal diff --git a/old_work/iterm2colors/terminal/Galaxy.terminal b/terminal/Galaxy.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Galaxy.terminal rename to terminal/Galaxy.terminal diff --git a/old_work/iterm2colors/terminal/Github.terminal b/terminal/Github.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Github.terminal rename to terminal/Github.terminal diff --git a/old_work/iterm2colors/terminal/Glacier.terminal b/terminal/Glacier.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Glacier.terminal rename to terminal/Glacier.terminal diff --git a/old_work/iterm2colors/terminal/Grape.terminal b/terminal/Grape.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Grape.terminal rename to terminal/Grape.terminal diff --git a/old_work/iterm2colors/terminal/Grass.terminal b/terminal/Grass.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Grass.terminal rename to terminal/Grass.terminal diff --git a/old_work/iterm2colors/terminal/Hardcore.terminal b/terminal/Hardcore.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hardcore.terminal rename to terminal/Hardcore.terminal diff --git a/old_work/iterm2colors/terminal/Harper.terminal b/terminal/Harper.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Harper.terminal rename to terminal/Harper.terminal diff --git a/old_work/iterm2colors/terminal/Highway.terminal b/terminal/Highway.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Highway.terminal rename to terminal/Highway.terminal diff --git a/old_work/iterm2colors/terminal/Hipster Green.terminal b/terminal/Hipster Green.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hipster Green.terminal rename to terminal/Hipster Green.terminal diff --git a/old_work/iterm2colors/terminal/Homebrew.terminal b/terminal/Homebrew.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Homebrew.terminal rename to terminal/Homebrew.terminal diff --git a/old_work/iterm2colors/terminal/Hurtado.terminal b/terminal/Hurtado.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hurtado.terminal rename to terminal/Hurtado.terminal diff --git a/old_work/iterm2colors/terminal/Hybrid.terminal b/terminal/Hybrid.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Hybrid.terminal rename to terminal/Hybrid.terminal diff --git a/old_work/iterm2colors/terminal/IC_Green_PPL.terminal b/terminal/IC_Green_PPL.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IC_Green_PPL.terminal rename to terminal/IC_Green_PPL.terminal diff --git a/old_work/iterm2colors/terminal/IC_Orange_PPL.terminal b/terminal/IC_Orange_PPL.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IC_Orange_PPL.terminal rename to terminal/IC_Orange_PPL.terminal diff --git a/old_work/iterm2colors/terminal/IR_Black.terminal b/terminal/IR_Black.terminal similarity index 100% rename from old_work/iterm2colors/terminal/IR_Black.terminal rename to terminal/IR_Black.terminal diff --git a/old_work/iterm2colors/terminal/Jackie Brown.terminal b/terminal/Jackie Brown.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Jackie Brown.terminal rename to terminal/Jackie Brown.terminal diff --git a/old_work/iterm2colors/terminal/Japanesque.terminal b/terminal/Japanesque.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Japanesque.terminal rename to terminal/Japanesque.terminal diff --git a/old_work/iterm2colors/terminal/Jellybeans.terminal b/terminal/Jellybeans.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Jellybeans.terminal rename to terminal/Jellybeans.terminal diff --git a/old_work/iterm2colors/terminal/JetBrains Darcula.terminal b/terminal/JetBrains Darcula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/JetBrains Darcula.terminal rename to terminal/JetBrains Darcula.terminal diff --git a/old_work/iterm2colors/terminal/Kibble.terminal b/terminal/Kibble.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Kibble.terminal rename to terminal/Kibble.terminal diff --git a/old_work/iterm2colors/terminal/Later This Evening.terminal b/terminal/Later This Evening.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Later This Evening.terminal rename to terminal/Later This Evening.terminal diff --git a/old_work/iterm2colors/terminal/Lavandula.terminal b/terminal/Lavandula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Lavandula.terminal rename to terminal/Lavandula.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbon.terminal b/terminal/LiquidCarbon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbon.terminal rename to terminal/LiquidCarbon.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal b/terminal/LiquidCarbonTransparent.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbonTransparent.terminal rename to terminal/LiquidCarbonTransparent.terminal diff --git a/old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal b/terminal/LiquidCarbonTransparentInverse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/LiquidCarbonTransparentInverse.terminal rename to terminal/LiquidCarbonTransparentInverse.terminal diff --git a/old_work/iterm2colors/terminal/Man Page.terminal b/terminal/Man Page.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Man Page.terminal rename to terminal/Man Page.terminal diff --git a/old_work/iterm2colors/terminal/Material.terminal b/terminal/Material.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Material.terminal rename to terminal/Material.terminal diff --git a/old_work/iterm2colors/terminal/MaterialDark.terminal b/terminal/MaterialDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/MaterialDark.terminal rename to terminal/MaterialDark.terminal diff --git a/old_work/iterm2colors/terminal/Mathias.terminal b/terminal/Mathias.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Mathias.terminal rename to terminal/Mathias.terminal diff --git a/old_work/iterm2colors/terminal/Medallion.terminal b/terminal/Medallion.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Medallion.terminal rename to terminal/Medallion.terminal diff --git a/old_work/iterm2colors/terminal/Misterioso.terminal b/terminal/Misterioso.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Misterioso.terminal rename to terminal/Misterioso.terminal diff --git a/old_work/iterm2colors/terminal/Molokai.terminal b/terminal/Molokai.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Molokai.terminal rename to terminal/Molokai.terminal diff --git a/old_work/iterm2colors/terminal/MonaLisa.terminal b/terminal/MonaLisa.terminal similarity index 100% rename from old_work/iterm2colors/terminal/MonaLisa.terminal rename to terminal/MonaLisa.terminal diff --git a/old_work/iterm2colors/terminal/Monokai Soda.terminal b/terminal/Monokai Soda.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Monokai Soda.terminal rename to terminal/Monokai Soda.terminal diff --git a/old_work/iterm2colors/terminal/N0tch2k.terminal b/terminal/N0tch2k.terminal similarity index 100% rename from old_work/iterm2colors/terminal/N0tch2k.terminal rename to terminal/N0tch2k.terminal diff --git a/old_work/iterm2colors/terminal/Neopolitan.terminal b/terminal/Neopolitan.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Neopolitan.terminal rename to terminal/Neopolitan.terminal diff --git a/old_work/iterm2colors/terminal/Neutron.terminal b/terminal/Neutron.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Neutron.terminal rename to terminal/Neutron.terminal diff --git a/old_work/iterm2colors/terminal/NightLion v1.terminal b/terminal/NightLion v1.terminal similarity index 100% rename from old_work/iterm2colors/terminal/NightLion v1.terminal rename to terminal/NightLion v1.terminal diff --git a/old_work/iterm2colors/terminal/NightLion v2.terminal b/terminal/NightLion v2.terminal similarity index 100% rename from old_work/iterm2colors/terminal/NightLion v2.terminal rename to terminal/NightLion v2.terminal diff --git a/old_work/iterm2colors/terminal/Novel.terminal b/terminal/Novel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Novel.terminal rename to terminal/Novel.terminal diff --git a/old_work/iterm2colors/terminal/Obsidian.terminal b/terminal/Obsidian.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Obsidian.terminal rename to terminal/Obsidian.terminal diff --git a/old_work/iterm2colors/terminal/Ocean.terminal b/terminal/Ocean.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ocean.terminal rename to terminal/Ocean.terminal diff --git a/old_work/iterm2colors/terminal/OceanicMaterial.terminal b/terminal/OceanicMaterial.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OceanicMaterial.terminal rename to terminal/OceanicMaterial.terminal diff --git a/old_work/iterm2colors/terminal/Ollie.terminal b/terminal/Ollie.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ollie.terminal rename to terminal/Ollie.terminal diff --git a/old_work/iterm2colors/terminal/OneHalfDark.terminal b/terminal/OneHalfDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OneHalfDark.terminal rename to terminal/OneHalfDark.terminal diff --git a/old_work/iterm2colors/terminal/OneHalfLight.terminal b/terminal/OneHalfLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/OneHalfLight.terminal rename to terminal/OneHalfLight.terminal diff --git a/old_work/iterm2colors/terminal/Parasio Dark.terminal b/terminal/Parasio Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Parasio Dark.terminal rename to terminal/Parasio Dark.terminal diff --git a/old_work/iterm2colors/terminal/PaulMillr.terminal b/terminal/PaulMillr.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PaulMillr.terminal rename to terminal/PaulMillr.terminal diff --git a/old_work/iterm2colors/terminal/PencilDark.terminal b/terminal/PencilDark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PencilDark.terminal rename to terminal/PencilDark.terminal diff --git a/old_work/iterm2colors/terminal/PencilLight.terminal b/terminal/PencilLight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/PencilLight.terminal rename to terminal/PencilLight.terminal diff --git a/old_work/iterm2colors/terminal/Piatto Light.terminal b/terminal/Piatto Light.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Piatto Light.terminal rename to terminal/Piatto Light.terminal diff --git a/old_work/iterm2colors/terminal/Pnevma.terminal b/terminal/Pnevma.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Pnevma.terminal rename to terminal/Pnevma.terminal diff --git a/old_work/iterm2colors/terminal/Pro.terminal b/terminal/Pro.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Pro.terminal rename to terminal/Pro.terminal diff --git a/old_work/iterm2colors/terminal/Red Alert.terminal b/terminal/Red Alert.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Red Alert.terminal rename to terminal/Red Alert.terminal diff --git a/old_work/iterm2colors/terminal/Red Sands.terminal b/terminal/Red Sands.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Red Sands.terminal rename to terminal/Red Sands.terminal diff --git a/old_work/iterm2colors/terminal/Rippedcasts.terminal b/terminal/Rippedcasts.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Rippedcasts.terminal rename to terminal/Rippedcasts.terminal diff --git a/old_work/iterm2colors/terminal/Royal.terminal b/terminal/Royal.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Royal.terminal rename to terminal/Royal.terminal diff --git a/old_work/iterm2colors/terminal/SeaShells.terminal b/terminal/SeaShells.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SeaShells.terminal rename to terminal/SeaShells.terminal diff --git a/old_work/iterm2colors/terminal/Seafoam Pastel.terminal b/terminal/Seafoam Pastel.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Seafoam Pastel.terminal rename to terminal/Seafoam Pastel.terminal diff --git a/old_work/iterm2colors/terminal/Seti.terminal b/terminal/Seti.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Seti.terminal rename to terminal/Seti.terminal diff --git a/old_work/iterm2colors/terminal/Shaman.terminal b/terminal/Shaman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Shaman.terminal rename to terminal/Shaman.terminal diff --git a/old_work/iterm2colors/terminal/Slate.terminal b/terminal/Slate.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Slate.terminal rename to terminal/Slate.terminal diff --git a/old_work/iterm2colors/terminal/Smyck.terminal b/terminal/Smyck.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Smyck.terminal rename to terminal/Smyck.terminal diff --git a/old_work/iterm2colors/terminal/SoftServer.terminal b/terminal/SoftServer.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SoftServer.terminal rename to terminal/SoftServer.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Darcula.terminal b/terminal/Solarized Darcula.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Darcula.terminal rename to terminal/Solarized Darcula.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal b/terminal/Solarized Dark - Patched.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark - Patched.terminal rename to terminal/Solarized Dark - Patched.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal b/terminal/Solarized Dark Higher Contrast.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark Higher Contrast.terminal rename to terminal/Solarized Dark Higher Contrast.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Dark.terminal b/terminal/Solarized Dark.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Dark.terminal rename to terminal/Solarized Dark.terminal diff --git a/old_work/iterm2colors/terminal/Solarized Light.terminal b/terminal/Solarized Light.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Solarized Light.terminal rename to terminal/Solarized Light.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal b/terminal/SpaceGray Eighties Dull.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray Eighties Dull.terminal rename to terminal/SpaceGray Eighties Dull.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray Eighties.terminal b/terminal/SpaceGray Eighties.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray Eighties.terminal rename to terminal/SpaceGray Eighties.terminal diff --git a/old_work/iterm2colors/terminal/SpaceGray.terminal b/terminal/SpaceGray.terminal similarity index 100% rename from old_work/iterm2colors/terminal/SpaceGray.terminal rename to terminal/SpaceGray.terminal diff --git a/old_work/iterm2colors/terminal/Spacedust.terminal b/terminal/Spacedust.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spacedust.terminal rename to terminal/Spacedust.terminal diff --git a/old_work/iterm2colors/terminal/Spiderman.terminal b/terminal/Spiderman.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spiderman.terminal rename to terminal/Spiderman.terminal diff --git a/old_work/iterm2colors/terminal/Spring.terminal b/terminal/Spring.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Spring.terminal rename to terminal/Spring.terminal diff --git a/old_work/iterm2colors/terminal/Square.terminal b/terminal/Square.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Square.terminal rename to terminal/Square.terminal diff --git a/old_work/iterm2colors/terminal/Sundried.terminal b/terminal/Sundried.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Sundried.terminal rename to terminal/Sundried.terminal diff --git a/old_work/iterm2colors/terminal/Symfonic.terminal b/terminal/Symfonic.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Symfonic.terminal rename to terminal/Symfonic.terminal diff --git a/old_work/iterm2colors/terminal/Teerb.terminal b/terminal/Teerb.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Teerb.terminal rename to terminal/Teerb.terminal diff --git a/old_work/iterm2colors/terminal/Terminal Basic.terminal b/terminal/Terminal Basic.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Terminal Basic.terminal rename to terminal/Terminal Basic.terminal diff --git a/old_work/iterm2colors/terminal/Thayer Bright.terminal b/terminal/Thayer Bright.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Thayer Bright.terminal rename to terminal/Thayer Bright.terminal diff --git a/old_work/iterm2colors/terminal/The Hulk.terminal b/terminal/The Hulk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/The Hulk.terminal rename to terminal/The Hulk.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal b/terminal/Tomorrow Night Blue.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Blue.terminal rename to terminal/Tomorrow Night Blue.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal b/terminal/Tomorrow Night Bright.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Bright.terminal rename to terminal/Tomorrow Night Bright.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal b/terminal/Tomorrow Night Eighties.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night Eighties.terminal rename to terminal/Tomorrow Night Eighties.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow Night.terminal b/terminal/Tomorrow Night.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow Night.terminal rename to terminal/Tomorrow Night.terminal diff --git a/old_work/iterm2colors/terminal/Tomorrow.terminal b/terminal/Tomorrow.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Tomorrow.terminal rename to terminal/Tomorrow.terminal diff --git a/old_work/iterm2colors/terminal/ToyChest.terminal b/terminal/ToyChest.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ToyChest.terminal rename to terminal/ToyChest.terminal diff --git a/old_work/iterm2colors/terminal/Treehouse.terminal b/terminal/Treehouse.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Treehouse.terminal rename to terminal/Treehouse.terminal diff --git a/old_work/iterm2colors/terminal/Twilight.terminal b/terminal/Twilight.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Twilight.terminal rename to terminal/Twilight.terminal diff --git a/old_work/iterm2colors/terminal/Ubuntu.terminal b/terminal/Ubuntu.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Ubuntu.terminal rename to terminal/Ubuntu.terminal diff --git a/old_work/iterm2colors/terminal/Urple.terminal b/terminal/Urple.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Urple.terminal rename to terminal/Urple.terminal diff --git a/old_work/iterm2colors/terminal/Vaughn.terminal b/terminal/Vaughn.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Vaughn.terminal rename to terminal/Vaughn.terminal diff --git a/old_work/iterm2colors/terminal/VibrantInk.terminal b/terminal/VibrantInk.terminal similarity index 100% rename from old_work/iterm2colors/terminal/VibrantInk.terminal rename to terminal/VibrantInk.terminal diff --git a/old_work/iterm2colors/terminal/WarmNeon.terminal b/terminal/WarmNeon.terminal similarity index 100% rename from old_work/iterm2colors/terminal/WarmNeon.terminal rename to terminal/WarmNeon.terminal diff --git a/old_work/iterm2colors/terminal/Wez.terminal b/terminal/Wez.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wez.terminal rename to terminal/Wez.terminal diff --git a/old_work/iterm2colors/terminal/WildCherry.terminal b/terminal/WildCherry.terminal similarity index 100% rename from old_work/iterm2colors/terminal/WildCherry.terminal rename to terminal/WildCherry.terminal diff --git a/old_work/iterm2colors/terminal/Wombat.terminal b/terminal/Wombat.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wombat.terminal rename to terminal/Wombat.terminal diff --git a/old_work/iterm2colors/terminal/Wryan.terminal b/terminal/Wryan.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Wryan.terminal rename to terminal/Wryan.terminal diff --git a/old_work/iterm2colors/terminal/Zenburn.terminal b/terminal/Zenburn.terminal similarity index 100% rename from old_work/iterm2colors/terminal/Zenburn.terminal rename to terminal/Zenburn.terminal diff --git a/old_work/iterm2colors/terminal/ayu.terminal b/terminal/ayu.terminal similarity index 100% rename from old_work/iterm2colors/terminal/ayu.terminal rename to terminal/ayu.terminal diff --git a/old_work/iterm2colors/terminal/idleToes.terminal b/terminal/idleToes.terminal similarity index 100% rename from old_work/iterm2colors/terminal/idleToes.terminal rename to terminal/idleToes.terminal diff --git a/old_work/iterm2colors/terminator/3024 Day.config b/terminator/3024 Day.config similarity index 100% rename from old_work/iterm2colors/terminator/3024 Day.config rename to terminator/3024 Day.config diff --git a/old_work/iterm2colors/terminator/3024 Night.config b/terminator/3024 Night.config similarity index 100% rename from old_work/iterm2colors/terminator/3024 Night.config rename to terminator/3024 Night.config diff --git a/old_work/iterm2colors/terminator/AdventureTime.config b/terminator/AdventureTime.config similarity index 100% rename from old_work/iterm2colors/terminator/AdventureTime.config rename to terminator/AdventureTime.config diff --git a/old_work/iterm2colors/terminator/Afterglow.config b/terminator/Afterglow.config similarity index 100% rename from old_work/iterm2colors/terminator/Afterglow.config rename to terminator/Afterglow.config diff --git a/old_work/iterm2colors/terminator/AlienBlood.config b/terminator/AlienBlood.config similarity index 100% rename from old_work/iterm2colors/terminator/AlienBlood.config rename to terminator/AlienBlood.config diff --git a/old_work/iterm2colors/terminator/Argonaut.config b/terminator/Argonaut.config similarity index 100% rename from old_work/iterm2colors/terminator/Argonaut.config rename to terminator/Argonaut.config diff --git a/old_work/iterm2colors/terminator/Arthur.config b/terminator/Arthur.config similarity index 100% rename from old_work/iterm2colors/terminator/Arthur.config rename to terminator/Arthur.config diff --git a/old_work/iterm2colors/terminator/AtelierSulphurpool.config b/terminator/AtelierSulphurpool.config similarity index 100% rename from old_work/iterm2colors/terminator/AtelierSulphurpool.config rename to terminator/AtelierSulphurpool.config diff --git a/old_work/iterm2colors/terminator/Atom.config b/terminator/Atom.config similarity index 100% rename from old_work/iterm2colors/terminator/Atom.config rename to terminator/Atom.config diff --git a/old_work/iterm2colors/terminator/AtomOneLight.config b/terminator/AtomOneLight.config similarity index 100% rename from old_work/iterm2colors/terminator/AtomOneLight.config rename to terminator/AtomOneLight.config diff --git a/old_work/iterm2colors/terminator/Batman.config b/terminator/Batman.config similarity index 100% rename from old_work/iterm2colors/terminator/Batman.config rename to terminator/Batman.config diff --git a/old_work/iterm2colors/terminator/Belafonte Day.config b/terminator/Belafonte Day.config similarity index 100% rename from old_work/iterm2colors/terminator/Belafonte Day.config rename to terminator/Belafonte Day.config diff --git a/old_work/iterm2colors/terminator/Belafonte Night.config b/terminator/Belafonte Night.config similarity index 100% rename from old_work/iterm2colors/terminator/Belafonte Night.config rename to terminator/Belafonte Night.config diff --git a/old_work/iterm2colors/terminator/BirdsOfParadise.config b/terminator/BirdsOfParadise.config similarity index 100% rename from old_work/iterm2colors/terminator/BirdsOfParadise.config rename to terminator/BirdsOfParadise.config diff --git a/old_work/iterm2colors/terminator/Blazer.config b/terminator/Blazer.config similarity index 100% rename from old_work/iterm2colors/terminator/Blazer.config rename to terminator/Blazer.config diff --git a/old_work/iterm2colors/terminator/Borland.config b/terminator/Borland.config similarity index 100% rename from old_work/iterm2colors/terminator/Borland.config rename to terminator/Borland.config diff --git a/old_work/iterm2colors/terminator/Bright Lights.config b/terminator/Bright Lights.config similarity index 100% rename from old_work/iterm2colors/terminator/Bright Lights.config rename to terminator/Bright Lights.config diff --git a/old_work/iterm2colors/terminator/Broadcast.config b/terminator/Broadcast.config similarity index 100% rename from old_work/iterm2colors/terminator/Broadcast.config rename to terminator/Broadcast.config diff --git a/old_work/iterm2colors/terminator/Brogrammer.config b/terminator/Brogrammer.config similarity index 100% rename from old_work/iterm2colors/terminator/Brogrammer.config rename to terminator/Brogrammer.config diff --git a/old_work/iterm2colors/terminator/C64.config b/terminator/C64.config similarity index 100% rename from old_work/iterm2colors/terminator/C64.config rename to terminator/C64.config diff --git a/old_work/iterm2colors/terminator/CLRS.config b/terminator/CLRS.config similarity index 100% rename from old_work/iterm2colors/terminator/CLRS.config rename to terminator/CLRS.config diff --git a/old_work/iterm2colors/terminator/Chalk.config b/terminator/Chalk.config similarity index 100% rename from old_work/iterm2colors/terminator/Chalk.config rename to terminator/Chalk.config diff --git a/old_work/iterm2colors/terminator/Chalkboard.config b/terminator/Chalkboard.config similarity index 100% rename from old_work/iterm2colors/terminator/Chalkboard.config rename to terminator/Chalkboard.config diff --git a/old_work/iterm2colors/terminator/Ciapre.config b/terminator/Ciapre.config similarity index 100% rename from old_work/iterm2colors/terminator/Ciapre.config rename to terminator/Ciapre.config diff --git a/old_work/iterm2colors/terminator/Cobalt Neon.config b/terminator/Cobalt Neon.config similarity index 100% rename from old_work/iterm2colors/terminator/Cobalt Neon.config rename to terminator/Cobalt Neon.config diff --git a/old_work/iterm2colors/terminator/Cobalt2.config b/terminator/Cobalt2.config similarity index 100% rename from old_work/iterm2colors/terminator/Cobalt2.config rename to terminator/Cobalt2.config diff --git a/old_work/iterm2colors/terminator/CrayonPonyFish.config b/terminator/CrayonPonyFish.config similarity index 100% rename from old_work/iterm2colors/terminator/CrayonPonyFish.config rename to terminator/CrayonPonyFish.config diff --git a/old_work/iterm2colors/terminator/Dark Pastel.config b/terminator/Dark Pastel.config similarity index 100% rename from old_work/iterm2colors/terminator/Dark Pastel.config rename to terminator/Dark Pastel.config diff --git a/old_work/iterm2colors/terminator/Darkside.config b/terminator/Darkside.config similarity index 100% rename from old_work/iterm2colors/terminator/Darkside.config rename to terminator/Darkside.config diff --git a/old_work/iterm2colors/terminator/Desert.config b/terminator/Desert.config similarity index 100% rename from old_work/iterm2colors/terminator/Desert.config rename to terminator/Desert.config diff --git a/old_work/iterm2colors/terminator/DimmedMonokai.config b/terminator/DimmedMonokai.config similarity index 100% rename from old_work/iterm2colors/terminator/DimmedMonokai.config rename to terminator/DimmedMonokai.config diff --git a/old_work/iterm2colors/terminator/DotGov.config b/terminator/DotGov.config similarity index 100% rename from old_work/iterm2colors/terminator/DotGov.config rename to terminator/DotGov.config diff --git a/old_work/iterm2colors/terminator/Dracula.config b/terminator/Dracula.config similarity index 100% rename from old_work/iterm2colors/terminator/Dracula.config rename to terminator/Dracula.config diff --git a/old_work/iterm2colors/terminator/Duotone Dark.config b/terminator/Duotone Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Duotone Dark.config rename to terminator/Duotone Dark.config diff --git a/old_work/iterm2colors/terminator/ENCOM.config b/terminator/ENCOM.config similarity index 100% rename from old_work/iterm2colors/terminator/ENCOM.config rename to terminator/ENCOM.config diff --git a/old_work/iterm2colors/terminator/Earthsong.config b/terminator/Earthsong.config similarity index 100% rename from old_work/iterm2colors/terminator/Earthsong.config rename to terminator/Earthsong.config diff --git a/old_work/iterm2colors/terminator/Elemental.config b/terminator/Elemental.config similarity index 100% rename from old_work/iterm2colors/terminator/Elemental.config rename to terminator/Elemental.config diff --git a/old_work/iterm2colors/terminator/Elementary.config b/terminator/Elementary.config similarity index 100% rename from old_work/iterm2colors/terminator/Elementary.config rename to terminator/Elementary.config diff --git a/old_work/iterm2colors/terminator/Espresso Libre.config b/terminator/Espresso Libre.config similarity index 100% rename from old_work/iterm2colors/terminator/Espresso Libre.config rename to terminator/Espresso Libre.config diff --git a/old_work/iterm2colors/terminator/Espresso.config b/terminator/Espresso.config similarity index 100% rename from old_work/iterm2colors/terminator/Espresso.config rename to terminator/Espresso.config diff --git a/old_work/iterm2colors/terminator/Fideloper.config b/terminator/Fideloper.config similarity index 100% rename from old_work/iterm2colors/terminator/Fideloper.config rename to terminator/Fideloper.config diff --git a/old_work/iterm2colors/terminator/FirefoxDev.config b/terminator/FirefoxDev.config similarity index 100% rename from old_work/iterm2colors/terminator/FirefoxDev.config rename to terminator/FirefoxDev.config diff --git a/old_work/iterm2colors/terminator/Firewatch.config b/terminator/Firewatch.config similarity index 100% rename from old_work/iterm2colors/terminator/Firewatch.config rename to terminator/Firewatch.config diff --git a/old_work/iterm2colors/terminator/FishTank.config b/terminator/FishTank.config similarity index 100% rename from old_work/iterm2colors/terminator/FishTank.config rename to terminator/FishTank.config diff --git a/old_work/iterm2colors/terminator/Flat.config b/terminator/Flat.config similarity index 100% rename from old_work/iterm2colors/terminator/Flat.config rename to terminator/Flat.config diff --git a/old_work/iterm2colors/terminator/Flatland.config b/terminator/Flatland.config similarity index 100% rename from old_work/iterm2colors/terminator/Flatland.config rename to terminator/Flatland.config diff --git a/old_work/iterm2colors/terminator/Floraverse.config b/terminator/Floraverse.config similarity index 100% rename from old_work/iterm2colors/terminator/Floraverse.config rename to terminator/Floraverse.config diff --git a/old_work/iterm2colors/terminator/ForestBlue.config b/terminator/ForestBlue.config similarity index 100% rename from old_work/iterm2colors/terminator/ForestBlue.config rename to terminator/ForestBlue.config diff --git a/old_work/iterm2colors/terminator/FrontEndDelight.config b/terminator/FrontEndDelight.config similarity index 100% rename from old_work/iterm2colors/terminator/FrontEndDelight.config rename to terminator/FrontEndDelight.config diff --git a/old_work/iterm2colors/terminator/FunForrest.config b/terminator/FunForrest.config similarity index 100% rename from old_work/iterm2colors/terminator/FunForrest.config rename to terminator/FunForrest.config diff --git a/old_work/iterm2colors/terminator/Galaxy.config b/terminator/Galaxy.config similarity index 100% rename from old_work/iterm2colors/terminator/Galaxy.config rename to terminator/Galaxy.config diff --git a/old_work/iterm2colors/terminator/Github.config b/terminator/Github.config similarity index 100% rename from old_work/iterm2colors/terminator/Github.config rename to terminator/Github.config diff --git a/old_work/iterm2colors/terminator/Glacier.config b/terminator/Glacier.config similarity index 100% rename from old_work/iterm2colors/terminator/Glacier.config rename to terminator/Glacier.config diff --git a/old_work/iterm2colors/terminator/Grape.config b/terminator/Grape.config similarity index 100% rename from old_work/iterm2colors/terminator/Grape.config rename to terminator/Grape.config diff --git a/old_work/iterm2colors/terminator/Grass.config b/terminator/Grass.config similarity index 100% rename from old_work/iterm2colors/terminator/Grass.config rename to terminator/Grass.config diff --git a/old_work/iterm2colors/terminator/Gruvbox Dark.config b/terminator/Gruvbox Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Gruvbox Dark.config rename to terminator/Gruvbox Dark.config diff --git a/old_work/iterm2colors/terminator/Hardcore.config b/terminator/Hardcore.config similarity index 100% rename from old_work/iterm2colors/terminator/Hardcore.config rename to terminator/Hardcore.config diff --git a/old_work/iterm2colors/terminator/Harper.config b/terminator/Harper.config similarity index 100% rename from old_work/iterm2colors/terminator/Harper.config rename to terminator/Harper.config diff --git a/old_work/iterm2colors/terminator/Highway.config b/terminator/Highway.config similarity index 100% rename from old_work/iterm2colors/terminator/Highway.config rename to terminator/Highway.config diff --git a/old_work/iterm2colors/terminator/Hipster Green.config b/terminator/Hipster Green.config similarity index 100% rename from old_work/iterm2colors/terminator/Hipster Green.config rename to terminator/Hipster Green.config diff --git a/old_work/iterm2colors/terminator/Homebrew.config b/terminator/Homebrew.config similarity index 100% rename from old_work/iterm2colors/terminator/Homebrew.config rename to terminator/Homebrew.config diff --git a/old_work/iterm2colors/terminator/Hurtado.config b/terminator/Hurtado.config similarity index 100% rename from old_work/iterm2colors/terminator/Hurtado.config rename to terminator/Hurtado.config diff --git a/old_work/iterm2colors/terminator/Hybrid.config b/terminator/Hybrid.config similarity index 100% rename from old_work/iterm2colors/terminator/Hybrid.config rename to terminator/Hybrid.config diff --git a/old_work/iterm2colors/terminator/IC_Green_PPL.config b/terminator/IC_Green_PPL.config similarity index 100% rename from old_work/iterm2colors/terminator/IC_Green_PPL.config rename to terminator/IC_Green_PPL.config diff --git a/old_work/iterm2colors/terminator/IC_Orange_PPL.config b/terminator/IC_Orange_PPL.config similarity index 100% rename from old_work/iterm2colors/terminator/IC_Orange_PPL.config rename to terminator/IC_Orange_PPL.config diff --git a/old_work/iterm2colors/terminator/IR_Black.config b/terminator/IR_Black.config similarity index 100% rename from old_work/iterm2colors/terminator/IR_Black.config rename to terminator/IR_Black.config diff --git a/old_work/iterm2colors/terminator/Jackie Brown.config b/terminator/Jackie Brown.config similarity index 100% rename from old_work/iterm2colors/terminator/Jackie Brown.config rename to terminator/Jackie Brown.config diff --git a/old_work/iterm2colors/terminator/Japanesque.config b/terminator/Japanesque.config similarity index 100% rename from old_work/iterm2colors/terminator/Japanesque.config rename to terminator/Japanesque.config diff --git a/old_work/iterm2colors/terminator/Jellybeans.config b/terminator/Jellybeans.config similarity index 100% rename from old_work/iterm2colors/terminator/Jellybeans.config rename to terminator/Jellybeans.config diff --git a/old_work/iterm2colors/terminator/JetBrains Darcula.config b/terminator/JetBrains Darcula.config similarity index 100% rename from old_work/iterm2colors/terminator/JetBrains Darcula.config rename to terminator/JetBrains Darcula.config diff --git a/old_work/iterm2colors/terminator/Kibble.config b/terminator/Kibble.config similarity index 100% rename from old_work/iterm2colors/terminator/Kibble.config rename to terminator/Kibble.config diff --git a/old_work/iterm2colors/terminator/Later This Evening.config b/terminator/Later This Evening.config similarity index 100% rename from old_work/iterm2colors/terminator/Later This Evening.config rename to terminator/Later This Evening.config diff --git a/old_work/iterm2colors/terminator/Lavandula.config b/terminator/Lavandula.config similarity index 100% rename from old_work/iterm2colors/terminator/Lavandula.config rename to terminator/Lavandula.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbon.config b/terminator/LiquidCarbon.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbon.config rename to terminator/LiquidCarbon.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbonTransparent.config b/terminator/LiquidCarbonTransparent.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbonTransparent.config rename to terminator/LiquidCarbonTransparent.config diff --git a/old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config b/terminator/LiquidCarbonTransparentInverse.config similarity index 100% rename from old_work/iterm2colors/terminator/LiquidCarbonTransparentInverse.config rename to terminator/LiquidCarbonTransparentInverse.config diff --git a/old_work/iterm2colors/terminator/Man Page.config b/terminator/Man Page.config similarity index 100% rename from old_work/iterm2colors/terminator/Man Page.config rename to terminator/Man Page.config diff --git a/old_work/iterm2colors/terminator/Material.config b/terminator/Material.config similarity index 100% rename from old_work/iterm2colors/terminator/Material.config rename to terminator/Material.config diff --git a/old_work/iterm2colors/terminator/MaterialDark.config b/terminator/MaterialDark.config similarity index 100% rename from old_work/iterm2colors/terminator/MaterialDark.config rename to terminator/MaterialDark.config diff --git a/old_work/iterm2colors/terminator/Mathias.config b/terminator/Mathias.config similarity index 100% rename from old_work/iterm2colors/terminator/Mathias.config rename to terminator/Mathias.config diff --git a/old_work/iterm2colors/terminator/Medallion.config b/terminator/Medallion.config similarity index 100% rename from old_work/iterm2colors/terminator/Medallion.config rename to terminator/Medallion.config diff --git a/old_work/iterm2colors/terminator/Misterioso.config b/terminator/Misterioso.config similarity index 100% rename from old_work/iterm2colors/terminator/Misterioso.config rename to terminator/Misterioso.config diff --git a/old_work/iterm2colors/terminator/Molokai.config b/terminator/Molokai.config similarity index 100% rename from old_work/iterm2colors/terminator/Molokai.config rename to terminator/Molokai.config diff --git a/old_work/iterm2colors/terminator/MonaLisa.config b/terminator/MonaLisa.config similarity index 100% rename from old_work/iterm2colors/terminator/MonaLisa.config rename to terminator/MonaLisa.config diff --git a/old_work/iterm2colors/terminator/Monokai Soda.config b/terminator/Monokai Soda.config similarity index 100% rename from old_work/iterm2colors/terminator/Monokai Soda.config rename to terminator/Monokai Soda.config diff --git a/old_work/iterm2colors/terminator/Monokai Vivid.config b/terminator/Monokai Vivid.config similarity index 100% rename from old_work/iterm2colors/terminator/Monokai Vivid.config rename to terminator/Monokai Vivid.config diff --git a/old_work/iterm2colors/terminator/N0tch2k.config b/terminator/N0tch2k.config similarity index 100% rename from old_work/iterm2colors/terminator/N0tch2k.config rename to terminator/N0tch2k.config diff --git a/old_work/iterm2colors/terminator/Neopolitan.config b/terminator/Neopolitan.config similarity index 100% rename from old_work/iterm2colors/terminator/Neopolitan.config rename to terminator/Neopolitan.config diff --git a/old_work/iterm2colors/terminator/Neutron.config b/terminator/Neutron.config similarity index 100% rename from old_work/iterm2colors/terminator/Neutron.config rename to terminator/Neutron.config diff --git a/old_work/iterm2colors/terminator/NightLion v1.config b/terminator/NightLion v1.config similarity index 100% rename from old_work/iterm2colors/terminator/NightLion v1.config rename to terminator/NightLion v1.config diff --git a/old_work/iterm2colors/terminator/NightLion v2.config b/terminator/NightLion v2.config similarity index 100% rename from old_work/iterm2colors/terminator/NightLion v2.config rename to terminator/NightLion v2.config diff --git a/old_work/iterm2colors/terminator/Novel.config b/terminator/Novel.config similarity index 100% rename from old_work/iterm2colors/terminator/Novel.config rename to terminator/Novel.config diff --git a/old_work/iterm2colors/terminator/Obsidian.config b/terminator/Obsidian.config similarity index 100% rename from old_work/iterm2colors/terminator/Obsidian.config rename to terminator/Obsidian.config diff --git a/old_work/iterm2colors/terminator/Ocean.config b/terminator/Ocean.config similarity index 100% rename from old_work/iterm2colors/terminator/Ocean.config rename to terminator/Ocean.config diff --git a/old_work/iterm2colors/terminator/OceanicMaterial.config b/terminator/OceanicMaterial.config similarity index 100% rename from old_work/iterm2colors/terminator/OceanicMaterial.config rename to terminator/OceanicMaterial.config diff --git a/old_work/iterm2colors/terminator/Ollie.config b/terminator/Ollie.config similarity index 100% rename from old_work/iterm2colors/terminator/Ollie.config rename to terminator/Ollie.config diff --git a/old_work/iterm2colors/terminator/OneHalfDark.config b/terminator/OneHalfDark.config similarity index 100% rename from old_work/iterm2colors/terminator/OneHalfDark.config rename to terminator/OneHalfDark.config diff --git a/old_work/iterm2colors/terminator/OneHalfLight.config b/terminator/OneHalfLight.config similarity index 100% rename from old_work/iterm2colors/terminator/OneHalfLight.config rename to terminator/OneHalfLight.config diff --git a/old_work/iterm2colors/terminator/Pandora.config b/terminator/Pandora.config similarity index 100% rename from old_work/iterm2colors/terminator/Pandora.config rename to terminator/Pandora.config diff --git a/old_work/iterm2colors/terminator/Paraiso Dark.config b/terminator/Paraiso Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Paraiso Dark.config rename to terminator/Paraiso Dark.config diff --git a/old_work/iterm2colors/terminator/Parasio Dark.config b/terminator/Parasio Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Parasio Dark.config rename to terminator/Parasio Dark.config diff --git a/old_work/iterm2colors/terminator/PaulMillr.config b/terminator/PaulMillr.config similarity index 100% rename from old_work/iterm2colors/terminator/PaulMillr.config rename to terminator/PaulMillr.config diff --git a/old_work/iterm2colors/terminator/PencilDark.config b/terminator/PencilDark.config similarity index 100% rename from old_work/iterm2colors/terminator/PencilDark.config rename to terminator/PencilDark.config diff --git a/old_work/iterm2colors/terminator/PencilLight.config b/terminator/PencilLight.config similarity index 100% rename from old_work/iterm2colors/terminator/PencilLight.config rename to terminator/PencilLight.config diff --git a/old_work/iterm2colors/terminator/Piatto Light.config b/terminator/Piatto Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Piatto Light.config rename to terminator/Piatto Light.config diff --git a/old_work/iterm2colors/terminator/Pnevma.config b/terminator/Pnevma.config similarity index 100% rename from old_work/iterm2colors/terminator/Pnevma.config rename to terminator/Pnevma.config diff --git a/old_work/iterm2colors/terminator/Pro.config b/terminator/Pro.config similarity index 100% rename from old_work/iterm2colors/terminator/Pro.config rename to terminator/Pro.config diff --git a/old_work/iterm2colors/terminator/Red Alert.config b/terminator/Red Alert.config similarity index 100% rename from old_work/iterm2colors/terminator/Red Alert.config rename to terminator/Red Alert.config diff --git a/old_work/iterm2colors/terminator/Red Sands.config b/terminator/Red Sands.config similarity index 100% rename from old_work/iterm2colors/terminator/Red Sands.config rename to terminator/Red Sands.config diff --git a/old_work/iterm2colors/terminator/Rippedcasts.config b/terminator/Rippedcasts.config similarity index 100% rename from old_work/iterm2colors/terminator/Rippedcasts.config rename to terminator/Rippedcasts.config diff --git a/old_work/iterm2colors/terminator/Royal.config b/terminator/Royal.config similarity index 100% rename from old_work/iterm2colors/terminator/Royal.config rename to terminator/Royal.config diff --git a/old_work/iterm2colors/terminator/Ryuuko.config b/terminator/Ryuuko.config similarity index 100% rename from old_work/iterm2colors/terminator/Ryuuko.config rename to terminator/Ryuuko.config diff --git a/old_work/iterm2colors/terminator/SeaShells.config b/terminator/SeaShells.config similarity index 100% rename from old_work/iterm2colors/terminator/SeaShells.config rename to terminator/SeaShells.config diff --git a/old_work/iterm2colors/terminator/Seafoam Pastel.config b/terminator/Seafoam Pastel.config similarity index 100% rename from old_work/iterm2colors/terminator/Seafoam Pastel.config rename to terminator/Seafoam Pastel.config diff --git a/old_work/iterm2colors/terminator/Seti.config b/terminator/Seti.config similarity index 100% rename from old_work/iterm2colors/terminator/Seti.config rename to terminator/Seti.config diff --git a/old_work/iterm2colors/terminator/Shaman.config b/terminator/Shaman.config similarity index 100% rename from old_work/iterm2colors/terminator/Shaman.config rename to terminator/Shaman.config diff --git a/old_work/iterm2colors/terminator/Slate.config b/terminator/Slate.config similarity index 100% rename from old_work/iterm2colors/terminator/Slate.config rename to terminator/Slate.config diff --git a/old_work/iterm2colors/terminator/Smyck.config b/terminator/Smyck.config similarity index 100% rename from old_work/iterm2colors/terminator/Smyck.config rename to terminator/Smyck.config diff --git a/old_work/iterm2colors/terminator/SoftServer.config b/terminator/SoftServer.config similarity index 100% rename from old_work/iterm2colors/terminator/SoftServer.config rename to terminator/SoftServer.config diff --git a/old_work/iterm2colors/terminator/Solarized Darcula.config b/terminator/Solarized Darcula.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Darcula.config rename to terminator/Solarized Darcula.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark - Patched.config b/terminator/Solarized Dark - Patched.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark - Patched.config rename to terminator/Solarized Dark - Patched.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config b/terminator/Solarized Dark Higher Contrast.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark Higher Contrast.config rename to terminator/Solarized Dark Higher Contrast.config diff --git a/old_work/iterm2colors/terminator/Solarized Dark.config b/terminator/Solarized Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Dark.config rename to terminator/Solarized Dark.config diff --git a/old_work/iterm2colors/terminator/Solarized Light.config b/terminator/Solarized Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Solarized Light.config rename to terminator/Solarized Light.config diff --git a/old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config b/terminator/SpaceGray Eighties Dull.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray Eighties Dull.config rename to terminator/SpaceGray Eighties Dull.config diff --git a/old_work/iterm2colors/terminator/SpaceGray Eighties.config b/terminator/SpaceGray Eighties.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray Eighties.config rename to terminator/SpaceGray Eighties.config diff --git a/old_work/iterm2colors/terminator/SpaceGray.config b/terminator/SpaceGray.config similarity index 100% rename from old_work/iterm2colors/terminator/SpaceGray.config rename to terminator/SpaceGray.config diff --git a/old_work/iterm2colors/terminator/Spacedust.config b/terminator/Spacedust.config similarity index 100% rename from old_work/iterm2colors/terminator/Spacedust.config rename to terminator/Spacedust.config diff --git a/old_work/iterm2colors/terminator/Spiderman.config b/terminator/Spiderman.config similarity index 100% rename from old_work/iterm2colors/terminator/Spiderman.config rename to terminator/Spiderman.config diff --git a/old_work/iterm2colors/terminator/Spring.config b/terminator/Spring.config similarity index 100% rename from old_work/iterm2colors/terminator/Spring.config rename to terminator/Spring.config diff --git a/old_work/iterm2colors/terminator/Square.config b/terminator/Square.config similarity index 100% rename from old_work/iterm2colors/terminator/Square.config rename to terminator/Square.config diff --git a/old_work/iterm2colors/terminator/Sundried.config b/terminator/Sundried.config similarity index 100% rename from old_work/iterm2colors/terminator/Sundried.config rename to terminator/Sundried.config diff --git a/old_work/iterm2colors/terminator/Symfonic.config b/terminator/Symfonic.config similarity index 100% rename from old_work/iterm2colors/terminator/Symfonic.config rename to terminator/Symfonic.config diff --git a/old_work/iterm2colors/terminator/Teerb.config b/terminator/Teerb.config similarity index 100% rename from old_work/iterm2colors/terminator/Teerb.config rename to terminator/Teerb.config diff --git a/old_work/iterm2colors/terminator/Terminal Basic.config b/terminator/Terminal Basic.config similarity index 100% rename from old_work/iterm2colors/terminator/Terminal Basic.config rename to terminator/Terminal Basic.config diff --git a/old_work/iterm2colors/terminator/Thayer Bright.config b/terminator/Thayer Bright.config similarity index 100% rename from old_work/iterm2colors/terminator/Thayer Bright.config rename to terminator/Thayer Bright.config diff --git a/old_work/iterm2colors/terminator/The Hulk.config b/terminator/The Hulk.config similarity index 100% rename from old_work/iterm2colors/terminator/The Hulk.config rename to terminator/The Hulk.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Blue.config b/terminator/Tomorrow Night Blue.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Blue.config rename to terminator/Tomorrow Night Blue.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Bright.config b/terminator/Tomorrow Night Bright.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Bright.config rename to terminator/Tomorrow Night Bright.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night Eighties.config b/terminator/Tomorrow Night Eighties.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night Eighties.config rename to terminator/Tomorrow Night Eighties.config diff --git a/old_work/iterm2colors/terminator/Tomorrow Night.config b/terminator/Tomorrow Night.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow Night.config rename to terminator/Tomorrow Night.config diff --git a/old_work/iterm2colors/terminator/Tomorrow.config b/terminator/Tomorrow.config similarity index 100% rename from old_work/iterm2colors/terminator/Tomorrow.config rename to terminator/Tomorrow.config diff --git a/old_work/iterm2colors/terminator/ToyChest.config b/terminator/ToyChest.config similarity index 100% rename from old_work/iterm2colors/terminator/ToyChest.config rename to terminator/ToyChest.config diff --git a/old_work/iterm2colors/terminator/Treehouse.config b/terminator/Treehouse.config similarity index 100% rename from old_work/iterm2colors/terminator/Treehouse.config rename to terminator/Treehouse.config diff --git a/old_work/iterm2colors/terminator/Twilight.config b/terminator/Twilight.config similarity index 100% rename from old_work/iterm2colors/terminator/Twilight.config rename to terminator/Twilight.config diff --git a/old_work/iterm2colors/terminator/Ubuntu.config b/terminator/Ubuntu.config similarity index 100% rename from old_work/iterm2colors/terminator/Ubuntu.config rename to terminator/Ubuntu.config diff --git a/old_work/iterm2colors/terminator/UnderTheSea.config b/terminator/UnderTheSea.config similarity index 100% rename from old_work/iterm2colors/terminator/UnderTheSea.config rename to terminator/UnderTheSea.config diff --git a/old_work/iterm2colors/terminator/Urple.config b/terminator/Urple.config similarity index 100% rename from old_work/iterm2colors/terminator/Urple.config rename to terminator/Urple.config diff --git a/old_work/iterm2colors/terminator/Vaughn.config b/terminator/Vaughn.config similarity index 100% rename from old_work/iterm2colors/terminator/Vaughn.config rename to terminator/Vaughn.config diff --git a/old_work/iterm2colors/terminator/VibrantInk.config b/terminator/VibrantInk.config similarity index 100% rename from old_work/iterm2colors/terminator/VibrantInk.config rename to terminator/VibrantInk.config diff --git a/old_work/iterm2colors/terminator/Violet Dark.config b/terminator/Violet Dark.config similarity index 100% rename from old_work/iterm2colors/terminator/Violet Dark.config rename to terminator/Violet Dark.config diff --git a/old_work/iterm2colors/terminator/Violet Light.config b/terminator/Violet Light.config similarity index 100% rename from old_work/iterm2colors/terminator/Violet Light.config rename to terminator/Violet Light.config diff --git a/old_work/iterm2colors/terminator/WarmNeon.config b/terminator/WarmNeon.config similarity index 100% rename from old_work/iterm2colors/terminator/WarmNeon.config rename to terminator/WarmNeon.config diff --git a/old_work/iterm2colors/terminator/Wez.config b/terminator/Wez.config similarity index 100% rename from old_work/iterm2colors/terminator/Wez.config rename to terminator/Wez.config diff --git a/old_work/iterm2colors/terminator/WildCherry.config b/terminator/WildCherry.config similarity index 100% rename from old_work/iterm2colors/terminator/WildCherry.config rename to terminator/WildCherry.config diff --git a/old_work/iterm2colors/terminator/Wombat.config b/terminator/Wombat.config similarity index 100% rename from old_work/iterm2colors/terminator/Wombat.config rename to terminator/Wombat.config diff --git a/old_work/iterm2colors/terminator/Wryan.config b/terminator/Wryan.config similarity index 100% rename from old_work/iterm2colors/terminator/Wryan.config rename to terminator/Wryan.config diff --git a/old_work/iterm2colors/terminator/Zenburn.config b/terminator/Zenburn.config similarity index 100% rename from old_work/iterm2colors/terminator/Zenburn.config rename to terminator/Zenburn.config diff --git a/old_work/iterm2colors/terminator/ayu.config b/terminator/ayu.config similarity index 100% rename from old_work/iterm2colors/terminator/ayu.config rename to terminator/ayu.config diff --git a/old_work/iterm2colors/terminator/ayu_light.config b/terminator/ayu_light.config similarity index 100% rename from old_work/iterm2colors/terminator/ayu_light.config rename to terminator/ayu_light.config diff --git a/old_work/iterm2colors/terminator/deep.config b/terminator/deep.config similarity index 100% rename from old_work/iterm2colors/terminator/deep.config rename to terminator/deep.config diff --git a/old_work/iterm2colors/terminator/idleToes.config b/terminator/idleToes.config similarity index 100% rename from old_work/iterm2colors/terminator/idleToes.config rename to terminator/idleToes.config diff --git a/old_work/iterm2colors/termite/3024 b/termite/3024 similarity index 100% rename from old_work/iterm2colors/termite/3024 rename to termite/3024 diff --git a/old_work/iterm2colors/termite/3024 Night b/termite/3024 Night similarity index 100% rename from old_work/iterm2colors/termite/3024 Night rename to termite/3024 Night diff --git a/old_work/iterm2colors/termite/AdventureTime b/termite/AdventureTime similarity index 100% rename from old_work/iterm2colors/termite/AdventureTime rename to termite/AdventureTime diff --git a/old_work/iterm2colors/termite/Afterglow b/termite/Afterglow similarity index 100% rename from old_work/iterm2colors/termite/Afterglow rename to termite/Afterglow diff --git a/old_work/iterm2colors/termite/AlienBlood b/termite/AlienBlood similarity index 100% rename from old_work/iterm2colors/termite/AlienBlood rename to termite/AlienBlood diff --git a/old_work/iterm2colors/termite/Argonaut b/termite/Argonaut similarity index 100% rename from old_work/iterm2colors/termite/Argonaut rename to termite/Argonaut diff --git a/old_work/iterm2colors/termite/Arthur b/termite/Arthur similarity index 100% rename from old_work/iterm2colors/termite/Arthur rename to termite/Arthur diff --git a/old_work/iterm2colors/termite/AtelierSulphurpool b/termite/AtelierSulphurpool similarity index 100% rename from old_work/iterm2colors/termite/AtelierSulphurpool rename to termite/AtelierSulphurpool diff --git a/old_work/iterm2colors/termite/Atom b/termite/Atom similarity index 100% rename from old_work/iterm2colors/termite/Atom rename to termite/Atom diff --git a/old_work/iterm2colors/termite/AtomOneLight b/termite/AtomOneLight similarity index 100% rename from old_work/iterm2colors/termite/AtomOneLight rename to termite/AtomOneLight diff --git a/old_work/iterm2colors/termite/Batman b/termite/Batman similarity index 100% rename from old_work/iterm2colors/termite/Batman rename to termite/Batman diff --git a/old_work/iterm2colors/termite/Belafonte Day b/termite/Belafonte Day similarity index 100% rename from old_work/iterm2colors/termite/Belafonte Day rename to termite/Belafonte Day diff --git a/old_work/iterm2colors/termite/Belafonte Night b/termite/Belafonte Night similarity index 100% rename from old_work/iterm2colors/termite/Belafonte Night rename to termite/Belafonte Night diff --git a/old_work/iterm2colors/termite/BirdsOfParadise b/termite/BirdsOfParadise similarity index 100% rename from old_work/iterm2colors/termite/BirdsOfParadise rename to termite/BirdsOfParadise diff --git a/old_work/iterm2colors/termite/Blazer b/termite/Blazer similarity index 100% rename from old_work/iterm2colors/termite/Blazer rename to termite/Blazer diff --git a/old_work/iterm2colors/termite/Borland b/termite/Borland similarity index 100% rename from old_work/iterm2colors/termite/Borland rename to termite/Borland diff --git a/old_work/iterm2colors/termite/Broadcast b/termite/Broadcast similarity index 100% rename from old_work/iterm2colors/termite/Broadcast rename to termite/Broadcast diff --git a/old_work/iterm2colors/termite/Brogrammer b/termite/Brogrammer similarity index 100% rename from old_work/iterm2colors/termite/Brogrammer rename to termite/Brogrammer diff --git a/old_work/iterm2colors/termite/C64 b/termite/C64 similarity index 100% rename from old_work/iterm2colors/termite/C64 rename to termite/C64 diff --git a/old_work/iterm2colors/termite/CLRS b/termite/CLRS similarity index 100% rename from old_work/iterm2colors/termite/CLRS rename to termite/CLRS diff --git a/old_work/iterm2colors/termite/Chalk b/termite/Chalk similarity index 100% rename from old_work/iterm2colors/termite/Chalk rename to termite/Chalk diff --git a/old_work/iterm2colors/termite/Chalkboard b/termite/Chalkboard similarity index 100% rename from old_work/iterm2colors/termite/Chalkboard rename to termite/Chalkboard diff --git a/old_work/iterm2colors/termite/Ciapre b/termite/Ciapre similarity index 100% rename from old_work/iterm2colors/termite/Ciapre rename to termite/Ciapre diff --git a/old_work/iterm2colors/termite/Cobalt Neon b/termite/Cobalt Neon similarity index 100% rename from old_work/iterm2colors/termite/Cobalt Neon rename to termite/Cobalt Neon diff --git a/old_work/iterm2colors/termite/Cobalt2 b/termite/Cobalt2 similarity index 100% rename from old_work/iterm2colors/termite/Cobalt2 rename to termite/Cobalt2 diff --git a/old_work/iterm2colors/termite/CrayonPonyFish b/termite/CrayonPonyFish similarity index 100% rename from old_work/iterm2colors/termite/CrayonPonyFish rename to termite/CrayonPonyFish diff --git a/old_work/iterm2colors/termite/Dark Pastel b/termite/Dark Pastel similarity index 100% rename from old_work/iterm2colors/termite/Dark Pastel rename to termite/Dark Pastel diff --git a/old_work/iterm2colors/termite/Darkside b/termite/Darkside similarity index 100% rename from old_work/iterm2colors/termite/Darkside rename to termite/Darkside diff --git a/old_work/iterm2colors/termite/Desert b/termite/Desert similarity index 100% rename from old_work/iterm2colors/termite/Desert rename to termite/Desert diff --git a/old_work/iterm2colors/termite/DimmedMonokai b/termite/DimmedMonokai similarity index 100% rename from old_work/iterm2colors/termite/DimmedMonokai rename to termite/DimmedMonokai diff --git a/old_work/iterm2colors/termite/DotGov b/termite/DotGov similarity index 100% rename from old_work/iterm2colors/termite/DotGov rename to termite/DotGov diff --git a/old_work/iterm2colors/termite/Dracula b/termite/Dracula similarity index 100% rename from old_work/iterm2colors/termite/Dracula rename to termite/Dracula diff --git a/old_work/iterm2colors/termite/ENCOM b/termite/ENCOM similarity index 100% rename from old_work/iterm2colors/termite/ENCOM rename to termite/ENCOM diff --git a/old_work/iterm2colors/termite/Earthsong b/termite/Earthsong similarity index 100% rename from old_work/iterm2colors/termite/Earthsong rename to termite/Earthsong diff --git a/old_work/iterm2colors/termite/Elemental b/termite/Elemental similarity index 100% rename from old_work/iterm2colors/termite/Elemental rename to termite/Elemental diff --git a/old_work/iterm2colors/termite/Espresso b/termite/Espresso similarity index 100% rename from old_work/iterm2colors/termite/Espresso rename to termite/Espresso diff --git a/old_work/iterm2colors/termite/Espresso Libre b/termite/Espresso Libre similarity index 100% rename from old_work/iterm2colors/termite/Espresso Libre rename to termite/Espresso Libre diff --git a/old_work/iterm2colors/termite/Fideloper b/termite/Fideloper similarity index 100% rename from old_work/iterm2colors/termite/Fideloper rename to termite/Fideloper diff --git a/old_work/iterm2colors/termite/FishTank b/termite/FishTank similarity index 100% rename from old_work/iterm2colors/termite/FishTank rename to termite/FishTank diff --git a/old_work/iterm2colors/termite/Flat b/termite/Flat similarity index 100% rename from old_work/iterm2colors/termite/Flat rename to termite/Flat diff --git a/old_work/iterm2colors/termite/Flatland b/termite/Flatland similarity index 100% rename from old_work/iterm2colors/termite/Flatland rename to termite/Flatland diff --git a/old_work/iterm2colors/termite/Floraverse b/termite/Floraverse similarity index 100% rename from old_work/iterm2colors/termite/Floraverse rename to termite/Floraverse diff --git a/old_work/iterm2colors/termite/FrontEndDelight b/termite/FrontEndDelight similarity index 100% rename from old_work/iterm2colors/termite/FrontEndDelight rename to termite/FrontEndDelight diff --git a/old_work/iterm2colors/termite/FunForrest b/termite/FunForrest similarity index 100% rename from old_work/iterm2colors/termite/FunForrest rename to termite/FunForrest diff --git a/old_work/iterm2colors/termite/Galaxy b/termite/Galaxy similarity index 100% rename from old_work/iterm2colors/termite/Galaxy rename to termite/Galaxy diff --git a/old_work/iterm2colors/termite/Github b/termite/Github similarity index 100% rename from old_work/iterm2colors/termite/Github rename to termite/Github diff --git a/old_work/iterm2colors/termite/Grape b/termite/Grape similarity index 100% rename from old_work/iterm2colors/termite/Grape rename to termite/Grape diff --git a/old_work/iterm2colors/termite/Grass b/termite/Grass similarity index 100% rename from old_work/iterm2colors/termite/Grass rename to termite/Grass diff --git a/old_work/iterm2colors/termite/Hardcore b/termite/Hardcore similarity index 100% rename from old_work/iterm2colors/termite/Hardcore rename to termite/Hardcore diff --git a/old_work/iterm2colors/termite/Harper b/termite/Harper similarity index 100% rename from old_work/iterm2colors/termite/Harper rename to termite/Harper diff --git a/old_work/iterm2colors/termite/Highway b/termite/Highway similarity index 100% rename from old_work/iterm2colors/termite/Highway rename to termite/Highway diff --git a/old_work/iterm2colors/termite/Hipster Green b/termite/Hipster Green similarity index 100% rename from old_work/iterm2colors/termite/Hipster Green rename to termite/Hipster Green diff --git a/old_work/iterm2colors/termite/Homebrew b/termite/Homebrew similarity index 100% rename from old_work/iterm2colors/termite/Homebrew rename to termite/Homebrew diff --git a/old_work/iterm2colors/termite/Hurtado b/termite/Hurtado similarity index 100% rename from old_work/iterm2colors/termite/Hurtado rename to termite/Hurtado diff --git a/old_work/iterm2colors/termite/Hybrid b/termite/Hybrid similarity index 100% rename from old_work/iterm2colors/termite/Hybrid rename to termite/Hybrid diff --git a/old_work/iterm2colors/termite/IC_Green_PPL b/termite/IC_Green_PPL similarity index 100% rename from old_work/iterm2colors/termite/IC_Green_PPL rename to termite/IC_Green_PPL diff --git a/old_work/iterm2colors/termite/IC_Orange_PPL b/termite/IC_Orange_PPL similarity index 100% rename from old_work/iterm2colors/termite/IC_Orange_PPL rename to termite/IC_Orange_PPL diff --git a/old_work/iterm2colors/termite/IR_Black b/termite/IR_Black similarity index 100% rename from old_work/iterm2colors/termite/IR_Black rename to termite/IR_Black diff --git a/old_work/iterm2colors/termite/Jackie Brown b/termite/Jackie Brown similarity index 100% rename from old_work/iterm2colors/termite/Jackie Brown rename to termite/Jackie Brown diff --git a/old_work/iterm2colors/termite/Japanesque b/termite/Japanesque similarity index 100% rename from old_work/iterm2colors/termite/Japanesque rename to termite/Japanesque diff --git a/old_work/iterm2colors/termite/Jellybeans b/termite/Jellybeans similarity index 100% rename from old_work/iterm2colors/termite/Jellybeans rename to termite/Jellybeans diff --git a/old_work/iterm2colors/termite/Kibble b/termite/Kibble similarity index 100% rename from old_work/iterm2colors/termite/Kibble rename to termite/Kibble diff --git a/old_work/iterm2colors/termite/Later This Evening b/termite/Later This Evening similarity index 100% rename from old_work/iterm2colors/termite/Later This Evening rename to termite/Later This Evening diff --git a/old_work/iterm2colors/termite/Lavandula b/termite/Lavandula similarity index 100% rename from old_work/iterm2colors/termite/Lavandula rename to termite/Lavandula diff --git a/old_work/iterm2colors/termite/LiquidCarbon b/termite/LiquidCarbon similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbon rename to termite/LiquidCarbon diff --git a/old_work/iterm2colors/termite/LiquidCarbonTransparent b/termite/LiquidCarbonTransparent similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbonTransparent rename to termite/LiquidCarbonTransparent diff --git a/old_work/iterm2colors/termite/LiquidCarbonTransparentInverse b/termite/LiquidCarbonTransparentInverse similarity index 100% rename from old_work/iterm2colors/termite/LiquidCarbonTransparentInverse rename to termite/LiquidCarbonTransparentInverse diff --git a/old_work/iterm2colors/termite/Man Page b/termite/Man Page similarity index 100% rename from old_work/iterm2colors/termite/Man Page rename to termite/Man Page diff --git a/old_work/iterm2colors/termite/Material b/termite/Material similarity index 100% rename from old_work/iterm2colors/termite/Material rename to termite/Material diff --git a/old_work/iterm2colors/termite/MaterialDark b/termite/MaterialDark similarity index 100% rename from old_work/iterm2colors/termite/MaterialDark rename to termite/MaterialDark diff --git a/old_work/iterm2colors/termite/Mathias b/termite/Mathias similarity index 100% rename from old_work/iterm2colors/termite/Mathias rename to termite/Mathias diff --git a/old_work/iterm2colors/termite/Medallion b/termite/Medallion similarity index 100% rename from old_work/iterm2colors/termite/Medallion rename to termite/Medallion diff --git a/old_work/iterm2colors/termite/Misterioso b/termite/Misterioso similarity index 100% rename from old_work/iterm2colors/termite/Misterioso rename to termite/Misterioso diff --git a/old_work/iterm2colors/termite/Molokai b/termite/Molokai similarity index 100% rename from old_work/iterm2colors/termite/Molokai rename to termite/Molokai diff --git a/old_work/iterm2colors/termite/MonaLisa b/termite/MonaLisa similarity index 100% rename from old_work/iterm2colors/termite/MonaLisa rename to termite/MonaLisa diff --git a/old_work/iterm2colors/termite/Monokai Soda b/termite/Monokai Soda similarity index 100% rename from old_work/iterm2colors/termite/Monokai Soda rename to termite/Monokai Soda diff --git a/old_work/iterm2colors/termite/N0tch2k b/termite/N0tch2k similarity index 100% rename from old_work/iterm2colors/termite/N0tch2k rename to termite/N0tch2k diff --git a/old_work/iterm2colors/termite/Neopolitan b/termite/Neopolitan similarity index 100% rename from old_work/iterm2colors/termite/Neopolitan rename to termite/Neopolitan diff --git a/old_work/iterm2colors/termite/Neutron b/termite/Neutron similarity index 100% rename from old_work/iterm2colors/termite/Neutron rename to termite/Neutron diff --git a/old_work/iterm2colors/termite/NightLion v1 b/termite/NightLion v1 similarity index 100% rename from old_work/iterm2colors/termite/NightLion v1 rename to termite/NightLion v1 diff --git a/old_work/iterm2colors/termite/NightLion v2 b/termite/NightLion v2 similarity index 100% rename from old_work/iterm2colors/termite/NightLion v2 rename to termite/NightLion v2 diff --git a/old_work/iterm2colors/termite/Novel b/termite/Novel similarity index 100% rename from old_work/iterm2colors/termite/Novel rename to termite/Novel diff --git a/old_work/iterm2colors/termite/Obsidian b/termite/Obsidian similarity index 100% rename from old_work/iterm2colors/termite/Obsidian rename to termite/Obsidian diff --git a/old_work/iterm2colors/termite/Ocean b/termite/Ocean similarity index 100% rename from old_work/iterm2colors/termite/Ocean rename to termite/Ocean diff --git a/old_work/iterm2colors/termite/OceanicMaterial b/termite/OceanicMaterial similarity index 100% rename from old_work/iterm2colors/termite/OceanicMaterial rename to termite/OceanicMaterial diff --git a/old_work/iterm2colors/termite/Ollie b/termite/Ollie similarity index 100% rename from old_work/iterm2colors/termite/Ollie rename to termite/Ollie diff --git a/old_work/iterm2colors/termite/Paraiso Dark b/termite/Paraiso Dark similarity index 100% rename from old_work/iterm2colors/termite/Paraiso Dark rename to termite/Paraiso Dark diff --git a/old_work/iterm2colors/termite/Parasio Dark b/termite/Parasio Dark similarity index 100% rename from old_work/iterm2colors/termite/Parasio Dark rename to termite/Parasio Dark diff --git a/old_work/iterm2colors/termite/PaulMillr b/termite/PaulMillr similarity index 100% rename from old_work/iterm2colors/termite/PaulMillr rename to termite/PaulMillr diff --git a/old_work/iterm2colors/termite/PencilDark b/termite/PencilDark similarity index 100% rename from old_work/iterm2colors/termite/PencilDark rename to termite/PencilDark diff --git a/old_work/iterm2colors/termite/PencilLight b/termite/PencilLight similarity index 100% rename from old_work/iterm2colors/termite/PencilLight rename to termite/PencilLight diff --git a/old_work/iterm2colors/termite/Piatto Light b/termite/Piatto Light similarity index 100% rename from old_work/iterm2colors/termite/Piatto Light rename to termite/Piatto Light diff --git a/old_work/iterm2colors/termite/Pnevma b/termite/Pnevma similarity index 100% rename from old_work/iterm2colors/termite/Pnevma rename to termite/Pnevma diff --git a/old_work/iterm2colors/termite/Pro b/termite/Pro similarity index 100% rename from old_work/iterm2colors/termite/Pro rename to termite/Pro diff --git a/old_work/iterm2colors/termite/Red Alert b/termite/Red Alert similarity index 100% rename from old_work/iterm2colors/termite/Red Alert rename to termite/Red Alert diff --git a/old_work/iterm2colors/termite/Red Sands b/termite/Red Sands similarity index 100% rename from old_work/iterm2colors/termite/Red Sands rename to termite/Red Sands diff --git a/old_work/iterm2colors/termite/Rippedcasts b/termite/Rippedcasts similarity index 100% rename from old_work/iterm2colors/termite/Rippedcasts rename to termite/Rippedcasts diff --git a/old_work/iterm2colors/termite/Royal b/termite/Royal similarity index 100% rename from old_work/iterm2colors/termite/Royal rename to termite/Royal diff --git a/old_work/iterm2colors/termite/SeaShells b/termite/SeaShells similarity index 100% rename from old_work/iterm2colors/termite/SeaShells rename to termite/SeaShells diff --git a/old_work/iterm2colors/termite/Seafoam Pastel b/termite/Seafoam Pastel similarity index 100% rename from old_work/iterm2colors/termite/Seafoam Pastel rename to termite/Seafoam Pastel diff --git a/old_work/iterm2colors/termite/Seti b/termite/Seti similarity index 100% rename from old_work/iterm2colors/termite/Seti rename to termite/Seti diff --git a/old_work/iterm2colors/termite/Shaman b/termite/Shaman similarity index 100% rename from old_work/iterm2colors/termite/Shaman rename to termite/Shaman diff --git a/old_work/iterm2colors/termite/Slate b/termite/Slate similarity index 100% rename from old_work/iterm2colors/termite/Slate rename to termite/Slate diff --git a/old_work/iterm2colors/termite/Smyck b/termite/Smyck similarity index 100% rename from old_work/iterm2colors/termite/Smyck rename to termite/Smyck diff --git a/old_work/iterm2colors/termite/SoftServer b/termite/SoftServer similarity index 100% rename from old_work/iterm2colors/termite/SoftServer rename to termite/SoftServer diff --git a/old_work/iterm2colors/termite/Solarized Darcula b/termite/Solarized Darcula similarity index 100% rename from old_work/iterm2colors/termite/Solarized Darcula rename to termite/Solarized Darcula diff --git a/old_work/iterm2colors/termite/Solarized Dark b/termite/Solarized Dark similarity index 100% rename from old_work/iterm2colors/termite/Solarized Dark rename to termite/Solarized Dark diff --git a/old_work/iterm2colors/termite/Solarized Dark Higher Contrast b/termite/Solarized Dark Higher Contrast similarity index 100% rename from old_work/iterm2colors/termite/Solarized Dark Higher Contrast rename to termite/Solarized Dark Higher Contrast diff --git a/old_work/iterm2colors/termite/Solarized Light b/termite/Solarized Light similarity index 100% rename from old_work/iterm2colors/termite/Solarized Light rename to termite/Solarized Light diff --git a/old_work/iterm2colors/termite/SpaceGray b/termite/SpaceGray similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray rename to termite/SpaceGray diff --git a/old_work/iterm2colors/termite/SpaceGray Eighties b/termite/SpaceGray Eighties similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray Eighties rename to termite/SpaceGray Eighties diff --git a/old_work/iterm2colors/termite/SpaceGray Eighties Dull b/termite/SpaceGray Eighties Dull similarity index 100% rename from old_work/iterm2colors/termite/SpaceGray Eighties Dull rename to termite/SpaceGray Eighties Dull diff --git a/old_work/iterm2colors/termite/Spacedust b/termite/Spacedust similarity index 100% rename from old_work/iterm2colors/termite/Spacedust rename to termite/Spacedust diff --git a/old_work/iterm2colors/termite/Spiderman b/termite/Spiderman similarity index 100% rename from old_work/iterm2colors/termite/Spiderman rename to termite/Spiderman diff --git a/old_work/iterm2colors/termite/Spring b/termite/Spring similarity index 100% rename from old_work/iterm2colors/termite/Spring rename to termite/Spring diff --git a/old_work/iterm2colors/termite/Square b/termite/Square similarity index 100% rename from old_work/iterm2colors/termite/Square rename to termite/Square diff --git a/old_work/iterm2colors/termite/Sundried b/termite/Sundried similarity index 100% rename from old_work/iterm2colors/termite/Sundried rename to termite/Sundried diff --git a/old_work/iterm2colors/termite/Symfonic b/termite/Symfonic similarity index 100% rename from old_work/iterm2colors/termite/Symfonic rename to termite/Symfonic diff --git a/old_work/iterm2colors/termite/Teerb b/termite/Teerb similarity index 100% rename from old_work/iterm2colors/termite/Teerb rename to termite/Teerb diff --git a/old_work/iterm2colors/termite/Terminal Basic b/termite/Terminal Basic similarity index 100% rename from old_work/iterm2colors/termite/Terminal Basic rename to termite/Terminal Basic diff --git a/old_work/iterm2colors/termite/Thayer Bright b/termite/Thayer Bright similarity index 100% rename from old_work/iterm2colors/termite/Thayer Bright rename to termite/Thayer Bright diff --git a/old_work/iterm2colors/termite/The Hulk b/termite/The Hulk similarity index 100% rename from old_work/iterm2colors/termite/The Hulk rename to termite/The Hulk diff --git a/old_work/iterm2colors/termite/Tomorrow b/termite/Tomorrow similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow rename to termite/Tomorrow diff --git a/old_work/iterm2colors/termite/Tomorrow Night b/termite/Tomorrow Night similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night rename to termite/Tomorrow Night diff --git a/old_work/iterm2colors/termite/Tomorrow Night Blue b/termite/Tomorrow Night Blue similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Blue rename to termite/Tomorrow Night Blue diff --git a/old_work/iterm2colors/termite/Tomorrow Night Bright b/termite/Tomorrow Night Bright similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Bright rename to termite/Tomorrow Night Bright diff --git a/old_work/iterm2colors/termite/Tomorrow Night Eighties b/termite/Tomorrow Night Eighties similarity index 100% rename from old_work/iterm2colors/termite/Tomorrow Night Eighties rename to termite/Tomorrow Night Eighties diff --git a/old_work/iterm2colors/termite/ToyChest b/termite/ToyChest similarity index 100% rename from old_work/iterm2colors/termite/ToyChest rename to termite/ToyChest diff --git a/old_work/iterm2colors/termite/Treehouse b/termite/Treehouse similarity index 100% rename from old_work/iterm2colors/termite/Treehouse rename to termite/Treehouse diff --git a/old_work/iterm2colors/termite/Twilight b/termite/Twilight similarity index 100% rename from old_work/iterm2colors/termite/Twilight rename to termite/Twilight diff --git a/old_work/iterm2colors/termite/Urple b/termite/Urple similarity index 100% rename from old_work/iterm2colors/termite/Urple rename to termite/Urple diff --git a/old_work/iterm2colors/termite/Vaughn b/termite/Vaughn similarity index 100% rename from old_work/iterm2colors/termite/Vaughn rename to termite/Vaughn diff --git a/old_work/iterm2colors/termite/VibrantInk b/termite/VibrantInk similarity index 100% rename from old_work/iterm2colors/termite/VibrantInk rename to termite/VibrantInk diff --git a/old_work/iterm2colors/termite/WarmNeon b/termite/WarmNeon similarity index 100% rename from old_work/iterm2colors/termite/WarmNeon rename to termite/WarmNeon diff --git a/old_work/iterm2colors/termite/Wez b/termite/Wez similarity index 100% rename from old_work/iterm2colors/termite/Wez rename to termite/Wez diff --git a/old_work/iterm2colors/termite/WildCherry b/termite/WildCherry similarity index 100% rename from old_work/iterm2colors/termite/WildCherry rename to termite/WildCherry diff --git a/old_work/iterm2colors/termite/Wombat b/termite/Wombat similarity index 100% rename from old_work/iterm2colors/termite/Wombat rename to termite/Wombat diff --git a/old_work/iterm2colors/termite/Wryan b/termite/Wryan similarity index 100% rename from old_work/iterm2colors/termite/Wryan rename to termite/Wryan diff --git a/old_work/iterm2colors/termite/Zenburn b/termite/Zenburn similarity index 100% rename from old_work/iterm2colors/termite/Zenburn rename to termite/Zenburn diff --git a/old_work/iterm2colors/termite/idleToes b/termite/idleToes similarity index 100% rename from old_work/iterm2colors/termite/idleToes rename to termite/idleToes diff --git a/old_work/iterm2colors/tools/genMD.py b/tools/genMD.py similarity index 100% rename from old_work/iterm2colors/tools/genMD.py rename to tools/genMD.py diff --git a/old_work/iterm2colors/tools/iterm2terminal.swift b/tools/iterm2terminal.swift similarity index 100% rename from old_work/iterm2colors/tools/iterm2terminal.swift rename to tools/iterm2terminal.swift diff --git a/old_work/iterm2colors/tools/iterm2xrdb b/tools/iterm2xrdb similarity index 100% rename from old_work/iterm2colors/tools/iterm2xrdb rename to tools/iterm2xrdb diff --git a/old_work/iterm2colors/tools/preview.rb b/tools/preview.rb similarity index 100% rename from old_work/iterm2colors/tools/preview.rb rename to tools/preview.rb diff --git a/old_work/iterm2colors/tools/screenshotTable.sh b/tools/screenshotTable.sh similarity index 100% rename from old_work/iterm2colors/tools/screenshotTable.sh rename to tools/screenshotTable.sh diff --git a/old_work/iterm2colors/tools/update_all.py b/tools/update_all.py similarity index 100% rename from old_work/iterm2colors/tools/update_all.py rename to tools/update_all.py diff --git a/old_work/iterm2colors/tools/xrdb2Xresources.py b/tools/xrdb2Xresources.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2Xresources.py rename to tools/xrdb2Xresources.py diff --git a/old_work/iterm2colors/tools/xrdb2hterm b/tools/xrdb2hterm similarity index 100% rename from old_work/iterm2colors/tools/xrdb2hterm rename to tools/xrdb2hterm diff --git a/old_work/iterm2colors/tools/xrdb2konsole.py b/tools/xrdb2konsole.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2konsole.py rename to tools/xrdb2konsole.py diff --git a/old_work/iterm2colors/tools/xrdb2putty.py b/tools/xrdb2putty.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2putty.py rename to tools/xrdb2putty.py diff --git a/old_work/iterm2colors/tools/xrdb2terminator.py b/tools/xrdb2terminator.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2terminator.py rename to tools/xrdb2terminator.py diff --git a/old_work/iterm2colors/tools/xrdb2xfce_terminal.py b/tools/xrdb2xfce_terminal.py similarity index 100% rename from old_work/iterm2colors/tools/xrdb2xfce_terminal.py rename to tools/xrdb2xfce_terminal.py 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/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme b/xfce4terminal/colorschemes/3024 Day.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/3024 Day.theme rename to xfce4terminal/colorschemes/3024 Day.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme b/xfce4terminal/colorschemes/3024 Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/3024 Night.theme rename to xfce4terminal/colorschemes/3024 Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme b/xfce4terminal/colorschemes/AdventureTime.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AdventureTime.theme rename to xfce4terminal/colorschemes/AdventureTime.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme b/xfce4terminal/colorschemes/Afterglow.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Afterglow.theme rename to xfce4terminal/colorschemes/Afterglow.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme b/xfce4terminal/colorschemes/AlienBlood.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AlienBlood.theme rename to xfce4terminal/colorschemes/AlienBlood.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme b/xfce4terminal/colorschemes/Argonaut.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Argonaut.theme rename to xfce4terminal/colorschemes/Argonaut.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme b/xfce4terminal/colorschemes/Arthur.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Arthur.theme rename to xfce4terminal/colorschemes/Arthur.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme b/xfce4terminal/colorschemes/AtelierSulphurpool.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AtelierSulphurpool.theme rename to xfce4terminal/colorschemes/AtelierSulphurpool.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme b/xfce4terminal/colorschemes/Atom.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Atom.theme rename to xfce4terminal/colorschemes/Atom.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme b/xfce4terminal/colorschemes/AtomOneLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/AtomOneLight.theme rename to xfce4terminal/colorschemes/AtomOneLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme b/xfce4terminal/colorschemes/Batman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Batman.theme rename to xfce4terminal/colorschemes/Batman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme b/xfce4terminal/colorschemes/Belafonte Day.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Day.theme rename to xfce4terminal/colorschemes/Belafonte Day.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme b/xfce4terminal/colorschemes/Belafonte Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Belafonte Night.theme rename to xfce4terminal/colorschemes/Belafonte Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme b/xfce4terminal/colorschemes/BirdsOfParadise.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/BirdsOfParadise.theme rename to xfce4terminal/colorschemes/BirdsOfParadise.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme b/xfce4terminal/colorschemes/Blazer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Blazer.theme rename to xfce4terminal/colorschemes/Blazer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme b/xfce4terminal/colorschemes/Borland.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Borland.theme rename to xfce4terminal/colorschemes/Borland.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme b/xfce4terminal/colorschemes/Bright Lights.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Bright Lights.theme rename to xfce4terminal/colorschemes/Bright Lights.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme b/xfce4terminal/colorschemes/Broadcast.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Broadcast.theme rename to xfce4terminal/colorschemes/Broadcast.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme b/xfce4terminal/colorschemes/Brogrammer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Brogrammer.theme rename to xfce4terminal/colorschemes/Brogrammer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme b/xfce4terminal/colorschemes/C64.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/C64.theme rename to xfce4terminal/colorschemes/C64.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme b/xfce4terminal/colorschemes/CLRS.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/CLRS.theme rename to xfce4terminal/colorschemes/CLRS.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme b/xfce4terminal/colorschemes/Chalk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Chalk.theme rename to xfce4terminal/colorschemes/Chalk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme b/xfce4terminal/colorschemes/Chalkboard.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Chalkboard.theme rename to xfce4terminal/colorschemes/Chalkboard.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme b/xfce4terminal/colorschemes/Ciapre.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ciapre.theme rename to xfce4terminal/colorschemes/Ciapre.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme b/xfce4terminal/colorschemes/Cobalt Neon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt Neon.theme rename to xfce4terminal/colorschemes/Cobalt Neon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme b/xfce4terminal/colorschemes/Cobalt2.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Cobalt2.theme rename to xfce4terminal/colorschemes/Cobalt2.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme b/xfce4terminal/colorschemes/CrayonPonyFish.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/CrayonPonyFish.theme rename to xfce4terminal/colorschemes/CrayonPonyFish.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme b/xfce4terminal/colorschemes/Dark Pastel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Dark Pastel.theme rename to xfce4terminal/colorschemes/Dark Pastel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme b/xfce4terminal/colorschemes/Darkside.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Darkside.theme rename to xfce4terminal/colorschemes/Darkside.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme b/xfce4terminal/colorschemes/Desert.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Desert.theme rename to xfce4terminal/colorschemes/Desert.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme b/xfce4terminal/colorschemes/DimmedMonokai.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/DimmedMonokai.theme rename to xfce4terminal/colorschemes/DimmedMonokai.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme b/xfce4terminal/colorschemes/DotGov.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/DotGov.theme rename to xfce4terminal/colorschemes/DotGov.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme b/xfce4terminal/colorschemes/Dracula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Dracula.theme rename to xfce4terminal/colorschemes/Dracula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme b/xfce4terminal/colorschemes/Duotone Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Duotone Dark.theme rename to xfce4terminal/colorschemes/Duotone Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme b/xfce4terminal/colorschemes/ENCOM.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ENCOM.theme rename to xfce4terminal/colorschemes/ENCOM.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme b/xfce4terminal/colorschemes/Earthsong.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Earthsong.theme rename to xfce4terminal/colorschemes/Earthsong.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme b/xfce4terminal/colorschemes/Elemental.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Elemental.theme rename to xfce4terminal/colorschemes/Elemental.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme b/xfce4terminal/colorschemes/Elementary.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Elementary.theme rename to xfce4terminal/colorschemes/Elementary.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme b/xfce4terminal/colorschemes/Espresso Libre.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Espresso Libre.theme rename to xfce4terminal/colorschemes/Espresso Libre.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme b/xfce4terminal/colorschemes/Espresso.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Espresso.theme rename to xfce4terminal/colorschemes/Espresso.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme b/xfce4terminal/colorschemes/Fideloper.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Fideloper.theme rename to xfce4terminal/colorschemes/Fideloper.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme b/xfce4terminal/colorschemes/FirefoxDev.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FirefoxDev.theme rename to xfce4terminal/colorschemes/FirefoxDev.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme b/xfce4terminal/colorschemes/Firewatch.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Firewatch.theme rename to xfce4terminal/colorschemes/Firewatch.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme b/xfce4terminal/colorschemes/FishTank.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FishTank.theme rename to xfce4terminal/colorschemes/FishTank.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme b/xfce4terminal/colorschemes/Flat.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Flat.theme rename to xfce4terminal/colorschemes/Flat.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme b/xfce4terminal/colorschemes/Flatland.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Flatland.theme rename to xfce4terminal/colorschemes/Flatland.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme b/xfce4terminal/colorschemes/Floraverse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Floraverse.theme rename to xfce4terminal/colorschemes/Floraverse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme b/xfce4terminal/colorschemes/ForestBlue.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ForestBlue.theme rename to xfce4terminal/colorschemes/ForestBlue.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme b/xfce4terminal/colorschemes/FrontEndDelight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FrontEndDelight.theme rename to xfce4terminal/colorschemes/FrontEndDelight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme b/xfce4terminal/colorschemes/FunForrest.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/FunForrest.theme rename to xfce4terminal/colorschemes/FunForrest.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme b/xfce4terminal/colorschemes/Galaxy.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Galaxy.theme rename to xfce4terminal/colorschemes/Galaxy.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme b/xfce4terminal/colorschemes/Github.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Github.theme rename to xfce4terminal/colorschemes/Github.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme b/xfce4terminal/colorschemes/Glacier.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Glacier.theme rename to xfce4terminal/colorschemes/Glacier.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme b/xfce4terminal/colorschemes/Grape.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Grape.theme rename to xfce4terminal/colorschemes/Grape.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme b/xfce4terminal/colorschemes/Grass.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Grass.theme rename to xfce4terminal/colorschemes/Grass.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme b/xfce4terminal/colorschemes/Gruvbox Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Gruvbox Dark.theme rename to xfce4terminal/colorschemes/Gruvbox Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme b/xfce4terminal/colorschemes/Hardcore.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hardcore.theme rename to xfce4terminal/colorschemes/Hardcore.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme b/xfce4terminal/colorschemes/Harper.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Harper.theme rename to xfce4terminal/colorschemes/Harper.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme b/xfce4terminal/colorschemes/Highway.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Highway.theme rename to xfce4terminal/colorschemes/Highway.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme b/xfce4terminal/colorschemes/Hipster Green.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hipster Green.theme rename to xfce4terminal/colorschemes/Hipster Green.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme b/xfce4terminal/colorschemes/Homebrew.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Homebrew.theme rename to xfce4terminal/colorschemes/Homebrew.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme b/xfce4terminal/colorschemes/Hurtado.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hurtado.theme rename to xfce4terminal/colorschemes/Hurtado.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme b/xfce4terminal/colorschemes/Hybrid.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Hybrid.theme rename to xfce4terminal/colorschemes/Hybrid.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme b/xfce4terminal/colorschemes/IC_Green_PPL.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IC_Green_PPL.theme rename to xfce4terminal/colorschemes/IC_Green_PPL.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme b/xfce4terminal/colorschemes/IC_Orange_PPL.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IC_Orange_PPL.theme rename to xfce4terminal/colorschemes/IC_Orange_PPL.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme b/xfce4terminal/colorschemes/IR_Black.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/IR_Black.theme rename to xfce4terminal/colorschemes/IR_Black.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme b/xfce4terminal/colorschemes/Jackie Brown.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Jackie Brown.theme rename to xfce4terminal/colorschemes/Jackie Brown.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme b/xfce4terminal/colorschemes/Japanesque.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Japanesque.theme rename to xfce4terminal/colorschemes/Japanesque.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme b/xfce4terminal/colorschemes/Jellybeans.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Jellybeans.theme rename to xfce4terminal/colorschemes/Jellybeans.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme b/xfce4terminal/colorschemes/JetBrains Darcula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/JetBrains Darcula.theme rename to xfce4terminal/colorschemes/JetBrains Darcula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme b/xfce4terminal/colorschemes/Kibble.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Kibble.theme rename to xfce4terminal/colorschemes/Kibble.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme b/xfce4terminal/colorschemes/Later This Evening.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Later This Evening.theme rename to xfce4terminal/colorschemes/Later This Evening.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme b/xfce4terminal/colorschemes/Lavandula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Lavandula.theme rename to xfce4terminal/colorschemes/Lavandula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme b/xfce4terminal/colorschemes/LiquidCarbon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbon.theme rename to xfce4terminal/colorschemes/LiquidCarbon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme b/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparent.theme rename to xfce4terminal/colorschemes/LiquidCarbonTransparent.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme b/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme rename to xfce4terminal/colorschemes/LiquidCarbonTransparentInverse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme b/xfce4terminal/colorschemes/Man Page.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Man Page.theme rename to xfce4terminal/colorschemes/Man Page.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme b/xfce4terminal/colorschemes/Material.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Material.theme rename to xfce4terminal/colorschemes/Material.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme b/xfce4terminal/colorschemes/MaterialDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/MaterialDark.theme rename to xfce4terminal/colorschemes/MaterialDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme b/xfce4terminal/colorschemes/Mathias.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Mathias.theme rename to xfce4terminal/colorschemes/Mathias.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme b/xfce4terminal/colorschemes/Medallion.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Medallion.theme rename to xfce4terminal/colorschemes/Medallion.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme b/xfce4terminal/colorschemes/Misterioso.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Misterioso.theme rename to xfce4terminal/colorschemes/Misterioso.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme b/xfce4terminal/colorschemes/Molokai.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Molokai.theme rename to xfce4terminal/colorschemes/Molokai.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme b/xfce4terminal/colorschemes/MonaLisa.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/MonaLisa.theme rename to xfce4terminal/colorschemes/MonaLisa.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme b/xfce4terminal/colorschemes/Monokai Soda.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Soda.theme rename to xfce4terminal/colorschemes/Monokai Soda.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme b/xfce4terminal/colorschemes/Monokai Vivid.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Monokai Vivid.theme rename to xfce4terminal/colorschemes/Monokai Vivid.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme b/xfce4terminal/colorschemes/N0tch2k.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/N0tch2k.theme rename to xfce4terminal/colorschemes/N0tch2k.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme b/xfce4terminal/colorschemes/Neopolitan.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Neopolitan.theme rename to xfce4terminal/colorschemes/Neopolitan.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme b/xfce4terminal/colorschemes/Neutron.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Neutron.theme rename to xfce4terminal/colorschemes/Neutron.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme b/xfce4terminal/colorschemes/NightLion v1.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v1.theme rename to xfce4terminal/colorschemes/NightLion v1.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme b/xfce4terminal/colorschemes/NightLion v2.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/NightLion v2.theme rename to xfce4terminal/colorschemes/NightLion v2.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme b/xfce4terminal/colorschemes/Novel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Novel.theme rename to xfce4terminal/colorschemes/Novel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme b/xfce4terminal/colorschemes/Obsidian.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Obsidian.theme rename to xfce4terminal/colorschemes/Obsidian.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme b/xfce4terminal/colorschemes/Ocean.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ocean.theme rename to xfce4terminal/colorschemes/Ocean.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme b/xfce4terminal/colorschemes/OceanicMaterial.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OceanicMaterial.theme rename to xfce4terminal/colorschemes/OceanicMaterial.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme b/xfce4terminal/colorschemes/Ollie.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ollie.theme rename to xfce4terminal/colorschemes/Ollie.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme b/xfce4terminal/colorschemes/OneHalfDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfDark.theme rename to xfce4terminal/colorschemes/OneHalfDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme b/xfce4terminal/colorschemes/OneHalfLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/OneHalfLight.theme rename to xfce4terminal/colorschemes/OneHalfLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme b/xfce4terminal/colorschemes/Pandora.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pandora.theme rename to xfce4terminal/colorschemes/Pandora.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme b/xfce4terminal/colorschemes/Paraiso Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Paraiso Dark.theme rename to xfce4terminal/colorschemes/Paraiso Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme b/xfce4terminal/colorschemes/Parasio Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Parasio Dark.theme rename to xfce4terminal/colorschemes/Parasio Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme b/xfce4terminal/colorschemes/PaulMillr.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PaulMillr.theme rename to xfce4terminal/colorschemes/PaulMillr.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme b/xfce4terminal/colorschemes/PencilDark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PencilDark.theme rename to xfce4terminal/colorschemes/PencilDark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme b/xfce4terminal/colorschemes/PencilLight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/PencilLight.theme rename to xfce4terminal/colorschemes/PencilLight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme b/xfce4terminal/colorschemes/Piatto Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Piatto Light.theme rename to xfce4terminal/colorschemes/Piatto Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme b/xfce4terminal/colorschemes/Pnevma.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pnevma.theme rename to xfce4terminal/colorschemes/Pnevma.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme b/xfce4terminal/colorschemes/Pro.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Pro.theme rename to xfce4terminal/colorschemes/Pro.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme b/xfce4terminal/colorschemes/Red Alert.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Red Alert.theme rename to xfce4terminal/colorschemes/Red Alert.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme b/xfce4terminal/colorschemes/Red Sands.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Red Sands.theme rename to xfce4terminal/colorschemes/Red Sands.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme b/xfce4terminal/colorschemes/Rippedcasts.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Rippedcasts.theme rename to xfce4terminal/colorschemes/Rippedcasts.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme b/xfce4terminal/colorschemes/Royal.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Royal.theme rename to xfce4terminal/colorschemes/Royal.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme b/xfce4terminal/colorschemes/Ryuuko.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ryuuko.theme rename to xfce4terminal/colorschemes/Ryuuko.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme b/xfce4terminal/colorschemes/SeaShells.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SeaShells.theme rename to xfce4terminal/colorschemes/SeaShells.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme b/xfce4terminal/colorschemes/Seafoam Pastel.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Seafoam Pastel.theme rename to xfce4terminal/colorschemes/Seafoam Pastel.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme b/xfce4terminal/colorschemes/Seti.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Seti.theme rename to xfce4terminal/colorschemes/Seti.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme b/xfce4terminal/colorschemes/Shaman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Shaman.theme rename to xfce4terminal/colorschemes/Shaman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme b/xfce4terminal/colorschemes/Slate.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Slate.theme rename to xfce4terminal/colorschemes/Slate.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme b/xfce4terminal/colorschemes/Smyck.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Smyck.theme rename to xfce4terminal/colorschemes/Smyck.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme b/xfce4terminal/colorschemes/SoftServer.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SoftServer.theme rename to xfce4terminal/colorschemes/SoftServer.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme b/xfce4terminal/colorschemes/Solarized Darcula.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Darcula.theme rename to xfce4terminal/colorschemes/Solarized Darcula.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme b/xfce4terminal/colorschemes/Solarized Dark - Patched.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark - Patched.theme rename to xfce4terminal/colorschemes/Solarized Dark - Patched.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme b/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme rename to xfce4terminal/colorschemes/Solarized Dark Higher Contrast.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme b/xfce4terminal/colorschemes/Solarized Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Dark.theme rename to xfce4terminal/colorschemes/Solarized Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme b/xfce4terminal/colorschemes/Solarized Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Solarized Light.theme rename to xfce4terminal/colorschemes/Solarized Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme b/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme rename to xfce4terminal/colorschemes/SpaceGray Eighties Dull.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme b/xfce4terminal/colorschemes/SpaceGray Eighties.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray Eighties.theme rename to xfce4terminal/colorschemes/SpaceGray Eighties.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme b/xfce4terminal/colorschemes/SpaceGray.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/SpaceGray.theme rename to xfce4terminal/colorschemes/SpaceGray.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme b/xfce4terminal/colorschemes/Spacedust.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spacedust.theme rename to xfce4terminal/colorschemes/Spacedust.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme b/xfce4terminal/colorschemes/Spiderman.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spiderman.theme rename to xfce4terminal/colorschemes/Spiderman.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme b/xfce4terminal/colorschemes/Spring.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Spring.theme rename to xfce4terminal/colorschemes/Spring.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme b/xfce4terminal/colorschemes/Square.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Square.theme rename to xfce4terminal/colorschemes/Square.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme b/xfce4terminal/colorschemes/Sundried.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Sundried.theme rename to xfce4terminal/colorschemes/Sundried.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme b/xfce4terminal/colorschemes/Symfonic.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Symfonic.theme rename to xfce4terminal/colorschemes/Symfonic.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme b/xfce4terminal/colorschemes/Teerb.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Teerb.theme rename to xfce4terminal/colorschemes/Teerb.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme b/xfce4terminal/colorschemes/Terminal Basic.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Terminal Basic.theme rename to xfce4terminal/colorschemes/Terminal Basic.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme b/xfce4terminal/colorschemes/Thayer Bright.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Thayer Bright.theme rename to xfce4terminal/colorschemes/Thayer Bright.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme b/xfce4terminal/colorschemes/The Hulk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/The Hulk.theme rename to xfce4terminal/colorschemes/The Hulk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme b/xfce4terminal/colorschemes/Tomorrow Night Blue.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Blue.theme rename to xfce4terminal/colorschemes/Tomorrow Night Blue.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme b/xfce4terminal/colorschemes/Tomorrow Night Bright.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Bright.theme rename to xfce4terminal/colorschemes/Tomorrow Night Bright.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme b/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night Eighties.theme rename to xfce4terminal/colorschemes/Tomorrow Night Eighties.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme b/xfce4terminal/colorschemes/Tomorrow Night.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow Night.theme rename to xfce4terminal/colorschemes/Tomorrow Night.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme b/xfce4terminal/colorschemes/Tomorrow.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Tomorrow.theme rename to xfce4terminal/colorschemes/Tomorrow.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme b/xfce4terminal/colorschemes/ToyChest.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ToyChest.theme rename to xfce4terminal/colorschemes/ToyChest.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme b/xfce4terminal/colorschemes/Treehouse.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Treehouse.theme rename to xfce4terminal/colorschemes/Treehouse.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme b/xfce4terminal/colorschemes/Twilight.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Twilight.theme rename to xfce4terminal/colorschemes/Twilight.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme b/xfce4terminal/colorschemes/Ubuntu.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Ubuntu.theme rename to xfce4terminal/colorschemes/Ubuntu.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme b/xfce4terminal/colorschemes/UnderTheSea.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/UnderTheSea.theme rename to xfce4terminal/colorschemes/UnderTheSea.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme b/xfce4terminal/colorschemes/Urple.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Urple.theme rename to xfce4terminal/colorschemes/Urple.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme b/xfce4terminal/colorschemes/Vaughn.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Vaughn.theme rename to xfce4terminal/colorschemes/Vaughn.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme b/xfce4terminal/colorschemes/VibrantInk.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/VibrantInk.theme rename to xfce4terminal/colorschemes/VibrantInk.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme b/xfce4terminal/colorschemes/Violet Dark.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Violet Dark.theme rename to xfce4terminal/colorschemes/Violet Dark.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme b/xfce4terminal/colorschemes/Violet Light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Violet Light.theme rename to xfce4terminal/colorschemes/Violet Light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme b/xfce4terminal/colorschemes/WarmNeon.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/WarmNeon.theme rename to xfce4terminal/colorschemes/WarmNeon.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme b/xfce4terminal/colorschemes/Wez.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wez.theme rename to xfce4terminal/colorschemes/Wez.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme b/xfce4terminal/colorschemes/WildCherry.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/WildCherry.theme rename to xfce4terminal/colorschemes/WildCherry.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme b/xfce4terminal/colorschemes/Wombat.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wombat.theme rename to xfce4terminal/colorschemes/Wombat.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme b/xfce4terminal/colorschemes/Wryan.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Wryan.theme rename to xfce4terminal/colorschemes/Wryan.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme b/xfce4terminal/colorschemes/Zenburn.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/Zenburn.theme rename to xfce4terminal/colorschemes/Zenburn.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme b/xfce4terminal/colorschemes/ayu.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ayu.theme rename to xfce4terminal/colorschemes/ayu.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme b/xfce4terminal/colorschemes/ayu_light.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/ayu_light.theme rename to xfce4terminal/colorschemes/ayu_light.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme b/xfce4terminal/colorschemes/deep.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/deep.theme rename to xfce4terminal/colorschemes/deep.theme diff --git a/old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme b/xfce4terminal/colorschemes/idleToes.theme similarity index 100% rename from old_work/iterm2colors/xfce4terminal/colorschemes/idleToes.theme rename to xfce4terminal/colorschemes/idleToes.theme diff --git a/old_work/iterm2colors/xrdb/3024 Day.xrdb b/xrdb/3024 Day.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/3024 Day.xrdb rename to xrdb/3024 Day.xrdb diff --git a/old_work/iterm2colors/xrdb/3024 Night.xrdb b/xrdb/3024 Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/3024 Night.xrdb rename to xrdb/3024 Night.xrdb diff --git a/old_work/iterm2colors/xrdb/AdventureTime.xrdb b/xrdb/AdventureTime.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AdventureTime.xrdb rename to xrdb/AdventureTime.xrdb diff --git a/old_work/iterm2colors/xrdb/Afterglow.xrdb b/xrdb/Afterglow.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Afterglow.xrdb rename to xrdb/Afterglow.xrdb diff --git a/old_work/iterm2colors/xrdb/AlienBlood.xrdb b/xrdb/AlienBlood.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AlienBlood.xrdb rename to xrdb/AlienBlood.xrdb diff --git a/old_work/iterm2colors/xrdb/Argonaut.xrdb b/xrdb/Argonaut.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Argonaut.xrdb rename to xrdb/Argonaut.xrdb diff --git a/old_work/iterm2colors/xrdb/Arthur.xrdb b/xrdb/Arthur.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Arthur.xrdb rename to xrdb/Arthur.xrdb diff --git a/old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb b/xrdb/AtelierSulphurpool.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AtelierSulphurpool.xrdb rename to xrdb/AtelierSulphurpool.xrdb diff --git a/old_work/iterm2colors/xrdb/Atom.xrdb b/xrdb/Atom.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Atom.xrdb rename to xrdb/Atom.xrdb diff --git a/old_work/iterm2colors/xrdb/AtomOneLight.xrdb b/xrdb/AtomOneLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/AtomOneLight.xrdb rename to xrdb/AtomOneLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Batman.xrdb b/xrdb/Batman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Batman.xrdb rename to xrdb/Batman.xrdb diff --git a/old_work/iterm2colors/xrdb/Belafonte Day.xrdb b/xrdb/Belafonte Day.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Belafonte Day.xrdb rename to xrdb/Belafonte Day.xrdb diff --git a/old_work/iterm2colors/xrdb/Belafonte Night.xrdb b/xrdb/Belafonte Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Belafonte Night.xrdb rename to xrdb/Belafonte Night.xrdb diff --git a/old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb b/xrdb/BirdsOfParadise.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/BirdsOfParadise.xrdb rename to xrdb/BirdsOfParadise.xrdb diff --git a/old_work/iterm2colors/xrdb/Blazer.xrdb b/xrdb/Blazer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Blazer.xrdb rename to xrdb/Blazer.xrdb diff --git a/old_work/iterm2colors/xrdb/Borland.xrdb b/xrdb/Borland.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Borland.xrdb rename to xrdb/Borland.xrdb diff --git a/old_work/iterm2colors/xrdb/Bright Lights.xrdb b/xrdb/Bright Lights.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Bright Lights.xrdb rename to xrdb/Bright Lights.xrdb diff --git a/old_work/iterm2colors/xrdb/Broadcast.xrdb b/xrdb/Broadcast.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Broadcast.xrdb rename to xrdb/Broadcast.xrdb diff --git a/old_work/iterm2colors/xrdb/Brogrammer.xrdb b/xrdb/Brogrammer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Brogrammer.xrdb rename to xrdb/Brogrammer.xrdb diff --git a/old_work/iterm2colors/xrdb/C64.xrdb b/xrdb/C64.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/C64.xrdb rename to xrdb/C64.xrdb diff --git a/old_work/iterm2colors/xrdb/CLRS.xrdb b/xrdb/CLRS.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/CLRS.xrdb rename to xrdb/CLRS.xrdb diff --git a/old_work/iterm2colors/xrdb/Chalk.xrdb b/xrdb/Chalk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Chalk.xrdb rename to xrdb/Chalk.xrdb diff --git a/old_work/iterm2colors/xrdb/Chalkboard.xrdb b/xrdb/Chalkboard.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Chalkboard.xrdb rename to xrdb/Chalkboard.xrdb diff --git a/old_work/iterm2colors/xrdb/Ciapre.xrdb b/xrdb/Ciapre.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ciapre.xrdb rename to xrdb/Ciapre.xrdb diff --git a/old_work/iterm2colors/xrdb/Cobalt Neon.xrdb b/xrdb/Cobalt Neon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Cobalt Neon.xrdb rename to xrdb/Cobalt Neon.xrdb diff --git a/old_work/iterm2colors/xrdb/Cobalt2.xrdb b/xrdb/Cobalt2.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Cobalt2.xrdb rename to xrdb/Cobalt2.xrdb diff --git a/old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb b/xrdb/CrayonPonyFish.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/CrayonPonyFish.xrdb rename to xrdb/CrayonPonyFish.xrdb diff --git a/old_work/iterm2colors/xrdb/Dark Pastel.xrdb b/xrdb/Dark Pastel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Dark Pastel.xrdb rename to xrdb/Dark Pastel.xrdb diff --git a/old_work/iterm2colors/xrdb/Darkside.xrdb b/xrdb/Darkside.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Darkside.xrdb rename to xrdb/Darkside.xrdb diff --git a/old_work/iterm2colors/xrdb/Desert.xrdb b/xrdb/Desert.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Desert.xrdb rename to xrdb/Desert.xrdb diff --git a/old_work/iterm2colors/xrdb/DimmedMonokai.xrdb b/xrdb/DimmedMonokai.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/DimmedMonokai.xrdb rename to xrdb/DimmedMonokai.xrdb diff --git a/old_work/iterm2colors/xrdb/DotGov.xrdb b/xrdb/DotGov.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/DotGov.xrdb rename to xrdb/DotGov.xrdb diff --git a/old_work/iterm2colors/xrdb/Dracula.xrdb b/xrdb/Dracula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Dracula.xrdb rename to xrdb/Dracula.xrdb diff --git a/old_work/iterm2colors/xrdb/Duotone Dark.xrdb b/xrdb/Duotone Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Duotone Dark.xrdb rename to xrdb/Duotone Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/ENCOM.xrdb b/xrdb/ENCOM.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ENCOM.xrdb rename to xrdb/ENCOM.xrdb diff --git a/old_work/iterm2colors/xrdb/Earthsong.xrdb b/xrdb/Earthsong.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Earthsong.xrdb rename to xrdb/Earthsong.xrdb diff --git a/old_work/iterm2colors/xrdb/Elemental.xrdb b/xrdb/Elemental.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Elemental.xrdb rename to xrdb/Elemental.xrdb diff --git a/old_work/iterm2colors/xrdb/Elementary.xrdb b/xrdb/Elementary.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Elementary.xrdb rename to xrdb/Elementary.xrdb diff --git a/old_work/iterm2colors/xrdb/Espresso Libre.xrdb b/xrdb/Espresso Libre.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Espresso Libre.xrdb rename to xrdb/Espresso Libre.xrdb diff --git a/old_work/iterm2colors/xrdb/Espresso.xrdb b/xrdb/Espresso.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Espresso.xrdb rename to xrdb/Espresso.xrdb diff --git a/old_work/iterm2colors/xrdb/Fideloper.xrdb b/xrdb/Fideloper.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Fideloper.xrdb rename to xrdb/Fideloper.xrdb diff --git a/old_work/iterm2colors/xrdb/FirefoxDev.xrdb b/xrdb/FirefoxDev.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FirefoxDev.xrdb rename to xrdb/FirefoxDev.xrdb diff --git a/old_work/iterm2colors/xrdb/Firewatch.xrdb b/xrdb/Firewatch.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Firewatch.xrdb rename to xrdb/Firewatch.xrdb diff --git a/old_work/iterm2colors/xrdb/FishTank.xrdb b/xrdb/FishTank.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FishTank.xrdb rename to xrdb/FishTank.xrdb diff --git a/old_work/iterm2colors/xrdb/Flat.xrdb b/xrdb/Flat.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Flat.xrdb rename to xrdb/Flat.xrdb diff --git a/old_work/iterm2colors/xrdb/Flatland.xrdb b/xrdb/Flatland.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Flatland.xrdb rename to xrdb/Flatland.xrdb diff --git a/old_work/iterm2colors/xrdb/Floraverse.xrdb b/xrdb/Floraverse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Floraverse.xrdb rename to xrdb/Floraverse.xrdb diff --git a/old_work/iterm2colors/xrdb/ForestBlue.xrdb b/xrdb/ForestBlue.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ForestBlue.xrdb rename to xrdb/ForestBlue.xrdb diff --git a/old_work/iterm2colors/xrdb/FrontEndDelight.xrdb b/xrdb/FrontEndDelight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FrontEndDelight.xrdb rename to xrdb/FrontEndDelight.xrdb diff --git a/old_work/iterm2colors/xrdb/FunForrest.xrdb b/xrdb/FunForrest.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/FunForrest.xrdb rename to xrdb/FunForrest.xrdb diff --git a/old_work/iterm2colors/xrdb/Galaxy.xrdb b/xrdb/Galaxy.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Galaxy.xrdb rename to xrdb/Galaxy.xrdb diff --git a/old_work/iterm2colors/xrdb/Github.xrdb b/xrdb/Github.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Github.xrdb rename to xrdb/Github.xrdb diff --git a/old_work/iterm2colors/xrdb/Glacier.xrdb b/xrdb/Glacier.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Glacier.xrdb rename to xrdb/Glacier.xrdb diff --git a/old_work/iterm2colors/xrdb/Grape.xrdb b/xrdb/Grape.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Grape.xrdb rename to xrdb/Grape.xrdb diff --git a/old_work/iterm2colors/xrdb/Grass.xrdb b/xrdb/Grass.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Grass.xrdb rename to xrdb/Grass.xrdb diff --git a/old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb b/xrdb/Gruvbox Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Gruvbox Dark.xrdb rename to xrdb/Gruvbox Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Hardcore.xrdb b/xrdb/Hardcore.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hardcore.xrdb rename to xrdb/Hardcore.xrdb diff --git a/old_work/iterm2colors/xrdb/Harper.xrdb b/xrdb/Harper.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Harper.xrdb rename to xrdb/Harper.xrdb diff --git a/old_work/iterm2colors/xrdb/Highway.xrdb b/xrdb/Highway.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Highway.xrdb rename to xrdb/Highway.xrdb diff --git a/old_work/iterm2colors/xrdb/Hipster Green.xrdb b/xrdb/Hipster Green.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hipster Green.xrdb rename to xrdb/Hipster Green.xrdb diff --git a/old_work/iterm2colors/xrdb/Homebrew.xrdb b/xrdb/Homebrew.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Homebrew.xrdb rename to xrdb/Homebrew.xrdb diff --git a/old_work/iterm2colors/xrdb/Hurtado.xrdb b/xrdb/Hurtado.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hurtado.xrdb rename to xrdb/Hurtado.xrdb diff --git a/old_work/iterm2colors/xrdb/Hybrid.xrdb b/xrdb/Hybrid.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Hybrid.xrdb rename to xrdb/Hybrid.xrdb diff --git a/old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb b/xrdb/IC_Green_PPL.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IC_Green_PPL.xrdb rename to xrdb/IC_Green_PPL.xrdb diff --git a/old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb b/xrdb/IC_Orange_PPL.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IC_Orange_PPL.xrdb rename to xrdb/IC_Orange_PPL.xrdb diff --git a/old_work/iterm2colors/xrdb/IR_Black.xrdb b/xrdb/IR_Black.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/IR_Black.xrdb rename to xrdb/IR_Black.xrdb diff --git a/old_work/iterm2colors/xrdb/Jackie Brown.xrdb b/xrdb/Jackie Brown.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Jackie Brown.xrdb rename to xrdb/Jackie Brown.xrdb diff --git a/old_work/iterm2colors/xrdb/Japanesque.xrdb b/xrdb/Japanesque.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Japanesque.xrdb rename to xrdb/Japanesque.xrdb diff --git a/old_work/iterm2colors/xrdb/Jellybeans.xrdb b/xrdb/Jellybeans.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Jellybeans.xrdb rename to xrdb/Jellybeans.xrdb diff --git a/old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb b/xrdb/JetBrains Darcula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/JetBrains Darcula.xrdb rename to xrdb/JetBrains Darcula.xrdb diff --git a/old_work/iterm2colors/xrdb/Kibble.xrdb b/xrdb/Kibble.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Kibble.xrdb rename to xrdb/Kibble.xrdb diff --git a/old_work/iterm2colors/xrdb/Later This Evening.xrdb b/xrdb/Later This Evening.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Later This Evening.xrdb rename to xrdb/Later This Evening.xrdb diff --git a/old_work/iterm2colors/xrdb/Lavandula.xrdb b/xrdb/Lavandula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Lavandula.xrdb rename to xrdb/Lavandula.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbon.xrdb b/xrdb/LiquidCarbon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbon.xrdb rename to xrdb/LiquidCarbon.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb b/xrdb/LiquidCarbonTransparent.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbonTransparent.xrdb rename to xrdb/LiquidCarbonTransparent.xrdb diff --git a/old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb b/xrdb/LiquidCarbonTransparentInverse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/LiquidCarbonTransparentInverse.xrdb rename to xrdb/LiquidCarbonTransparentInverse.xrdb diff --git a/old_work/iterm2colors/xrdb/Man Page.xrdb b/xrdb/Man Page.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Man Page.xrdb rename to xrdb/Man Page.xrdb diff --git a/old_work/iterm2colors/xrdb/Material.xrdb b/xrdb/Material.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Material.xrdb rename to xrdb/Material.xrdb diff --git a/old_work/iterm2colors/xrdb/MaterialDark.xrdb b/xrdb/MaterialDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/MaterialDark.xrdb rename to xrdb/MaterialDark.xrdb diff --git a/old_work/iterm2colors/xrdb/Mathias.xrdb b/xrdb/Mathias.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Mathias.xrdb rename to xrdb/Mathias.xrdb diff --git a/old_work/iterm2colors/xrdb/Medallion.xrdb b/xrdb/Medallion.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Medallion.xrdb rename to xrdb/Medallion.xrdb diff --git a/old_work/iterm2colors/xrdb/Misterioso.xrdb b/xrdb/Misterioso.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Misterioso.xrdb rename to xrdb/Misterioso.xrdb diff --git a/old_work/iterm2colors/xrdb/Molokai.xrdb b/xrdb/Molokai.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Molokai.xrdb rename to xrdb/Molokai.xrdb diff --git a/old_work/iterm2colors/xrdb/MonaLisa.xrdb b/xrdb/MonaLisa.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/MonaLisa.xrdb rename to xrdb/MonaLisa.xrdb diff --git a/old_work/iterm2colors/xrdb/Monokai Soda.xrdb b/xrdb/Monokai Soda.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Monokai Soda.xrdb rename to xrdb/Monokai Soda.xrdb diff --git a/old_work/iterm2colors/xrdb/Monokai Vivid.xrdb b/xrdb/Monokai Vivid.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Monokai Vivid.xrdb rename to xrdb/Monokai Vivid.xrdb diff --git a/old_work/iterm2colors/xrdb/N0tch2k.xrdb b/xrdb/N0tch2k.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/N0tch2k.xrdb rename to xrdb/N0tch2k.xrdb diff --git a/old_work/iterm2colors/xrdb/Neopolitan.xrdb b/xrdb/Neopolitan.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Neopolitan.xrdb rename to xrdb/Neopolitan.xrdb diff --git a/old_work/iterm2colors/xrdb/Neutron.xrdb b/xrdb/Neutron.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Neutron.xrdb rename to xrdb/Neutron.xrdb diff --git a/old_work/iterm2colors/xrdb/NightLion v1.xrdb b/xrdb/NightLion v1.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/NightLion v1.xrdb rename to xrdb/NightLion v1.xrdb diff --git a/old_work/iterm2colors/xrdb/NightLion v2.xrdb b/xrdb/NightLion v2.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/NightLion v2.xrdb rename to xrdb/NightLion v2.xrdb diff --git a/old_work/iterm2colors/xrdb/Novel.xrdb b/xrdb/Novel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Novel.xrdb rename to xrdb/Novel.xrdb diff --git a/old_work/iterm2colors/xrdb/Obsidian.xrdb b/xrdb/Obsidian.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Obsidian.xrdb rename to xrdb/Obsidian.xrdb diff --git a/old_work/iterm2colors/xrdb/Ocean.xrdb b/xrdb/Ocean.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ocean.xrdb rename to xrdb/Ocean.xrdb diff --git a/old_work/iterm2colors/xrdb/OceanicMaterial.xrdb b/xrdb/OceanicMaterial.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OceanicMaterial.xrdb rename to xrdb/OceanicMaterial.xrdb diff --git a/old_work/iterm2colors/xrdb/Ollie.xrdb b/xrdb/Ollie.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ollie.xrdb rename to xrdb/Ollie.xrdb diff --git a/old_work/iterm2colors/xrdb/OneHalfDark.xrdb b/xrdb/OneHalfDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OneHalfDark.xrdb rename to xrdb/OneHalfDark.xrdb diff --git a/old_work/iterm2colors/xrdb/OneHalfLight.xrdb b/xrdb/OneHalfLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/OneHalfLight.xrdb rename to xrdb/OneHalfLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Pandora.xrdb b/xrdb/Pandora.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pandora.xrdb rename to xrdb/Pandora.xrdb diff --git a/old_work/iterm2colors/xrdb/Paraiso Dark.xrdb b/xrdb/Paraiso Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Paraiso Dark.xrdb rename to xrdb/Paraiso Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Parasio Dark.xrdb b/xrdb/Parasio Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Parasio Dark.xrdb rename to xrdb/Parasio Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/PaulMillr.xrdb b/xrdb/PaulMillr.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PaulMillr.xrdb rename to xrdb/PaulMillr.xrdb diff --git a/old_work/iterm2colors/xrdb/PencilDark.xrdb b/xrdb/PencilDark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PencilDark.xrdb rename to xrdb/PencilDark.xrdb diff --git a/old_work/iterm2colors/xrdb/PencilLight.xrdb b/xrdb/PencilLight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/PencilLight.xrdb rename to xrdb/PencilLight.xrdb diff --git a/old_work/iterm2colors/xrdb/Piatto Light.xrdb b/xrdb/Piatto Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Piatto Light.xrdb rename to xrdb/Piatto Light.xrdb diff --git a/old_work/iterm2colors/xrdb/Pnevma.xrdb b/xrdb/Pnevma.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pnevma.xrdb rename to xrdb/Pnevma.xrdb diff --git a/old_work/iterm2colors/xrdb/Pro.xrdb b/xrdb/Pro.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Pro.xrdb rename to xrdb/Pro.xrdb diff --git a/old_work/iterm2colors/xrdb/Red Alert.xrdb b/xrdb/Red Alert.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Red Alert.xrdb rename to xrdb/Red Alert.xrdb diff --git a/old_work/iterm2colors/xrdb/Red Sands.xrdb b/xrdb/Red Sands.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Red Sands.xrdb rename to xrdb/Red Sands.xrdb diff --git a/old_work/iterm2colors/xrdb/Rippedcasts.xrdb b/xrdb/Rippedcasts.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Rippedcasts.xrdb rename to xrdb/Rippedcasts.xrdb diff --git a/old_work/iterm2colors/xrdb/Royal.xrdb b/xrdb/Royal.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Royal.xrdb rename to xrdb/Royal.xrdb diff --git a/old_work/iterm2colors/xrdb/Ryuuko.xrdb b/xrdb/Ryuuko.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ryuuko.xrdb rename to xrdb/Ryuuko.xrdb diff --git a/old_work/iterm2colors/xrdb/SeaShells.xrdb b/xrdb/SeaShells.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SeaShells.xrdb rename to xrdb/SeaShells.xrdb diff --git a/old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb b/xrdb/Seafoam Pastel.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Seafoam Pastel.xrdb rename to xrdb/Seafoam Pastel.xrdb diff --git a/old_work/iterm2colors/xrdb/Seti.xrdb b/xrdb/Seti.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Seti.xrdb rename to xrdb/Seti.xrdb diff --git a/old_work/iterm2colors/xrdb/Shaman.xrdb b/xrdb/Shaman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Shaman.xrdb rename to xrdb/Shaman.xrdb diff --git a/old_work/iterm2colors/xrdb/Slate.xrdb b/xrdb/Slate.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Slate.xrdb rename to xrdb/Slate.xrdb diff --git a/old_work/iterm2colors/xrdb/Smyck.xrdb b/xrdb/Smyck.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Smyck.xrdb rename to xrdb/Smyck.xrdb diff --git a/old_work/iterm2colors/xrdb/SoftServer.xrdb b/xrdb/SoftServer.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SoftServer.xrdb rename to xrdb/SoftServer.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Darcula.xrdb b/xrdb/Solarized Darcula.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Darcula.xrdb rename to xrdb/Solarized Darcula.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb b/xrdb/Solarized Dark - Patched.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark - Patched.xrdb rename to xrdb/Solarized Dark - Patched.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb b/xrdb/Solarized Dark Higher Contrast.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark Higher Contrast.xrdb rename to xrdb/Solarized Dark Higher Contrast.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Dark.xrdb b/xrdb/Solarized Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Dark.xrdb rename to xrdb/Solarized Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Solarized Light.xrdb b/xrdb/Solarized Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Solarized Light.xrdb rename to xrdb/Solarized Light.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb b/xrdb/SpaceGray Eighties Dull.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray Eighties Dull.xrdb rename to xrdb/SpaceGray Eighties Dull.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb b/xrdb/SpaceGray Eighties.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray Eighties.xrdb rename to xrdb/SpaceGray Eighties.xrdb diff --git a/old_work/iterm2colors/xrdb/SpaceGray.xrdb b/xrdb/SpaceGray.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/SpaceGray.xrdb rename to xrdb/SpaceGray.xrdb diff --git a/old_work/iterm2colors/xrdb/Spacedust.xrdb b/xrdb/Spacedust.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spacedust.xrdb rename to xrdb/Spacedust.xrdb diff --git a/old_work/iterm2colors/xrdb/Spiderman.xrdb b/xrdb/Spiderman.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spiderman.xrdb rename to xrdb/Spiderman.xrdb diff --git a/old_work/iterm2colors/xrdb/Spring.xrdb b/xrdb/Spring.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Spring.xrdb rename to xrdb/Spring.xrdb diff --git a/old_work/iterm2colors/xrdb/Square.xrdb b/xrdb/Square.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Square.xrdb rename to xrdb/Square.xrdb diff --git a/old_work/iterm2colors/xrdb/Sundried.xrdb b/xrdb/Sundried.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Sundried.xrdb rename to xrdb/Sundried.xrdb diff --git a/old_work/iterm2colors/xrdb/Symfonic.xrdb b/xrdb/Symfonic.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Symfonic.xrdb rename to xrdb/Symfonic.xrdb diff --git a/old_work/iterm2colors/xrdb/Teerb.xrdb b/xrdb/Teerb.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Teerb.xrdb rename to xrdb/Teerb.xrdb diff --git a/old_work/iterm2colors/xrdb/Terminal Basic.xrdb b/xrdb/Terminal Basic.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Terminal Basic.xrdb rename to xrdb/Terminal Basic.xrdb diff --git a/old_work/iterm2colors/xrdb/Thayer Bright.xrdb b/xrdb/Thayer Bright.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Thayer Bright.xrdb rename to xrdb/Thayer Bright.xrdb diff --git a/old_work/iterm2colors/xrdb/The Hulk.xrdb b/xrdb/The Hulk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/The Hulk.xrdb rename to xrdb/The Hulk.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb b/xrdb/Tomorrow Night Blue.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Blue.xrdb rename to xrdb/Tomorrow Night Blue.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb b/xrdb/Tomorrow Night Bright.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Bright.xrdb rename to xrdb/Tomorrow Night Bright.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb b/xrdb/Tomorrow Night Eighties.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night Eighties.xrdb rename to xrdb/Tomorrow Night Eighties.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow Night.xrdb b/xrdb/Tomorrow Night.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow Night.xrdb rename to xrdb/Tomorrow Night.xrdb diff --git a/old_work/iterm2colors/xrdb/Tomorrow.xrdb b/xrdb/Tomorrow.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Tomorrow.xrdb rename to xrdb/Tomorrow.xrdb diff --git a/old_work/iterm2colors/xrdb/ToyChest.xrdb b/xrdb/ToyChest.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ToyChest.xrdb rename to xrdb/ToyChest.xrdb diff --git a/old_work/iterm2colors/xrdb/Treehouse.xrdb b/xrdb/Treehouse.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Treehouse.xrdb rename to xrdb/Treehouse.xrdb diff --git a/old_work/iterm2colors/xrdb/Twilight.xrdb b/xrdb/Twilight.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Twilight.xrdb rename to xrdb/Twilight.xrdb diff --git a/old_work/iterm2colors/xrdb/Ubuntu.xrdb b/xrdb/Ubuntu.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Ubuntu.xrdb rename to xrdb/Ubuntu.xrdb diff --git a/old_work/iterm2colors/xrdb/UnderTheSea.xrdb b/xrdb/UnderTheSea.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/UnderTheSea.xrdb rename to xrdb/UnderTheSea.xrdb diff --git a/old_work/iterm2colors/xrdb/Urple.xrdb b/xrdb/Urple.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Urple.xrdb rename to xrdb/Urple.xrdb diff --git a/old_work/iterm2colors/xrdb/Vaughn.xrdb b/xrdb/Vaughn.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Vaughn.xrdb rename to xrdb/Vaughn.xrdb diff --git a/old_work/iterm2colors/xrdb/VibrantInk.xrdb b/xrdb/VibrantInk.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/VibrantInk.xrdb rename to xrdb/VibrantInk.xrdb diff --git a/old_work/iterm2colors/xrdb/Violet Dark.xrdb b/xrdb/Violet Dark.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Violet Dark.xrdb rename to xrdb/Violet Dark.xrdb diff --git a/old_work/iterm2colors/xrdb/Violet Light.xrdb b/xrdb/Violet Light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Violet Light.xrdb rename to xrdb/Violet Light.xrdb diff --git a/old_work/iterm2colors/xrdb/WarmNeon.xrdb b/xrdb/WarmNeon.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/WarmNeon.xrdb rename to xrdb/WarmNeon.xrdb diff --git a/old_work/iterm2colors/xrdb/Wez.xrdb b/xrdb/Wez.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wez.xrdb rename to xrdb/Wez.xrdb diff --git a/old_work/iterm2colors/xrdb/WildCherry.xrdb b/xrdb/WildCherry.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/WildCherry.xrdb rename to xrdb/WildCherry.xrdb diff --git a/old_work/iterm2colors/xrdb/Wombat.xrdb b/xrdb/Wombat.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wombat.xrdb rename to xrdb/Wombat.xrdb diff --git a/old_work/iterm2colors/xrdb/Wryan.xrdb b/xrdb/Wryan.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Wryan.xrdb rename to xrdb/Wryan.xrdb diff --git a/old_work/iterm2colors/xrdb/Zenburn.xrdb b/xrdb/Zenburn.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/Zenburn.xrdb rename to xrdb/Zenburn.xrdb diff --git a/old_work/iterm2colors/xrdb/ayu.xrdb b/xrdb/ayu.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ayu.xrdb rename to xrdb/ayu.xrdb diff --git a/old_work/iterm2colors/xrdb/ayu_light.xrdb b/xrdb/ayu_light.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/ayu_light.xrdb rename to xrdb/ayu_light.xrdb diff --git a/old_work/iterm2colors/xrdb/deep.xrdb b/xrdb/deep.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/deep.xrdb rename to xrdb/deep.xrdb diff --git a/old_work/iterm2colors/xrdb/idleToes.xrdb b/xrdb/idleToes.xrdb similarity index 100% rename from old_work/iterm2colors/xrdb/idleToes.xrdb rename to xrdb/idleToes.xrdb