aboutsummaryrefslogtreecommitdiff
path: root/overlays/patches/htop/0001-htop-untruncated-username.patch
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/patches/htop/0001-htop-untruncated-username.patch')
-rw-r--r--overlays/patches/htop/0001-htop-untruncated-username.patch136
1 files changed, 136 insertions, 0 deletions
diff --git a/overlays/patches/htop/0001-htop-untruncated-username.patch b/overlays/patches/htop/0001-htop-untruncated-username.patch
new file mode 100644
index 00000000000..1456cf04362
--- /dev/null
+++ b/overlays/patches/htop/0001-htop-untruncated-username.patch
@@ -0,0 +1,136 @@
+From: Alyssa Ross <hi@alyssa.is>
+Subject: [PATCH v2] Make "spacekookie" fit untruncated as a user name
+Date: Fri, 15 Mar 2019 18:18:22 +0000
+
+---
+This version of the increases the length of the column header as well as
+the values, so columns after USER don't have misaligned headers.
+
+ Process.c | 10 +++++-----
+ darwin/Platform.c | 2 +-
+ dragonflybsd/DragonFlyBSDProcess.c | 2 +-
+ freebsd/FreeBSDProcess.c | 2 +-
+ linux/LinuxProcess.c | 2 +-
+ openbsd/OpenBSDProcess.c | 2 +-
+ solaris/SolarisProcess.c | 2 +-
+ unsupported/Platform.c | 2 +-
+ 8 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/Process.c b/Process.c
+index 54c41af..41d30a3 100644
+--- a/Process.c
++++ b/Process.c
+@@ -480,13 +480,13 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
+ if (Process_getuid != (int) this->st_uid)
+ attr = CRT_colors[PROCESS_SHADOW];
+ if (this->user) {
+- xSnprintf(buffer, n, "%-9s ", this->user);
++ xSnprintf(buffer, n, "%-11s ", this->user);
+ } else {
+- xSnprintf(buffer, n, "%-9d ", this->st_uid);
++ xSnprintf(buffer, n, "%-11d ", this->st_uid);
+ }
+- if (buffer[9] != '\0') {
+- buffer[9] = ' ';
+- buffer[10] = '\0';
++ if (buffer[11] != '\0') {
++ buffer[11] = ' ';
++ buffer[12] = '\0';
+ }
+ break;
+ }
+diff --git a/darwin/Platform.c b/darwin/Platform.c
+index 1dce8b6..d603fd2 100644
+--- a/darwin/Platform.c
++++ b/darwin/Platform.c
+@@ -93,7 +93,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+diff --git a/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c
+index dade106..19d075d 100644
+--- a/dragonflybsd/DragonFlyBSDProcess.c
++++ b/dragonflybsd/DragonFlyBSDProcess.c
+@@ -77,7 +77,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+diff --git a/freebsd/FreeBSDProcess.c b/freebsd/FreeBSDProcess.c
+index f81fadf..1ed6c2a 100644
+--- a/freebsd/FreeBSDProcess.c
++++ b/freebsd/FreeBSDProcess.c
+@@ -76,7 +76,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
+index 5f69707..1288155 100644
+--- a/linux/LinuxProcess.c
++++ b/linux/LinuxProcess.c
+@@ -206,7 +206,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c
+index 70f9653..ed90cf2 100644
+--- a/openbsd/OpenBSDProcess.c
++++ b/openbsd/OpenBSDProcess.c
+@@ -150,7 +150,7 @@ ProcessFieldData Process_fields[] = {
+ .flags = 0, },
+ [USER] = {
+ .name = "USER",
+- .title = "USER ",
++ .title = "USER ",
+ .description = "Username of the process owner (or user ID if name cannot be determined)",
+ .flags = 0, },
+ [TIME] = {
+diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c
+index 31f488e..7452e94 100644
+--- a/solaris/SolarisProcess.c
++++ b/solaris/SolarisProcess.c
+@@ -93,7 +93,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+diff --git a/unsupported/Platform.c b/unsupported/Platform.c
+index ba84419..cf5b09d 100644
+--- a/unsupported/Platform.c
++++ b/unsupported/Platform.c
+@@ -53,7 +53,7 @@ ProcessFieldData Process_fields[] = {
+ [ST_UID] = { .name = "ST_UID", .title = " UID ", .description = "User ID of the process owner", .flags = 0, },
+ [PERCENT_CPU] = { .name = "PERCENT_CPU", .title = "CPU% ", .description = "Percentage of the CPU time the process used in the last sampling", .flags = 0, },
+ [PERCENT_MEM] = { .name = "PERCENT_MEM", .title = "MEM% ", .description = "Percentage of the memory the process is using, based on resident memory size", .flags = 0, },
+- [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
++ [USER] = { .name = "USER", .title = "USER ", .description = "Username of the process owner (or user ID if name cannot be determined)", .flags = 0, },
+ [TIME] = { .name = "TIME", .title = " TIME+ ", .description = "Total time the process has spent in user and system time", .flags = 0, },
+ [NLWP] = { .name = "NLWP", .title = "NLWP ", .description = "Number of threads in the process", .flags = 0, },
+ [TGID] = { .name = "TGID", .title = " TGID ", .description = "Thread group ID (i.e. process ID)", .flags = 0, },
+--
+2.19.2
+
+