Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ endif()
add_executable(btop src/main.cpp)
add_library(libbtop OBJECT
src/btop.cpp
src/btop_cli.cpp
src/btop_config.cpp
src/btop_draw.cpp
src/btop_input.cpp
src/btop_log.cpp
src/btop_menu.cpp
src/btop_shared.cpp
src/btop_theme.cpp
src/btop_tools.cpp
src/cli.cpp
src/config.cpp
src/draw.cpp
src/input.cpp
src/log.cpp
src/menu.cpp
src/shared.cpp
src/theme.cpp
src/tools.cpp
)

target_link_libraries(btop libbtop)
Expand All @@ -67,15 +67,15 @@ if(BTOP_LTO)
endif()

if(APPLE)
target_sources(libbtop PRIVATE src/osx/btop_collect.cpp src/osx/sensors.cpp src/osx/smc.cpp)
target_sources(libbtop PRIVATE src/osx/collect.cpp src/osx/sensors.cpp src/osx/smc.cpp)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "MidnightBSD")
target_sources(libbtop PRIVATE src/freebsd/btop_collect.cpp)
target_sources(libbtop PRIVATE src/freebsd/collect.cpp)
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
target_sources(libbtop PRIVATE src/openbsd/btop_collect.cpp src/openbsd/sysctlbyname.cpp)
target_sources(libbtop PRIVATE src/openbsd/collect.cpp src/openbsd/sysctlbyname.cpp)
elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
target_sources(libbtop PRIVATE src/netbsd/btop_collect.cpp)
target_sources(libbtop PRIVATE src/netbsd/collect.cpp)
elseif(LINUX)
target_sources(libbtop PRIVATE src/linux/btop_collect.cpp)
target_sources(libbtop PRIVATE src/linux/collect.cpp)
if(BTOP_GPU)
add_subdirectory(src/linux/intel_gpu_top)
endif()
Expand Down
18 changes: 9 additions & 9 deletions src/btop.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ tab-size = 4
#include <fmt/core.h>
#include <fmt/ostream.h>

#include "btop_cli.hpp"
#include "btop_config.hpp"
#include "btop_draw.hpp"
#include "btop_input.hpp"
#include "btop_log.hpp"
#include "btop_menu.hpp"
#include "btop_shared.hpp"
#include "btop_theme.hpp"
#include "btop_tools.hpp"
#include "cli.hpp"
#include "config.hpp"
#include "draw.hpp"
#include "input.hpp"
#include "log.hpp"
#include "menu.hpp"
#include "shared.hpp"
#include "theme.hpp"
#include "tools.hpp"

using std::atomic;
using std::cout;
Expand Down
6 changes: 3 additions & 3 deletions src/btop_cli.cpp → src/cli.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

#include "btop_cli.hpp"
#include "cli.hpp"

#include <algorithm>
#include <expected>
Expand All @@ -18,8 +18,8 @@
#include <fmt/base.h>
#include <fmt/format.h>

#include "btop_config.hpp"
#include "btop_shared.hpp"
#include "config.hpp"
#include "shared.hpp"
#include "config.h"

using namespace std::string_view_literals;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/btop_config.cpp → src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ tab-size = 4
#include <fmt/core.h>
#include <sys/statvfs.h>

#include "btop_config.hpp"
#include "btop_log.hpp"
#include "btop_shared.hpp"
#include "btop_tools.hpp"
#include "config.hpp"
#include "log.hpp"
#include "shared.hpp"
#include "tools.hpp"

using std::array;
using std::atomic;
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions src/btop_draw.cpp → src/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ tab-size = 4

#include <fmt/format.h>

#include "btop_config.hpp"
#include "btop_draw.hpp"
#include "btop_input.hpp"
#include "btop_log.hpp"
#include "btop_menu.hpp"
#include "btop_shared.hpp"
#include "btop_theme.hpp"
#include "btop_tools.hpp"
#include "config.hpp"
#include "draw.hpp"
#include "input.hpp"
#include "log.hpp"
#include "menu.hpp"
#include "shared.hpp"
#include "theme.hpp"
#include "tools.hpp"

using std::array;
using std::clamp;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/freebsd/btop_collect.cpp → src/freebsd/collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ tab-size = 4

#include <fmt/format.h>

#include "../btop_config.hpp"
#include "../btop_log.hpp"
#include "../btop_shared.hpp"
#include "../btop_tools.hpp"
#include "../config.hpp"
#include "../log.hpp"
#include "../shared.hpp"
#include "../tools.hpp"

using std::clamp, std::string_literals::operator""s, std::cmp_equal, std::cmp_less, std::cmp_greater;
using std::ifstream, std::numeric_limits, std::streamsize, std::round, std::max, std::min;
Expand Down
12 changes: 6 additions & 6 deletions src/btop_input.cpp → src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ tab-size = 4
#include <utility>
#include <cmath>

#include "btop_input.hpp"
#include "btop_tools.hpp"
#include "btop_config.hpp"
#include "btop_shared.hpp"
#include "btop_menu.hpp"
#include "btop_draw.hpp"
#include "input.hpp"
#include "tools.hpp"
#include "config.hpp"
#include "shared.hpp"
#include "menu.hpp"
#include "draw.hpp"

using namespace Tools;
using namespace std::literals; // for operator""s
Expand Down
2 changes: 1 addition & 1 deletion src/btop_input.hpp → src/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using std::string;
/* The input functions rely on the following termios parameters being set:
Non-canonical mode (c_lflags & ~(ICANON))
VMIN and VTIME (c_cc) set to 0
These will automatically be set when running Term::init() from btop_tools.cpp
These will automatically be set when running Term::init() from tools.cpp
*/

//* Functions and variables for handling keyboard and mouse input
Expand Down
8 changes: 4 additions & 4 deletions src/linux/btop_collect.cpp → src/linux/collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ tab-size = 4
#include <pwd.h>
#endif

#include "../btop_config.hpp"
#include "../btop_log.hpp"
#include "../btop_shared.hpp"
#include "../btop_tools.hpp"
#include "../config.hpp"
#include "../log.hpp"
#include "../shared.hpp"
#include "../tools.hpp"

#if defined(GPU_SUPPORT)
#define class class_
Expand Down
4 changes: 2 additions & 2 deletions src/btop_log.cpp → src/log.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0

#include "btop_log.hpp"
#include "log.hpp"

#include "btop_shared.hpp"
#include "shared.hpp"

#include <algorithm>
#include <cerrno>
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions src/btop_menu.cpp → src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ indent = tab
tab-size = 4
*/

#include "btop_menu.hpp"

#include "btop_config.hpp"
#include "btop_draw.hpp"
#include "btop_log.hpp"
#include "btop_shared.hpp"
#include "btop_theme.hpp"
#include "btop_tools.hpp"
#include "menu.hpp"

#include "config.hpp"
#include "draw.hpp"
#include "log.hpp"
#include "shared.hpp"
#include "theme.hpp"
#include "tools.hpp"

#include <errno.h>
#include <signal.h>
Expand Down
2 changes: 1 addition & 1 deletion src/btop_menu.hpp → src/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tab-size = 4
#include <string_view>
#include <vector>

#include "btop_input.hpp"
#include "input.hpp"

using std::atomic;
using std::bitset;
Expand Down
8 changes: 4 additions & 4 deletions src/netbsd/btop_collect.cpp → src/netbsd/collect.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ tab-size = 4

#include <fmt/format.h>

#include "../btop_config.hpp"
#include "../btop_log.hpp"
#include "../btop_shared.hpp"
#include "../btop_tools.hpp"
#include "../config.hpp"
#include "../log.hpp"
#include "../shared.hpp"
#include "../tools.hpp"

using std::clamp, std::string_literals::operator""s, std::cmp_equal, std::cmp_less, std::cmp_greater;
using std::ifstream, std::numeric_limits, std::streamsize, std::round, std::max, std::min;
Expand Down
8 changes: 4 additions & 4 deletions src/openbsd/btop_collect.cpp → src/openbsd/collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ tab-size = 4

#include <fmt/format.h>

#include "../btop_config.hpp"
#include "../btop_log.hpp"
#include "../btop_shared.hpp"
#include "../btop_tools.hpp"
#include "../config.hpp"
#include "../log.hpp"
#include "../shared.hpp"
#include "../tools.hpp"

#include "./sysctlbyname.h"

Expand Down
2 changes: 1 addition & 1 deletion src/openbsd/sysctlbyname.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <string.h>

#include "internal.h"
#include "../btop_tools.hpp"
#include "../tools.hpp"

int
sysctlbyname(const char *name, void *oldp, size_t *oldlenp,
Expand Down
8 changes: 4 additions & 4 deletions src/osx/btop_collect.cpp → src/osx/collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ tab-size = 4

#include <fmt/format.h>

#include "../btop_config.hpp"
#include "../btop_log.hpp"
#include "../btop_shared.hpp"
#include "../btop_tools.hpp"
#include "../config.hpp"
#include "../log.hpp"
#include "../shared.hpp"
#include "../tools.hpp"

#if __MAC_OS_X_VERSION_MIN_REQUIRED > 101504
#include "sensors.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/btop_shared.cpp → src/shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ tab-size = 4
#include <regex>
#include <string>

#include "btop_config.hpp"
#include "btop_shared.hpp"
#include "btop_tools.hpp"
#include "config.hpp"
#include "shared.hpp"
#include "tools.hpp"

namespace fs = std::filesystem;
namespace rng = std::ranges;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/btop_theme.cpp → src/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ tab-size = 4
#include <fstream>
#include <unistd.h>

#include "btop_config.hpp"
#include "btop_log.hpp"
#include "btop_theme.hpp"
#include "btop_tools.hpp"
#include "config.hpp"
#include "log.hpp"
#include "theme.hpp"
#include "tools.hpp"

using std::round;
using std::stoi;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/btop_tools.cpp → src/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ tab-size = 4
#include <unistd.h>

#include "widechar_width.hpp"
#include "btop_log.hpp"
#include "btop_shared.hpp"
#include "btop_tools.hpp"
#include "btop_config.hpp"
#include "log.hpp"
#include "shared.hpp"
#include "tools.hpp"
#include "config.hpp"

using std::cout;
using std::floor;
Expand Down
2 changes: 1 addition & 1 deletion src/btop_tools.hpp → src/tools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tab-size = 4
#include <fmt/core.h>
#include <fmt/format.h>

#include "btop_log.hpp"
#include "log.hpp"

using std::array;
using std::atomic;
Expand Down
Loading