summaryrefslogtreecommitdiff
path: root/Library/SDK/Modules/Strawberry.MenuBar.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-07-07 11:06:12 +0200
committerMinteck <contact@minteck.org>2022-07-07 11:06:12 +0200
commit3e064be8020ed1eccc5cddcac5ab355320ebccb5 (patch)
tree37ca0fa0141b5600955ce5d001a4c7a7745902a0 /Library/SDK/Modules/Strawberry.MenuBar.js
parent0e9f2dc57e9df8fbc5a5da6d68d1268278aa4129 (diff)
downloadstrawberry-os-3e064be8020ed1eccc5cddcac5ab355320ebccb5.tar.gz
strawberry-os-3e064be8020ed1eccc5cddcac5ab355320ebccb5.tar.bz2
strawberry-os-3e064be8020ed1eccc5cddcac5ab355320ebccb5.zip
m. working on features scoots doesn't want to work onHEADmane
Diffstat (limited to 'Library/SDK/Modules/Strawberry.MenuBar.js')
-rw-r--r--Library/SDK/Modules/Strawberry.MenuBar.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/Library/SDK/Modules/Strawberry.MenuBar.js b/Library/SDK/Modules/Strawberry.MenuBar.js
index 957dcf1..35eced6 100644
--- a/Library/SDK/Modules/Strawberry.MenuBar.js
+++ b/Library/SDK/Modules/Strawberry.MenuBar.js
@@ -28,8 +28,13 @@ self = {
},
Reset: () => {
process.stdout.cursorTo(0, 0);
- process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length)) + new Date().toTimeString().substring(0, 5) + " " + name + " ")))
- process.stdout.cursorTo(0, process.stdout.rows);
+ if (global._STRAWBERRY_DEBUG_MODE) {
+ process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length + 4)) + new Date().toTimeString().substring(0, 5) + " " + name + " " + color.bgRed.black(" D ") + " ")))
+ process.stdout.cursorTo(0, process.stdout.rows);
+ } else {
+ process.stdout.write(color.reset(color.bgBlue(" " + color.black.bgYellowBright(" O ") + " " + menus + " ".repeat(process.stdout.columns - (15 + Strawberry.App.length + menusText.length)) + new Date().toTimeString().substring(0, 5) + " " + name + " ")))
+ process.stdout.cursorTo(0, process.stdout.rows);
+ }
},
Active: (item) => {
let a = Strawberry.Menus.filter((_, i) => {
@@ -129,7 +134,11 @@ self = {
},
UpdateClock: () => {
- process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length), 0);
+ if (global._STRAWBERRY_DEBUG_MODE) {
+ process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length + 4), 0);
+ } else {
+ process.stdout.cursorTo(process.stdout.columns - (10 + Strawberry.App.length), 0);
+ }
process.stdout.write(color.bgBlue(new Date().toTimeString().substring(0, 5)));
process.stdout.cursorTo(0, process.stdout.rows);
}