From fc9981bff034a801942ee749cb0fb043fdfd9720 Mon Sep 17 00:00:00 2001 From: "kepler155c@gmail.com" Date: Mon, 19 Feb 2018 22:19:49 -0500 Subject: [PATCH] neural + copy file path --- sys/apps/Files.lua | 7 ++++++- sys/network/snmp.lua | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/apps/Files.lua b/sys/apps/Files.lua index 5675925..464ab75 100644 --- a/sys/apps/Files.lua +++ b/sys/apps/Files.lua @@ -48,6 +48,7 @@ local Browser = UI.Page { { text = 'Edit', dropdown = { { text = 'Cut ^x', event = 'cut' }, { text = 'Copy ^c', event = 'copy' }, + { text = 'Copy path ', event = 'copy_path' }, { text = 'Paste ^v', event = 'paste' }, UI.MenuBar.spacer, { text = 'Mark m', event = 'mark' }, @@ -228,7 +229,6 @@ function Browser:updateDirectory(dir) end function Browser:setDir(dirName, noStatus) - self:unmarkAll() if self.dir then @@ -379,6 +379,11 @@ function Browser:eventHandler(event) self:setStatus('Copied %d file(s)', Util.size(copied)) end + elseif event.type == 'copy_path' then + if file then + os.queueEvent('clipboard_copy', file.fullName) + end + elseif event.type == 'paste' then for _,m in pairs(copied) do local s, m = pcall(function() diff --git a/sys/network/snmp.lua b/sys/network/snmp.lua index af79aab..8c185bc 100644 --- a/sys/network/snmp.lua +++ b/sys/network/snmp.lua @@ -149,7 +149,9 @@ local function sendInfo() if device.neuralInterface then info.status = device.neuralInterface.status if not info.status and device.neuralInterface.getMetaOwner then - info.status = 'health: ' .. device.neuralInterface.getMetaOwner().health + info.status = 'health: ' .. + math.floor(device.neuralInterface.getMetaOwner().health / + device.neuralInterface.getMetaOwner().maxHealth * 100) end end device.wireless_modem.transmit(999, os.getComputerID(), info)