From 9c8004580ae338da5b3f1761ad9ea73af80754a0 Mon Sep 17 00:00:00 2001 From: snxraven Date: Thu, 23 Sep 2021 19:58:17 -0400 Subject: [PATCH] Clean up --- main.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/main.js b/main.js index 046e260..e85e452 100644 --- a/main.js +++ b/main.js @@ -7,9 +7,6 @@ const battery = require("battery"); const fs = require('fs'); const os = require('os'); -const isNotDefined = require("is-not-defined"); - - function cpuUsage(cb, core, sampleMs) { var deltaUsed; var deltaIdle; @@ -42,8 +39,6 @@ process.on('uncaughtException', err => { process.exit(1) //mandatory (as per the Node.js docs) }) - - // The cache file const file = '/home/raven/Documents/cache.json' @@ -107,7 +102,6 @@ async function update() { cpuUsage(perc => lb.append(lb.left + "RavenScott | CPU: ".lbFg("#fff") + (Math.round(perc * 100) / 100).toFixed(2).lbFg("#fff"))); - // Check the cache SSID jsonfile.readFile(file, function (err, obj) { if (err) console.error(err) @@ -122,7 +116,6 @@ async function update() { lb.append(lb.right + (" " + new Date().toDateString().lbFg("#fff") + " | BAT: ".lbFg("#fff") + level.toString().lbFg("#fff") + " " + "| WIFI: ".lbFg("#fff") + wifiSSID.toString().lbFg("#fff")).lbSwap) } - monitor.getActiveWindow((err, window) => { if (!err) { lb.append((lb.center + window.app.lbFg("#fff"))) @@ -135,10 +128,7 @@ async function update() { lb.write() }) - - }) - } update()