nick black
8585c0a8a9
[subprocs] use posix_spawn in place of fork+exec #2194
3 years ago
nick black
9d7fb54535
replace ncsubproc_createvpe() with ncexecvpe() #2194
3 years ago
nick black
5553919579
[subprocs] factor out ncexecvpe() #2194
3 years ago
nick black
a5397ea19a
[subproc] kill FIXME; set pipes O_CLOEXEC manually in absence of pipe2()
3 years ago
nick black
3c7d23b151
[compat] add set_fd_cloexec()
3 years ago
nick black
4da93eae5d
kill FIXME: detect whether linesigs are enabled on startup
3 years ago
nick black
58f650f0c1
drop mlterm inversion for DECSDM
3 years ago
nick black
0b62a89834
Invert interpretation of DECSDM #2204
...
more and more terminals are switching their
interpretation of DECSDM to match the actual VT340
behavior, rather than that of XTerm prior to
patchlevel 369. start using \e[?80l by default to
turn DECSDM on. track terminalsXversions which
use the previous behavior, and for them, emit 80h.
continue to always send 8452h, on which i have
no data suggesting anything but one interpretation.
remove pixel_shutdown. note that Alacritty switched
over to the new semantics in 0.15.1.
3 years ago
nick black
9f2eb07ce6
make pixel implementation choice clearer
...
We were using the value of pixel_shutdown to decide
whether we needed to take a kitty-specific path or
not. Instead, just use the pixel_implementation field
of tinfo, which was added a few weeks back.
3 years ago
nick black
6985d9a715
drop tinfo argument from pixel_init()
3 years ago
nick black
556039eb73
compare_versions: work for multidigit version components
3 years ago
joseLuís
fb003c4eef
fix doc-comment on ncplane_erase_region
...
and another minor typo
3 years ago
joseLuís
2141338e4c
revert stylemask return types #2200
3 years ago
joseLuís
1811e3b0ef
fix stylemask return types #2200
3 years ago
joseLuís
d55a44ef4b
make `ncdirect_styles` require const reference
3 years ago
nick black
0918fa251e
XTerm 359+ uses correct DECSDM #1782
3 years ago
nick black
eee94d8e40
mintty switches DECSDM in 3.5.2 #1782
3 years ago
nick black
f42a563367
[input] no transitions >= 0x80
3 years ago
magiblot
7fd93b5977
ncwidth: fix heap overrun
3 years ago
nick black
828c06ffde
ncplane_erase_region: unit tests
3 years ago
nick black
8a0d924baf
ncplane_erase_region(): protect against overflow
3 years ago
nick black
0c41b3ddc5
grid: cli-style
3 years ago
nick black
69e58667c7
[bitmapstates] properly use ncplane_erase_region()
3 years ago
nick black
ad2b806444
add grid PoC
3 years ago
nick black
e770dbff43
ncplane_erase_regions: generalize harder #2181
3 years ago
nick black
72757044da
[ncplane_erase_region] generalize #2181
3 years ago
nick black
9733835673
ncplane_erase_region: grotesque copy-and-paste bug =[
3 years ago
nick black
0fef97c1fb
ncneofetch: no scaling when using NCBLIT_PIXEL
3 years ago
nick black
d8c1a67b81
[input] don't tear down input layer on windows for now #2192
3 years ago
nick black
257ec21671
[windows] use WaitForSingleObject
3 years ago
nick black
92f4dce595
use wcsrtombs() in place of wcstombs()
3 years ago
nick black
5412adef4d
[input] set rifd high on WAIT_OBJECT_0 #2192
3 years ago
nick black
690ed75c8f
[input] initialize stdinhandle on windows #2192
3 years ago
nick black
7c197fba59
remove obsolete FIXME
3 years ago
nick black
675a4ac63c
we're using kitty keyboard level 1, not 31
3 years ago
nick black
0bf192f4c1
sync sixel_draw/kitty_redraw #2189
3 years ago
nick black
e983c83d4e
[input] mask SIGTHR where defined #2191
3 years ago
nick black
343a74ac82
[ncneofetch] don't move logo to left #2138
3 years ago
nick black
e9891bc555
[interp] drop unused variable 'id'
3 years ago
nick black
37fb92dba3
interp PoC: don't use NCOPTION_DRAIN_INPUT
3 years ago
nick black
5c82d5b849
[input] properly convert delaybounds to deadlines
3 years ago
nick black
82a2f19d67
[input] account input events on receive side only
3 years ago
nick black
3faf8ee3fb
[input] introduce NCKEY_EOF #2185
3 years ago
nick black
ea5da346f0
Add keytype indicator to notcurses-input #2182
3 years ago
nick black
99007e128c
[input] add evtype to ncinput, for press/repeat/release #2182
3 years ago
nick black
b0c4a3af97
direct_dump_cellplane: position all lines according to xoff
3 years ago
nick black
0de21824cc
[input] return error once we've emptied ibuf and hit stdineof
3 years ago
nick black
da6fc8420d
[input] consider a drop to be an input_error
3 years ago
nick black
70997670a5
[sprixel_redraw] want the offset, not absolute position #2168
3 years ago
nick black
6849ed9da7
[input] windows fixes
3 years ago
nick black
bea71b99dd
kill debugging cruft
3 years ago
nick black
d36591b01b
[input] handle mouse release, implement stdineof, w00t!
3 years ago
nick black
60ee94b4ca
pump_control_read: return 2 following XTSMGRAPHICS #2174
3 years ago
nick black
e12aceccce
[input] break up events #2174
3 years ago
nick black
24eac43f4f
interrogate_terminfo: allow for NULL termtype
3 years ago
nick black
8f4fa30e7b
[input] replay non-escapes as regular text #2100
3 years ago
nick black
fe34e797a3
[input] more precise utf8 matching
3 years ago
nick black
00f8246bf9
direct_raster: drop unnecessary flush
3 years ago
nick black
811f9334d1
A melange of fixen ( #2179 )
...
* split up ncdirect_dump_{sprixel, cellplane}()
* build ncdirect_dump_cellplane() out of fbuf #2167
* [macos] don't run pandoc in workflow
* [gpm] account for margins in mouse reports
* [in] drop mouse clicks from top/left margins
* [ffmpeg] compile against avformat 59+ w/out warnings
3 years ago
nick black
875b3a56de
direct PoC: remove unnecssary fflush()es
3 years ago
nick black
e6ca5ebd5e
build ncdirect_dump_cellplane() out of fbuf #2167
3 years ago
nick black
8c12ca0c06
split up ncdirect_dump_{sprixel, cellplane}()
3 years ago
nick black
c0f432f99b
setup_signals: block SIGWINCH/SIGCONT for the calling thread #2175
3 years ago
nick black
a6d0a7e2cd
[input] support calling notcures_get() with a NULL ncinput
3 years ago
nick black
5eed1abe8e
notcurses_get: restore old delaybound behavior #2169
3 years ago
nick black
aa6b9486c9
pthread_cond_timedwait() directly returns errno #2169
3 years ago
nick black
8c0d32d986
fix windows build
3 years ago
nick black
1689365b6c
PixelWipe unit test: fix for sixel-based terminals
3 years ago
nick black
b2b9655d6f
don't try to run xrandr on XNU/Windows
3 years ago
nick black
0686a1c390
[input] signal when making space in output buffer
3 years ago
nick black
24c194df1b
[process_bulk] walk the buffer
3 years ago
nick black
78eeaf55ea
Merge branch 'master' into dankamongmen/input-thread
3 years ago
nick black
686aac4689
[input] pthread_cond_wait when no timeout
3 years ago
nick black
1d4c62d446
[input] implement timeouts
3 years ago
nick black
edb9eff34b
[input] serialize terminfo lookups ugh
3 years ago
nick black
81e2fd1351
[input] track linesigs status
3 years ago
nick black
9edd0c7849
[input] load specials from terminfo, except on windows
3 years ago
nick black
3d02a75323
NCOPTION_DRAIN_INPUT in notcurses-info and ncneofetch
3 years ago
nick black
a3ed82ccff
honor NCOPTION_DRAIN_INPUT
3 years ago
nick black
716a37f917
[input] walk specials automaton
3 years ago
nick black
5a64f25ac2
restripe_lastframe: properly index into tmp/lastframe
3 years ago
nick black
bfdd5dd01d
notcurses_input: need lock around refresh()
3 years ago
nick black
fd5708a7cd
unicode 14.0!
3 years ago
nick black
8f900754d5
[input] synthesize SIGINT/SIGQUIT
3 years ago
nick black
c31f20b602
[input] remap 0x7f to NCKEY_BACKSPACE
3 years ago
nick black
c3545a4b40
process_ncinput: fix ictx->isize check
3 years ago
nick black
37cb5adb87
[input] add constant specials to trie
3 years ago
nick black
315edacf08
[input] handle unicode-encoded mouse events
3 years ago
nick black
22f421657d
fix up windows block_on_input()
3 years ago
nick black
9e9a949f0f
[direct] move to new cursor location reports
3 years ago
nick black
6f0ddd8c15
[input] handle multibyte utf8
3 years ago
nick black
1fe5cc9555
[input] build kitty protocol into new input automaton
3 years ago
nick black
7159913530
[input] kill unnecessary state CURSOR_OR_PIXELGEOM
3 years ago
nick black
0dd41f0e79
[input] hand ncinputs back to calling client
3 years ago
nick black
5f00466b38
protect initdata, notcurses_getvec()
3 years ago
nick black
1630a1629f
merge that shit
3 years ago
nick black
3cf5a67b84
input thread #2136
3 years ago
nick black
55c7cc356d
[resize] carefully copy over reuseable parts of lastframe #2165
3 years ago
nick black
39025dd053
eliminate kitty graphics one-off enum type
3 years ago
nick black
20edd5a3cd
purge deprecated cell typedef
3 years ago
nick black
0213e026b2
allow users to set the stdplane's resizecb
...
Hardcode a call to ncplane_resize_maximize() in
notcurses_resize_internal() for the standard plane,
when handling the standard pile. allow the user
to set the standard plane's resize callback beyond
that. closes #2163 .
3 years ago
nick black
76b1ea9842
[kitty] fix 1st gen animation
...
Much as we needed to do in the accounting core for
kitty animation, whether we blitted a sprixcell of
alpha nulls or instead wiped it affects how we
rebuild under KITTY_ANIMATION, which right now is
all Kitty >= 0.20.0 since KITTY_SELFREF is disabled.
This gets KITTY_ANIMATION working perfectly on
bitmapstates. I've accomplished this by stashing a
bool onto the end of each KITTY_ANIMATION-style
auxvector, set high if it originated in a reblit's
null alphas, and low if it was zorched by a wipe.
Set {c, r} arguments to animation directive based
on whether this is set. See #2161 .
3 years ago
nick black
4789aca20f
notcurses.h: remove some more deprecated static inlines
3 years ago
nick black
4e1897c1c0
[kitty] KITTY_ANIMATED rebuild fix #2161
3 years ago
nick black
79610b2efa
more work on input thread
3 years ago
nick black
e54661f425
initialize and shutdown the new input layer from termdesc.c
3 years ago
nick black
b65f7b5e10
[input] tear down thread
3 years ago
nick black
613b2f9d31
extract cancel_and_join() helper
3 years ago
nick black
ff6066ba33
space_for_read(), read_input_nblock()
3 years ago
nick black
b6e5a815a3
[inputthread] scaffolding
3 years ago
nick black
eb70aeed90
start in on input thread
3 years ago
nick black
4ec1bfd8be
[info] differentiate between kitty animation and kitty selfref #2161
3 years ago
nick black
6612d1b149
[kitty] disable KITTY_SELFREF for now #2161
3 years ago
nick black
bd6d0e28fb
[kitty] unite kitty_wipe_animation and kitty_wipe_selfref #2161
3 years ago
nick black
9cc04ea259
[demo] use DETECTMAXONLY for fps graph #2152
3 years ago
nick black
9ec41fe123
[plots] fix NCPLOT_OPTION_DETECTMAXONLY #2152
3 years ago
nick black
88f40df4ae
[plots] print current sample as summary #2152
3 years ago
nick black
fb8b6bfcae
[kitty] multiframe annihilation transitivity
...
When using the reflexive composition extension to the
Kitty graphics protocol, we refer to the previously-
blitted image to rebuild cells, and thus don't have to
keep a copy of the image ourselves. We just blit null-
alpha cells to wipe, and then execute a reflective
composition to rebuild. The auxvector is a single word,
holding the state we were in before the wipe, since we
don't have a copy of the image to look at to determine
the state afresh (and caching it is more efficient
anyway). Good, good.
Except. When we reload the plane, we want to carry over
those wipe cells, yes? I.e. if there was a plane above
the graphic before, and we replace the graphic, that
plane still better be above it. And that means editing
the cell out of the new graphic that we blit up, on the
fly. Which we were doing. Problem is, if we later need
to rebuild that cell, and we reflexively compose using
this new image, *we reflexively compose the edited-out
cell*, and thus remain wiped (our RGB values get set
properly, but we have all 0 alphas). No good!
So instead, in KITTY_SELFREF (the most advanced kitty
implementation, corresponding to reflexive composition),
do a pass at the end and send AAAAA wipes for any
ANNIHILATED{_TRANS} sprixcells. We don't present until
both have hit (since we're using a new image ID), so
there's no flicker, though there is some bandwidth cost.
That handles rebuilding. Problem is, if we then need to
wipe these same sprixcells *again*, our auxvecs were
set to ANNIHILATED{_TRANS}, and thus no wipe takes place.
Rather than blindly propagating the auxvec across the
frames, properly reset the auxvec according to the new
blit. This handles wiping post rebuild, closing the cycle.
Kitty 0.22.0+ now runs the bitmapstates PoC perfectly.
Closes #2143 . woo-hah!
3 years ago
nick black
86ea9d00d0
sprixel_debug: don't perform overeager invalid decoding
3 years ago
nick black
4a6e45adb6
kitty_wipe_selfref: update auxvec with state #2143
3 years ago
nick black
e70302416e
[ncneofetch] try using sysctlbyname() on bsd for totalram
3 years ago
nick black
128c35dc69
[ncneofetch] get total RAM on apple
3 years ago
nick black
51de081616
[ncneofetch] don't go just printing NULLs
3 years ago
nick black
7e6442077b
[input] ctrl+ capitalizes ASCII, reflect when synthesizing signals
3 years ago
nick black
e7fe2d2ffd
[ncneofetch] kill 'KERNEL_XNU unhandled' warning
3 years ago
nick black
5734444d49
ncneofetch: use kern.osproductversion sysctl for macOS version #2158
3 years ago
nick black
54cf38b076
add ncstrwidth_valid() and documentation #2153
3 years ago
nick black
831a65aa7c
[kitty] move cursor prior to positioning command, closes #2155
3 years ago
nick black
956a2b03ec
[sprite] remove old debugging cruft
3 years ago
nick black
d899c5c9d3
notcurses_stop: free rstate fbuf
3 years ago
nick black
2a04effbca
[kitty] reset fbuf prior to init for animation #2150
3 years ago
nick black
762d382ba7
[ncplayer] s/getc/get/
3 years ago
nick black
3610ce26d6
[ncplayer] nonblocking input check even when behind clockwise
3 years ago
nick black
42179890c0
ncplane_mergedown: don't pass unsafe NULL for sprixelstack
3 years ago
nick black
1018a9d78d
[ncvisual_from_plane] kill two dead stores
3 years ago
nick black
0d948dcbf4
[plots] call destructors on error paths
3 years ago
nick black
5527fabdf5
[input] initialize ncinput all the way through
3 years ago
nick black
36825374b9
[shutdown] ensure kitty pop goes to tty
...
In notcurses_stop_minimal(), we need to send most of
our resets prior to sending rmcup. rmcup and the kitty
pop, furthermore, need to be going to the ttyfd to match
their opposites. They were previously going to stdout,
meaning the kitty pop wasn't acted on when we redirected
stdout. Closes #2149 .
3 years ago
nick black
b74b23ad7c
handle kitty's augmented backspace
3 years ago
nick black
d82a30cf97
[sixel] finish opaque side of update_rmatrix #2133
3 years ago
nick black
c24a31d49d
[sixel] update_rmatrix() logic for transparency side #2133
3 years ago
nick black
a406a5f8ef
introduce pixel_refresh #2133
3 years ago
nick black
4dc6b7e826
[plots] kill bogon duplicate plot plane #2133
3 years ago
nick black
953243971d
sprite_draw: properly place bound planes
3 years ago
nick black
16dc202362
[intro] don't fail out on unicode failures
3 years ago
nick black
270572c477
[egcpool] make it safe for c++ callers
3 years ago
nick black
fac2cd7045
[notcurses-input] fix for non-pixel terminals
3 years ago
nick black
d941a012c4
[render] on pile change, move to UNSEEN, not INVALIDATED
3 years ago
nick black
cb039eafdf
restore termios settings before calling rmcup
3 years ago
nick black
a299c3226d
[direct] pop kitty keyboard state to ttyfd #2145
3 years ago
nick black
1c72516c06
[direct] finalize fbuf on exit
3 years ago
nick black
61ee8b8668
sprixel: damage only on sprite_wipe() failure
3 years ago
nick black
1827a7d58d
[sixel] correctly invalidate on wipe #2142
3 years ago
nick black
882664b6c9
notcurses-input: use max sixelgeom as limiter on plot width #2140
3 years ago
nick black
ac5efd529d
[initbanner] properly clreol, ugh
3 years ago
nick black
ca3635c28d
render: sanity when we hit an undamaged cell when debugging #2133
3 years ago
nick black
d07221ecac
closing banner: clear lines #2134
3 years ago
nick black
83bb816c15
clear to end of line in init banner, if el is available #2134
3 years ago
nick black
108012950e
notcurses-info: indicate that el capability is present
3 years ago
nick black
335f47afe8
extract banner code into banner.{ch} #2134
3 years ago
nick black
0be7412376
only synthesize signals on non-windows #2131
3 years ago
nick black
2268328b3d
synthesize SIG{INT, TSTP, QUIT} for appropriate ctrls #2131
3 years ago
nick black
1ace0139ff
mention kitty keyboard protocol support #2131
3 years ago
nick black
f44d5bb97b
[input] close off the kitty specials list #2131
3 years ago
nick black
e1b84d6c41
handle legacy function key encodings #2131
3 years ago
nick black
c340a5b6b0
always add windows special keys #2131
3 years ago
nick black
25afdd8ab6
[kitty] handle level 1 of keyboard protocol #2131
3 years ago
nick black
e1a1ac3497
eliminate double-free of tpreserved
3 years ago
nick black
e968b3972c
fills unit test: require nccell_strdup() success
3 years ago
nick black
39f9dd3b96
kill fbuf_at(), eliminating static analyzer warning #1348
3 years ago
nick black
cd14e914fa
render: eliminate dead stores
3 years ago
nick black
2e1ccdce15
interrogate_terminfo: avoid double-free on error path
3 years ago
nick black
42d1722ec7
reel: protect against NULL bottom plane
3 years ago
nick black
d03051d154
notcurses_core_init: kill memory leak on error path
3 years ago
nick black
429485551a
[ncdirect] postition cursor after blitting image #2059
3 years ago
nick black
6ba5a98a7c
ncdirect_dump_plane: manually scroll before emitting plane #2059
3 years ago
nick black
823e79416b
[input] simplify startup automaton, unpop csi inputs
3 years ago
nick black
582e7b24c5
complete initial libgpm support #1405
3 years ago
nick black
1463049d32
add ncinput_shovel for GPM #1405
3 years ago
nick black
e245fa0fb2
block_on_input: mintty ought fall through to poll
3 years ago
nick black
009530c0cf
properly read cursor report from infd #2130
3 years ago
nick black
ccd2068ee3
calculate pixel-cell geometry from responses
3 years ago
nick black
fcd845c99a
[windows] kill compiler warning
3 years ago
nick black
71f491ad23
sixel_scrub: don't persist sixel override across loop #2106
3 years ago
nick black
0ee5ba4ffe
only use tpreserved when it's not NULL #2132
3 years ago
nick black
0fd2fe7ce1
restore terminal settings on interrogate_terminfo() failure #2132
3 years ago
nick black
556c448ee6
clean_sprixels: drop unnecessary cursor move
3 years ago
nick black
ea75d9355c
[render] adjust bitmaps for scrolling
...
If a sprixel is in SPRIXEL_MOVED, check to see whether
it's the same x position as it was before, and whether
it's moved up a number of rows equal to the number of
scrolls. If that is the case, take the sprixel to
SPRIXEL_QUIESCENT rather than actually redrawing. This
both saves us a blit, and properly aligns bitmaps when
sixels scroll. Closes #2110 .
3 years ago
nick black
ae1121402d
ncneofetch: accept -v
3 years ago
nick black
1b3c580a23
gpm: only use DRAG, DOWN, and UP, not MOVE #1405
3 years ago
nick black
9df967289f
decode GPM events
3 years ago
nick black
d7c74b8fda
multiselect PoC: NCLOGLEVEL_ERROR
3 years ago
nick black
b6844ca214
notcurss-input: NCLOGLEVEL_ERROR
3 years ago
nick black
cd7b4c021d
gpm: add version to banner, launch thread #1405
3 years ago
nick black
88ed5a48ab
[linux] don't close fb fd before font change #2108
3 years ago
nick black
22386f3154
[linux] blit fb copy back after font change
...
After reprogramming the Linux console font, remap
the framebuffer. Verify that the size and geometry
match the copy we made beforehand, and assuming
they do, blit the copy back into the framebuffer.
This allows us to reprogram the console font while
maintaining any graphics present. Closes #2108 .
3 years ago
nick black
6a6b9ad3b8
[linux] move fbdup code into linux.c #2108
3 years ago
nick black
b8e9b235ea
[linux] add copy_and_close_linux_fb #2108
3 years ago
nick black
4bcd773569
[linux] reprogram font before mapping framebuffer
...
You can't reprogram the Linux console font while holding
a map of the framebuffer, annoyingly. Move the attempt to
reprogram the fonts prior to the acquisition of the
framebuffer. The problem with this is that it clears the
framebuffer, so we're going to need to get a copy of it
beforehand, which we will reblit afterwards #2108 .
3 years ago
nick black
38495fd00b
[linux] track halfblocks distinctly from quads wrt font #2121
3 years ago