Fix various typos in code, themes and workflows

This commit is contained in:
Steffen Winter
2025-04-23 21:52:55 +02:00
committed by Steffen
parent d40cd430b8
commit 6cab38f097
9 changed files with 17 additions and 17 deletions

View File

@@ -115,7 +115,7 @@ jobs:
mkdir .artifacts
mkdir .package
- name: Create binary atrifacts
- name: Create binary artifacts
run: |
TOOLCHAIN=${{ matrix.toolchain }}
GIT_HASH=$(git rev-parse --short "${{ github.sha }}")

View File

@@ -198,7 +198,7 @@ if(BTOP_STATIC)
target_link_options(btop PRIVATE -static LINKER:--fatal-warnings)
endif()
# Other platform depdendent flags
# Other platform dependent flags
if(APPLE)
target_link_libraries(btop
$<LINK_LIBRARY:FRAMEWORK,CoreFoundation> $<LINK_LIBRARY:FRAMEWORK,IOKit>

View File

@@ -122,7 +122,7 @@ namespace Cli {
auto preset_id = std::clamp(std::stoi(arg.data()), 0, 9);
cli.preset = std::make_optional(preset_id);
} catch (std::invalid_argument& e) {
error("Preset must be a positiv number");
error("Preset must be a positive number");
return OrRetCode { 1 };
}
continue;
@@ -139,7 +139,7 @@ namespace Cli {
auto refresh_rate = std::min(std::stoul(arg.data()), 100UL);
cli.updates = refresh_rate;
} catch (std::invalid_argument& e) {
error("Update must be a positiv number");
error("Update must be a positive number");
return OrRetCode { 1 };
}
continue;
@@ -165,7 +165,7 @@ namespace Cli {
" {2}-p, --preset {1}<id> Start with a preset (0-9)\n"
" {2}-t, --tty{1} Force tty mode with ANSI graph symbols and 16 colors only\n"
" {2} --no-tty{1} Force disable tty mode\n"
" {2}-u, --update {1}<ms> Set an inital update rate in milliseconds\n"
" {2}-u, --update {1}<ms> Set an initial update rate in milliseconds\n"
" {2}-h, --help{1} Show this help message and exit\n"
" {2}-V, --version{1} Show a version message and exit (more with --version)\n",
BOLD_UNDERLINE, RESET, BOLD

View File

@@ -1170,8 +1170,8 @@ namespace Menu {
return (redraw ? Changed : retval);
}
static int optionsMenu(const string& key) {
enum Predispositions { isBool, isInt, isString, is2D, isBrowseable, isEditable};
static int optionsMenu(const string& key) {
enum Predispositions { isBool, isInt, isString, is2D, isBrowsable, isEditable};
static int y{};
static int x{};
static int height{};
@@ -1383,7 +1383,7 @@ namespace Menu {
recollect = true;
}
}
else if (selPred.test(isBrowseable)) {
else if (selPred.test(isBrowsable)) {
auto& optList = optionsList.at(option).get();
int i = v_index(optList, Config::getS(option));
@@ -1438,9 +1438,9 @@ namespace Menu {
if (not selPred.test(isString))
selPred.set(is2D);
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);
}
@@ -1475,14 +1475,14 @@ namespace Menu {
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, "_", " "))
+ (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())
: ""), 29);
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)) + " ";
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;
mouse_mappings["left"] = {cy-2, x, 2, 5};
mouse_mappings["right"] = {cy-2, x+25, 2, 5};

View File

@@ -211,7 +211,7 @@ namespace Tools {
//* Replace <from> in <str> with <to> and return new string
string s_replace(const string& str, const string& from, const string& to);
//* Capatilize <str>
//* Capitalize <str>
inline string capitalize(string str) {
str.at(0) = toupper(str.at(0));
return str;

View File

@@ -972,7 +972,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 string dir : {"download", "upload"}) {
auto &saved_stat = net.at(iface).stat.at(dir);

View File

@@ -147,7 +147,7 @@ namespace Cpu {
return IOConnectCallStructMethod(conn, index,
// inputStructure
inputStructure, structureInputSize,
// ouputStructure
// outputStructure
outputStructure, &structureOutputSize);
}

View File

@@ -10,7 +10,7 @@ theme[main_fg]="#deddda"
# Title color for boxes
theme[title]="#deddda"
# Higlight color for keyboard shortcuts
# Highlight color for keyboard shortcuts
theme[hi_fg]="#62a0ea"
# Background color of selected item in processes box

View File

@@ -14,7 +14,7 @@ theme[main_fg]="#cfc9c2"
# Title color for boxes
theme[title]="#cfc9c2"
# Higlight color for keyboard shortcuts
# Highlight color for keyboard shortcuts
theme[hi_fg]="#7dcfff"
# Background color of selected item in processes box