about summary refs log tree commit diff stats
path: root/counters.mu
Commit message (Expand)AuthorAgeFilesLines
* 1780 - now we always reclaim local scopesKartik K. Agaram2015-07-131-2/+2
* 1773 - update all mu recipes to new-default-spaceKartik K. Agaram2015-07-131-2/+2
* 1599Kartik K. Agaram2015-06-191-4/+4
* 1469Kartik K. Agaram2015-05-261-6/+6
* 1363 - rename 'integer' to 'number'Kartik K. Agaram2015-05-131-7/+7
* 1345Kartik K. Agaram2015-05-111-3/+6
* 1298 - better ingredient/product handlingKartik K. Agaram2015-05-071-5/+1
* 1276 - make C++ version the defaultKartik K. Agaram2015-05-051-30/+32
* 690 - convention: '$' commands for debugging onlyKartik K. Agaram2015-02-011-3/+3
* 578 - switch to non-polymorphic 'print' functionsKartik K. Agaram2015-01-171-2/+2
* 574 - printing string literals is a hack; hard-code it in for nowKartik K. Agaram2015-01-161-3/+3
* 571 - screen primitives take an explicit terminalKartik K. Agaram2015-01-151-5/+5
* 498 - how mu provides closuresKartik K. Agaram2015-01-021-1/+1
* 497 - strengthen the concept of 'space'Kartik K. Agaram2015-01-021-0/+33
ff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
package main

import (
	"time"

	"git.sr.ht/~sircmpwn/aerc2/config"
	"git.sr.ht/~sircmpwn/aerc2/ui"
	"git.sr.ht/~sircmpwn/aerc2/worker"
	"git.sr.ht/~sircmpwn/aerc2/worker/types"
)

func main() {
	conf, err := config.LoadConfig(nil)
	if err != nil {
		panic(err)
	}
	var workers []worker.Worker
	for _, account := range conf.Accounts {
		work, err := worker.NewWorker(account.Source)
		if err != nil {
			panic(err)
		}
		go work.Run()
		work.PostAction(types.Configure{Config: account})
		workers = append(workers, work)
	}
	_ui, err := ui.Initialize(conf)
	if err != nil {
		panic(err)
	}
	defer _ui.Close()
	for !_ui.Exit {
		activity := false
		for _, worker := range workers {
			if msg := worker.GetMessage(); msg != nil {
				activity = true
			}
		}
		activity = _ui.Tick() || activity
		if !activity {
			time.Sleep(100 * time.Millisecond)
		}
	}
}