Commit Graph

2465 Commits (602531ff33c7ecbebe5cac958dd64c18e0eb2b83)

Author SHA1 Message Date
nick black 5b1602606e animate demo: get the movement completely working 4 years ago
nick black 9acf5e6a2e animate demo: outer circle / closing logic 4 years ago
nick black 80a3727b83 animate demo: begin work on pathfinder 4 years ago
nick black 655cafa69d plan out animate demo 4 years ago
nick black a6ddb6ed2e plot out animate demo #1267 4 years ago
nick black 5dfd0f94eb start replacing allglyph with animate #1263 4 years ago
nick black 1108ebb5b6
Fix up some subtle pile issues
ncplane_destroy() needs to call ncplane_reparent_family(), not
ncplane_reparent() as it was doing (closes #1291). ->absy and
->absx actually are absolute; return them directly for an O(1)
ncplane_abs_yx() (down from O(N), huzzah). Add some unit tests
related to destroying and reparenting (#1286). Add ncplane_abs_y()
and ncplane_abs_x(), document them, etc.
4 years ago
nick black 0e8f7dfbe7
implement ncplane_abs_yx() #1286 4 years ago
nick black 5a1df02f01
Use runtime wcwidth() to check libc
We've been using #ifdefs and such to check for libc
Unicode 13 support at compile time. Instead, execute
a wcwidth() using a sextant. If it comes back -1, the
libc lacks support; disable sextants. Otherwise, let
it go. This ought allow us to support sextants on BSD
as soon as it has support; it furthermore allows us to
properly disable them on Linuxes lacking such support.
Closes #1289.
4 years ago
nick black fa3c17abb9
freebsd: don't use sextants, no libc support #1287 4 years ago
nick black 8c508bbb5a
ncneofetch: use freebsd sysctl for cpu info #1284 4 years ago
nick black a48c149b77
ncneofetch: fall back harder to neofetch logo 4 years ago
nick black 9077bd2ee2
ncneofetch: use big daemon logo on FreeBSD 4 years ago
nick black 222d5e722d
uniblocks: avoid some problematic glyphs #1285 4 years ago
nick black b38b2c9fdb
ncneofetch: print explanation for neologo #1260 4 years ago
nick black fb2afee75e
ncneofetch: account for multicol glyphs in neologos #1260 4 years ago
nick black 129dc33c70
don't use tiparm() with no-param sequences 4 years ago
nick black 6077cbde5c
tighten up ncneofetch a bit
Use 74 columns for infoplane, handling longer model names.
Match /etc/os-release fields whether delimited by tabs or
spaces. Properly extract only the names from /etc/os-release.
4 years ago
nick black c4f61c528d
ncneofetch: center neologo #1260 4 years ago
nick black aab28aadb4
ncneofetch: hook up ncart logos #1260 4 years ago
nick black fe800436ca
ncneofetch: work on non-x86
/proc/cpuinfo doesn't always declare a Model Name, but
it seems to have a vendor_id everywhere I've been able
to check (s390x etc.). fall back to vendor_id in the
absence of a model name. count cores based off instances
of core id while we're at it (likewise fixes s390x).
4 years ago
nick black 103639d901
ncneofetch: recognize DragonFly BSD #1121 4 years ago
nick black ee3dc54911
only use execvpe on linux #1121 4 years ago
nick black d4aef247ea
Fixes for DragonFly BSD from Weitian LI #1121 4 years ago
nick black 01d9b63c5b
add warningless ncart.c generate #1260 4 years ago
nick black 250d50134e
neofetch-ripper: build usable C code 4 years ago
nick black 0a165a9de8
paint: solve for egc following colors #1068 4 years ago
nick black 78a6ffdd22
ncdirect: call rl_deprep_terminal first 4 years ago
nick black 8283adc28f
Introduce src/compat/ for all bins
I've created the new files src/compat/compat.{hc}. These
are available to all binaries by adding src to the include
directories, and src/compat/compat.c to the sources. Several
functions are implemented here which one or more target
operating systems are missing, right now all related to time.
This includes clock_nanosleep(), which is missing on OS X and
DragonFly BSD. Eliminate the other three definitions of
timespec_to_ns() and friends. Standardize on NANOSECS_IN_SEC
rather than the more opaque GIG. Progress on #1121.
4 years ago
nick black 68b340e3c8
ncdirect: prep readline for use #1120 4 years ago
nick black 4fc099f2e9
reel/plot/menu: properly warn on bad flags 4 years ago
nick black cff006f8ab
fix return value of output functions 4 years ago
nick black ae1463245d examples: directmode text 4 years ago
nick black 6ff95dd24a
notcurses-demo: print usage on invalid spec 4 years ago
nick black 3d9b3b679c
debian glibc 2.31-7 has unicode 13 support, back out ncwidth, yay 4 years ago
nick black 54b44513c4
Wide EGC tweaks
Don't bias the nccell width by 1, or 0-length EGCs become
255 columns. We weren't actually using the width to drive
much anything until now, so this wasn't a problem, but it
is exposed as an error once we got rid of CELL_WIDE_ASIAN
and start looping through the actual egc column width.
Closes #1278, closes #1277
4 years ago
nick black e6cf1d3844
postpaint: value-result to postpaint_cell for x
postpaint_cell sometimes needs to skip over the following
cells, due to a multicolumn EGC. postpaint() was only
passing x as a value parameter, though, and thus any
changes made weren't escaping out to postpaint(). replace
it with a value-result parameter. might fix #1276.
4 years ago
nick black ab846f9ac8
ncneofetch improvements
* Use NCBLIT_DEFAULT rather than explicit 2x2, so that we use
  NCBLIT_3x2 on terminals which support it.
* Use NCSCALE_SCALE_HIRES rather than NCSCALE_SCALE.
* Support LOGO in /etc/os-release, with or without quotes.

Closes #1246.
4 years ago
nick black 4427713f0f
ncdirect: drop signals in ncdirect_stop_minimal 4 years ago
nick black 6d6416064e
ncdirect: set up fatal signal handlers #1271 4 years ago
nick black 9245fda17f
genericize setup_signals() for ncdirect #1271 4 years ago
nick black 998cf02f34
add NCDIRECT_NO_QUIT_SIGHANDLERS #1271 4 years ago
nick black 8b0de2aa1b
introduce ncwidth() to handle sextants on pre-U13 libcs #1274 4 years ago
nick black 4a57436bb8
ncdirect_putstr: handle palette-indexed color 4 years ago
nick black a991e0f624
ncdirect_putstr(): fix up foreground default #1269 4 years ago
nick black 478d7cb514
update channels in ncdirect palindex #1275 4 years ago
nick black 9dcbda54ef
postpaint_cell()/ncplane_putc(): handle EGCs of more than 2 columns #1273 4 years ago
nick black 8285b131c6
cell_duplicate_far: drop obsolete FIXME 4 years ago
nick black e5fd6a832a
back out running postpaint_cell() #1272 4 years ago
nick black 9021526f45
ncneofetch: always call notcurses_stop #1246 4 years ago
nick black af07822d35 Document base cell better
Improve the documentation for ncplane_set_base_cell() and
ncplane_set_base(). Go by render.c's authority (all three
channels are independently checked for transparency, and
replaced with the base cell if so--egc, fg, and bg). Add a
BASE CELL section to notcurses_plane.3. Check for, and reject,
an nccell which is secondary among a multicolumn EGC.

Closes #1238.
4 years ago
nick black cc49c715a6
ffmpeg: averr is a raw int 4 years ago
nick black bc4fe21ed1
get smxx/rmxx from terminfo 4 years ago
nick black a9ccbc28f9
ncls: support -V/--version #1266 4 years ago
nick black e37b466eea
notcurses-demo: support 'V' for version out #1266 4 years ago
nick black 4616d60ae9
notcurses-view: support 'V' for version out #1266 4 years ago
nick black 0bcb107ae6
fallin: don't carry cell across planes #1265 4 years ago
nick black 449455cf4b
microoptimize channels_blend() top half #1262 4 years ago
nick black 8e4158a817
inline postpaint_cell into raster #1262 4 years ago
nick black 23d3e03386
ncls: handle --help option 4 years ago
nick black 69e329d328
BigMult unit tests: fix for non-'.' decseps 4 years ago
nick black 7e20a25482
ncdirect_*_palindex -> ncdirect_set_*_palindex #1261 4 years ago
nick black f1253560ad
ncdirect: set_ on rgb functions #1261 4 years ago
nick black 76d8e2dfce
ncdirect_{fg, bg}_default() -> ncdirect_set_{fg, bg}_default() #1261 4 years ago
nick black 58bc9bd3bc
fix up writeout stats, report in shutdown banner 4 years ago
nick black 0e8faed3f5
ncneofetch: check LOGO field in /etc/os-release #1246 4 years ago
nick black 638dde7657
remove unnecessary args from ncdirect_raster_frame() #1248 4 years ago
nick black 1d8fcbb5e4
ncdirect: styles{set, on, off} -> _styles #1247 4 years ago
nick black f608df2af8 progbar PoC: call through on 1 #1258 4 years ago
nick black 8824495924 uniblock demo: properly set progress 4 years ago
nick black f729d855f9 complete SingleCellDown/SingleCellUp tests #1258 4 years ago
nick black b0c6f697e0
yield: render in pfill loop so we never look locked up 4 years ago
nick black 68f5ea711e
demo: move HUD over by 2, don't block legend 4 years ago
nick black f22ddfa72f
progbar: don't overrun on 1.0 #1257 4 years ago
nick black c9fb385ebe fold out test breakage #1250 4 years ago
nick black 91e932ed26 ncvisual_render: handle NCSCALE_NONE_HIRES #1250 4 years ago
nick black 56d94e9392 intro: add a bar on top to match bottom 4 years ago
nick black 15664b9799 ncdirect: handle new scalings #1250 4 years ago
nick black dd1cdc40d5 add NCSCALE_NONE_HIRES, NCSCALE_SCALE_HIRES #1250 4 years ago
nick black a4bad2318f
dragon: don't force 3x2 4 years ago
nick black 3f26c36458
direct: honor transparency in image blitting #1252 4 years ago
nick black 1fa4580a3e
throw some D's on that bitch #1114
If the TERM string contains either of "kitty", "vte", or
"gnome", enable sextants. Fuck it, we'll do it live!
4 years ago
nick black 4d8efcab82
Progress towards NCBLIT_3x2 by default
Add a new member 'sextants' to the terminfo cache (both
notcurses and ncvisual contain one of these, and both
initialize it the same way -- interrogate_terminfo()).
Add a new function, 'notcurses_media_defblitter()', and
deprecate 'ncvisual_default_blitter()' (the latter didn't
receive enough information to return NCBLIT_3x2). Update
all callers. Add new *internal* function rgba_default_blitter(),
so this logic can be freely changed in the future. If
sextants are available, and we're scaling, return NCBLIT_3x2.
Once we detect sextant availability, we'll have sexblitter
as a default -- stay tuned! #1114
4 years ago
nick black b8c33a6caf
ncplane_highgradient: use direct blitting #1249 4 years ago
nick black 4e5dbfd2b9
render: use hpa in place of cuf #1245 4 years ago
nick black e6a45d5422
wcwidth: print running measure 4 years ago
nick black 6ca8949845 add kittyzapper PoC #1117 4 years ago
nick black 0578e86e02 introduce terminal-specific heuristics
Kitty conflates an RGB background specification that aligns
with the default background color with that actual background
color. This can result in translucent background when we're
expecting opaque ones. Detect kitty (strstr check of terminal
name for "kitty"), and if it's active, mark `bg_collides_default`
with the rgb of the default background color. For now, we assume
this to be (0,0,0), but we ought improve it by determining (or
setting, if that's impossible) the precise default bg color.
Closes #1117.
4 years ago
nick black 7df2c7cd04
ncdirect: use sgr0, properly align images 4 years ago
nick black 1fb4a66853
raster: fine-grained emits of op for default #1240 4 years ago
nick black 408004ee66
define fgop/bgop for fine-grained default color #1240 4 years ago
nick black 248dd1fff2
add dynamic linesig control #1228 4 years ago
nick black 99abcb5f07
cbreak_mode: move to input.c 4 years ago
nick black d1fdaf7614 view: add -t option for timeouts
When the -t switch is provided to notcurses-view, its
floating-point argument is the number of seconds for
which we delay after showing an image. When this is used,
the standard "press any key to continue" prompt is not
displayed, and indeed keybindings are not honored. This
can be used for a slideshow, or just for fullscreen display
involving no user interaction. It does not apply in the
case of -L for looping. Closes #1229.
4 years ago
nick black c0316ee96c view: document and parse -t time argument #1229 4 years ago
nick black 0b633fbdad
ncplane_at_yx_cell/at_cursor_cell: return bytes of egc 4 years ago
nick black fd146db050
demo: reject extra command line arguments 4 years ago
Nick Black 730e9f69ec
Multithreaded ncls (#1232)
Thread out ncls to perform the media decode in different threads, in parallel. Only the display needs be locked. On a directory of 200 files on my 39070X, this speeds ncls from ~5s to ~1s. On 75 files, we go from ~.5s to ~.2s. On a single file, we lose about 5%. To facilitate this, ncdirect_render_image() has been split into two helpers, ncdirect_render_frame() and ncdirect_raster_frame().
4 years ago
nick black d7fd7fa39e
ncdirect_render_image: save/restore colors #1230 4 years ago
nick black bf3e3eb0b5
ncplane_at_cursor_cell: rewrite with ncplane_at_yx_cell() 4 years ago
nick black 1798e061e1
fallin': drop unused nccell c #1231 4 years ago
nick black 28b1a80433
ncplane_at_yx_cell: work directly with cell_duplicate() #1231 4 years ago
nick black 1b613591fe
ncmenu_create: missing newline on diagnostic 4 years ago
nick black e43d127b42
ncdirect_render_image: reset colors after each line #1222 4 years ago
nick black 14778e4b71
ncdirect_dump_plane: always emit newline #1222 4 years ago
nick black 85b0a37154
ncdirect: retry fflush() on EAGAIN on all paths 4 years ago
nick black 0fb455f0ee
ncls: don't flush output after each line 4 years ago
nick black 9b0f88f024
ncpile_drop(): reset stdplane's blist #1226 4 years ago
nick black 3226652936
reel demo: kill tablets on demo_render() exit #1225 4 years ago
nick black 4fabba6789
s/reception/receipt/ 4 years ago
Nick Black 1bdd2d0555
Progress bar polishing (#1219)
Progress bars now support four 32-bit channels in ncprogbar_options, and uses them to color a gradient. The redraw procedure has been changed from O(n) to O(1). ASCII progress bars have been repaired. Closes #1213.
4 years ago
nick black 243b8bd4d4
uniblock: scrub all legend residue 4 years ago
nick black 7b4f978256
ncplane_resize_internal: disallow bad keepy/keepx #1215 4 years ago
nick black 66150c1f42
ncplane_resize_internal: reject keep > len #1215 4 years ago
nick black a0c722ff0d
notcurses_nccell.3 -> notcurses_cell.3 4 years ago
nick black 913373c27e
ncplane_reparent: update boundto in non-root case #1214 4 years ago
nick black f83bdab99c
progress bars: full resolution for retrograde #1210 4 years ago
nick black a598c706db
Correctly splice children of reparented root plane
Tremendous thanks to @kaniini, @Ikke and everyone else over
at Alpine Linux for helping to chase this down. I blundered
in ncplane_reparent() when reparenting a root plane with
children (the children need to come into the root plane
list). This will hopefully fix our amd64 failures on Alpine
since late 2.0.x. Closes #1197.
4 years ago
Ariadne Conill b49ac58d3e cope with situations where /dev/tty is not actually a TTY
this can happen in situations where a child process is not running in a
session group associated with a TTY, such as on a build server.
4 years ago
nick black f2cbfff8d9
demo: remove meaningless average r%/w% 4 years ago
nick black 8ec6d2e6fc
progbars: full resolution, fix vert inversion #1210 4 years ago
nick black 2ff20108c8
force LTR override on UC_BIDI_AL #1204 4 years ago
nick black 1bbbdd9dc0
annotate many functions with ((nonnull)) 4 years ago
nick black f7d55e8fa8
allglyph demo: add two fat vertical progress bars 4 years ago
nick black 6b859b6a32
ncls: add --align argument #1195 4 years ago
nick black ee9ed23e04
uniblock: fixed-width progress bar to better show off smooth fill #1209 4 years ago
nick black 5036e655cb
ASCII fallback for progress bar #1209 4 years ago
nick black fb38818667
progbar: cover all dependent regions #1209 4 years ago
nick black 91431f84d9
progress bars: 8x resolution #1209 4 years ago
nick black d5574cab9a
restructure progbar logic to prep for highres #1209 4 years ago
nick black 4984903d61
intro: better use of flipmode bar 4 years ago
nick black ca547bc521
progbar: get vertical progbars working #1209 4 years ago
nick black cd3fd17174
uniblock demo: add a progress bar #1151 4 years ago
nick black 827d758c19 properly color progbar #1202 4 years ago
nick black d56ea8b5e7 progbar: remove egcs options 4 years ago
nick black c3b5069eae progbar PoC: use retrograde #1202 4 years ago
nick black 82ffac8eed remove ncprogbar locking options #1202 4 years ago
nick black e37540c76e ncprogbar: implement core draw loop #1202 4 years ago
nick black 08b2d38721 progbar: directions + channels 4 years ago
nick black ff798e69e9 progbar PoC: finish up 4 years ago
nick black 1d74979718 progbar core / poc #1202 4 years ago
nick black be3bd474f6
model.dot: simplify 4 years ago
nick black 11efb0f98f
selector: no NULL deref on error path 4 years ago
nick black 97c2d53abf
notcurses-view: remove unused variable 'gotinput' 4 years ago
nick black ea131b9b11
scan-build: remove unused stores 4 years ago
nick black 33862979da
scan-build: remove dead stores 4 years ago
nick black 228bd17237
rtl PoC #1204 4 years ago
nick black a2ab467219
whiteout demo: fix up brace extensions 4 years ago
nick black c98d6c2576
selectively copy width in paint() #1207 4 years ago
nick black fd2acde1b1 rename cell->nccell, keep alias #1200 4 years ago