Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package btop for openSUSE:Factory checked in at 2022-03-07 19:02:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/btop (Old) and /work/SRC/openSUSE:Factory/.btop.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "btop" Mon Mar 7 19:02:59 2022 rev:16 rq:960037 version:1.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/btop/btop.changes 2022-02-28 19:44:34.925963560 +0100 +++ /work/SRC/openSUSE:Factory/.btop.new.1958/btop.changes 2022-03-07 19:03:00.174033092 +0100 @@ -1,0 +2,12 @@ +Mon Mar 7 16:21:05 UTC 2022 - Scott Bradnick <scott.bradn...@suse.com> - 1.2.5 + +- Update to upstream release 1.2.5: + * Fixed: Fallback to less accurate UTF8 char count if conversion to + wstring fails + * Fixed: Small ui fixes for mem and disks + * Added: New theme HotPurpleTrafficLight, by @pallebone + * Fixed: title_left symbol between auto and zero in the net box is + not displayed, by @mrdotx + * Fixed: Mouse mappings for net box + +------------------------------------------------------------------- Old: ---- v1.2.4.tar.gz New: ---- v1.2.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ btop.spec ++++++ --- /var/tmp/diff_new_pack.lkKiUr/_old 2022-03-07 19:03:01.050032782 +0100 +++ /var/tmp/diff_new_pack.lkKiUr/_new 2022-03-07 19:03:01.054032780 +0100 @@ -17,7 +17,7 @@ Name: btop -Version: 1.2.4 +Version: 1.2.5 Release: 0 Summary: Usage and stats for processor, memory, disks, network and processes License: Apache-2.0 ++++++ v1.2.4.tar.gz -> v1.2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.4/CHANGELOG.md new/btop-1.2.5/CHANGELOG.md --- old/btop-1.2.4/CHANGELOG.md 2022-02-27 14:24:39.000000000 +0100 +++ new/btop-1.2.5/CHANGELOG.md 2022-03-06 00:27:23.000000000 +0100 @@ -1,3 +1,15 @@ +## v1.2.5 + +* Fixed: Fallback to less accurate UTF8 char count if conversion to wstring fails + +* Fixed: Small ui fixes for mem and disks + +* Added: New theme HotPurpleTrafficLight, by @pallebone + +* Fixed: title_left symbol between auto and zero in the net box is not displayed, by @mrdotx + +* Fixed: Mouse mappings for net box + ## v1.2.4 * Optimization: Proc::draw() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.4/src/btop.cpp new/btop-1.2.5/src/btop.cpp --- old/btop-1.2.4/src/btop.cpp 2022-02-27 14:24:39.000000000 +0100 +++ new/btop-1.2.5/src/btop.cpp 2022-03-06 00:27:23.000000000 +0100 @@ -60,7 +60,7 @@ {"#801414", "???????????????????????? ????????? ???????????????????????????????????? ????????? ?????????"}, {"#000000", "????????????????????? ????????? ????????????????????? ?????????"}, }; - const string Version = "1.2.4"; + const string Version = "1.2.5"; int coreCount; string overlay; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.4/src/btop_draw.cpp new/btop-1.2.5/src/btop_draw.cpp --- old/btop-1.2.4/src/btop_draw.cpp 2022-02-27 14:24:39.000000000 +0100 +++ new/btop-1.2.5/src/btop_draw.cpp 2022-03-06 00:27:23.000000000 +0100 @@ -816,7 +816,7 @@ const string humanized = floating_humanizer(mem.stats.at(name)); const string graphics = (use_graphs ? mem_graphs.at(name)(mem.percent.at(name), redraw or data_same) : mem_meters.at(name)(mem.percent.at(name).back())); if (mem_size > 2) { - out += Mv::to(y+1+cy, x+1+cx) + divider + ljust(title, 4, false, false, not big_mem) + ljust(":", (big_mem ? 1 : 6)) + out += Mv::to(y+1+cy, x+1+cx) + divider + title.substr(0, big_mem ? 10 : 5) + ":" + Mv::to(y+1+cy, x+cx + mem_width - 2 - humanized.size()) + trans(humanized) + Mv::to(y+2+cy, x+cx + (graph_height >= 2 ? 0 : 1)) + graphics + up + rjust(to_string(mem.percent.at(name).back()) + "%", 4); cy += (graph_height == 0 ? 2 : graph_height + 1); @@ -836,6 +836,7 @@ cx = mem_width; cy = 0; const bool big_disk = disks_width >= 25; divider = Mv::l(1) + Theme::c("div_line") + Symbols::div_left + Symbols::h_line * disks_width + Theme::c("mem_box") + Fx::ub + Symbols::div_right + Mv::l(disks_width); + const string hu_div = Theme::c("div_line") + Symbols::h_line + Theme::c("main_fg"); if (io_mode) { for (const auto& mount : mem.disks_order) { if (not disks.contains(mount)) continue; @@ -843,11 +844,11 @@ const auto& disk = disks.at(mount); if (disk.io_read.empty()) continue; const string total = floating_humanizer(disk.total, not big_disk); - out += Mv::to(y+1+cy, x+1+cx) + divider + Theme::c("title") + Fx::b + uresize(disk.name, disks_width - 2) + Mv::to(y+1+cy, x+cx + disks_width - total.size()) + out += Mv::to(y+1+cy, x+1+cx) + divider + Theme::c("title") + Fx::b + uresize(disk.name, disks_width - 8) + Mv::to(y+1+cy, x+cx + disks_width - total.size()) + trans(total) + Fx::ub; if (big_disk) { const string used_percent = to_string(disk.used_percent); - out += Mv::to(y+1+cy, x+1+cx + round((double)disks_width / 2) - round((double)used_percent.size() / 2)) + Theme::c("main_fg") + used_percent + '%'; + out += Mv::to(y+1+cy, x+1+cx + round((double)disks_width / 2) - round((double)used_percent.size() / 2) - 1) + hu_div + used_percent + '%' + hu_div; } out += Mv::to(y+2+cy++, x+1+cx) + (big_disk ? " IO% " : " IO " + Mv::l(2)) + Theme::c("inactive_fg") + graph_bg * (disks_width - 6) + Theme::g("available").at(clamp(disk.io_activity.back(), 50ll, 100ll)) + Mv::l(disks_width - 6) + io_graphs.at(mount + "_activity")(disk.io_activity, redraw or data_same) + Theme::c("main_fg"); @@ -878,21 +879,21 @@ if (cy > height - 3) break; const auto& disk = disks.at(mount); auto comb_val = (not disk.io_read.empty() ? disk.io_read.back() + disk.io_write.back() : 0ll); - const string human_io = (comb_val > 0 and big_disk ? (disk.io_write.back() > 0 ? "???"s : ""s) + (disk.io_read.back() > 0 ? "???"s : ""s) + const string human_io = (comb_val > 0 ? (disk.io_write.back() > 0 and big_disk ? "???"s : ""s) + (disk.io_read.back() > 0 and big_disk ? "???"s : ""s) + floating_humanizer(comb_val, true) : ""); const string human_total = floating_humanizer(disk.total, not big_disk); const string human_used = floating_humanizer(disk.used, not big_disk); const string human_free = floating_humanizer(disk.free, not big_disk); - out += Mv::to(y+1+cy, x+1+cx) + divider + Theme::c("title") + Fx::b + uresize(disk.name, disks_width - 2) + Mv::to(y+1+cy, x+cx + disks_width - human_total.size()) + out += Mv::to(y+1+cy, x+1+cx) + divider + Theme::c("title") + Fx::b + uresize(disk.name, disks_width - 8) + Mv::to(y+1+cy, x+cx + disks_width - human_total.size()) + trans(human_total) + Fx::ub + Theme::c("main_fg"); if (big_disk and not human_io.empty()) - out += Mv::to(y+1+cy, x+1+cx + round((double)disks_width / 2) - round((double)human_io.size() / 2)) + Theme::c("main_fg") + human_io; + out += Mv::to(y+1+cy, x+1+cx + round((double)disks_width / 2) - round((double)human_io.size() / 2) - 1) + hu_div + human_io + hu_div; if (++cy > height - 3) break; if (show_io_stat and io_graphs.contains(mount + "_activity")) { out += Mv::to(y+1+cy, x+1+cx) + (big_disk ? " IO% " : " IO " + Mv::l(2)) + Theme::c("inactive_fg") + graph_bg * (disks_width - 6) + Theme::g("available").at(clamp(disk.io_activity.back(), 50ll, 100ll)) + Mv::l(disks_width - 6) + io_graphs.at(mount + "_activity")(disk.io_activity, redraw or data_same) + Theme::c("main_fg"); - if (not big_disk) out += Mv::to(y+1+cy, x+cx) + Theme::c("main_fg") + human_io; + if (not big_disk) out += Mv::to(y+1+cy, x+cx+1) + Theme::c("main_fg") + human_io; if (++cy > height - 3) break; } @@ -962,13 +963,13 @@ //? Interface selector and buttons - out += Mv::to(y, x+width - i_size - 10) + title_left + Fx::b + Theme::c("hi_fg") + "<b " + Theme::c("title") + out += Mv::to(y, x+width - i_size - 9) + title_left + Fx::b + Theme::c("hi_fg") + "<b " + Theme::c("title") + uresize(selected_iface, 10) + Theme::c("hi_fg") + " n>" + title_right - + Mv::to(y, x+width - i_size - 16) + title_left + Theme::c("hi_fg") + (net.stat.at("download").offset + net.stat.at("upload").offset > 0 ? Fx::b : "") + 'z' + + Mv::to(y, x+width - i_size - 15) + title_left + Theme::c("hi_fg") + (net.stat.at("download").offset + net.stat.at("upload").offset > 0 ? Fx::b : "") + 'z' + Theme::c("title") + "ero" + title_right; - Input::mouse_mappings["b"] = {y, x+width - i_size - 9, 1, 3}; + Input::mouse_mappings["b"] = {y, x+width - i_size - 8, 1, 3}; Input::mouse_mappings["n"] = {y, x+width - 6, 1, 3}; - Input::mouse_mappings["z"] = {y, x+width - i_size - 15, 1, 4}; + Input::mouse_mappings["z"] = {y, x+width - i_size - 14, 1, 4}; if (width - i_size - 20 > 6) { out += Mv::to(y, x+width - i_size - 21) + title_left + Theme::c("hi_fg") + (net_auto ? Fx::b : "") + 'a' + Theme::c("title") + "uto" + title_right; Input::mouse_mappings["a"] = {y, x+width - i_size - 20, 1, 4}; @@ -1662,4 +1663,4 @@ box = createBox(x, y, width, height, Theme::c("proc_box"), true, "proc", "", 4); } } -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.4/src/btop_tools.cpp new/btop-1.2.5/src/btop_tools.cpp --- old/btop-1.2.4/src/btop_tools.cpp 2022-02-27 14:24:39.000000000 +0100 +++ new/btop-1.2.5/src/btop_tools.cpp 2022-03-06 00:27:23.000000000 +0100 @@ -170,11 +170,16 @@ size_t wide_ulen(const string& str) { unsigned int chars = 0; - std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; - auto w_str = conv.from_bytes((str.size() > 10000 ? str.substr(0, 10000).c_str() : str.c_str())); + try { + std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; + auto w_str = conv.from_bytes((str.size() > 10000 ? str.substr(0, 10000).c_str() : str.c_str())); - for (auto c : w_str) { - chars += utf8::wcwidth(c); + for (auto c : w_str) { + chars += utf8::wcwidth(c); + } + } + catch (...) { + return ulen(str); } return chars; @@ -193,11 +198,17 @@ string uresize(string str, const size_t len, const bool wide) { if (len < 1 or str.empty()) return ""; if (wide) { - std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; - auto w_str = conv.from_bytes((str.size() > 10000 ? str.substr(0, 10000).c_str() : str.c_str())); - while (wide_ulen(w_str) > len) - w_str.pop_back(); - str = conv.to_bytes(w_str); + try { + std::wstring_convert<std::codecvt_utf8<wchar_t>> conv; + auto w_str = conv.from_bytes((str.size() > 10000 ? str.substr(0, 10000).c_str() : str.c_str())); + while (wide_ulen(w_str) > len) + w_str.pop_back(); + string n_str = conv.to_bytes(w_str); + return n_str; + } + catch (...) { + return uresize(str, len, false); + } } else { for (size_t x = 0, i = 0; i < str.size(); i++) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/btop-1.2.4/themes/HotPurpleTrafficLight.theme new/btop-1.2.5/themes/HotPurpleTrafficLight.theme --- old/btop-1.2.4/themes/HotPurpleTrafficLight.theme 1970-01-01 01:00:00.000000000 +0100 +++ new/btop-1.2.5/themes/HotPurpleTrafficLight.theme 2022-03-06 00:27:23.000000000 +0100 @@ -0,0 +1,94 @@ +#HotPurpleTrafficLight +#by Pete Allebone - mess with the best... you know the rest. <catch me at: peter at allebone dot org> +#Designed to flash up bright red with danger when loads are high and attention is needed. + +# Main background, empty for terminal default, need to be empty if you want transparent background +theme[main_bg]="#000000" + +# Main text color +theme[main_fg]="#d1d1e0" + +# Title color for boxes +theme[title]="#d1d1e0" + +# Highlight color for keyboard shortcuts +theme[hi_fg]="#9933ff" + +# Background color of selected item in processes box +theme[selected_bg]="#6666ff" + +# Foreground color of selected item in processes box +theme[selected_fg]="#d1d1e0" + +# Color of inactive/disabled text +theme[inactive_fg]="#9999ff" + +# Color of text appearing on top of graphs, i.e uptime and current network graph scaling +theme[graph_text]="#9933ff" + +# Background color of the percentage meters +theme[meter_bg]="#4d4dff" + +# Misc colors for processes box including mini cpu graphs, details memory graph and details status text +theme[proc_misc]="#9933ff" + +# Cpu box outline color +theme[cpu_box]="#a64dff" + +# Memory/disks box outline color +theme[mem_box]="#a64dff" + +# Net up/down box outline color +theme[net_box]="#a64dff" + +# Processes box outline color +theme[proc_box]="#a64dff" + +# Box divider line and small boxes line color +theme[div_line]="#4d4dff" + +# Temperature graph colors +theme[temp_start]="#00ff00" +theme[temp_mid]="#ff9933" +theme[temp_end]="#ff0000" + +# CPU graph colors +theme[cpu_start]="#00ff00" +theme[cpu_mid]="#ccff66" +theme[cpu_end]="#ff0000" + +# Mem/Disk free meter +theme[free_end]="#00ff00" +theme[free_mid]="#ccff66" +theme[free_start]="#ff0000" + +# Mem/Disk cached meter +theme[cached_start]="#00ff00" +theme[cached_mid]="#ccff66" +theme[cached_end]="#ff0000" + +# Mem/Disk available meter +theme[available_start]="#ff0000" +theme[available_mid]="#ccff66" +theme[available_end]="#00ff00" + +# Mem/Disk used meter +theme[used_start]="#00ff00" +theme[used_mid]="#ccff66" +theme[used_end]="#ff0000" + +# Download graph colors +theme[download_start]="#00ff00" +theme[download_mid]="#ff9933" +theme[download_end]="#ff0000" + +# Upload graph colors +theme[upload_start]="#00ff00" +theme[upload_mid]="#ff9933" +theme[upload_end]="#ff0000" + +# Process box color gradient for threads, mem and cpu usage +theme[process_start]="#9999ff" +theme[process_mid]="#4d4dff" +theme[process_end]="#a64dff" +