Commit Graph

16 Commits

Author SHA1 Message Date
Kartik K. Agaram 41bf615f43 nail down trusted Teliva channels a little more
In each session, Teliva has to bootstrap a trusted channel with the
computer owner while running arbitrarily untrusted code. So let's get
really, really precise about what the trusted channel consists of:
  - the bottom-most row of screen containing the menu
  - the keystrokes the owner types in
  - ncurses COLOR_PAIR slots 254 (menu) and 255 (error)

One reason the menu colors are important: we don't want people to get
used to apps that hide the menu colors by setting default
foreground/background to invisible and then drawing their own menu one
row up.

The error COLOR_PAIR I don't see any reason to carve out right now, but
it seems like a good idea for Teliva the framework to not get into the
habit of apps doing some things for it.

I'm not sure how realistic all this is (I feel quite ill-equipped to
think about security), but it seems worthwhile to err on the side of
paranoia. Teliva will be paranoid so people don't have to be.
2021-12-21 15:47:55 -08:00
Kartik K. Agaram 653f9cc874 minor colorscheme tweak 2021-12-08 22:34:01 -08:00
Kartik K. Agaram bba3559b06 slightly more obvious menu copy
Still sucks, though..
2021-12-06 20:35:39 -08:00
Kartik K. Agaram 6b307fba2b tweak solarized-esque scheme 2021-12-06 20:13:17 -08:00
Kartik K. Agaram a0c66dbe31 more configurable colors
Also start using 256 colors, under the assumption most people will have
them.
2021-12-06 16:53:11 -08:00
Kartik K. Agaram 267489c19f support the comment/uncomment hotkey on Macs
^/ works on Linux but not on Mac
^- emits the same character code on Mac
^_ seems to be the underlying character code, and works on both
ctrl-7 also emits the same character code
2021-12-03 20:19:32 -08:00
Kartik K. Agaram bbab1a7c10 get rid of `Esc` hotkey
For a variety of historical reasons, terminals pause every time you
press `Esc`. Let's get rid of that lag.
2021-12-03 19:45:51 -08:00
Kartik K. Agaram 31af4bd1fd improve support for backspace
I still don't understand the entire state space here, so I'm trying to
err on the side of improving discoverability of the `ctrl-h` escape
hatch. Without requiring too wide a window to show all hotkeys on the
menu.
2021-12-03 18:05:25 -08:00
Kartik K. Agaram f5a6f434c5 better cross-platform backspace support
I wish I could just hide KEY_BACKSPACE and prevent myself from using it
by accident.

Then again, I'm not making this smarts available in Teliva programs
themselves. Just for the Teliva environment.
2021-11-30 09:56:06 -08:00
Kartik K. Agaram e80af9206c ctrl-/ to comment/uncomment line 2021-11-28 21:08:12 -08:00
Kartik K. Agaram eec4845c31 ctrl-u/ctrl-k to make editing a bit more ergonomic 2021-11-28 20:48:54 -08:00
Kartik K. Agaram b24a47dd0d mac backspace attempt 3 2021-11-28 16:27:02 -08:00
Kartik K. Agaram af4e2e0751 fix half-assed mac os backspace commit 2021-11-28 16:19:01 -08:00
Kartik K. Agaram 1ac98e28e6 fix backspace on Mac
I'm deliberately restricting this incompatibility to the editor
environment for now.
2021-11-28 08:50:47 -08:00
Kartik K. Agaram 75ded7a918 editor hotkeys: sol/eol
I'm growing attached to ^e, so mildly breaking with convention there.
Perhaps this is a bad idea.
2021-11-28 08:44:37 -08:00
Kartik K. Agaram e699b5a052 dedup an enum 2021-11-26 16:26:13 -08:00