Compare commits

..

1 Commits
main ... main

Author SHA1 Message Date
Serhii Sakhno
975284f5f3 Eolite: provide label for NVMe disks on left panel
Signed-off-by: Serhii Sakhno <serhii.sakhno.jr@gmail.com>
2024-08-01 22:29:57 +03:00
3 changed files with 10 additions and 8 deletions

View File

@ -62,6 +62,7 @@ char *actions[] = {
#define T_FD "„¨áª¥â  "
#define T_HD "†¥á⪨© ¤¨áª "
#define T_SATA "SATA ¤¨áª "
#define T_NVME "NVMe disk "
#define T_USB "USB ¤¨áª "
#define T_RAM "RAM ¤¨áª "
#define T_UNC "<22>¥¨§¢¥áâ­® "
@ -160,6 +161,7 @@ char *actions[] = {
#define T_FD "Floppy disk "
#define T_HD "Hard disk "
#define T_SATA "SATA disk "
#define T_NVME "NVMe disk "
#define T_USB "USB disk "
#define T_RAM "RAM disk "
#define T_UNC "Unknown "
@ -252,6 +254,7 @@ char *devinfo = {
"hd", 4, T_HD,
"bd", 4, T_HD,
"sd", 4, T_SATA,
"nv", 4, T_NVME,
"tm", 5, T_RAM,
"us", 6, T_USB,
0

View File

@ -1,5 +1,5 @@
@del sysmon
@c-- /D=LANG_ENG sysmon.c
@c-- /D=LANG_RUS sysmon.c
@rename sysmon.com sysmon
@del warning.txt
if not exist sysmon ( @pause )

View File

@ -1,6 +1,6 @@
/*
* System Monitor
* version 1.42
* version 1.41
* Author: Leency
*/
@ -38,7 +38,7 @@
#define BOTPANEL_H 36
#ifdef LANG_RUS
#define T_APP_TITLE "‘¨á⥬­ë© Œ®­¨â®à 1.42"
#define T_APP_TITLE "‘¨á⥬­ë© ¬®­¨â®à"
#define T_SHOW_SYSTEM "‘¨á⥬­ë¥"
#define T_DETAILS "<22>®¤à®¡­¥¥"
#define T_PROC_KILL "‘­ïâì § ¤ çã"
@ -49,7 +49,7 @@
#define T_RD_USAGE "‘¨á⥬­ë© ¤¨áª: %i Š¡ ᢮¡®¤­® ¨§ 1.4 Œ¡"
#define T_TMP_USAGE "TMP%i ¤¨áª: %i Œ¡ ᢮¡®¤­® ¨§ %i Œ¡"
#else
#define T_APP_TITLE "System Monitor 1.42"
#define T_APP_TITLE "System Monitor"
#define T_SHOW_SYSTEM "System"
#define T_DETAILS "Details"
#define T_PROC_KILL "Terminate"
@ -57,7 +57,7 @@
#define T_PROC_HEADER "Process RAM KB CPU %"
#define T_CPU_LOAD "CPU load %i%% "
#define T_RAM_USAGE "RAM usage: %i MB free of %i MB"
#define T_RD_USAGE "System disk usage: %i KB free of 1.4 MB"
#define T_RD_USAGE "System disk usage: %i MB free of 1.4 MB"
#define T_TMP_USAGE "TMP%i usage: %i MB free of %i MB"
#endif
@ -156,7 +156,7 @@ void main()
break;
case evReDraw:
sc.get();
DefineAndDrawWindow(Form.left, Form.top, Form.width, Form.height, 0x33, sc.work, T_APP_TITLE, 0);
DefineAndDrawWindow(Form.left, Form.top, Form.width, Form.height, 0x33, sc.work, T_APP_TITLE,0);
_DRAW_WINDOW:
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) break;
@ -281,7 +281,7 @@ void SelectList_DrawLine(dword i)
}
sprintf(#cpu_use, "%i", Process.use_cpu*100/maxcpu);
if (maxcpu) WriteText(GAP+205 - calc(strlen(#cpu_use)-4*8),
if (maxcpu) WriteText(GAP+203 - calc(strlen(#cpu_use)-4*8),
posy+select_list.text_y, 0x90, 0x444444, #cpu_use);
}
@ -311,7 +311,6 @@ dword GetTmpDiskFreeSpace(int _id)
sprintf(#param, "/tmp%i/1", _id);
dir_size.get(#param);
dir_size.sizelo += dir_size.files/2 + 32 * 512; //file attr size + FAT table size
dir_size.sizelo += 1024*1024 - 1; // add this line to round up
dir_size.sizelo /= 1024*1024; //convert to MiB
return dir_size.sizelo;
}