initial commit of bin scripts into git
This commit is contained in:
17
resolution.tcl
Executable file
17
resolution.tcl
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/tclsh
|
||||
|
||||
set out [exec xwininfo -root -display :0]
|
||||
regexp {geometry (\d+x\d+)} $out m res
|
||||
if { $argc == 1 } {
|
||||
set str "$argv0\($argv\): $res"
|
||||
} else {
|
||||
set str "$argv0: $res"
|
||||
}
|
||||
puts $res
|
||||
# if file can be opened for writing then add debug data to it
|
||||
set fn "/tmp/resolution_results.txt"
|
||||
if { ! [catch {open $fn a} f] } {
|
||||
puts -nonewline $f "[clock format [clock seconds]]: "
|
||||
puts $f $str
|
||||
close $f
|
||||
}
|
||||
Reference in New Issue
Block a user