summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--john.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/john.lua b/john.lua
index b1449fe..cab1104 100644
--- a/john.lua
+++ b/john.lua
@@ -1,10 +1,18 @@
local framebuf = require("framebuf")
local fb = framebuf.new()
+local function splitw(str)
+ local res = {}
+ for s in str:gmatch("%S+") do
+ table.insert(res,s)
+ end
+ return res
+end
-local monitors = {
- "monitor_1808", "monitor_1810", "monitor_1809"
-}
+local monitors = splitw(settings.get"john.monitors")
+if monitors == nil or #monitors < 1 then
+ error("need john.monitors setting")
+end
for ix,iname in ipairs(monitors) do
print("doing",ix,iname)