Skip to content

Instantly share code, notes, and snippets.

@doctordrau
doctordrau / TrueColour.md
Created November 22, 2020 19:29 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
diff --git a/src/compton.c b/src/compton.c
index 92935a3..8de8883 100644
--- a/src/compton.c
+++ b/src/compton.c
@@ -5063,9 +5063,9 @@ parse_matrix(session_t *ps, const char *src, const char **endptr) {
printf_errf("(): Width/height not odd.");
goto parse_matrix_err;
}
- if (wid > 16 || hei > 16) {
- printf_errf("(): Matrix width/height too large.");
@doctordrau
doctordrau / fix_zsh_history.sh
Last active October 18, 2017 02:39 — forked from kolach/fix_zsh_history.sh
Fix for zsh: corrupt history file /home/marc/.zsh_history
#!/usr/bin/env sh
# George Ornbo (shapeshed) http://shapeshed.com
# License - http://unlicense.org
#
# Fixes a corrupt .zsh_history file
mv ~/.zsh_history ~/.zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R ~/.zsh_history
rm ~/.zsh_history_bad