Added font support
This commit is contained in:
parent
fb755a02a5
commit
def2721360
7
main.js
7
main.js
@ -11,6 +11,8 @@ const date = require('date-and-time');
|
|||||||
var free = require('freem');
|
var free = require('freem');
|
||||||
const checkDiskSpace = require('check-disk-space').default
|
const checkDiskSpace = require('check-disk-space').default
|
||||||
|
|
||||||
|
let font = "Roboto Medium"
|
||||||
|
|
||||||
function cpuUsage(cb, core, sampleMs) {
|
function cpuUsage(cb, core, sampleMs) {
|
||||||
var deltaUsed;
|
var deltaUsed;
|
||||||
var deltaIdle;
|
var deltaIdle;
|
||||||
@ -64,7 +66,8 @@ lb.launch({
|
|||||||
|
|
||||||
background: "#000", // Background color (#rgb, #rrggbb, #aarrggbb)
|
background: "#000", // Background color (#rgb, #rrggbb, #aarrggbb)
|
||||||
foreground: "#000", // Foreground color
|
foreground: "#000", // Foreground color
|
||||||
lineWidth: 1, lineColor: "#666", // Underline/Overline config
|
lineWidth: 1, lineColor: "#666",
|
||||||
|
fonts: ["Roboto Medium", "Roboto Medium"], // Underline/Overline config
|
||||||
geometry: { // Window geometry
|
geometry: { // Window geometry
|
||||||
x: 0, y: 0,
|
x: 0, y: 0,
|
||||||
width: null, height: 25
|
width: null, height: 25
|
||||||
@ -133,7 +136,7 @@ async function update() {
|
|||||||
lb.append(lb.right + (date.format(now, 'hh:mm:ss').toString.lbFg("#fff") + " | ".lbFg("#fff") + date.format(now, pattern).toString().lbFg("#fff") + " | BAT: ".lbFg("#fff") + level.toString().lbFg("#fff") + " (Charging)".lbFg("#fff") + " " + "| WIFI: ".lbFg("#fff") + wifiSSID.ssid.lbFg("#fff") + " | IP: ".lbFg("#fff") + address().lbFg("#fff")).lbSwap)
|
lb.append(lb.right + (date.format(now, 'hh:mm:ss').toString.lbFg("#fff") + " | ".lbFg("#fff") + date.format(now, pattern).toString().lbFg("#fff") + " | BAT: ".lbFg("#fff") + level.toString().lbFg("#fff") + " (Charging)".lbFg("#fff") + " " + "| WIFI: ".lbFg("#fff") + wifiSSID.ssid.lbFg("#fff") + " | IP: ".lbFg("#fff") + address().lbFg("#fff")).lbSwap)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
lb.append(lb.right + (date.format(now, 'hh:mm:ss').toString().lbFg("#fff") + " | ".lbFg("#fff") + date.format(now, pattern).toString().lbFg("#fff") + " | BAT: ".lbFg("#fff") + level.toString().lbFg("#fff") + " " + "| WIFI: ".lbFg("#fff") + wifiSSID.toString().lbFg("#fff") + " | IP: ".lbFg("#fff") + address().lbFg("#fff")).lbSwap)
|
lb.append(lb.right + (date.format(now, 'hh:mm:ss').toString().lbFont(font).lbFg("#fff") + " | ".lbFg("#fff") + date.format(now, pattern).toString().lbFg("#fff") + " | BAT: ".lbFg("#fff") + level.toString().lbFg("#fff") + " " + "| WIFI: ".lbFg("#fff") + wifiSSID.toString().lbFg("#fff") + " | IP: ".lbFg("#fff") + address().lbFg("#fff")).lbSwap)
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.getActiveWindow((err, window) => {
|
monitor.getActiveWindow((err, window) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user