mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-16 17:35:03 +12:00
Merge 7fea4f17d9
into fd2a2acdad
This commit is contained in:
commit
90346d00a1
2
.github/workflows/continuous-build-linux.yml
vendored
2
.github/workflows/continuous-build-linux.yml
vendored
|
@ -113,7 +113,7 @@ jobs:
|
||||||
mkdir .artifacts
|
mkdir .artifacts
|
||||||
mkdir .package
|
mkdir .package
|
||||||
|
|
||||||
- name: Create binary atrifacts
|
- name: Create binary artifacts
|
||||||
run: |
|
run: |
|
||||||
TOOLCHAIN=${{ matrix.toolchain }}
|
TOOLCHAIN=${{ matrix.toolchain }}
|
||||||
GIT_HASH=$(git rev-parse --short "${{ github.sha }}")
|
GIT_HASH=$(git rev-parse --short "${{ github.sha }}")
|
||||||
|
|
6
.github/workflows/test-snap-can-build.yml
vendored
6
.github/workflows/test-snap-can-build.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- '*.*'
|
- '*.*'
|
||||||
paths:
|
paths:
|
||||||
- 'src/**'
|
- 'src/**'
|
||||||
- '!src/osx/**'
|
- '!src/osx/**'
|
||||||
|
@ -22,14 +22,14 @@ on:
|
||||||
- 'include/**'
|
- 'include/**'
|
||||||
- 'Makefile'
|
- 'Makefile'
|
||||||
- '.github/workflows/test-snap-can-build.yml'
|
- '.github/workflows/test-snap-can-build.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [16.x]
|
node-version: [16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ Fixed incorrect used and available memory for OSX | | 4461a43
|
||||||
|
|
||||||
* Fixed: Wrong memory unit when shorten and size is less than 10, by @mohi001
|
* Fixed: Wrong memory unit when shorten and size is less than 10, by @mohi001
|
||||||
|
|
||||||
* Fixed: Use cpu cores avarage temp if missing cpu package temp for FreeBSD
|
* Fixed: Use cpu cores average temp if missing cpu package temp for FreeBSD
|
||||||
|
|
||||||
* Changed: Enter symbol to a more common variant
|
* Changed: Enter symbol to a more common variant
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ Fixed incorrect used and available memory for OSX | | 4461a43
|
||||||
|
|
||||||
* Changed: Moved check for valid terminal dimensions to before platform init
|
* Changed: Moved check for valid terminal dimensions to before platform init
|
||||||
|
|
||||||
* Added: Check for empty percentage deques
|
* Added: Check for empty percentage dequeues
|
||||||
|
|
||||||
* Changed: Cpu temp values check for existing values
|
* Changed: Cpu temp values check for existing values
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ Fixed incorrect used and available memory for OSX | | 4461a43
|
||||||
|
|
||||||
* Fixed: Sizing constraints bug on start and boxes can be toggled from size error screen
|
* Fixed: Sizing constraints bug on start and boxes can be toggled from size error screen
|
||||||
|
|
||||||
* Fixed: UTF-8 check crashing if LANG was set to non existant locale
|
* Fixed: UTF-8 check crashing if LANG was set to non existent locale
|
||||||
|
|
||||||
## v1.0.4
|
## v1.0.4
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ if(LINUX AND BTOP_GPU)
|
||||||
if(BTOP_RSMI_STATIC)
|
if(BTOP_RSMI_STATIC)
|
||||||
# ROCm doesn't properly add it's folders to the module path if `CMAKE_MODULE_PATH` is already
|
# ROCm doesn't properly add it's folders to the module path if `CMAKE_MODULE_PATH` is already
|
||||||
# set
|
# set
|
||||||
# We could also manully append ROCm's path here
|
# We could also manually append ROCm's path here
|
||||||
set(_CMAKE_MODULE_PATH CMAKE_MODULE_PATH)
|
set(_CMAKE_MODULE_PATH CMAKE_MODULE_PATH)
|
||||||
unset(CMAKE_MODULE_PATH)
|
unset(CMAKE_MODULE_PATH)
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ if(BTOP_STATIC)
|
||||||
target_link_options(btop PRIVATE -static LINKER:--fatal-warnings)
|
target_link_options(btop PRIVATE -static LINKER:--fatal-warnings)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Other platform depdendent flags
|
# Other platform dependent flags
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_libraries(btop
|
target_link_libraries(btop
|
||||||
$<LINK_LIBRARY:FRAMEWORK,CoreFoundation> $<LINK_LIBRARY:FRAMEWORK,IOKit>
|
$<LINK_LIBRARY:FRAMEWORK,CoreFoundation> $<LINK_LIBRARY:FRAMEWORK,IOKit>
|
||||||
|
@ -173,7 +173,7 @@ if(APPLE)
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||||
# Avoid version mismatch for libstdc++ when a specific version of GCC is installed and not the
|
# Avoid version mismatch for libstdc++ when a specific version of GCC is installed and not the
|
||||||
# default one since all use the default ones RPATH
|
# default one since all use the default ones RPATH
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
string(REGEX MATCH "^[0-9]+" GCC_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}")
|
string(REGEX MATCH "^[0-9]+" GCC_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
set_target_properties(btop PROPERTIES
|
set_target_properties(btop PROPERTIES
|
||||||
INSTALL_RPATH "/usr/local/lib/gcc${GCC_VERSION_MAJOR}"
|
INSTALL_RPATH "/usr/local/lib/gcc${GCC_VERSION_MAJOR}"
|
||||||
|
|
|
@ -425,7 +425,7 @@ If you have an AMD GPU `rocm_smi_lib` is required, which may or may not be packa
|
||||||
| `GPU_SUPPORT=<true\|false>` | Enable/disable GPU support (Enabled by default on X86_64 Linux) |
|
| `GPU_SUPPORT=<true\|false>` | Enable/disable GPU support (Enabled by default on X86_64 Linux) |
|
||||||
| `RSMI_STATIC=true` | To statically link the ROCm SMI library used for querying AMDGPU |
|
| `RSMI_STATIC=true` | To statically link the ROCm SMI library used for querying AMDGPU |
|
||||||
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
||||||
| `CXX=<compiler>` | Manualy set which compiler to use |
|
| `CXX=<compiler>` | Manually set which compiler to use |
|
||||||
|
|
||||||
Example: `make ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
Example: `make ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ If you have an AMD GPU `rocm_smi_lib` is required, which may or may not be packa
|
||||||
| `ARCH=<architecture>` | To manually set the target architecture |
|
| `ARCH=<architecture>` | To manually set the target architecture |
|
||||||
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
||||||
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
||||||
| `CXX=<compiler>` | Manualy set which compiler to use |
|
| `CXX=<compiler>` | Manually set which compiler to use |
|
||||||
|
|
||||||
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ If you have an AMD GPU `rocm_smi_lib` is required, which may or may not be packa
|
||||||
| `ARCH=<architecture>` | To manually set the target architecture |
|
| `ARCH=<architecture>` | To manually set the target architecture |
|
||||||
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
||||||
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
||||||
| `CXX=<compiler>` | Manualy set which compiler to use |
|
| `CXX=<compiler>` | Manually set which compiler to use |
|
||||||
|
|
||||||
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ If you have an AMD GPU `rocm_smi_lib` is required, which may or may not be packa
|
||||||
| `ARCH=<architecture>` | To manually set the target architecture |
|
| `ARCH=<architecture>` | To manually set the target architecture |
|
||||||
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
| `FORTIFY_SOURCE=false` | Disable fortification with `_FORTIFY_SOURCE=3` |
|
||||||
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
| `ADDFLAGS=<flags>` | For appending flags to both compiler and linker |
|
||||||
| `CXX=<compiler>` | Manualy set which compiler to use |
|
| `CXX=<compiler>` | Manually set which compiler to use |
|
||||||
|
|
||||||
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
Example: `gmake ADDFLAGS=-march=native` might give a performance boost if compiling only for your own system.
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ parts:
|
||||||
- build-essential
|
- build-essential
|
||||||
- gcc-11
|
- gcc-11
|
||||||
- g++-11
|
- g++-11
|
||||||
|
|
||||||
override-pull: |
|
override-pull: |
|
||||||
snapcraftctl pull
|
snapcraftctl pull
|
||||||
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"
|
snapcraftctl set-version "$(git describe --tags | sed 's/^v//' | cut -d "-" -f1)"
|
||||||
|
|
|
@ -434,7 +434,7 @@ namespace Runner {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//* Wrapper for raising priviliges when using SUID bit
|
//* Wrapper for raising privileges when using SUID bit
|
||||||
class gain_priv {
|
class gain_priv {
|
||||||
int status = -1;
|
int status = -1;
|
||||||
public:
|
public:
|
||||||
|
@ -867,7 +867,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
Global::start_time = time_s();
|
Global::start_time = time_s();
|
||||||
|
|
||||||
//? Save real and effective userid's and drop priviliges until needed if running with SUID bit set
|
//? Save real and effective userid's and drop privileges until needed if running with SUID bit set
|
||||||
Global::real_uid = getuid();
|
Global::real_uid = getuid();
|
||||||
Global::set_uid = geteuid();
|
Global::set_uid = geteuid();
|
||||||
if (Global::real_uid != Global::set_uid) {
|
if (Global::real_uid != Global::set_uid) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Input {
|
||||||
//* Last entered key
|
//* Last entered key
|
||||||
extern deque<string> history;
|
extern deque<string> history;
|
||||||
|
|
||||||
//* Poll keyboard & mouse input for <timeout> ms and return input availabilty as a bool
|
//* Poll keyboard & mouse input for <timeout> ms and return input availability as a bool
|
||||||
bool poll(const uint64_t timeout=0);
|
bool poll(const uint64_t timeout=0);
|
||||||
|
|
||||||
//* Get a key or mouse action from input
|
//* Get a key or mouse action from input
|
||||||
|
|
|
@ -490,7 +490,7 @@ namespace Menu {
|
||||||
"Kelvin, 0 = absolute zero, 1 degree change",
|
"Kelvin, 0 = absolute zero, 1 degree change",
|
||||||
"equals 1 degree change in Celsius.",
|
"equals 1 degree change in Celsius.",
|
||||||
"",
|
"",
|
||||||
"Rankine, 0 = abosulte zero, 1 degree change",
|
"Rankine, 0 = absolute zero, 1 degree change",
|
||||||
"equals 1 degree change in Fahrenheit."},
|
"equals 1 degree change in Fahrenheit."},
|
||||||
{"show_cpu_freq",
|
{"show_cpu_freq",
|
||||||
"Show CPU frequency.",
|
"Show CPU frequency.",
|
||||||
|
@ -651,7 +651,7 @@ namespace Menu {
|
||||||
"",
|
"",
|
||||||
"Begin line with \"exclude=\" to change to",
|
"Begin line with \"exclude=\" to change to",
|
||||||
"exclude filter.",
|
"exclude filter.",
|
||||||
"Oterwise defaults to \"most include\" filter.",
|
"Otherwise defaults to \"most include\" filter.",
|
||||||
"",
|
"",
|
||||||
"Example:",
|
"Example:",
|
||||||
"\"exclude=/boot /home/user\""},
|
"\"exclude=/boot /home/user\""},
|
||||||
|
@ -1154,7 +1154,7 @@ namespace Menu {
|
||||||
}
|
}
|
||||||
|
|
||||||
int optionsMenu(const string& key) {
|
int optionsMenu(const string& key) {
|
||||||
enum Predispositions { isBool, isInt, isString, is2D, isBrowseable, isEditable};
|
enum Predispositions { isBool, isInt, isString, is2D, isBrowsable, isEditable};
|
||||||
static int y{};
|
static int y{};
|
||||||
static int x{};
|
static int x{};
|
||||||
static int height{};
|
static int height{};
|
||||||
|
@ -1359,7 +1359,7 @@ namespace Menu {
|
||||||
recollect = true;
|
recollect = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (selPred.test(isBrowseable)) {
|
else if (selPred.test(isBrowsable)) {
|
||||||
auto& optList = optionsList.at(option).get();
|
auto& optList = optionsList.at(option).get();
|
||||||
int i = v_index(optList, Config::getS(option));
|
int i = v_index(optList, Config::getS(option));
|
||||||
|
|
||||||
|
@ -1411,9 +1411,9 @@ namespace Menu {
|
||||||
if (not selPred.test(isString))
|
if (not selPred.test(isString))
|
||||||
selPred.set(is2D);
|
selPred.set(is2D);
|
||||||
else if (optionsList.contains(selOption)) {
|
else if (optionsList.contains(selOption)) {
|
||||||
selPred.set(isBrowseable);
|
selPred.set(isBrowsable);
|
||||||
}
|
}
|
||||||
if (not selPred.test(isBrowseable) and (selPred.test(isString) or selPred.test(isInt)))
|
if (not selPred.test(isBrowsable) and (selPred.test(isString) or selPred.test(isInt)))
|
||||||
selPred.set(isEditable);
|
selPred.set(isEditable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1448,14 +1448,14 @@ namespace Menu {
|
||||||
|
|
||||||
out += Mv::to(cy++, x + 1) + (c-1 == selected ? Theme::c("selected_bg") + Theme::c("selected_fg") : Theme::c("title"))
|
out += Mv::to(cy++, x + 1) + (c-1 == selected ? Theme::c("selected_bg") + Theme::c("selected_fg") : Theme::c("title"))
|
||||||
+ Fx::b + cjust(capitalize(s_replace(option, "_", " "))
|
+ Fx::b + cjust(capitalize(s_replace(option, "_", " "))
|
||||||
+ (c-1 == selected and selPred.test(isBrowseable)
|
+ (c-1 == selected and selPred.test(isBrowsable)
|
||||||
? ' ' + to_string(v_index(optionsList.at(option).get(), (option == "color_theme" ? Config::getS("color_theme") : value)) + 1) + '/' + to_string(optionsList.at(option).get().size())
|
? ' ' + to_string(v_index(optionsList.at(option).get(), (option == "color_theme" ? Config::getS("color_theme") : value)) + 1) + '/' + to_string(optionsList.at(option).get().size())
|
||||||
: ""), 29);
|
: ""), 29);
|
||||||
out += Mv::to(cy++, x + 1) + (c-1 == selected ? "" : Theme::c("main_fg")) + Fx::ub + " "
|
out += Mv::to(cy++, x + 1) + (c-1 == selected ? "" : Theme::c("main_fg")) + Fx::ub + " "
|
||||||
+ (c-1 == selected and editing ? cjust(editor(24), 34, true) : cjust(value, 25, true)) + " ";
|
+ (c-1 == selected and editing ? cjust(editor(24), 34, true) : cjust(value, 25, true)) + " ";
|
||||||
|
|
||||||
if (c-1 == selected) {
|
if (c-1 == selected) {
|
||||||
if (not editing and (selPred.test(is2D) or selPred.test(isBrowseable))) {
|
if (not editing and (selPred.test(is2D) or selPred.test(isBrowsable))) {
|
||||||
out += Fx::b + Mv::to(cy-1, x+2) + Symbols::left + Mv::to(cy-1, x+28) + Symbols::right;
|
out += Fx::b + Mv::to(cy-1, x+2) + Symbols::left + Mv::to(cy-1, x+28) + Symbols::right;
|
||||||
mouse_mappings["left"] = {cy-2, x, 2, 5};
|
mouse_mappings["left"] = {cy-2, x, 2, 5};
|
||||||
mouse_mappings["right"] = {cy-2, x+25, 2, 5};
|
mouse_mappings["right"] = {cy-2, x+25, 2, 5};
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Theme {
|
||||||
extern std::filesystem::path theme_dir;
|
extern std::filesystem::path theme_dir;
|
||||||
extern std::filesystem::path user_theme_dir;
|
extern std::filesystem::path user_theme_dir;
|
||||||
|
|
||||||
//* Contains "Default" and "TTY" at indeces 0 and 1, otherwise full paths to theme files
|
//* Contains "Default" and "TTY" at indices 0 and 1, otherwise full paths to theme files
|
||||||
extern vector<string> themes;
|
extern vector<string> themes;
|
||||||
|
|
||||||
//* Generate escape sequence for 24-bit or 256 color and return as a string
|
//* Generate escape sequence for 24-bit or 256 color and return as a string
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace Term {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool refresh(bool only_check) {
|
bool refresh(bool only_check) {
|
||||||
// Query dimensions of '/dev/tty' of the 'STDOUT_FILENO' isn't avaiable.
|
// Query dimensions of '/dev/tty' of the 'STDOUT_FILENO' isn't available.
|
||||||
// This variable is set in those cases to avoid calls to ioctl
|
// This variable is set in those cases to avoid calls to ioctl
|
||||||
constinit static bool uses_dev_tty = false;
|
constinit static bool uses_dev_tty = false;
|
||||||
struct winsize wsize {};
|
struct winsize wsize {};
|
||||||
|
@ -644,7 +644,7 @@ namespace Logger {
|
||||||
size_t loglevel;
|
size_t loglevel;
|
||||||
fs::path logfile;
|
fs::path logfile;
|
||||||
|
|
||||||
//* Wrapper for lowering priviliges if using SUID bit and currently isn't using real userid
|
//* Wrapper for lowering privileges if using SUID bit and currently isn't using real userid
|
||||||
class lose_priv {
|
class lose_priv {
|
||||||
int status = -1;
|
int status = -1;
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -114,7 +114,7 @@ namespace Mv {
|
||||||
//* Save cursor position
|
//* Save cursor position
|
||||||
const string save = Fx::e + "s";
|
const string save = Fx::e + "s";
|
||||||
|
|
||||||
//* Restore saved cursor postion
|
//* Restore saved cursor position
|
||||||
const string restore = Fx::e + "u";
|
const string restore = Fx::e + "u";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ namespace Tools {
|
||||||
//* Replace <from> in <str> with <to> and return new string
|
//* Replace <from> in <str> with <to> and return new string
|
||||||
string s_replace(const string& str, const string& from, const string& to);
|
string s_replace(const string& str, const string& from, const string& to);
|
||||||
|
|
||||||
//* Capatilize <str>
|
//* Capitalize <str>
|
||||||
inline string capitalize(string str) {
|
inline string capitalize(string str) {
|
||||||
str.at(0) = toupper(str.at(0));
|
str.at(0) = toupper(str.at(0));
|
||||||
return str;
|
return str;
|
||||||
|
@ -286,7 +286,7 @@ namespace Tools {
|
||||||
return is_in(str, "true", "True");
|
return is_in(str, "true", "True");
|
||||||
}
|
}
|
||||||
|
|
||||||
//* Check if a string is a valid integer value (only postive)
|
//* Check if a string is a valid integer value (only positive)
|
||||||
inline bool isint(const string& str) {
|
inline bool isint(const string& str) {
|
||||||
return all_of(str.begin(), str.end(), ::isdigit);
|
return all_of(str.begin(), str.end(), ::isdigit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,7 @@ namespace Cpu {
|
||||||
got_sensors = true;
|
got_sensors = true;
|
||||||
int temp;
|
int temp;
|
||||||
size_t size = sizeof(temp);
|
size_t size = sizeof(temp);
|
||||||
sysctlbyname("dev.cpu.0.coretemp.tjmax", &temp, &size, nullptr, 0); //asuming the max temp is same for all cores
|
sysctlbyname("dev.cpu.0.coretemp.tjmax", &temp, &size, nullptr, 0); //assuming the max temp is same for all cores
|
||||||
temp = (temp - 2732) / 10; // since it's an int, it's multiplied by 10, and offset to absolute zero...
|
temp = (temp - 2732) / 10; // since it's an int, it's multiplied by 10, and offset to absolute zero...
|
||||||
current_cpu.temp_max = temp;
|
current_cpu.temp_max = temp;
|
||||||
}
|
}
|
||||||
|
@ -907,7 +907,7 @@ namespace Net {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//? Get total recieved and transmitted bytes + device address if no ip was found
|
//? Get total received and transmitted bytes + device address if no ip was found
|
||||||
for (const auto &iface : interfaces) {
|
for (const auto &iface : interfaces) {
|
||||||
for (const string dir : {"download", "upload"}) {
|
for (const string dir : {"download", "upload"}) {
|
||||||
auto &saved_stat = net.at(iface).stat.at(dir);
|
auto &saved_stat = net.at(iface).stat.at(dir);
|
||||||
|
|
|
@ -2061,7 +2061,7 @@ namespace Mem {
|
||||||
if (access(zfs_pool_stat_path.c_str(), R_OK) == 0) {
|
if (access(zfs_pool_stat_path.c_str(), R_OK) == 0) {
|
||||||
return zfs_pool_stat_path;
|
return zfs_pool_stat_path;
|
||||||
} else {
|
} else {
|
||||||
Logger::debug("Cant access folder: " + zfs_pool_stat_path.string());
|
Logger::debug("Can't access folder: " + zfs_pool_stat_path.string());
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2266,7 +2266,7 @@ namespace Net {
|
||||||
} //else, ignoring family==AF_PACKET (see man 3 getifaddrs) which is the first one in the `for` loop.
|
} //else, ignoring family==AF_PACKET (see man 3 getifaddrs) which is the first one in the `for` loop.
|
||||||
}
|
}
|
||||||
|
|
||||||
//? Get total recieved and transmitted bytes + device address if no ip was found
|
//? Get total received and transmitted bytes + device address if no ip was found
|
||||||
for (const auto& iface : interfaces) {
|
for (const auto& iface : interfaces) {
|
||||||
if (net.at(iface).ipv4.empty() and net.at(iface).ipv6.empty())
|
if (net.at(iface).ipv4.empty() and net.at(iface).ipv6.empty())
|
||||||
net.at(iface).ipv4 = readfile("/sys/class/net/" + iface + "/address");
|
net.at(iface).ipv4 = readfile("/sys/class/net/" + iface + "/address");
|
||||||
|
|
|
@ -859,7 +859,7 @@ namespace Net {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//? Get total recieved and transmitted bytes + device address if no ip was found
|
//? Get total received and transmitted bytes + device address if no ip was found
|
||||||
for (const auto &iface : interfaces) {
|
for (const auto &iface : interfaces) {
|
||||||
for (const string dir : {"download", "upload"}) {
|
for (const string dir : {"download", "upload"}) {
|
||||||
auto &saved_stat = net.at(iface).stat.at(dir);
|
auto &saved_stat = net.at(iface).stat.at(dir);
|
||||||
|
|
|
@ -606,7 +606,7 @@ namespace Mem {
|
||||||
|
|
||||||
mach_port_t libtop_master_port;
|
mach_port_t libtop_master_port;
|
||||||
if (IOMasterPort(bootstrap_port, &libtop_master_port)) {
|
if (IOMasterPort(bootstrap_port, &libtop_master_port)) {
|
||||||
Logger::error("errot getting master port");
|
Logger::error("error getting master port");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Get the list of all drive objects. */
|
/* Get the list of all drive objects. */
|
||||||
|
@ -940,7 +940,7 @@ namespace Net {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//? Get total recieved and transmitted bytes + device address if no ip was found
|
//? Get total received and transmitted bytes + device address if no ip was found
|
||||||
for (const auto &iface : interfaces) {
|
for (const auto &iface : interfaces) {
|
||||||
for (const string dir : {"download", "upload"}) {
|
for (const string dir : {"download", "upload"}) {
|
||||||
auto &saved_stat = net.at(iface).stat.at(dir);
|
auto &saved_stat = net.at(iface).stat.at(dir);
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace Cpu {
|
||||||
return IOConnectCallStructMethod(conn, index,
|
return IOConnectCallStructMethod(conn, index,
|
||||||
// inputStructure
|
// inputStructure
|
||||||
inputStructure, structureInputSize,
|
inputStructure, structureInputSize,
|
||||||
// ouputStructure
|
// outputStructure
|
||||||
outputStructure, &structureOutputSize);
|
outputStructure, &structureOutputSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#cfd8dc"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#ff"
|
theme[title]="#ff"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#90"
|
theme[hi_fg]="#90"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#2e3436"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#2e3436"
|
theme[title]="#2e3436"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#1a5fb4"
|
theme[hi_fg]="#1a5fb4"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
theme[selected_bg]="#1c71d8"
|
theme[selected_bg]="#1c71d8"
|
||||||
|
|
||||||
# Foreground color of selected item in processes box
|
# Foreground color of selected item in processes box
|
||||||
theme[selected_fg]="#ffffff"
|
theme[selected_fg]="#ffffff"
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#99DFFF"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#99FFFF"
|
theme[title]="#99FFFF"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#FF7F00"
|
theme[hi_fg]="#FF7F00"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
theme[selected_bg]="#722B01"
|
theme[selected_bg]="#722B01"
|
||||||
|
|
||||||
# Foreground color of selected item in processes box
|
# Foreground color of selected item in processes box
|
||||||
theme[selected_fg]="#99FFFF"
|
theme[selected_fg]="#99FFFF"
|
||||||
|
|
|
@ -11,7 +11,7 @@ theme[main_fg]="#eee8d5"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#eee8d5"
|
theme[title]="#eee8d5"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#d1302c"
|
theme[hi_fg]="#d1302c"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -22,7 +22,7 @@ theme[selected_bg]="#374145"
|
||||||
theme[selected_fg]="#dbbc7f"
|
theme[selected_fg]="#dbbc7f"
|
||||||
|
|
||||||
# Color of inactive/disabled text
|
# Color of inactive/disabled text
|
||||||
theme[inactive_fg]="#272e33"
|
theme[inactive_fg]="#272e33"
|
||||||
|
|
||||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||||
theme[graph_text]="#d3c6aa"
|
theme[graph_text]="#d3c6aa"
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#737680"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#272a34"
|
theme[title]="#272a34"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#90"
|
theme[hi_fg]="#90"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#E6E6E6"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#ff"
|
theme[title]="#ff"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#90"
|
theme[hi_fg]="#90"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#bb"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#cc"
|
theme[title]="#cc"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#90"
|
theme[hi_fg]="#90"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
theme[selected_bg]="#ff"
|
theme[selected_bg]="#ff"
|
||||||
|
|
||||||
# Foreground color of selected item in processes box
|
# Foreground color of selected item in processes box
|
||||||
theme[selected_fg]="#00"
|
theme[selected_fg]="#00"
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#a89984"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#ebdbb2"
|
theme[title]="#ebdbb2"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#d79921"
|
theme[hi_fg]="#d79921"
|
||||||
|
|
||||||
# Background color of selected items
|
# Background color of selected items
|
||||||
|
|
|
@ -29,7 +29,7 @@ theme[selected_bg]="#32302F"
|
||||||
theme[selected_fg]="#D3869B"
|
theme[selected_fg]="#D3869B"
|
||||||
|
|
||||||
# Color of inactive/disabled text
|
# Color of inactive/disabled text
|
||||||
theme[inactive_fg]="#3C3836"
|
theme[inactive_fg]="#3C3836"
|
||||||
|
|
||||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||||
theme[graph_text]="#A89984"
|
theme[graph_text]="#A89984"
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#d4be98"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#d4be98"
|
theme[title]="#d4be98"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#ea6962"
|
theme[hi_fg]="#ea6962"
|
||||||
|
|
||||||
# Background color of selected items
|
# Background color of selected items
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#F8F8F2"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#F8F8F2"
|
theme[title]="#F8F8F2"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#2eb398"
|
theme[hi_fg]="#2eb398"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#F8F8F2"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#F8F8F2"
|
theme[title]="#F8F8F2"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#F92672"
|
theme[hi_fg]="#F92672"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#d6deeb"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#ffffff"
|
theme[title]="#ffffff"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#addb67"
|
theme[hi_fg]="#addb67"
|
||||||
|
|
||||||
# Background color of selected items
|
# Background color of selected items
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#D8DEE9"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#8FBCBB"
|
theme[title]="#8FBCBB"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#5E81AC"
|
theme[hi_fg]="#5E81AC"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -10,7 +10,7 @@ theme[main_fg]="#abb2bf"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#abb2bf"
|
theme[title]="#abb2bf"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#61afef"
|
theme[hi_fg]="#61afef"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -12,7 +12,7 @@ theme[main_fg]="#00"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#00"
|
theme[title]="#00"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#CC3E28"
|
theme[hi_fg]="#CC3E28"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#eee8d5"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#fdf6e3"
|
theme[title]="#fdf6e3"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#b58900"
|
theme[hi_fg]="#b58900"
|
||||||
|
|
||||||
# Background color of selected items
|
# Background color of selected items
|
||||||
theme[selected_bg]="#073642"
|
theme[selected_bg]="#073642"
|
||||||
|
|
||||||
# Foreground color of selected items
|
# Foreground color of selected items
|
||||||
theme[selected_fg]="#d6a200"
|
theme[selected_fg]="#d6a200"
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#586e75"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#002b36"
|
theme[title]="#002b36"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#b58900"
|
theme[hi_fg]="#b58900"
|
||||||
|
|
||||||
# Background color of selected items
|
# Background color of selected items
|
||||||
theme[selected_bg]="#eee8d5"
|
theme[selected_bg]="#eee8d5"
|
||||||
|
|
||||||
# Foreground color of selected items
|
# Foreground color of selected items
|
||||||
theme[selected_fg]="#b58900"
|
theme[selected_fg]="#b58900"
|
||||||
|
|
|
@ -10,7 +10,7 @@ theme[main_fg]="#cfc9c2"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#cfc9c2"
|
theme[title]="#cfc9c2"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#7dcfff"
|
theme[hi_fg]="#7dcfff"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -10,7 +10,7 @@ theme[main_fg]="#cfc9c2"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#cfc9c2"
|
theme[title]="#cfc9c2"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#7dcfff"
|
theme[hi_fg]="#7dcfff"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,7 +18,7 @@ theme[main_fg]="#c5c8c6"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#c5c8c6"
|
theme[title]="#c5c8c6"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#81beb7"
|
theme[hi_fg]="#81beb7"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|
|
@ -18,11 +18,11 @@ theme[main_fg]="#30"
|
||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#10"
|
theme[title]="#10"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#284d75"
|
theme[hi_fg]="#284d75"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
theme[selected_bg]="#15283d"
|
theme[selected_bg]="#15283d"
|
||||||
|
|
||||||
# Foreground color of selected item in processes box
|
# Foreground color of selected item in processes box
|
||||||
theme[selected_fg]="#ff"
|
theme[selected_fg]="#ff"
|
||||||
|
|
Loading…
Reference in a new issue