Commit Graph

178 Commits

Author SHA1 Message Date
fang
064b15e5a0
term: move coordinate origin to top left
Having the origin at the top left instead of the bottom left is more
conventional and ergonomic. The only thing this complicates is
prompt-specific logic, where we care about the coordinates of the
bottom-most line on the screen.

For that reason, the bulk of the changes here are in vere, where we
treat the bottom-most line specially, drawing the spinner onto it.
Webterm is likewise updated to account for the new coordinate system.

Drum now opts to accept clicks anywhere on the screen, and does its best
to move the cursor as close to the clicked location as possible (within
the confines of the prompt).
2022-04-03 21:38:09 +02:00
fang
01de5a06b0
term: consistently use x/y coordinate ordering
%rez has always used "width & height". Certainly, "x & y" is more
standard than "row & column". As such, we settle on making %hop and %hit
respect the more natural ordering. This change is safe because these
interfaces haven't made it to livenet yet.
2022-03-25 13:45:29 +01:00
fang
8906d1c17d
dill: move %mor case into $blit
This lets us send a single blit around, instead of sending facts for
every individual blit in a draw event.
2022-03-05 18:17:48 -06:00
fang
25a1c79aa3
drum: properly hook up new |link
More uncommitted code.
2022-03-02 23:25:38 -06:00
fang
e53cb4a205
drum: make |un/link work for non-default sessions 2022-02-28 16:47:49 -06:00
fang
f6f2fcfcac
drum: make eel per-session
This allows us to have different apps connected to different sessions.
2022-02-28 16:45:56 -06:00
fang
bf97b8da38
drum: move +se-view call into +se-abet
We practically always do se-abet:se-view anyway.
2022-02-28 16:27:29 -06:00
fang
bb11c74278
drum: don't drop state during se-subze
Previously, it was putting new session state into the old map,
preserving only the state of the last session in the map.
2022-02-28 16:24:41 -06:00
fang
da47cfb08e
drum: correctly initialize session in +prep 2022-02-21 12:11:40 -06:00
fang
3120681b2b
sole: properly support multiple sessions
We update the sole protocol to more cleanly support multiple sessions.

Primarily, the "sole id" is updated to be a [@p @ta] instead of a @ta,
and it is now generated based off the connected dill session, rather
than statically.

This change ripples out to applications that support the sole protocol:
the subscription path becomes /sole/[ship]/[session] (as opposed to
/sole/[per-ship-constant]), and %sole-action pokes include the new id as
well.
For shoe agents, this means (at the very least) updating the function
signatures of the shoe arms.

/lib/sole has been updated to include helper functions for parsing a
sole-id from a subscription path, and turning a sole-id into its
corresponding path. It also has a function to aid in migrating old
sole-ids.

Existing sole agents are made to kick any known open sessions, forcing a
resubscribe by drum, so that they may use exclusively the new format
going forward. Third-party agents are recommended to do the same.

Note that some functionality, such as |link, still operates exclusively
on the default session. Improvements in this area to follow soon.
2022-02-20 17:19:03 -06:00
fang
2c5510db64
Merge branch 'jb/next-gen-term' into next/dill
Resolves a good number of conflicts. Most notably, re-propagates removal
of gall's %onto, confirms new /app/herm behavior, coerces hood/drum
state adapters back into place, and updates webterm to use the latest
api.
2022-01-24 14:50:16 +01:00
fang
0bc1f49f0f
drum: only process pokes from the local ship
No mark files exist for any of the drum marks, so trying to poke remote drums
would fail anyway, but relying on the mark system in that way seems a bit
fragile, so we add an explicit permission check.
2022-01-13 00:24:31 +01:00
Ted Blackman
2544b79e4b kiln,desks: remove %fish from /desk/bill; fix some other kiln issues 2021-09-26 17:03:26 -04:00
Joe Bryan
5385889ebd Revert "Revert "Merge pull request #4463 from urbit/m/next-gen-term""
This reverts commit 3fba32185d.
2021-09-24 23:14:55 -04:00
Joe Bryan
3fba32185d Revert "Merge pull request #4463 from urbit/m/next-gen-term"
This reverts commit 39667fc071, reversing
changes made to 698fd6f66f.
2021-09-24 16:33:15 -04:00
Ted Blackman
6408baaa93 various: fix merge problems 2021-08-18 01:16:48 +03:00
Fang
da85ee2e38
Merge branch 'master' into m/next-gen-term 2021-08-12 15:15:36 +02:00
Ted Blackman
616ab66f26 merge master; loosen :hood's updates 2021-08-11 19:23:36 +03:00
ixv
83aaaa398a hood: start notify 2021-07-28 12:26:33 -07:00
Ted Blackman
2507404f97 hood,desk.bill: fix boot issues 2021-07-23 14:07:58 +03:00
Ted Blackman
db816644ab drum: actually fix ctrl-d 2021-07-18 21:21:13 +03:00
Ted Blackman
4f3e99f797 clay,hood: seems to boot for real now 2021-07-17 02:54:20 +03:00
Ted Blackman
df250a0eae drum: fix broken ctrl-d 2021-07-16 21:46:12 +03:00
Ted Blackman
4cb5cd0ba1 gall,drum,kiln: WIP start agents in kiln 2021-07-15 09:51:03 +03:00
Ted Blackman
529502543b sys,lib: boots! 2021-07-14 01:00:13 +03:00
fang
568e8e320b
hood, pill: clean up merge artifacts 2021-06-23 14:53:47 +02:00
fang
2640a3352a
Merge branch 'master' into m/next-gen-term-real 2021-06-23 11:19:48 +02:00
Philip Monk
87ca57c364
gall: allow apps to run from any desk
Start with |start %desk %app-name

Everywhere in the kernel that we deal with marks, we infer the app it's
connected to and use the marks from that desk.

Also some light renaming in gall, especially path->wire and
current-agent->yoke.

Subsequent tasks:

- Dojo needs a syntax to run generators and threads from other desks
- The home desk should be split into at least a minimal base desk and
  big "userspace" desk.  Dill's initialization logic should be updated
  to handle
- |show-package, |install, and |uninstall should to be written
- Clay should have smarter handling of system versions instead of just
  ignoring what's on each desk.  It's not clear that this will work
  correctly when sys updates right now.
2021-06-18 16:13:55 -10:00
Liam Fitzgerald
d37dd90aef
hood: dm-hook is born 2021-05-17 16:16:37 +10:00
fang
97540ed638
various: comments, clean-up 2021-04-28 16:45:55 +02:00
fang
91f32ee098
dill: reify sessions interface
Implements tasks for creating and deleting new sessions, and allows
terminal handler agents to distinguish between sessions.

Includes bits of preparation in drum to more fully support multiple
distinct sessions, but doesn't get it all the way there just yet.
2021-04-05 22:37:38 +02:00
fang
5ef68d38c7
gall: stop sending %onto
Gall would send %onto gifts to notify about app updates and update
failures. This would end up in dill, which printed some appropriate
text.

Here, we make gall responsible for doing this printing itself (by
having it explicitly ask dill to print some tape/tank), instead of
relying on the receiving end of some bespoke notification protocol.
2021-04-04 17:22:41 +02:00
fang
49a991e40e
term: final +belt tweaks
The previous version allowed for redundant values (both [%bac ~] and
[%key ~ %bac ~] for example), had an odd constraint in @cF, and relied
unnecessarily on $<.

Also rewords some of the belt and blit descriptions.
2021-03-19 23:56:51 +01:00
fang
7fe8c67684
drum: restrict +se-blin to expected/sane blits
We only expect the two primary screen-draw blits here.
2021-03-13 02:34:45 +01:00
fang
4b7f05c681
dill: rename %lin to %put
It's no longer strictly a full line of screen content, instead more
accurately described now as "put text at cursor".
2021-03-13 02:20:00 +01:00
fang
2861de983b
dill: replace %ctl and %met belts with %key
Previously, we relied on foolish hacks, like [%met %bac], to send
"special" keystrokes with modifiers.

This updates the belt type to have %key, which represents a single
keystroke, with any combination of modifier keys.

Note that this has overlap with %txt to some extent. [%key ~ 'a'] should
be considered equivalent and preferred to [%txt 'a' ~], but updating
existing usage is left to a later commit.
2021-03-13 02:19:36 +01:00
fang
7e2a6efd70
Merge branch 'release/next-sys' into m/next-gen-term 2021-02-19 19:43:40 +01:00
fang
881f9ebfaa
drum: redraw prompt only if it changed 2021-02-19 12:24:31 +01:00
fang
0d8288e666
term: better %url handling
%url blits are meant for "activating" urls. Of course, opening a new
browser tab from within a C program is difficult, so we don't do it.

This is still better than doing the faux activation by just printing
the url. term.c no longer really knows where/how to draw it, and it's
meant as interactive behavior rather than visual output, anyway.
2021-02-18 01:44:33 +01:00
fang
a4e20facb7
term: decouple line clearing from line printing
This simplifies the behavior of individual blits, making their
implementation simpler and giving arvo more control.

This lets us write on top of existing content, instead of completely
replacing the affected row. Additionally, lets us draw starting at the
cursor position, instead of the leftmost column.

To retain the previous behavior, preface with [%hop 0] to move the
cursor to the start of the line, [%wyp ~] to clear the existing content,
and finally your %lin to render it.
2021-02-18 01:44:26 +01:00
fang
30ac51e281
term: no longer redraw the prompt as part of %clr
Instead, rely on the console application to send whatever is needed
directly following a %clr blit.
2021-02-17 17:04:45 +01:00
fang
00dd0656e8
zuse: move styx engine into zuse
styx and stub are both defined in lull. Having functions for dealing
with them in zuse rather than userspace is fitting.

While not a _common_ format per se, it still seems best at home in
+format, instead of on its own.
2021-02-16 17:33:58 +01:00
fang
0b1fde0595
dill: remove now-redundant blits
Previously, these affected dill state. Now, they're equivalent to %lin
and %klr blits.
2021-02-10 20:05:26 +01:00
fang
3fdef14688
dill: stop redrawing the prompt & cursor
No longer inserts newlines or redraws the prompt post-print, pushing
this responsibility down to drum where it belongs.

Additionally, separates the flow for dill's own output, from that of the
console application. This lets us keep the desired behavior for now, and
will ease reworking in the future.

Last-printed-line and cursor position are still kept around in dill
state, in order to respond to the relevant scry endpoints. These should
either be refactored to scry into the underlying console app, or be
removed entirely in favor of %hey.
2021-02-10 14:23:17 +01:00
fang
7ab6d7dc9c
term: add minimal mouse support
Only detects mouse clicks. Though, "9" mode seems broken, or unsupported
or something? Probably need to upgrade to "1000" mode or higher, but
that also reports scrolling events and such, which don't want to steal
from the context we're running in just yet.
2021-02-10 14:23:03 +01:00
Liam Fitzgerald
579570ed42
drum: load %settings-store on boot and migrate 2021-02-03 17:57:44 +10:00
Logan Allen
48d9e8c9b8 group-view: initiate %contact-pull-hook subscription upon group join 2021-02-01 16:36:16 -06:00
Liam Fitzgerald
97502838d6
Merge remote-tracking branch 'origin/la/contact-store' into lf/join-cleanup 2021-02-01 17:01:02 +10:00
Logan Allen
72e036bae3 Merge branch 'release/next-userspace' into la/contact-store 2021-01-29 14:48:39 -06:00
fang
776de8b3d9
lull: make dill-blit explicit superset of blit
Likewise for belt. This necessitates renaming the %mor blit for newlines
to %nel, making this require a new runtime version. That's fine, more
breaking changes are to follow.
2021-01-26 18:37:33 +01:00