synthesize common prompt functions

This commit is contained in:
romkatv 2020-01-20 23:37:03 +01:00
commit 0f6b7953be
3 changed files with 74 additions and 120 deletions

View file

@ -1,4 +1,3 @@
- decouple *_init functions from segments; find all of them with a glob in _p9k_init_cacheable.
- declare local _p9k_worker_reset in _p9k_worker_receive. it can be set when replies from worker
are eval'd. initial value 0. 1 means reset-prompt is needed. 2 for _p9k_set_prompt + reset-prompt.
- battery: when state or icon change, update with _p9k_set_prompt. make sure icons can be sent with