From f4bcd611160bd5c8894c4959d99ea6c3c4f47d49 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Thu, 25 Apr 2019 14:44:36 -0400 Subject: [PATCH] tweaks --- sys/apis/event.lua | 6 +++++- sys/apis/fs/netfs.lua | 1 + sys/apps/Files.lua | 4 ++-- sys/autorun/apps.lua | 2 +- sys/init/6.tl3.lua | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/apis/event.lua b/sys/apis/event.lua index b563f2f..924461e 100644 --- a/sys/apis/event.lua +++ b/sys/apis/event.lua @@ -118,12 +118,16 @@ function Event.off(h) end function Event.onInterval(interval, fn) - return Event.addRoutine(function() + local h = Event.addRoutine(function() while true do os.sleep(interval) fn() end end) + function h.updateInterval(i) + interval = i + end + return h end function Event.onTimeout(timeout, fn) diff --git a/sys/apis/fs/netfs.lua b/sys/apis/fs/netfs.lua index d7eb2eb..77ec3b0 100644 --- a/sys/apis/fs/netfs.lua +++ b/sys/apis/fs/netfs.lua @@ -36,6 +36,7 @@ end local methods = { 'delete', 'exists', 'getFreeSpace', 'makeDir', 'list', 'listEx' } local function resolveDir(dir, node) + -- TODO: Wrong ! (does not support names with dashes) dir = dir:gsub(node.mountPoint, '', 1) return fs.combine(node.directory, dir) end diff --git a/sys/apps/Files.lua b/sys/apps/Files.lua index 0e40ec5..f7564ed 100644 --- a/sys/apps/Files.lua +++ b/sys/apps/Files.lua @@ -146,9 +146,9 @@ local Browser = UI.Page { s = 'shell', p = 'pastebin', r = 'refresh', - space = 'mark', + [ ' ' ] = 'mark', + m = 'mark', backspace = 'updir', - m = 'move', u = 'unmark', d = 'delete', delete = 'delete', diff --git a/sys/autorun/apps.lua b/sys/autorun/apps.lua index c66656b..5322c79 100644 --- a/sys/autorun/apps.lua +++ b/sys/autorun/apps.lua @@ -1,4 +1,4 @@ -fs.mount('sys/apps/pain.lua', 'urlfs', 'http://pastebin.com/raw/wJQ7jav0') +fs.mount('sys/apps/pain.lua', 'urlfs', 'https://github.com/LDDestroier/CC/raw/master/pain.lua') fs.mount('sys/apps/update.lua', 'urlfs', 'http://pastebin.com/raw/UzGHLbNC') fs.mount('sys/apps/Enchat.lua', 'urlfs', 'https://raw.githubusercontent.com/LDDestroier/enchat/master/enchat3.lua') fs.mount('sys/apps/cloud.lua', 'urlfs', 'https://cloud-catcher.squiddev.cc/cloud.lua') diff --git a/sys/init/6.tl3.lua b/sys/init/6.tl3.lua index feeb5a0..53519c4 100644 --- a/sys/init/6.tl3.lua +++ b/sys/init/6.tl3.lua @@ -286,7 +286,7 @@ end) local function isBlacklisted(b) if b and state.blacklist then - for k, v in pairs(state.blacklist) do + for _, v in pairs(state.blacklist) do if b.name:find(v) then return true end