REF update core

This commit is contained in:
Nathan Dwarshuis 2021-08-08 15:10:09 -04:00
parent 15dc15f534
commit ac01b8f607
7 changed files with 15 additions and 15 deletions

2
core

@ -1 +1 @@
Subproject commit 958f836bebece975a212d756c56f3de17c2ac6ce Subproject commit 8fdf42631afd209d076e23e1db1025aafcdcfb62

View File

@ -1,6 +1,6 @@
local M = {} local M = {}
local F = require 'primitive' local F = require 'geom'
local util = require 'util' local util = require 'util'
local theme = require 'theme' local theme = require 'theme'
local dial = require 'dial' local dial = require 'dial'

View File

@ -3,7 +3,7 @@ local texttable = require 'texttable'
local util = require 'util' local util = require 'util'
local common = require 'common' local common = require 'common'
local geometry = require 'geometry' local geometry = require 'geometry'
local func = require 'func' local pure = require 'pure'
return function(update_freq) return function(update_freq)
local MODULE_Y = 712 local MODULE_Y = 712
@ -111,7 +111,7 @@ return function(update_freq)
-- memory top table -- memory top table
local NUM_ROWS = 5 local NUM_ROWS = 5
local TABLE_CONKY = func.map( local TABLE_CONKY = pure.map(
function(i) function(i)
return { return {
comm = '${top_mem name '..i..'}', comm = '${top_mem name '..i..'}',
@ -119,7 +119,7 @@ return function(update_freq)
mem = '${top_mem mem '..i..'}', mem = '${top_mem mem '..i..'}',
} }
end, end,
func.seq(NUM_ROWS)) pure.seq(NUM_ROWS))
local tbl = common.make_text_table( local tbl = common.make_text_table(
geometry.RIGHT_X, geometry.RIGHT_X,

View File

@ -1,7 +1,7 @@
local util = require 'util' local util = require 'util'
local common = require 'common' local common = require 'common'
local geometry = require 'geometry' local geometry = require 'geometry'
local func = require 'func' local pure = require 'pure'
return function(update_freq) return function(update_freq)
local PLOT_SEC_BREAK = 20 local PLOT_SEC_BREAK = 20
@ -18,7 +18,7 @@ return function(update_freq)
local INTERFACES = get_interfaces() local INTERFACES = get_interfaces()
local INTERFACE_PATHS = func.map( local INTERFACE_PATHS = pure.map(
function(s) function(s)
local dir = string.format('/sys/class/net/%s/statistics/', s) local dir = string.format('/sys/class/net/%s/statistics/', s)
return {rx = dir..'rx_bytes', tx = dir..'tx_bytes'} return {rx = dir..'rx_bytes', tx = dir..'tx_bytes'}

View File

@ -4,8 +4,8 @@ local texttable = require 'texttable'
local util = require 'util' local util = require 'util'
local common = require 'common' local common = require 'common'
local geometry = require 'geometry' local geometry = require 'geometry'
local cpu = require 'cpu' local cpu = require 'sys'
local func = require 'func' local pure = require 'pure'
local __math_floor = math.floor local __math_floor = math.floor
@ -117,9 +117,9 @@ return function(update_freq)
-- cpu top table -- cpu top table
local NUM_ROWS = 5 local NUM_ROWS = 5
local TABLE_CONKY = func.map( local TABLE_CONKY = pure.map(
function(i) return {pid = '${top pid '..i..'}', cpu = '${top cpu '..i..'}'} end, function(i) return {pid = '${top pid '..i..'}', cpu = '${top cpu '..i..'}'} end,
func.seq(NUM_ROWS) pure.seq(NUM_ROWS)
) )
local tbl = common.make_text_table( local tbl = common.make_text_table(

View File

@ -1,7 +1,7 @@
local util = require 'util' local util = require 'util'
local common = require 'common' local common = require 'common'
local geometry = require 'geometry' local geometry = require 'geometry'
local func = require 'func' local pure = require 'pure'
return function(update_freq) return function(update_freq)
local PLOT_SEC_BREAK = 20 local PLOT_SEC_BREAK = 20
@ -19,7 +19,7 @@ return function(update_freq)
local __string_match = string.match local __string_match = string.match
-- TODO any way to make better lambda functions? -- TODO any way to make better lambda functions?
local DEVICE_PATHS = func.map( local DEVICE_PATHS = pure.map(
function(s) return string.format('/sys/block/%s/stat', s) end, function(s) return string.format('/sys/block/%s/stat', s) end,
DEVICES DEVICES
) )

View File

@ -8,11 +8,11 @@ local ABS_PATH = debug.getinfo(1).source:match("@?(.*/)")
package.path = ABS_PATH..'?.lua;'.. package.path = ABS_PATH..'?.lua;'..
ABS_PATH..'drawing/?.lua;'.. ABS_PATH..'drawing/?.lua;'..
ABS_PATH..'schema/?.lua;'.. ABS_PATH..'schema/?.lua;'..
ABS_PATH..'core/func/?.lua;'.. ABS_PATH..'core/?.lua;'..
ABS_PATH..'core/widget/?.lua;'.. ABS_PATH..'core/widget/?.lua;'..
ABS_PATH..'core/widget/arc/?.lua;'.. ABS_PATH..'core/widget/arc/?.lua;'..
ABS_PATH..'core/widget/text/?.lua;'.. ABS_PATH..'core/widget/text/?.lua;'..
ABS_PATH..'core/widget/plot/?.lua;'.. ABS_PATH..'core/widget/timeseries/?.lua;'..
ABS_PATH..'core/widget/rect/?.lua;'.. ABS_PATH..'core/widget/rect/?.lua;'..
ABS_PATH..'core/widget/poly/?.lua;' ABS_PATH..'core/widget/poly/?.lua;'