@@ -71,6 +71,7 @@ static inline void printHelp()
7171 " --host-format <format>\n"
7272 " --kernel-format <format>\n"
7373 " --uptime-format <format>\n"
74+ " --processes-format <format>\n"
7475 " --packages-format <format>\n"
7576 " --shell-format <format>\n"
7677 " --resolution-format <format>\n"
@@ -96,6 +97,7 @@ static inline void printHelp()
9697 " --host-key <key>\n"
9798 " --kernel-key <key>\n"
9899 " --uptime-key <key>\n"
100+ " --processes-key <key>\n"
99101 " --packages-key <key>\n"
100102 " --shell-key <key>\n"
101103 " --resolution-key <key>: takes the resolution index as argument\n"
@@ -286,6 +288,12 @@ static inline void printCommandHelp(const char* command)
286288 "Seconds"
287289 );
288290 }
291+ else if (strcasecmp (command , "processes-format" ) == 0 )
292+ {
293+ constructAndPrintCommandHelpFormat ("processes" , "{}" , 1 ,
294+ "Count"
295+ );
296+ }
289297 else if (strcasecmp (command , "packages-format" ) == 0 )
290298 {
291299 constructAndPrintCommandHelpFormat ("packages" , "{2} (pacman){?3}[{3}]{?}, {4} (dpkg), {5} (rpm), {6} (xps), {7}, (flatpak), {8} (snap)" , 8 ,
@@ -501,6 +509,7 @@ static inline void printAvailableModules()
501509 "Memory\n"
502510 "OS\n"
503511 "Packages\n"
512+ "Processes\n"
504513 "Resolution\n"
505514 "Separator\n"
506515 "Shell\n"
@@ -848,6 +857,10 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
848857 optionParseString (key , value , & instance -> config .uptimeFormat );
849858 else if (strcasecmp (key , "--uptime-key" ) == 0 )
850859 optionParseString (key , value , & instance -> config .uptimeKey );
860+ else if (strcasecmp (key , "--processes-format" ) == 0 )
861+ optionParseString (key , value , & instance -> config .processesFormat );
862+ else if (strcasecmp (key , "--processes-key" ) == 0 )
863+ optionParseString (key , value , & instance -> config .processesKey );
851864 else if (strcasecmp (key , "--packages-format" ) == 0 )
852865 optionParseString (key , value , & instance -> config .packagesFormat );
853866 else if (strcasecmp (key , "--packages-key" ) == 0 )
@@ -1043,6 +1056,8 @@ static void parseStructureCommand(FFinstance* instance, FFdata* data, const char
10431056 ffPrintKernel (instance );
10441057 else if (strcasecmp (line , "uptime" ) == 0 )
10451058 ffPrintUptime (instance );
1059+ else if (strcasecmp (line , "processes" ) == 0 )
1060+ ffPrintProcesses (instance );
10461061 else if (strcasecmp (line , "packages" ) == 0 )
10471062 ffPrintPackages (instance );
10481063 else if (strcasecmp (line , "shell" ) == 0 )
0 commit comments