mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-10-08 18:56:42 +02:00
main menu-ish
This commit is contained in:
parent
8e97d52a2f
commit
7d4998601b
2 changed files with 17 additions and 24 deletions
20
src/tek.rs
20
src/tek.rs
|
|
@ -391,7 +391,7 @@ mod config {
|
|||
*config.error.write().unwrap() = Some(format!("{e:?}").into());
|
||||
panic!("{e:?}");
|
||||
} else {
|
||||
println!("config updated");
|
||||
//println!("config updated");
|
||||
},
|
||||
Err(errors) => {
|
||||
panic!("{errors:?}");
|
||||
|
|
@ -403,7 +403,7 @@ mod config {
|
|||
NotifyConfig::default().with_poll_interval(Duration::from_millis(250))
|
||||
)?;
|
||||
if let Some(mut path) = config.get_file() {
|
||||
println!("watching: {path:?}");
|
||||
//println!("watching: {path:?}");
|
||||
watcher.watch(&path, RecursiveMode::NonRecursive)?;
|
||||
*config.watch.write().unwrap() = Some(watcher);
|
||||
Ok(())
|
||||
|
|
@ -426,7 +426,7 @@ mod config {
|
|||
|
||||
/// Write initial contents of configuration.
|
||||
pub fn init (&self) -> Usually<()> {
|
||||
println!("\r\ninit {}", quanta::Clock::new().raw());
|
||||
//println!("\r\ninit {}", quanta::Clock::new().raw());
|
||||
self.clear();
|
||||
self.load(Self::CONFIG, Self::DEFAULTS, |cfgs, dsl|{
|
||||
cfgs.add(&dsl)?;
|
||||
|
|
@ -1501,13 +1501,13 @@ mod draw {
|
|||
.and_then(|m|self.config.get_mode(m))
|
||||
.map(|mode|{
|
||||
|
||||
south!(
|
||||
format!("Mode: {:?}", self.mode.as_ref()),
|
||||
format!("Time: {}", self.config.stamp.load(Relaxed)),
|
||||
iter_south(||mode.view.iter().enumerate().map(|(index, line)|{
|
||||
format!("View #{index} {line}")
|
||||
}))
|
||||
).align_nw().draw(to)?;
|
||||
//south!(
|
||||
//format!("Mode: {:?}", self.mode.as_ref()),
|
||||
//format!("Time: {}", self.config.stamp.load(Relaxed)),
|
||||
//iter_south(||mode.view.iter().enumerate().map(|(index, line)|{
|
||||
//format!("View #{index} {line}")
|
||||
//}))
|
||||
//).align_nw().draw(to)?;
|
||||
|
||||
for (index, dsl) in mode.view.iter().enumerate() {
|
||||
if let Err(e) = self.interpret(to, dsl) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue