Fixed git ignore, updated much functionality, updated the procress_monitor to work, updated install.sh, added license, updated Makefile, updated install.sh, updated README.md, all that

This commit is contained in:
klein panic
2024-10-29 00:07:08 -04:00
parent 5c0af3b725
commit 8edd71b476
20 changed files with 853 additions and 686 deletions

View File

@@ -13,4 +13,11 @@ void log_message(const char *message);
// New function declaration for process monitoring
int get_high_cpu_processes(char *process_list[], int max_processes);
extern int battery_saving_mode_active;
extern int THRESHOLD_LOW;
extern int THRESHOLD_CRITICAL;
extern int THRESHOLD_HIGH;
void load_thresholds_from_config();
#endif // BATTERY_MONITOR_H

View File

@@ -1,8 +1,21 @@
#ifndef PROCESS_MONITOR_H
#define PROCESS_MONITOR_H
int get_high_cpu_processes(char *process_list[], int max_processes);
void free_process_list(char *process_list[], int count);
#include <stdbool.h>
#include <sys/types.h>
extern bool dry_run;
extern pid_t suspended_pids[];
extern int suspended_count;
extern pid_t suspended_high_cpu_pids[];
extern int suspended_high_cpu_count;
int run_battery_saving_mode(pid_t current_pid);
int get_ignore_processes(char *ignore_list[], int max_ignores, const char *config_key);
int is_process_critical(const char *process_name, char *ignore_list[], int ignore_count);
int suspend_user_daemons();
int resume_user_daemons();
int resume_high_cpu_processes();
#endif // PROCESS_MONITOR_H

9
include/version.h Normal file
View File

@@ -0,0 +1,9 @@
// version.h
#ifndef VERSION_H
#define VERSION_H
#define VERSION "1.0.0"
#endif // VERSION_H