From 0ab0cbfe43c27577a5f7c709d447ef9714b9b3ff Mon Sep 17 00:00:00 2001 From: ubq323 Date: Mon, 1 Apr 2024 02:33:33 +0100 Subject: launch john --- john.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'john.lua') 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) -- cgit v1.2.3