#!/bin/env tclsh
set path [file dirname [dict get [info frame 0] file]]
package require Thread
package require logger
set log [logger::init tclircc::main]
${log}::info {tclircc 0.0.1 <https://amehut.dev/~aleteoryx/tclircc>}
${log}::info "running from $path"
${log}::debug "starting ui thread"
set ui_thread [thread::create -preserved]
if {[thread::send $ui_thread [list source "$path[file separator]/uiMain.tcl"] result] == 1} {
${log}::critical "couldn't start ui thread: $result"
exit -1
}
${log}::info "entering event loop"
vwait nil