aboutsummaryrefslogtreecommitdiff
path: root/scripts (unfollow)
Commit message (Collapse)AuthorLines
2020-12-21generate-alt-random: ioctl(TIOCGWINSZ) may fail in run inside a containerDaniel Eklöf-5/+14
This _should_ only happen when we’re doing a partial PGO build, since then the script is run in the parent terminal. In this case, the user is expected to use --rows/--cols anyway.
2020-12-20generate-alt-random: override detected width/height when --cols/--rows have been usedDaniel Eklöf-0/+2
This ensures we have a valid width and height, that matches what the PGO helper binary expects.
2020-12-20generate-alt-random: fix “new style” cube escapeDaniel Eklöf-1/+1
It’s “38:5:<idx>”, not “38:2:5:<idx>”.
2020-12-20generate-alt-random-writes: use python random, allow setting a seedsterni-99/+101
Using Python's own PRNG should make the code cleaner and allow for reproducible stimulus files if that is desired via setting --seed (at least for the same versions of the script, changing the kind and/or order of the random calls will of course impact the output in the future). I did the following substitutions: * rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n → random.randrange(n) * rand.read(1)[0] → random.randrange(256) * rand.read(n) → [random.randrange(256) for _ in range(n)] (better alternative would have been random.randbytes(n), but is only available for Python >= 3.9, switching to this in the future will impact output) * list[rand.read(1) % len(list)] → random.choice(list)
2020-11-24scripts: generate-alt-random-writes: add --sixelDaniel Eklöf-1/+48
When --sixel is specified, we generate random sixel images in the ‘normal’ screen, after exiting the alt screen.
2020-11-22scripts: generate-alt-random-writes: add unicode and multi-column charsDaniel Eklöf-1/+1
2020-11-22scripts: generate-alt-random-writes: add support for bold/italic/underlineDaniel Eklöf-0/+10
2020-11-22scripts: generate-alt-random-writes: don’t always reset all attributesDaniel Eklöf-4/+5
2020-11-22scripts: generate-alt-random-writes: mix \e[S with \nDaniel Eklöf-1/+5
2020-11-22scripts: generate-alt-random-writes: add support for emitting 256-indexed colorsDaniel Eklöf-0/+15
2020-11-22scripts: generate-alt-random-writes: mix new/old-style RGB escapesDaniel Eklöf-1/+8
2020-11-22scripts: generate-alt-random-writes: add command line arguments for cols/rowsDaniel Eklöf-0/+7
2020-11-22scripts: generate-alt-random-writes: don’t re-use ‘count’ variableDaniel Eklöf-2/+2
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-146/+42
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.
2020-05-31scripts: benchmarking utility scriptDaniel Eklöf-0/+51
2020-05-09generate-unicode-precompose: /bin/sh is more standard than /usr/bin/shDaniel Eklöf-2/+2
At the same time, fix `cut` command to pass filename last, as this is also more portable. Fixes build issues on e.g. Alpine Linux
2020-05-09unicode-precompose: use fcft's precompose functionalityDaniel Eklöf-33/+0
This allows us more options when determining whether to use a pre-composed character or not: We now only use the pre-composed character if it's from the primary font, or if at least one of the base or combining characters are from a fallback font. I.e. use glyphs from the primary font if possible. But, if one or more of the decomposed glyphs are from a fallback font, use the pre-composed character anyway.
2020-05-02script: generate-unicode-precompose: generate a complete header fileDaniel Eklöf-2/+27
2020-05-02unicode-combine: remove utf8proc dependencyDaniel Eklöf-0/+8
We only used utf8proc to try to pre-compose a glyph from a base and combining character. We can do this ourselves by using a pre-compiled table of valid pre-compositions. This table isn't _that_ big, and binary searching it is fast. That is, for a very small amount of code, and not too much extra RO data, we can get rid of the utf8proc dependency.
2020-03-08scripts/generate-alt-random-writes: use TIOCGWINSZ instead of shutilDaniel Eklöf-4/+8
2019-12-19script: generate-alt-random: reduce output sizeDaniel Eklöf-1/+1
2019-09-20generate-alt-random-writes: reduce output sizeDaniel Eklöf-1/+1
2019-08-30generate-alt-random-writes: generate streaks of charactersDaniel Eklöf-1/+4
2019-08-23generate-alt-random-writes: reset SGR and scroll region at the endDaniel Eklöf-2/+2
2019-08-22generate-alt-random-writes: generate color, scroll and scroll region sequencesDaniel Eklöf-11/+72
2019-08-21generate-alt-random-writes: script to generate payload for profilingDaniel Eklöf-0/+35