mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-17 01:45:34 +12:00
More reorganizing
This commit is contained in:
parent
470bca62ec
commit
61694f72a5
|
@ -33,6 +33,7 @@ tab-size = 4
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include <btop_shared.hpp>
|
||||||
#include <btop_tools.hpp>
|
#include <btop_tools.hpp>
|
||||||
#include <btop_config.hpp>
|
#include <btop_config.hpp>
|
||||||
#include <btop_input.hpp>
|
#include <btop_input.hpp>
|
||||||
|
@ -42,18 +43,15 @@ tab-size = 4
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define LINUX
|
#define LINUX
|
||||||
#include <btop_linux.hpp>
|
|
||||||
#elif defined(__unix__) || !defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__unix__) || !defined(__APPLE__) && defined(__MACH__)
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#if defined(BSD)
|
#if defined(BSD)
|
||||||
// #include <btop_bsd.h>
|
|
||||||
#error BSD support not yet implemented!
|
#error BSD support not yet implemented!
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__APPLE__) && defined(__MACH__)
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#if TARGET_OS_MAC == 1
|
#if TARGET_OS_MAC == 1
|
||||||
#define OSX
|
#define OSX
|
||||||
// #include <btop_osx.h>
|
|
||||||
#error OSX support not yet implemented!
|
#error OSX support not yet implemented!
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -23,6 +23,7 @@ tab-size = 4
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include <btop_config.hpp>
|
#include <btop_config.hpp>
|
||||||
|
#include <btop_shared.hpp>
|
||||||
#include <btop_tools.hpp>
|
#include <btop_tools.hpp>
|
||||||
|
|
||||||
using robin_hood::unordered_flat_map, std::map, std::array, std::atomic;
|
using robin_hood::unordered_flat_map, std::map, std::array, std::atomic;
|
||||||
|
|
|
@ -32,7 +32,7 @@ tab-size = 4
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <btop_linux.hpp>
|
#include <btop_shared.hpp>
|
||||||
#include <btop_config.hpp>
|
#include <btop_config.hpp>
|
||||||
#include <btop_tools.hpp>
|
#include <btop_tools.hpp>
|
||||||
|
|
||||||
|
|
|
@ -20,25 +20,26 @@ tab-size = 4
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <atomic>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
using std::string, std::vector, std::atomic;
|
using std::string, std::vector;
|
||||||
|
|
||||||
namespace Global {
|
namespace Global {
|
||||||
|
extern string Version;
|
||||||
extern int coreCount;
|
extern int coreCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Tools {
|
namespace Tools {
|
||||||
|
//* Platform specific function for system_uptime
|
||||||
double system_uptime();
|
double system_uptime();
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Proc {
|
namespace Proc {
|
||||||
|
|
||||||
extern std::filesystem::path proc_path;
|
extern std::filesystem::path proc_path;
|
||||||
extern size_t numpids;
|
extern size_t numpids;
|
||||||
extern atomic<bool> stop;
|
extern std::atomic<bool> stop;
|
||||||
extern atomic<bool> collecting;
|
extern std::atomic<bool> collecting;
|
||||||
extern vector<string> sort_vector;
|
extern vector<string> sort_vector;
|
||||||
|
|
||||||
//* Container for process information
|
//* Container for process information
|
|
@ -31,6 +31,7 @@ tab-size = 4
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
#include <btop_shared.hpp>
|
||||||
#include <btop_tools.hpp>
|
#include <btop_tools.hpp>
|
||||||
|
|
||||||
using std::string_view, std::array, std::regex, std::max, std::to_string, std::cin,
|
using std::string_view, std::array, std::regex, std::max, std::to_string, std::cin,
|
||||||
|
|
|
@ -31,10 +31,6 @@ using std::string, std::vector;
|
||||||
|
|
||||||
//? ------------------------------------------------- NAMESPACES ------------------------------------------------------
|
//? ------------------------------------------------- NAMESPACES ------------------------------------------------------
|
||||||
|
|
||||||
namespace Global {
|
|
||||||
extern string Version;
|
|
||||||
}
|
|
||||||
|
|
||||||
//* Collection of escape codes for text style and formatting
|
//* Collection of escape codes for text style and formatting
|
||||||
namespace Fx {
|
namespace Fx {
|
||||||
extern const string e; //* Escape sequence start
|
extern const string e; //* Escape sequence start
|
||||||
|
|
Loading…
Reference in a new issue