1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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