parent
5f5f2b3f4f
commit
a4be54d444
22 changed files with 1055 additions and 0 deletions
@ -0,0 +1,50 @@ |
||||
From ab439368d73236c2f1927ddd2e1f6d4b62eac6eb Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:02:55 -0500
|
||||
Subject: [PATCH 01/22] Make the separator between columns larger
|
||||
|
||||
---
|
||||
Header.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Header.c b/Header.c
|
||||
index 7447f718..8f90f2f3 100644
|
||||
--- a/Header.c
|
||||
+++ b/Header.c
|
||||
@@ -194,12 +194,14 @@ void Header_reinit(Header* this) {
|
||||
void Header_draw(const Header* this) {
|
||||
const int height = this->height;
|
||||
const int pad = this->pad;
|
||||
+ const int sep = 3;
|
||||
+
|
||||
attrset(CRT_colors[RESET_COLOR]);
|
||||
for (int y = 0; y < height; y++) {
|
||||
mvhline(y, 0, ' ', COLS);
|
||||
}
|
||||
const size_t numCols = HeaderLayout_getColumns(this->headerLayout);
|
||||
- const int width = COLS - 2 * pad - ((int)numCols - 1);
|
||||
+ const int width = COLS - 2 * pad - sep*((int)numCols - 1);
|
||||
int x = pad;
|
||||
float roundingLoss = 0.0F;
|
||||
|
||||
@@ -222,7 +224,7 @@ void Header_draw(const Header* this) {
|
||||
except for multi column meters. */
|
||||
if (meter->mode == TEXT_METERMODE && !Meter_isMultiColumn(meter)) {
|
||||
for (int j = 1; j < meter->columnWidthCount; j++) {
|
||||
- actualWidth++; /* separator column */
|
||||
+ actualWidth+=sep; /* separator column */
|
||||
actualWidth += (float)width * HeaderLayout_layouts[this->headerLayout].widths[col + j] / 100.0F;
|
||||
}
|
||||
}
|
||||
@@ -233,7 +235,7 @@ void Header_draw(const Header* this) {
|
||||
}
|
||||
|
||||
x += floorf(colWidth);
|
||||
- x++; /* separator column */
|
||||
+ x+= sep; /* separator column */
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From 4a73d8e15c53f19eb17bad8c3e56ba797ebe30a3 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Wed, 25 May 2022 09:29:58 -0400
|
||||
Subject: [PATCH 02/22] Pad core id with 0s
|
||||
|
||||
---
|
||||
CPUMeter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CPUMeter.c b/CPUMeter.c
|
||||
index 40eaac10..6fdeb48b 100644
|
||||
--- a/CPUMeter.c
|
||||
+++ b/CPUMeter.c
|
||||
@@ -92,7 +92,7 @@ static void CPUMeter_updateValues(Meter* this) {
|
||||
if (settings->showCPUFrequency) {
|
||||
double cpuFrequency = this->values[CPU_METER_FREQUENCY];
|
||||
if (isNonnegative(cpuFrequency)) {
|
||||
- xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "%4uMHz", (unsigned)cpuFrequency);
|
||||
+ xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "%04uMHz", (unsigned)cpuFrequency);
|
||||
} else {
|
||||
xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "N/A");
|
||||
}
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From 7ca257d269245b91c7e811134f94f26a0fbc7b99 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:10:06 -0500
|
||||
Subject: [PATCH 03/22] Use filled square for bar char
|
||||
|
||||
---
|
||||
Meter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index 4f8f7667..331ef303 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -168,7 +168,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
assert(i < strlen(BarMeterMode_characters));
|
||||
RichString_setChar(&bar, startPos + j, BarMeterMode_characters[i]);
|
||||
} else {
|
||||
- RichString_setChar(&bar, startPos + j, '|');
|
||||
+ RichString_setChar(&bar, startPos + j, L'■');
|
||||
}
|
||||
}
|
||||
offset = nextOffset;
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,52 @@ |
||||
From ccab854b3aa26ebf8e014cb3aba92f295ff7157c Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 26 May 2022 12:53:08 -0400
|
||||
Subject: [PATCH 04/22] Use accent color for key and add separator
|
||||
|
||||
---
|
||||
CRT.c | 6 ++++--
|
||||
FunctionBar.c | 1 +
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index c92c1043..6f9f3b16 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -55,6 +55,8 @@ in the source distribution for its full text.
|
||||
#define Cyan COLOR_CYAN
|
||||
#define White COLOR_WHITE
|
||||
|
||||
+#define Accent Red
|
||||
+
|
||||
#define ColorPairGrayBlack ColorPair(Magenta,Magenta)
|
||||
#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta)
|
||||
|
||||
@@ -128,11 +130,11 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[COLORSCHEME_DEFAULT] = {
|
||||
[RESET_COLOR] = ColorPair(White, Black),
|
||||
[DEFAULT_COLOR] = ColorPair(White, Black),
|
||||
- [FUNCTION_BAR] = ColorPair(Black, Cyan),
|
||||
- [FUNCTION_KEY] = ColorPair(White, Black),
|
||||
[PANEL_HEADER_FOCUS] = ColorPair(Black, Green),
|
||||
[PANEL_HEADER_UNFOCUS] = ColorPair(Black, Green),
|
||||
[PANEL_SELECTION_FOCUS] = ColorPair(Black, Cyan),
|
||||
+ [FUNCTION_BAR] = ColorPair(White, Black),
|
||||
+ [FUNCTION_KEY] = ColorPair(Accent, Black),
|
||||
[PANEL_SELECTION_FOLLOW] = ColorPair(Black, Yellow),
|
||||
[PANEL_SELECTION_UNFOCUS] = ColorPair(Black, White),
|
||||
[FAILED_SEARCH] = ColorPair(Red, Cyan),
|
||||
diff --git a/FunctionBar.c b/FunctionBar.c
|
||||
index 765fc4f7..e46f5136 100644
|
||||
--- a/FunctionBar.c
|
||||
+++ b/FunctionBar.c
|
||||
@@ -103,6 +103,7 @@ int FunctionBar_drawExtra(const FunctionBar* this, const char* buffer, int attr,
|
||||
attrset(CRT_colors[FUNCTION_KEY]);
|
||||
mvaddstr(LINES - 1, x, this->keys.constKeys[i]);
|
||||
x += strlen(this->keys.constKeys[i]);
|
||||
+ x ++;
|
||||
attrset(CRT_colors[FUNCTION_BAR]);
|
||||
mvaddstr(LINES - 1, x, this->functions[i]);
|
||||
x += strlen(this->functions[i]);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,60 @@ |
||||
From 9d35af61018a5dc1b0e6ce5a700dbdc08a231edf Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 26 May 2022 13:00:00 -0400
|
||||
Subject: [PATCH 05/22] Shorten labels in function bar
|
||||
|
||||
---
|
||||
MainPanel.c | 36 +++++++++++++++++++++++++++---------
|
||||
1 file changed, 27 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/MainPanel.c b/MainPanel.c
|
||||
index f82439d2..0e4721e0 100644
|
||||
--- a/MainPanel.c
|
||||
+++ b/MainPanel.c
|
||||
@@ -25,16 +25,34 @@ in the source distribution for its full text.
|
||||
#include "Table.h"
|
||||
#include "XUtils.h"
|
||||
|
||||
+static const char* const MainFunctions[] =
|
||||
+ {"Help ",
|
||||
+ "Conf ",
|
||||
+ "Srch ",
|
||||
+ "Fltr ",
|
||||
+ "Tree ",
|
||||
+ "Sort ",
|
||||
+ "Nice-",
|
||||
+ "Nice+",
|
||||
+ "Kill ",
|
||||
+ "Quit ", NULL};
|
||||
+static const char* const MainFunctions_ro[] =
|
||||
+ {"Help ",
|
||||
+ "Conf ",
|
||||
+ "Srch ",
|
||||
+ "Fltr ",
|
||||
+ "Tree ",
|
||||
+ "Sort ",
|
||||
+ " ",
|
||||
+ " ",
|
||||
+ " ",
|
||||
+ "Quit ", NULL};
|
||||
|
||||
-static const char* const MainFunctions[] = {"Help ", "Setup ", "Search", "Filter", "Tree ", "SortBy", "Nice -", "Nice +", "Kill ", "Quit ", NULL};
|
||||
-static const char* const MainFunctions_ro[] = {"Help ", "Setup ", "Search", "Filter", "Tree ", "SortBy", " ", " ", " ", "Quit ", NULL};
|
||||
-
|
||||
-void MainPanel_updateLabels(MainPanel* this, bool list, bool filter) {
|
||||
- FunctionBar* bar = MainPanel_getFunctionBar(this);
|
||||
- FunctionBar_setLabel(bar, KEY_F(5), list ? "List " : "Tree ");
|
||||
- FunctionBar_setLabel(bar, KEY_F(4), filter ? "FILTER" : "Filter");
|
||||
-}
|
||||
-
|
||||
+ void MainPanel_updateLabels(MainPanel* this, bool list, bool filter) {
|
||||
+ FunctionBar* bar = MainPanel_getFunctionBar(this);
|
||||
+ FunctionBar_setLabel(bar, KEY_F(5), list ? "List " : "Tree ");
|
||||
+ FunctionBar_setLabel(bar, KEY_F(4), filter ? "FLTR " : "Fltr ");
|
||||
+ }
|
||||
static void MainPanel_idSearch(MainPanel* this, int ch) {
|
||||
Panel* super = &this->super;
|
||||
pid_t id = ch - 48 + this->idSearch;
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,67 @@ |
||||
From ba44e8ffd3e7fc6590b7cb40a9d2563514a56142 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 10:54:42 -0400
|
||||
Subject: [PATCH 06/22] Add separators
|
||||
|
||||
This allows to use neutral highlighting for the top row and the
|
||||
function bar.
|
||||
---
|
||||
Panel.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/Panel.c b/Panel.c
|
||||
index f0c38af6..fd37e416 100644
|
||||
--- a/Panel.c
|
||||
+++ b/Panel.c
|
||||
@@ -219,6 +219,13 @@ void Panel_splice(Panel* this, Vector* from) {
|
||||
this->needsRedraw = true;
|
||||
}
|
||||
|
||||
+inline void draw_separator(int y, int x, int w) {
|
||||
+ for (int i=0;i<w;i++) {
|
||||
+ mvaddstr(y,x,"⎯");
|
||||
+ x++;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelected, bool hideFunctionBar) {
|
||||
assert (this != NULL);
|
||||
|
||||
@@ -228,9 +235,15 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
|
||||
int x = this->x;
|
||||
int h = this->h;
|
||||
|
||||
+ // Separator
|
||||
+ attrset(CRT_colors[RESET_COLOR]);
|
||||
+ // draw_separator(y-1,x+1,this->w-2);
|
||||
+
|
||||
if (hideFunctionBar)
|
||||
h++;
|
||||
|
||||
+ h--; //separator at the bottom
|
||||
+
|
||||
const int header_attr = focus
|
||||
? CRT_colors[PANEL_HEADER_FOCUS]
|
||||
: CRT_colors[PANEL_HEADER_UNFOCUS];
|
||||
@@ -253,6 +266,9 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
|
||||
h--;
|
||||
}
|
||||
|
||||
+ draw_separator(y,x,this->w);
|
||||
+ y++; h--;
|
||||
+
|
||||
// ensure scroll area is on screen
|
||||
if (this->scrollV < 0) {
|
||||
this->scrollV = 0;
|
||||
@@ -331,6 +347,8 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
|
||||
RichString_delete(&old);
|
||||
}
|
||||
|
||||
+ draw_separator(y+h,x,this->w);
|
||||
+
|
||||
if (focus && (this->needsRedraw || force_redraw || !this->wasFocus)) {
|
||||
if (Panel_drawFunctionBarFn(this))
|
||||
Panel_drawFunctionBar(this, hideFunctionBar);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,27 @@ |
||||
From bc00da18c58a6842421a757c3e795f4b587b9415 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 10:58:11 -0400
|
||||
Subject: [PATCH 07/22] Use proper glyphs to denote sorting
|
||||
|
||||
---
|
||||
CRT.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index 6f9f3b16..1f2a0fc9 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -85,8 +85,8 @@ static const char* const CRT_treeStrUtf8[LAST_TREE_STR] = {
|
||||
// WITH VERTICAL STROKE' (U+1FBAF, "\xf0\x9f\xae\xaf") when
|
||||
// Unicode 13 is common
|
||||
[TREE_STR_SHUT] = "\xe2\x94\x80", // ─
|
||||
- [TREE_STR_ASC] = "\xe2\x96\xb3", // △
|
||||
- [TREE_STR_DESC] = "\xe2\x96\xbd", // ▽
|
||||
+ [TREE_STR_ASC] = "▲",
|
||||
+ [TREE_STR_DESC] = "▼",
|
||||
};
|
||||
|
||||
bool CRT_utf8 = false;
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From 26232c296aabf06dfe3c8f2f3a57348617dbc3ad Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 10:59:42 -0400
|
||||
Subject: [PATCH 08/22] Use accent color for labels
|
||||
|
||||
---
|
||||
CRT.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index 1f2a0fc9..8e4de503 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -144,7 +144,7 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[BATTERY] = A_BOLD | ColorPair(Cyan, Black),
|
||||
[LARGE_NUMBER] = A_BOLD | ColorPair(Red, Black),
|
||||
[METER_SHADOW] = A_BOLD | ColorPairGrayBlack,
|
||||
- [METER_TEXT] = ColorPair(Cyan, Black),
|
||||
+ [METER_TEXT] = ColorPair(Accent, Black),
|
||||
[METER_VALUE] = A_BOLD | ColorPair(Cyan, Black),
|
||||
[METER_VALUE_ERROR] = A_BOLD | ColorPair(Red, Black),
|
||||
[METER_VALUE_IOREAD] = ColorPair(Green, Black),
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From f49606a2dca4a6e29a5b01551c0556cb28ac400f Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 11:00:37 -0400
|
||||
Subject: [PATCH 09/22] Remove bold attribute (broken on solarized-like)
|
||||
|
||||
---
|
||||
CRT.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index 8e4de503..10e85485 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -162,7 +162,7 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan, Black),
|
||||
[PROCESS_TREE] = ColorPair(Cyan, Black),
|
||||
[PROCESS_RUN_STATE] = ColorPair(Green, Black),
|
||||
- [PROCESS_D_STATE] = A_BOLD | ColorPair(Red, Black),
|
||||
+ [PROCESS_D_STATE] = ColorPair(Magenta, Black),
|
||||
[PROCESS_HIGH_PRIORITY] = ColorPair(Red, Black),
|
||||
[PROCESS_LOW_PRIORITY] = ColorPair(Green, Black),
|
||||
[PROCESS_NEW] = ColorPair(Black, Green),
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,47 @@ |
||||
From b2cc1850060ea96b73b5de8bf9df2918ea3c501f Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 11:02:45 -0400
|
||||
Subject: [PATCH 10/22] Introduce highlighted pairs
|
||||
|
||||
This only makes sense in solarized-like schemes
|
||||
---
|
||||
CRT.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index 10e85485..b0fa39cd 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -45,6 +45,7 @@ in the source distribution for its full text.
|
||||
#define ColorIndex(i,j) ((7-(i))*8+(j))
|
||||
|
||||
#define ColorPair(i,j) COLOR_PAIR(ColorIndex(i,j))
|
||||
+#define HighlightColorPair(i,j) COLOR_PAIR(64+ColorIndex(i,j))
|
||||
|
||||
#define Black COLOR_BLACK
|
||||
#define Red COLOR_RED
|
||||
@@ -130,9 +131,9 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[COLORSCHEME_DEFAULT] = {
|
||||
[RESET_COLOR] = ColorPair(White, Black),
|
||||
[DEFAULT_COLOR] = ColorPair(White, Black),
|
||||
- [PANEL_HEADER_FOCUS] = ColorPair(Black, Green),
|
||||
- [PANEL_HEADER_UNFOCUS] = ColorPair(Black, Green),
|
||||
- [PANEL_SELECTION_FOCUS] = ColorPair(Black, Cyan),
|
||||
+ [PANEL_HEADER_FOCUS] = ColorPair(White, Black),
|
||||
+ [PANEL_HEADER_UNFOCUS] = ColorPair(White, Black),
|
||||
+ [PANEL_SELECTION_FOCUS] = HighlightColorPair(White, Black),
|
||||
[FUNCTION_BAR] = ColorPair(White, Black),
|
||||
[FUNCTION_KEY] = ColorPair(Accent, Black),
|
||||
[PANEL_SELECTION_FOLLOW] = ColorPair(Black, Yellow),
|
||||
@@ -1338,6 +1339,8 @@ void CRT_setColors(int colorScheme) {
|
||||
if (ColorIndex(i, j) != ColorIndexGrayBlack && ColorIndex(i, j) != ColorIndexWhiteDefault) {
|
||||
short int bg = (colorScheme != COLORSCHEME_BLACKNIGHT) && (j == 0) ? -1 : j;
|
||||
init_pair(ColorIndex(i, j), i, bg);
|
||||
+ init_pair(64+ColorIndex(i, j), (ColorIndex(i,j) == 0?-1:i), j);
|
||||
+
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,38 @@ |
||||
From 228f7448a37f4f3988fddd0255e44a680a547b14 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:26:27 -0500
|
||||
Subject: [PATCH 11/22] Remove Bar borders
|
||||
|
||||
This is an experiment in Tufte-ism
|
||||
---
|
||||
Meter.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index 331ef303..cb08f152 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -101,11 +101,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
|
||||
// Draw the bar borders
|
||||
if (w >= 1) {
|
||||
- x += captionLen;
|
||||
- attrset(CRT_colors[BAR_BORDER]);
|
||||
- mvaddch(y, x, '[');
|
||||
- w--;
|
||||
- mvaddch(y, x + w, ']');
|
||||
+ x += captionLen + 1;
|
||||
w--;
|
||||
}
|
||||
|
||||
@@ -119,7 +115,6 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
goto end;
|
||||
}
|
||||
attrset(CRT_colors[RESET_COLOR]); // Clear the bold attribute
|
||||
- x++;
|
||||
|
||||
// The text in the bar is right aligned;
|
||||
// Pad with maximal spaces and then calculate needed starting position offset
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,87 @@ |
||||
From 9ad0e22be9db595d39e9ec3f6e8471f4d4382ef4 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Fri, 27 May 2022 11:09:54 -0400
|
||||
Subject: [PATCH 12/22] Implement highlight methods
|
||||
|
||||
---
|
||||
Panel.c | 2 +-
|
||||
RichString.c | 23 +++++++++++++++++++++++
|
||||
RichString.h | 4 ++++
|
||||
3 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Panel.c b/Panel.c
|
||||
index fd37e416..6f2e14cc 100644
|
||||
--- a/Panel.c
|
||||
+++ b/Panel.c
|
||||
@@ -306,7 +306,7 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
|
||||
}
|
||||
if (item.highlightAttr) {
|
||||
attrset(item.highlightAttr);
|
||||
- RichString_setAttr(&item, item.highlightAttr);
|
||||
+ RichString_highlight(&item);
|
||||
this->selectedLen = itemLen;
|
||||
}
|
||||
mvhline(y + line, x, ' ', this->w);
|
||||
diff --git a/RichString.c b/RichString.c
|
||||
index fcb4e358..52e7a099 100644
|
||||
--- a/RichString.c
|
||||
+++ b/RichString.c
|
||||
@@ -160,6 +160,25 @@ inline void RichString_setAttrn(RichString* this, int attrs, size_t start, size_
|
||||
}
|
||||
}
|
||||
|
||||
+inline void RichString_highlightn(RichString* this, int start, int charcount) {
|
||||
+ int end = CLAMP(start + charcount, 0, this->chlen);
|
||||
+ for (int i = start; i < end; i++) {
|
||||
+ wchar_t ch[10];
|
||||
+ attr_t attr;
|
||||
+ short pair;
|
||||
+ // use getcchar/setcchar
|
||||
+ getcchar(&this->chptr[i],ch,&attr,&pair,NULL);
|
||||
+ pair |= 64;
|
||||
+ if (pair == 64) {
|
||||
+ attr |= A_BOLD;
|
||||
+ } else {
|
||||
+ attr &= (0xffffff & !A_BOLD);
|
||||
+ }
|
||||
+ setcchar(&this->chptr[i],ch,attr,pair,NULL);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
void RichString_appendChr(RichString* this, int attrs, char c, int count) {
|
||||
int from = this->chlen;
|
||||
int newLen = from + count;
|
||||
@@ -243,6 +262,10 @@ void RichString_setAttr(RichString* this, int attrs) {
|
||||
RichString_setAttrn(this, attrs, 0, this->chlen);
|
||||
}
|
||||
|
||||
+void RichString_highlight(RichString* this) {
|
||||
+ RichString_highlightn(this, 0, this->chlen);
|
||||
+}
|
||||
+
|
||||
int RichString_appendWide(RichString* this, int attrs, const char* data) {
|
||||
return RichString_writeFromWide(this, attrs, data, this->chlen, strlen(data));
|
||||
}
|
||||
diff --git a/RichString.h b/RichString.h
|
||||
index f6eeb902..2a61c91d 100644
|
||||
--- a/RichString.h
|
||||
+++ b/RichString.h
|
||||
@@ -52,10 +52,14 @@ void RichString_rewind(RichString* this, int count);
|
||||
|
||||
void RichString_setAttrn(RichString* this, int attrs, size_t start, size_t charcount);
|
||||
|
||||
+void RichString_highlightn(RichString* this, int start, int charcount);
|
||||
+
|
||||
int RichString_findChar(const RichString* this, char c, int start);
|
||||
|
||||
void RichString_setAttr(RichString* this, int attrs);
|
||||
|
||||
+void RichString_highlight(RichString* this);
|
||||
+
|
||||
void RichString_appendChr(RichString* this, int attrs, char c, int count);
|
||||
|
||||
/* All appending and writing functions return the number of written characters (not columns). */
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,93 @@ |
||||
From ddd7754ecd1eda821a6f928e6528649707a087a3 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:39:16 -0500
|
||||
Subject: [PATCH 13/22] Implement rudimentary separator
|
||||
|
||||
---
|
||||
Meter.c | 41 +++++++++++++++++++++++++++++++++++++++++
|
||||
Meter.h | 2 ++
|
||||
linux/Platform.c | 1 +
|
||||
3 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index cb08f152..5a823d66 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -111,6 +111,16 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
this->total = MAXIMUM(sum, this->total);
|
||||
}
|
||||
|
||||
+ if (caption[0] == 0) {
|
||||
+ // This should be a check for being a blank meter
|
||||
+ for (int i=0;i<w;i++) {
|
||||
+ mvaddstr(y,x,"⎯");
|
||||
+ x++;
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
if (w < 1) {
|
||||
goto end;
|
||||
}
|
||||
@@ -610,3 +620,34 @@ const MeterClass BlankMeter_class = {
|
||||
.uiName = "Blank",
|
||||
.caption = ""
|
||||
};
|
||||
+
|
||||
+/* Separator meter */
|
||||
+
|
||||
+static void SeparatorMeter_updateValues(Meter* this) {
|
||||
+}
|
||||
+
|
||||
+static void SeparatorMeter_display(const Object* cast, RichString* out) {
|
||||
+ RichString_writeWide(out, CRT_colors[DEFAULT_COLOR],
|
||||
+"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯");
|
||||
+}
|
||||
+
|
||||
+static const int SeparatorMeter_attributes[] = {
|
||||
+ DEFAULT_COLOR
|
||||
+};
|
||||
+
|
||||
+const MeterClass SeparatorMeter_class = {
|
||||
+ .super = {
|
||||
+ .extends = Class(Meter),
|
||||
+ .delete = Meter_delete,
|
||||
+ .display = SeparatorMeter_display,
|
||||
+ },
|
||||
+ .updateValues = SeparatorMeter_updateValues,
|
||||
+ .defaultMode = TEXT_METERMODE,
|
||||
+ .supportedModes = (1 << TEXT_METERMODE),
|
||||
+ .maxItems = 0,
|
||||
+ .total = 100.0,
|
||||
+ .attributes = SeparatorMeter_attributes,
|
||||
+ .name = "Separator",
|
||||
+ .uiName = "Separator",
|
||||
+ .caption = ""
|
||||
+};
|
||||
diff --git a/Meter.h b/Meter.h
|
||||
index d81e8d8b..6564880e 100644
|
||||
--- a/Meter.h
|
||||
+++ b/Meter.h
|
||||
@@ -155,4 +155,6 @@ ListItem* Meter_toListItem(const Meter* this, bool moving);
|
||||
|
||||
extern const MeterClass BlankMeter_class;
|
||||
|
||||
+extern const MeterClass SeparatorMeter_class;
|
||||
+
|
||||
#endif
|
||||
diff --git a/linux/Platform.c b/linux/Platform.c
|
||||
index a0bfbfa9..975b5cb0 100644
|
||||
--- a/linux/Platform.c
|
||||
+++ b/linux/Platform.c
|
||||
@@ -238,6 +238,7 @@ const MeterClass* const Platform_meterTypes[] = {
|
||||
&LeftCPUs8Meter_class,
|
||||
&RightCPUs8Meter_class,
|
||||
&BlankMeter_class,
|
||||
+ &SeparatorMeter_class,
|
||||
&PressureStallCPUSomeMeter_class,
|
||||
&PressureStallIOSomeMeter_class,
|
||||
&PressureStallIOFullMeter_class,
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,28 @@ |
||||
From 3501705c0c0db188575c74d3cd1dc95ee3bc8235 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 30 May 2022 23:08:47 -0400
|
||||
Subject: [PATCH 14/22] Put Kernel CPU first
|
||||
|
||||
---
|
||||
CPUMeter.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CPUMeter.c b/CPUMeter.c
|
||||
index 6fdeb48b..90e7353d 100644
|
||||
--- a/CPUMeter.c
|
||||
+++ b/CPUMeter.c
|
||||
@@ -26,9 +26,9 @@ in the source distribution for its full text.
|
||||
|
||||
|
||||
static const int CPUMeter_attributes[] = {
|
||||
- CPU_NICE,
|
||||
- CPU_NORMAL,
|
||||
CPU_SYSTEM,
|
||||
+ CPU_NORMAL,
|
||||
+ CPU_NICE,
|
||||
CPU_IRQ,
|
||||
CPU_SOFTIRQ,
|
||||
CPU_STEAL,
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,53 @@ |
||||
From 040927bdc39048ef004985b157d68b50c6d4ace2 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Sun, 7 May 2023 15:56:42 -0400
|
||||
Subject: [PATCH 15/22] Avoid bold in solarized-based themes
|
||||
|
||||
---
|
||||
CRT.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index b0fa39cd..9c6a3dbf 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -157,10 +157,10 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[TASKS_RUNNING] = A_BOLD | ColorPair(Green, Black),
|
||||
[PROCESS] = A_NORMAL,
|
||||
[PROCESS_SHADOW] = A_BOLD | ColorPairGrayBlack,
|
||||
- [PROCESS_TAG] = A_BOLD | ColorPair(Yellow, Black),
|
||||
+ [PROCESS_TAG] = ColorPair(Yellow, Black),
|
||||
[PROCESS_MEGABYTES] = ColorPair(Cyan, Black),
|
||||
[PROCESS_GIGABYTES] = ColorPair(Green, Black),
|
||||
- [PROCESS_BASENAME] = A_BOLD | ColorPair(Cyan, Black),
|
||||
+ [PROCESS_BASENAME] = ColorPair(Cyan, Black),
|
||||
[PROCESS_TREE] = ColorPair(Cyan, Black),
|
||||
[PROCESS_RUN_STATE] = ColorPair(Green, Black),
|
||||
[PROCESS_D_STATE] = ColorPair(Magenta, Black),
|
||||
@@ -169,7 +169,7 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[PROCESS_NEW] = ColorPair(Black, Green),
|
||||
[PROCESS_TOMB] = ColorPair(Black, Red),
|
||||
[PROCESS_THREAD] = ColorPair(Green, Black),
|
||||
- [PROCESS_THREAD_BASENAME] = A_BOLD | ColorPair(Green, Black),
|
||||
+ [PROCESS_THREAD_BASENAME] = ColorPair(Cyan, Black),
|
||||
[PROCESS_COMM] = ColorPair(Magenta, Black),
|
||||
[PROCESS_THREAD_COMM] = A_BOLD | ColorPair(Blue, Black),
|
||||
[PROCESS_PRIV] = ColorPair(Magenta, Black),
|
||||
@@ -189,10 +189,10 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[HUGEPAGE_1] = ColorPair(Green, Black),
|
||||
[HUGEPAGE_2] = ColorPair(Yellow, Black),
|
||||
[HUGEPAGE_3] = ColorPair(Red, Black),
|
||||
- [HUGEPAGE_4] = A_BOLD | ColorPair(Blue, Black),
|
||||
- [LOAD_AVERAGE_FIFTEEN] = ColorPair(Cyan, Black),
|
||||
- [LOAD_AVERAGE_FIVE] = A_BOLD | ColorPair(Cyan, Black),
|
||||
- [LOAD_AVERAGE_ONE] = A_BOLD | ColorPair(White, Black),
|
||||
+ [HUGEPAGE_4] = ColorPair(Blue, Black),
|
||||
+ [LOAD_AVERAGE_FIFTEEN] = ColorPair(Yellow, Black),
|
||||
+ [LOAD_AVERAGE_FIVE] = ColorPair(Cyan, Black),
|
||||
+ [LOAD_AVERAGE_ONE] = ColorPair(Blue, Black),
|
||||
[LOAD] = A_BOLD,
|
||||
[HELP_BOLD] = A_BOLD | ColorPair(Cyan, Black),
|
||||
[HELP_SHADOW] = A_BOLD | ColorPairGrayBlack,
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,26 @@ |
||||
From 83472f671f654ef6fe8d3dce5a4b4c6036f119f2 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 30 May 2022 23:10:12 -0400
|
||||
Subject: [PATCH 16/22] Use dimmed on highlighted background for unfocused
|
||||
selection
|
||||
|
||||
---
|
||||
CRT.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CRT.c b/CRT.c
|
||||
index 9c6a3dbf..d84acf2c 100644
|
||||
--- a/CRT.c
|
||||
+++ b/CRT.c
|
||||
@@ -137,7 +137,7 @@ static int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT] = {
|
||||
[FUNCTION_BAR] = ColorPair(White, Black),
|
||||
[FUNCTION_KEY] = ColorPair(Accent, Black),
|
||||
[PANEL_SELECTION_FOLLOW] = ColorPair(Black, Yellow),
|
||||
- [PANEL_SELECTION_UNFOCUS] = ColorPair(Black, White),
|
||||
+ [PANEL_SELECTION_UNFOCUS] = A_BOLD | HighlightColorPair(Yellow, Black),
|
||||
[FAILED_SEARCH] = ColorPair(Red, Cyan),
|
||||
[FAILED_READ] = A_BOLD | ColorPair(Red, Black),
|
||||
[PAUSED] = A_BOLD | ColorPair(Yellow, Cyan),
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,55 @@ |
||||
From 879fc4e51d18957f0b0f2cd2c137fd9ce3a34fc1 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 17 Nov 2025 09:55:12 -0500
|
||||
Subject: [PATCH 17/22] Put margin in each column
|
||||
|
||||
---
|
||||
Header.c | 2 +-
|
||||
Meter.c | 11 ++++++++---
|
||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Header.c b/Header.c
|
||||
index 8f90f2f3..760789ce 100644
|
||||
--- a/Header.c
|
||||
+++ b/Header.c
|
||||
@@ -194,7 +194,7 @@ void Header_reinit(Header* this) {
|
||||
void Header_draw(const Header* this) {
|
||||
const int height = this->height;
|
||||
const int pad = this->pad;
|
||||
- const int sep = 3;
|
||||
+ const int sep = 1;
|
||||
|
||||
attrset(CRT_colors[RESET_COLOR]);
|
||||
for (int y = 0; y < height; y++) {
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index 5a823d66..b3f15759 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -63,9 +63,10 @@ static void TextMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
assert(w <= INT_MAX - x);
|
||||
|
||||
const char* caption = Meter_getCaption(this);
|
||||
- if (w > 0) {
|
||||
- attrset(CRT_colors[METER_TEXT]);
|
||||
- mvaddnstr(y, x, caption, w);
|
||||
+ if ((w > 0) && (caption[0] != 0)) {
|
||||
+ x++; w-=2; //margin
|
||||
+ attrset(CRT_colors[METER_TEXT]);
|
||||
+ mvaddnstr(y, x, caption, w);
|
||||
}
|
||||
attrset(CRT_colors[RESET_COLOR]);
|
||||
|
||||
@@ -93,6 +94,10 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
// Draw the caption
|
||||
int captionLen = 3;
|
||||
const char* caption = Meter_getCaption(this);
|
||||
+ if (caption[0] != 0) {
|
||||
+ x++; w-=2; //margin
|
||||
+ }
|
||||
+
|
||||
if (w >= captionLen) {
|
||||
attrset(CRT_colors[METER_TEXT]);
|
||||
mvaddnstr(y, x, caption, captionLen);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,26 @@ |
||||
From 6b072ad0dbe16f7ffef34a6c6d4ec537148da06f Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 30 May 2022 23:12:02 -0400
|
||||
Subject: [PATCH 18/22] Use "regular" highlight if unfocused
|
||||
|
||||
---
|
||||
Panel.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Panel.c b/Panel.c
|
||||
index 6f2e14cc..1644e4f4 100644
|
||||
--- a/Panel.c
|
||||
+++ b/Panel.c
|
||||
@@ -306,7 +306,8 @@ void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelect
|
||||
}
|
||||
if (item.highlightAttr) {
|
||||
attrset(item.highlightAttr);
|
||||
- RichString_highlight(&item);
|
||||
+ if (focus) RichString_highlight(&item);
|
||||
+ else RichString_setAttr(&item, item.highlightAttr);
|
||||
this->selectedLen = itemLen;
|
||||
}
|
||||
mvhline(y + line, x, ' ', this->w);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,24 @@ |
||||
From 869c68863a88ef64de37a4d45997256a4a461d88 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 17 Nov 2025 09:59:23 -0500
|
||||
Subject: [PATCH 19/22] Better spacing for sorted column
|
||||
|
||||
---
|
||||
Table.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Table.c b/Table.c
|
||||
index 9bedfc70..03cc7711 100644
|
||||
--- a/Table.c
|
||||
+++ b/Table.c
|
||||
@@ -311,6 +311,7 @@ void Table_printHeader(const Settings* settings, RichString* header) {
|
||||
RichString_appendWide(header,
|
||||
CRT_colors[PANEL_SELECTION_FOCUS],
|
||||
CRT_treeStr[ascending ? TREE_STR_ASC : TREE_STR_DESC]);
|
||||
+ RichString_appendWide(header, color, " ");
|
||||
}
|
||||
if (COMM == fields[i] && settings->showMergedCommand) {
|
||||
RichString_appendAscii(header, color, "(merged)");
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From 1d71c67f19cd3b596ffc12c26a63a11bfe4d4886 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 30 May 2022 23:13:24 -0400
|
||||
Subject: [PATCH 20/22] Shorten string (it does not fit on my terminal anyways)
|
||||
|
||||
---
|
||||
TasksMeter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/TasksMeter.c b/TasksMeter.c
|
||||
index f522b753..6d797894 100644
|
||||
--- a/TasksMeter.c
|
||||
+++ b/TasksMeter.c
|
||||
@@ -60,7 +60,7 @@ static void TasksMeter_display(const Object* cast, RichString* out) {
|
||||
RichString_appendAscii(out, CRT_colors[METER_TEXT], "; ");
|
||||
len = xSnprintf(buffer, sizeof(buffer), "%d", (int)this->values[3]);
|
||||
RichString_appendnAscii(out, CRT_colors[TASKS_RUNNING], buffer, len);
|
||||
- RichString_appendAscii(out, CRT_colors[METER_TEXT], " running");
|
||||
+ RichString_appendAscii(out, CRT_colors[METER_TEXT], " run");
|
||||
}
|
||||
|
||||
const MeterClass TasksMeter_class = {
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,172 @@ |
||||
From 9629d4c287b9ef301245e5701bff0c28dfe795b7 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Mon, 17 Nov 2025 10:02:29 -0500
|
||||
Subject: [PATCH 21/22] Remove ':' from captions
|
||||
|
||||
---
|
||||
BatteryMeter.c | 2 +-
|
||||
ClockMeter.c | 2 +-
|
||||
DateMeter.c | 2 +-
|
||||
DateTimeMeter.c | 2 +-
|
||||
DiskIOMeter.c | 6 +++---
|
||||
HostnameMeter.c | 2 +-
|
||||
LoadAverageMeter.c | 4 ++--
|
||||
NetworkIOMeter.c | 2 +-
|
||||
SysArchMeter.c | 2 +-
|
||||
TasksMeter.c | 2 +-
|
||||
UptimeMeter.c | 2 +-
|
||||
11 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/BatteryMeter.c b/BatteryMeter.c
|
||||
index 7ab1bac9..1e3c36d2 100644
|
||||
--- a/BatteryMeter.c
|
||||
+++ b/BatteryMeter.c
|
||||
@@ -69,5 +69,5 @@ const MeterClass BatteryMeter_class = {
|
||||
.attributes = BatteryMeter_attributes,
|
||||
.name = "Battery",
|
||||
.uiName = "Battery",
|
||||
- .caption = "Battery: "
|
||||
+ .caption = "Battery "
|
||||
};
|
||||
diff --git a/ClockMeter.c b/ClockMeter.c
|
||||
index 9c70b24f..e6bd3741 100644
|
||||
--- a/ClockMeter.c
|
||||
+++ b/ClockMeter.c
|
||||
@@ -42,5 +42,5 @@ const MeterClass ClockMeter_class = {
|
||||
.attributes = ClockMeter_attributes,
|
||||
.name = "Clock",
|
||||
.uiName = "Clock",
|
||||
- .caption = "Time: ",
|
||||
+ .caption = "Time ",
|
||||
};
|
||||
diff --git a/DateMeter.c b/DateMeter.c
|
||||
index 02aaabfb..f8678e52 100644
|
||||
--- a/DateMeter.c
|
||||
+++ b/DateMeter.c
|
||||
@@ -42,5 +42,5 @@ const MeterClass DateMeter_class = {
|
||||
.attributes = DateMeter_attributes,
|
||||
.name = "Date",
|
||||
.uiName = "Date",
|
||||
- .caption = "Date: ",
|
||||
+ .caption = "Date ",
|
||||
};
|
||||
diff --git a/DateTimeMeter.c b/DateTimeMeter.c
|
||||
index c4ec0def..5dd19b49 100644
|
||||
--- a/DateTimeMeter.c
|
||||
+++ b/DateTimeMeter.c
|
||||
@@ -42,5 +42,5 @@ const MeterClass DateTimeMeter_class = {
|
||||
.attributes = DateTimeMeter_attributes,
|
||||
.name = "DateTime",
|
||||
.uiName = "Date and Time",
|
||||
- .caption = "Date & Time: ",
|
||||
+ .caption = "Date & Time ",
|
||||
};
|
||||
diff --git a/DiskIOMeter.c b/DiskIOMeter.c
|
||||
index 264074aa..8ea4787f 100644
|
||||
--- a/DiskIOMeter.c
|
||||
+++ b/DiskIOMeter.c
|
||||
@@ -318,7 +318,7 @@ const MeterClass DiskIORateMeter_class = {
|
||||
.name = "DiskIORate",
|
||||
.uiName = "Disk IO Rate",
|
||||
.description = "Disk IO read & write bytes per second",
|
||||
- .caption = "Dsk: "
|
||||
+ .caption = "Dsk "
|
||||
};
|
||||
|
||||
const MeterClass DiskIOTimeMeter_class = {
|
||||
@@ -337,7 +337,7 @@ const MeterClass DiskIOTimeMeter_class = {
|
||||
.name = "DiskIOTime",
|
||||
.uiName = "Disk IO Time",
|
||||
.description = "Disk percent time busy",
|
||||
- .caption = "Dsk: "
|
||||
+ .caption = "Dsk "
|
||||
};
|
||||
|
||||
const MeterClass DiskIOMeter_class = {
|
||||
@@ -353,7 +353,7 @@ const MeterClass DiskIOMeter_class = {
|
||||
.name = "DiskIO",
|
||||
.uiName = "Disk IO",
|
||||
.description = "Disk IO rate & time combined display",
|
||||
- .caption = "Dsk: ",
|
||||
+ .caption = "Dsk ",
|
||||
.draw = DiskIOMeter_draw,
|
||||
.init = DiskIOMeter_init,
|
||||
.updateMode = DiskIOMeter_updateMode,
|
||||
diff --git a/HostnameMeter.c b/HostnameMeter.c
|
||||
index e8b2befb..91c7f638 100644
|
||||
--- a/HostnameMeter.c
|
||||
+++ b/HostnameMeter.c
|
||||
@@ -35,5 +35,5 @@ const MeterClass HostnameMeter_class = {
|
||||
.attributes = HostnameMeter_attributes,
|
||||
.name = "Hostname",
|
||||
.uiName = "Hostname",
|
||||
- .caption = "Hostname: ",
|
||||
+ .caption = "Hostname ",
|
||||
};
|
||||
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c
|
||||
index a0b05f2b..8cd352d7 100644
|
||||
--- a/LoadAverageMeter.c
|
||||
+++ b/LoadAverageMeter.c
|
||||
@@ -117,7 +117,7 @@ const MeterClass LoadAverageMeter_class = {
|
||||
.name = "LoadAverage",
|
||||
.uiName = "Load average",
|
||||
.description = "Load averages: 1 minute, 5 minutes, 15 minutes",
|
||||
- .caption = "Load average: "
|
||||
+ .caption = "Load average "
|
||||
};
|
||||
|
||||
const MeterClass LoadMeter_class = {
|
||||
@@ -136,5 +136,5 @@ const MeterClass LoadMeter_class = {
|
||||
.name = "Load",
|
||||
.uiName = "Load",
|
||||
.description = "Load: average of ready processes in the last minute",
|
||||
- .caption = "Load: "
|
||||
+ .caption = "Load "
|
||||
};
|
||||
diff --git a/NetworkIOMeter.c b/NetworkIOMeter.c
|
||||
index c5719ba1..869ed1f9 100644
|
||||
--- a/NetworkIOMeter.c
|
||||
+++ b/NetworkIOMeter.c
|
||||
@@ -178,5 +178,5 @@ const MeterClass NetworkIOMeter_class = {
|
||||
.attributes = NetworkIOMeter_attributes,
|
||||
.name = "NetworkIO",
|
||||
.uiName = "Network IO",
|
||||
- .caption = "Network: "
|
||||
+ .caption = "Network "
|
||||
};
|
||||
diff --git a/SysArchMeter.c b/SysArchMeter.c
|
||||
index 3c1f2796..529304c1 100644
|
||||
--- a/SysArchMeter.c
|
||||
+++ b/SysArchMeter.c
|
||||
@@ -41,5 +41,5 @@ const MeterClass SysArchMeter_class = {
|
||||
.attributes = SysArchMeter_attributes,
|
||||
.name = "System",
|
||||
.uiName = "System",
|
||||
- .caption = "System: ",
|
||||
+ .caption = "System ",
|
||||
};
|
||||
diff --git a/TasksMeter.c b/TasksMeter.c
|
||||
index 6d797894..f7890deb 100644
|
||||
--- a/TasksMeter.c
|
||||
+++ b/TasksMeter.c
|
||||
@@ -78,5 +78,5 @@ const MeterClass TasksMeter_class = {
|
||||
.attributes = TasksMeter_attributes,
|
||||
.name = "Tasks",
|
||||
.uiName = "Task counter",
|
||||
- .caption = "Tasks: "
|
||||
+ .caption = "Tasks "
|
||||
};
|
||||
diff --git a/UptimeMeter.c b/UptimeMeter.c
|
||||
index 1f4f1bbb..dcb7e319 100644
|
||||
--- a/UptimeMeter.c
|
||||
+++ b/UptimeMeter.c
|
||||
@@ -56,5 +56,5 @@ const MeterClass UptimeMeter_class = {
|
||||
.attributes = UptimeMeter_attributes,
|
||||
.name = "Uptime",
|
||||
.uiName = "Uptime",
|
||||
- .caption = "Uptime: "
|
||||
+ .caption = "Uptime "
|
||||
};
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -0,0 +1,25 @@ |
||||
From 4638e3658b387eac29fa38d76fcda027f68a3fb1 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Wed, 28 Sep 2022 15:19:08 -0400
|
||||
Subject: [PATCH 22/22] Make ultra-long separator just in case
|
||||
|
||||
---
|
||||
Meter.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index b3f15759..b76df3d1 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -633,7 +633,7 @@ static void SeparatorMeter_updateValues(Meter* this) {
|
||||
|
||||
static void SeparatorMeter_display(const Object* cast, RichString* out) {
|
||||
RichString_writeWide(out, CRT_colors[DEFAULT_COLOR],
|
||||
-"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯");
|
||||
+"⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯");
|
||||
}
|
||||
|
||||
static const int SeparatorMeter_attributes[] = {
|
||||
--
|
||||
2.51.0
|
||||
|
||||
Loading…
Reference in new issue