Hi,
I have been using ion for a while, but this is my first time on the
mailing list.
I have recently created a lua script (my first!) which is working
perfectly for what I wrote it for (enforcing microbreaks).
However, when it is enabled (i.e dopath()'d), if I use keyboard resize
mode, ion appears to lock up. I can't exit resize mode, resize, or do
any other ion functions. killall -USR1 ion3 and killall -HUP ion3 have
no effect. I was wondering if anyone here has any ideas of what I
might be doing wrong?
-------------------------------------------------------
local timer = ioncore.create_timer()
local prev_val = 0
function readrsi()
local f=io.popen('/home/jarrod/bin/readus', 'r')
if not f then
return "err"
end
local s=f:read('*all')
f:close()
local _, _, r, level = string.find(s, "(([0-9]+)[0-9:I =-]+)")
mod_statusbar.inform("rsi", r)
mod_statusbar.update()
if not ( prev_val == level ) then
dopath("look_auto" .. level .. ".lua")
dopath("action_auto" .. level .. ".lua")
prev_val = level
end
timer:set(1000, readrsi)
end
readrsi()
---------------------------------------------------
For the curious, readus returns a line which shows which length of
break I should be in, timers until I should be in each break, and how
long X has been idle. If anyone wants the code (in C) just email me.
--
Jarrod Lowe