all repos — acme @ 2b1cefce23fb3c94ec60796751b2853d3b7b6f6a

fork of the acme editor from plan9port - keybinds, tweaks, config.h, etc

active tick updates propagate to column and row tags now; update readme; v9001-a03
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmIVOLEACgkQO3+8IhRO
Y5jR4w//dN8SdpVRePon9wN9OSDngAcU+12ZFAtYsZY27fIeLzUnYtn2qwz/c3ON
1bChhuDCjhIovdLPooBjy960rdadwIh+Rk+A34VR4KLtPfnIZxOXDM8PBr7pmIX6
MZq6AOk4ePEMLw23Dxb9F0foo92mTciXqt+B+rjmzxnWkzG1k+7oINs69JjDn7E7
w1QHr3is3MTROuXBadhNYtfWhkL/5Qf0Tb2MDHRy2mr7KfwMlVbhjycEAm+VXTEC
rUjFQnxp7Z6zBriV5VnlInmtydAdSnz5m2WJcVDdlob8sXWiUbfpjKvaN/GYVsRc
O4UiOhq4D/EEg3hdgNoQHo1QhruSECuJC2EL9hp13cEmvOtEM5tdtbUHCKOXOMXB
SMGcKN6XvS8uGInJX0PmDa/5WGmi2uiXmnTHTTxmtGX6lzAtR9tR/YTa8dGuKztI
QnTA4pS6jgQhJagHqHWSAuhoxPkcbhFuGF+ryMCvDguw7erAfeNWHzHdNIDwEaHx
k3nROebSidhV7JECeJLlog+xTaVbLqGqQI9x8OdWj/CPHJa9pQHLi2ytRL74D8bh
W7WS8A9i2PJG9433kNqg16Oy0+7UfSjxKHi6sVNtpxFK7SwJdPqETtEntBLYI8Pm
qhF/Ctsn9F0NX84kvAsKXc2Mi0RoF1q66Y+TLH81Qlpr6ruBCmA=
=a9KY
-----END PGP SIGNATURE-----
commit

2b1cefce23fb3c94ec60796751b2853d3b7b6f6a

parent

ee6965098b0bda45cbdb4b7509247ecb553ba668

2 files changed, 8 insertions(+), 12 deletions(-)

jump to
M README.mdREADME.md

@@ -2,9 +2,9 @@ # acme9k

This is a fork of the `acme` text editor from the `plan9port` distribution. It combines the customizability of [lumar](https://github.com/lumar)/[sminez](https://github.com/sminez/plan9port)'s forks and [acme2k](https://github.com/karahobny/acme2k) with upstream fixes from [9fans](https://github.com/9fans/plan9port) and some custom work. -Namely, when click-to-focus is enabled, the active window body or tag renders the tick (aka the text cursor) with the hilight color (`COLOR_<TAG|BODY>_HI`); otherwise the tick is rendered with the text color (`COLOR_<TAG|BODY>_TX`). This is all done with a fork of `libframe` which is included in the distribution and compiled into the program. +Namely, when click-to-focus is enabled, the active text frame renders the tick (aka the text cursor) with the hilight color (`COLOR_<TAG|BODY>_HI`); otherwise the tick is rendered with the text color (`COLOR_<TAG|BODY>_TX`). This is all done with a fork of `libframe` which is included in the distribution and compiled into the program, and some simple logic that selects the proper ticks for each frame when the focus changes and forces a redraw. -See the `config.def.h` for out of the box customizations that can be done. +See the `config.def.h` for out of the box customizations that can be done. Below is a screenshot of my typical setup (note I use compositing rules to make the window transparent, this is not in the scope of `acme` itself). [![screenshot](./scrot.png)](./scrot.png)

@@ -28,7 +28,7 @@ - Up/Down: move cursor

- PgUp/PgDown: the obvious - Esc: cut if there is a selection, otherwise hilight the most recently edited text -Users unfamiliar with acme in general should check the following resources: +Users unfamiliar with `acme` in general should check the following resources: - [Acme: A User Interface for Programmers](http://doc.cat-v.org/plan_9/4th_edition/papers/acme/) - the definitive guide from Rob Pike - [A Tour of Acme](https://research.swtch.com/acme) - Russ Cox giving a tour of acme on plan9port (video)

@@ -37,7 +37,7 @@

## build - Clone this repository -- From the repo root, if desired, copy `config.def.h` to `config.h` and make your modifications +- From the repo root, if desired, copy `config.def.h` to `config.h` and make your modifications (you will almost certainly want to change the fonts; my default primary font is Sauce Code Pro Nerd Font) - Run `./build.sh` from the repo root. ## install

@@ -46,13 +46,12 @@ After building, run `./install.sh`; If run as a regular user, it will install to `~/bin/9`; if run as root, it will overwrite the systemwide `acme` in `$PLAN9/bin`

## TODO -- [ ] allow active tick to be rendered for row/column tags, not just window body and tags - [ ] compile helpers ## thanks -- [rob pike](https://github.com/robpike) author of the original acme for plan9 -- [russ cox](https://research.swtch.com) and the rest of the [9fans](https://github.com/9fans) for plan9port +- [rob pike](https://github.com/robpike) - author of the original `acme` for Plan9 +- [russ cox](https://research.swtch.com) and the rest of the [9fans](https://github.com/9fans) for [plan9port](https://github.com/9fans/plan9port) - [lumar](https://github.com/lumar) - looks like they deleted their github repos but I originally pulled my keybinds from there - [sminez](https://github.com/sminez) - possibly the original source of lumar's keybindings - [karahobny](https://github.com/karahobny) - creator of acme2k, a big inspiration for this project
M acme.cacme.c

@@ -43,7 +43,7 @@ Rune snarfrune[NSnarf + 1];

char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT}; -char version[] = "acme9k v9001-a02"; +char version[] = "acme9k v9001-a03"; Command* command;

@@ -512,7 +512,6 @@ enum { MResize, MMouse, MPlumb, MWarnings, NMALT };

static Alt alts[NMALT + 1]; /* make sure we don't recklessly refresh the ticks */ - int click; Text* oldbarttext; USED(v);

@@ -534,7 +533,6 @@ alts[MPlumb].op = CHANNOP;

alts[NMALT].op = CHANEND; for (;;) { - click = 0; qlock(&row.lk); flushwarnings(); qunlock(&row.lk);

@@ -646,7 +644,6 @@ goto Continue;

} if (m.buttons) { if (w) { - click = 1; winlock(w, 'M'); } t->eq0 = ~0;

@@ -679,7 +676,7 @@ goto Continue;

} Continue: /* won't refresh ticks if scrolling didn't change the active frame! */ - if (oldbarttext != barttext && (m.buttons & (8 | 16) || click) && t) { + if (oldbarttext != barttext && (m.buttons) && t) { textsettick(t, t->row); } qunlock(&row.lk);