Added themes and 16 color mode

This commit is contained in:
aristocratos 2021-06-20 22:07:04 +02:00
parent 61694f72a5
commit 3a783ae4a5
23 changed files with 1525 additions and 121 deletions

View file

@ -67,7 +67,7 @@ namespace Global {
{"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"},
{"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"},
};
std::string Version = "0.0.21";
const std::string Version = "0.0.21";
int coreCount;
}
@ -178,7 +178,7 @@ void _signal_handler(int sig) {
void banner_gen() {
size_t z = 0;
string b_color, bg, fg, oc, letter;
bool truecolor = Config::getB("truecolor");
auto& truecolor = Config::getB("truecolor");
int bg_i;
Global::banner.clear();
Global::banner_width = 0;
@ -186,7 +186,7 @@ void banner_gen() {
for (auto line: Global::Banner_src) {
if (auto w = ulen(line[1]); w > Global::banner_width) Global::banner_width = w;
fg = Theme::hex_to_color(line[0], !truecolor);
bg_i = 120-z*12;
bg_i = 120 - z * 12;
bg = Theme::dec_to_color(bg_i, bg_i, bg_i, !truecolor);
for (size_t i = 0; i < line[1].size(); i += 3) {
if (line[1][i] == ' ') {
@ -238,7 +238,6 @@ int main(int argc, char **argv){
#if defined(LINUX)
Global::coreCount = sysconf(_SC_NPROCESSORS_ONLN);
if (Global::coreCount < 1) Global::coreCount = 1;
{
std::error_code ec;
Global::self_path = fs::read_symlink("/proc/self/exe", ec).remove_filename();
@ -327,7 +326,7 @@ int main(int argc, char **argv){
auto thts = time_ms();
//? Generate the theme
Theme::set(Theme::Default_theme);
Theme::set("Default");
//? Create the btop++ banner
banner_gen();
@ -407,7 +406,7 @@ int main(int argc, char **argv){
exit(0);
}
if (false) {
if (true) {
vector<long long> mydata;
for (long long i = 0; i <= 100; i++) mydata.push_back(i);
@ -589,7 +588,7 @@ int main(int argc, char **argv){
cmd_cond = p.cmd.substr(0, std::min(p.cmd.find(' '), p.cmd.size()));
cmd_cond = cmd_cond.substr(std::min(cmd_cond.find_last_of('/') + 1, cmd_cond.size()));
}
ostring += Mv::r(1) + greyscale[lc] + ljust(p.prefix + to_string(p.pid) + " " + p.name + " " + (!cmd_cond.empty() && cmd_cond != p.name ? "(" + cmd_cond + ")" : ""), Term::width - 40, true) + " "
ostring += Mv::r(1) + (Config::getB("tty_mode") ? " " : greyscale[lc]) + ljust(p.prefix + to_string(p.pid) + " " + p.name + " " + (!cmd_cond.empty() && cmd_cond != p.name ? "(" + cmd_cond + ")" : ""), Term::width - 40, true) + " "
+ rjust(to_string(p.threads), 5) + " " + ljust(p.user, 10) + " " + rjust(floating_humanizer(p.mem, true), 5) + string(11, ' ')
+ (p.cpu_p < 10 || p.cpu_p >= 100 ? rjust(to_string(p.cpu_p), 3) + " " : rjust(to_string(p.cpu_p), 4))
+ "\n";

View file

@ -39,69 +39,120 @@ namespace Config {
bool write_new;
vector<array<string, 2>> descriptions = {
{"color_theme", "#* Color theme, looks for a .theme file in \"/usr/[local/]share/bpytop/themes\" and \"~/.config/bpytop/themes\", \"Default\" for builtin default theme.\n"
"#* Prefix name by a plus sign (+) for a theme located in user themes folder, i.e. color_theme=\"+monokai\"." },
{"theme_background", "#* If the theme set background should be shown, set to False if you want terminal background transparency."},
{"truecolor", "#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false."},
{"graph_symbol", "#* Default symbols to use for graph creation, \"braille\", \"block\" or \"tty\".\n"
"#* \"braille\" offers the highest resolution but might not be included in all fonts.\n"
"#* \"block\" has half the resolution of braille but uses more common characters.\n"
"#* \"tty\" uses only 3 different symbols but will work with most fonts and should work in a real TTY.\n"
"#* Note that \"tty\" only has half the horizontal resolution of the other two, so will show a shorter historical view."},
{"graph_symbol_cpu", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_mem", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_net", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_proc", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"force_tty", "#* Set to true to true to force tty mode regardless if a real tty has been detected or not."},
{"shown_boxes", "#* Manually set which boxes to show. Available values are \"cpu mem net proc\", separate values with whitespace."},
{"update_ms", "#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs."},
{"color_theme", "#* Color theme, looks for a .theme file in \"/usr/[local/]share/bpytop/themes\" and \"~/.config/bpytop/themes\", \"Default\" for builtin default theme.\n"
"#* Prefix name by a plus sign (+) for a theme located in user themes folder, i.e. color_theme=\"+monokai\"." },
{"theme_background", "#* If the theme set background should be shown, set to False if you want terminal background transparency."},
{"truecolor", "#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false."},
{"force_tty", "#* Set to true to force tty mode regardless if a real tty has been detected or not.\n"
"#* Will force 16-color mode, set all graph symbols to \"tty\" and swap out other non tty friendly symbols."},
{"graph_symbol", "#* Default symbols to use for graph creation, \"braille\", \"block\" or \"tty\".\n"
"#* \"braille\" offers the highest resolution but might not be included in all fonts.\n"
"#* \"block\" has half the resolution of braille but uses more common characters.\n"
"#* \"tty\" uses only 3 different symbols but will work with most fonts and should work in a real TTY.\n"
"#* Note that \"tty\" only has half the horizontal resolution of the other two, so will show a shorter historical view."},
{"graph_symbol_cpu", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_mem", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_net", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"graph_symbol_proc", "# Graph symbol to use for graphs in cpu box, \"default\", \"braille\", \"block\" or \"tty\"."},
{"shown_boxes", "#* Manually set which boxes to show. Available values are \"cpu mem net proc\", separate values with whitespace."},
{"update_ms", "#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs."},
{"proc_update_mult", "#* Processes update multiplier, sets how often the process list is updated as a multiplier of \"update_ms\".\n"
"#* Set to 2 or higher to greatly decrease bpytop cpu usage. (Only integers)."},
{"proc_sorting", "#* Processes sorting, \"pid\" \"program\" \"arguments\" \"threads\" \"user\" \"memory\" \"cpu lazy\" \"cpu responsive\",\n"
"#* \"cpu lazy\" updates top process over time, \"cpu responsive\" updates top process directly."},
{"proc_reversed", "#* Reverse sorting order, True or False."},
{"proc_tree", "#* Show processes as a tree."},
{"proc_colors", "#* Use the cpu graph colors in the process list."},
{"proc_gradient", "#* Use a darkening gradient in the process list."},
{"proc_per_core", "#* If process cpu usage should be of the core it's running on or usage of the total available cpu power."},
{"proc_mem_bytes", "#* Show process memory as bytes instead of percent."},
{"cpu_graph_upper", "#* Sets the CPU stat shown in upper half of the CPU graph, \"total\" is always available.\n"
"#* Select from a list of detected attributes from the options menu."},
{"cpu_graph_lower", "#* Sets the CPU stat shown in lower half of the CPU graph, \"total\" is always available.\n"
"#* Select from a list of detected attributes from the options menu."},
{"cpu_invert_lower", "#* Toggles if the lower CPU graph should be inverted."},
{"cpu_single_graph", "#* Set to True to completely disable the lower CPU graph."},
{"show_uptime", "#* Shows the system uptime in the CPU box."},
{"check_temp", "#* Show cpu temperature."},
{"cpu_sensor", "#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors."},
{"show_coretemp", "#* Show temperatures for cpu cores also if check_temp is True and sensors has been found."},
{"temp_scale", "#* Which temperature scale to use, available values: \"celsius\", \"fahrenheit\", \"kelvin\" and \"rankine\"."},
{"show_cpu_freq", "#* Show CPU frequency."},
{"draw_clock", "#* Draw a clock at top of screen, formatting according to strftime, empty string to disable."},
{"background_update", "#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort."},
{"custom_cpu_name", "#* Custom cpu model name, empty string to disable."},
{"disks_filter", "#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with a comma \",\".\n"
"#* Begin line with \"exclude=\" to change to exclude filter, otherwise defaults to \"most include\" filter. Example: disks_filter=\"exclude=/boot, /home/user\"."},
{"mem_graphs", "#* Show graphs instead of meters for memory values."},
{"show_swap", "#* If swap memory should be shown in memory box."},
{"swap_disk", "#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk."},
{"show_disks", "#* If mem box should be split to also show disks info."},
{"only_physical", "#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar."},
{"use_fstab", "#* Read disks list from /etc/fstab. This also disables only_physical."},
{"show_io_stat", "#* Toggles if io stats should be shown in regular disk usage view."},
{"io_mode", "#* Toggles io mode for disks, showing only big graphs for disk read/write speeds."},
{"io_graph_combined", "#* Set to True to show combined read/write io graphs in io mode."},
{"io_graph_speeds", "#* Set the top speed for the io graphs in MiB/s (10 by default), use format \"device:speed\" separate disks with a comma \",\".\n"
"#* Example: \"/dev/sda:100, /dev/sdb:20\"."},
{"net_download", "#* Set fixed values for network graphs, default \"10M\" = 10 Mibibytes, possible units \"K\", \"M\", \"G\", append with \"bit\" for bits instead of bytes, i.e \"100mbit\"."},
{"proc_sorting", "#* Processes sorting, \"pid\" \"program\" \"arguments\" \"threads\" \"user\" \"memory\" \"cpu lazy\" \"cpu responsive\",\n"
"#* \"cpu lazy\" updates top process over time, \"cpu responsive\" updates top process directly."},
{"proc_reversed", "#* Reverse sorting order, True or False."},
{"proc_tree", "#* Show processes as a tree."},
{"proc_colors", "#* Use the cpu graph colors in the process list."},
{"proc_gradient", "#* Use a darkening gradient in the process list."},
{"proc_per_core", "#* If process cpu usage should be of the core it's running on or usage of the total available cpu power."},
{"proc_mem_bytes", "#* Show process memory as bytes instead of percent."},
{"cpu_graph_upper", "#* Sets the CPU stat shown in upper half of the CPU graph, \"total\" is always available.\n"
"#* Select from a list of detected attributes from the options menu."},
{"cpu_graph_lower", "#* Sets the CPU stat shown in lower half of the CPU graph, \"total\" is always available.\n"
"#* Select from a list of detected attributes from the options menu."},
{"cpu_invert_lower", "#* Toggles if the lower CPU graph should be inverted."},
{"cpu_single_graph", "#* Set to True to completely disable the lower CPU graph."},
{"show_uptime", "#* Shows the system uptime in the CPU box."},
{"check_temp", "#* Show cpu temperature."},
{"cpu_sensor", "#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors."},
{"show_coretemp", "#* Show temperatures for cpu cores also if check_temp is True and sensors has been found."},
{"temp_scale", "#* Which temperature scale to use, available values: \"celsius\", \"fahrenheit\", \"kelvin\" and \"rankine\"."},
{"show_cpu_freq", "#* Show CPU frequency."},
{"draw_clock", "#* Draw a clock at top of screen, formatting according to strftime, empty string to disable."},
{"background_update", "#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort."},
{"custom_cpu_name", "#* Custom cpu model name, empty string to disable."},
{"disks_filter", "#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with a comma \",\".\n"
"#* Begin line with \"exclude=\" to change to exclude filter, otherwise defaults to \"most include\" filter. Example: disks_filter=\"exclude=/boot, /home/user\"."},
{"mem_graphs", "#* Show graphs instead of meters for memory values."},
{"show_swap", "#* If swap memory should be shown in memory box."},
{"swap_disk", "#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk."},
{"show_disks", "#* If mem box should be split to also show disks info."},
{"only_physical", "#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar."},
{"use_fstab", "#* Read disks list from /etc/fstab. This also disables only_physical."},
{"show_io_stat", "#* Toggles if io stats should be shown in regular disk usage view."},
{"io_mode", "#* Toggles io mode for disks, showing only big graphs for disk read/write speeds."},
{"io_graph_combined", "#* Set to True to show combined read/write io graphs in io mode."},
{"io_graph_speeds", "#* Set the top speed for the io graphs in MiB/s (10 by default), use format \"device:speed\" separate disks with a comma \",\".\n"
"#* Example: \"/dev/sda:100, /dev/sdb:20\"."},
{"net_download", "#* Set fixed values for network graphs, default \"10M\" = 10 Mibibytes, possible units \"K\", \"M\", \"G\", append with \"bit\" for bits instead of bytes, i.e \"100mbit\"."},
{"net_upload", ""},
{"net_auto", "#* Start in network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest."},
{"net_sync", "#* Sync the scaling for download and upload to whichever currently has the highest scale."},
{"net_color_fixed", "#* If the network graphs color gradient should scale to bandwidth usage or auto scale, bandwidth usage is based on \"net_download\" and \"net_upload\" values."},
{"net_iface", "#* Starts with the Network Interface specified here."},
{"show_battery", "#* Show battery stats in top right if battery is present."},
{"log_level", "#* Set loglevel for \"~/.config/bpytop/error.log\" levels are: \"ERROR\" \"WARNING\" \"INFO\" \"DEBUG\".\n"
"#* The level set includes all lower levels, i.e. \"DEBUG\" will show all logging info."}
{"net_auto", "#* Start in network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest."},
{"net_sync", "#* Sync the scaling for download and upload to whichever currently has the highest scale."},
{"net_color_fixed", "#* If the network graphs color gradient should scale to bandwidth usage or auto scale, bandwidth usage is based on \"net_download\" and \"net_upload\" values."},
{"net_iface", "#* Starts with the Network Interface specified here."},
{"show_battery", "#* Show battery stats in top right if battery is present."},
{"log_level", "#* Set loglevel for \"~/.config/bpytop/error.log\" levels are: \"ERROR\" \"WARNING\" \"INFO\" \"DEBUG\".\n"
"#* The level set includes all lower levels, i.e. \"DEBUG\" will show all logging info."}
};
unordered_flat_map<string, string> strings = {
@ -180,42 +231,35 @@ namespace Config {
fs::path conf_dir;
fs::path conf_file;
vector<string> valid_graph_symbols = { "braille", "block", "tty" };
const vector<string> valid_graph_symbols = { "braille", "block", "tty" };
//* Return bool config value <name>
const bool& getB(string name){
return bools.at(name);
}
//* Return integer config value <name>
const int& getI(string name){
return ints.at(name);
}
//* Return string config value <name>
const string& getS(string name){
return strings.at(name);
}
//* Set config value <name> to bool <value>
void set(string name, bool value){
if (_locked(name)) boolsTmp.insert_or_assign(name, value);
else bools.at(name) = value;
}
//* Set config value <name> to int <value>
void set(string name, int value){
if (_locked(name)) intsTmp.insert_or_assign(name, value);
ints.at(name) = value;
}
//* Set config value <name> to string <value>
void set(string name, string value){
if (_locked(name)) stringsTmp.insert_or_assign(name, value);
else strings.at(name) = value;
}
//* Flip config bool <name>
void flip(string name){
if (_locked(name)) {
if (boolsTmp.contains(name)) boolsTmp.at(name) = !boolsTmp.at(name);
@ -224,12 +268,10 @@ namespace Config {
else bools.at(name) = !bools.at(name);
}
//* Wait if locked then lock config and cache changes until unlock
void lock(){
atomic_wait_set(locked);
}
//* Unlock config and write any cached values to config
void unlock(){
atomic_wait_set(writelock);
@ -252,7 +294,6 @@ namespace Config {
writelock = false;
}
//* Load the config file from disk
void load(fs::path conf_file, vector<string>& load_errors){
if (conf_file.empty())
return;
@ -319,7 +360,6 @@ namespace Config {
}
}
//* Write the config file to disk
void write(){
if (conf_file.empty() || !write_new) return;
Logger::debug("Writing new config file");

View file

@ -30,27 +30,27 @@ namespace Config {
extern std::filesystem::path conf_dir;
extern std::filesystem::path conf_file;
extern vector<string> valid_graph_symbols;
extern const vector<string> valid_graph_symbols;
//* Return bool config value <name>
//* Return bool for config key <name>
const bool& getB(string name);
//* Return integer config value <name>
//* Return integer for config key <name>
const int& getI(string name);
//* Return string config value <name>
//* Return string for config key <name>
const string& getS(string name);
//* Set config value <name> to bool <value>
//* Set config key <name> to bool <value>
void set(string name, bool value);
//* Set config value <name> to int <value>
//* Set config key <name> to int <value>
void set(string name, int value);
//* Set config value <name> to string <value>
//* Set config key <name> to string <value>
void set(string name, string value);
//* Flip config bool <name>
//* Flip config key bool <name>
void flip(string name);
//* Wait if locked then lock config and cache changes until unlock

View file

@ -45,6 +45,7 @@ namespace Draw {
string line_color = "", title = "", title2 = "";
bool fill = true;
uint num=0;
uint w_percent=0, h_percent=0;
};
//* Create a box using values from a BoxConf struct and return as a string

View file

@ -92,35 +92,29 @@ namespace Proc {
};
//* Generate process tree list
void _tree_gen(proc_info& cur_proc, vector<proc_info>& in_procs, vector<proc_info>& out_procs, int cur_depth=0, bool collapsed=false){
void _tree_gen(proc_info& cur_proc, vector<proc_info>& in_procs, vector<proc_info>& out_procs, int cur_depth, bool collapsed, string& prefix){
auto cur_pos = out_procs.size();
if (!collapsed)
out_procs.push_back(cur_proc);
int children = 0;
for (auto& p : in_procs) {
if (p.ppid == cur_proc.pid) {
children++;
if (collapsed) {
out_procs.back().cpu_p += p.cpu_p;
out_procs.back().mem += p.mem;
out_procs.back().threads += p.threads;
_tree_gen(p, in_procs, out_procs, cur_depth + 1, collapsed);
}
else _tree_gen(p, in_procs, out_procs, cur_depth + 1, cache.at(cur_proc.pid).collapsed);
for (auto& p : rng::equal_range(in_procs, cur_proc.pid, rng::less{}, &proc_info::ppid)) {
children++;
if (collapsed) {
out_procs.back().cpu_p += p.cpu_p;
out_procs.back().mem += p.mem;
out_procs.back().threads += p.threads;
}
_tree_gen(p, in_procs, out_procs, cur_depth + 1, (collapsed ? true : cache.at(cur_proc.pid).collapsed), prefix);
}
if (collapsed) return;
if (out_procs.size() > cur_pos + 1 && !out_procs.back().prefix.ends_with("] ")) {
std::string_view n_prefix = out_procs.back().prefix;
n_prefix.remove_suffix(8);
out_procs.back().prefix = (string)n_prefix + " └─ ";
out_procs.back().prefix.resize(out_procs.back().prefix.size() - 8);
out_procs.back().prefix += " └─ ";
}
string prefix = " ├─ ";
if (children > 0) prefix = (cache.at(cur_proc.pid).collapsed) ? "[+] " : "[-] ";
out_procs.at(cur_pos).prefix = ""s * cur_depth + prefix;
out_procs.at(cur_pos).prefix = ""s * cur_depth + (children > 0 ? (cache.at(cur_proc.pid).collapsed ? "[+] " : "[-] ") : prefix);
}
vector<proc_info> current_procs;
@ -323,13 +317,13 @@ namespace Proc {
new_proc.mem *= page_size;
}
//* Push process to vector
//? Push process to vector
procs.push_back(new_proc);
}
}
//* Sort processes
auto cmp = [&reverse](auto &a, auto &b) { return (reverse ? a < b : a > b); };
auto cmp = [&reverse](const auto &a, const auto &b) { return (reverse ? a < b : a > b); };
switch (v_index(sort_vector, sorting)) {
case 0: { rng::sort(procs, cmp, &proc_info::pid); break; }
case 1: { rng::sort(procs, cmp, &proc_info::name); break; }
@ -359,9 +353,13 @@ namespace Proc {
//* Generate tree view if enabled
if (tree) {
vector<proc_info> tree_procs;
auto min_pid = rng::min(procs, rng::less{}, &proc_info::ppid).ppid;
for (auto& p : procs) {
if (p.ppid == min_pid) _tree_gen(p, procs, tree_procs);
//? Stable sort to retain selected sorting among processes with the same parent
rng::stable_sort(procs, rng::less{}, &proc_info::ppid);
string prefix = " ├─ ";
for (auto& p : rng::equal_range(procs, procs.at(0).ppid, rng::less{}, &proc_info::ppid)) {
_tree_gen(p, procs, tree_procs, 0, cache.at(p.pid).collapsed, prefix);
}
procs.swap(tree_procs);
}
@ -372,11 +370,10 @@ namespace Proc {
counter = 0;
unordered_flat_map<uint, p_cache> r_cache;
r_cache.reserve(pid_list.size());
for (auto& p : pid_list) {
if (cache.contains(p)) r_cache[p] = cache.at(p);
}
rng::for_each(pid_list, [&r_cache](const auto &p){ if (cache.contains(p)) r_cache[p] = cache.at(p); });
cache.swap(r_cache);
}
old_cputimes = cputimes;
current_procs.swap(procs);
numpids = npids;

View file

@ -26,8 +26,9 @@ tab-size = 4
using std::string, std::vector;
namespace Global {
extern string Version;
extern const string Version;
extern int coreCount;
extern string banner;
}
namespace Tools {

View file

@ -37,6 +37,7 @@ namespace Theme {
fs::path theme_dir;
fs::path user_theme_dir;
vector<string> themes;
const unordered_flat_map<string, string> Default_theme = {
{ "main_bg", "#00" },
@ -83,6 +84,51 @@ namespace Theme {
{ "process_end", "#d45454" }
};
const unordered_flat_map<string, string> TTY_theme = {
{ "main_bg", "\x1b[40m" },
{ "main_fg", "\x1b[37m" },
{ "title", "\x1b[97m" },
{ "hi_fg", "\x1b[31m" },
{ "selected_bg", "\x1b[41m" },
{ "selected_fg", "\x1b[97m" },
{ "inactive_fg", "\x1b[90m" },
{ "graph_text", "\x1b[37m" },
{ "meter_bg", "\x1b[90m" },
{ "proc_misc", "\x1b[92m" },
{ "cpu_box", "\x1b[32m" },
{ "mem_box", "\x1b[33m" },
{ "net_box", "\x1b[35m" },
{ "proc_box", "\x1b[31m" },
{ "div_line", "\x1b[90m" },
{ "temp_start", "\x1b[94m" },
{ "temp_mid", "\x1b[96m" },
{ "temp_end", "\x1b[95m" },
{ "cpu_start", "\x1b[92m" },
{ "cpu_mid", "\x1b[93m" },
{ "cpu_end", "\x1b[91m" },
{ "free_start", "\x1b[32m" },
{ "free_mid", "" },
{ "free_end", "\x1b[92m" },
{ "cached_start", "\x1b[36m" },
{ "cached_mid", "" },
{ "cached_end", "\x1b[96m" },
{ "available_start", "\x1b[33m" },
{ "available_mid", "" },
{ "available_end", "\x1b[93m" },
{ "used_start", "\x1b[31m" },
{ "used_mid", "" },
{ "used_end", "\x1b[91m" },
{ "download_start", "\x1b[34m" },
{ "download_mid", "" },
{ "download_end", "\x1b[94m" },
{ "upload_start", "\x1b[35m" },
{ "upload_mid", "" },
{ "upload_end", "\x1b[95m" },
{ "process_start", "\x1b[32m" },
{ "process_mid", "\x1b[33m" },
{ "process_end", "\x1b[31m" }
};
namespace {
//* Convert 24-bit colors to 256 colors using 6x6x6 color cube
int truecolor_to_256(int r, int g, int b){
@ -182,7 +228,7 @@ namespace Theme {
}
//* Generate colors and rgb decimal vectors for the theme
void generateColors(unordered_flat_map<string, string>& source){
void generateColors(unordered_flat_map<string, string> source){
vector<string> t_rgb;
string depth;
bool t_to_256 = !Config::getB("truecolor");
@ -251,13 +297,55 @@ namespace Theme {
gradients[wname].swap(c_gradient);
}
}
void generateTTYColors(){
rgbs.clear();
colors = TTY_theme;
gradients.clear();
for (auto& c : colors) {
if (!c.first.ends_with("_start")) continue;
string base_name = rtrim(c.first, "_start");
string section = "_start";
int split = colors.at(base_name + "_mid").empty() ? 50 : 33;
for (int i : iota(0, 101)) {
gradients[base_name][i] = colors.at(base_name + section);
if (i == split) {
if (split == 50 || split == 66)
section = "_end";
else {
section = "_mid";
split *= 2;
}
}
}
}
}
auto loadFile(string filename){
unordered_flat_map<string, string> out;
return out;
}
}
void updateThemes(){
}
//* Set current theme using <source> map
void set(unordered_flat_map<string, string> source){
generateColors(source);
generateGradients();
void set(string theme){
if (theme == "TTY" || Config::getB("tty_mode"))
generateTTYColors();
else {
generateColors((theme == "Default" ? Default_theme : loadFile(theme)));
generateGradients();
}
Term::fg = colors.at("main_fg");
Term::bg = colors.at("main_bg");
Fx::reset = Fx::reset_base + Term::fg + Term::bg;

View file

@ -28,7 +28,7 @@ namespace Theme {
extern std::filesystem::path theme_dir;
extern std::filesystem::path user_theme_dir;
extern const robin_hood::unordered_flat_map<string, string> Default_theme;
extern vector<string> themes;
//* Generate escape sequence for 24-bit or 256 color and return as a string
//* Args hexa: ["#000000"-"#ffffff"] for color, ["#00"-"#ff"] for greyscale
@ -45,8 +45,11 @@ namespace Theme {
//* Return an array of red, green and blue, 0-255 values for a 24-bit color escape string
std::array<int, 3> esc_to_rgb(string c_string);
//* Update list of available themes
void updateThemes();
//* Set current theme using <source> map
void set(robin_hood::unordered_flat_map<string, string> source);
void set(string theme);
//* Return escape code for color <name>
const string& c(string name);

View file

@ -151,7 +151,7 @@ namespace Tools {
//* Check if vector <vec> contains value <find_val>
template <typename T>
bool v_contains(vector<T>& vec, T find_val) {
bool v_contains(const vector<T>& vec, const T find_val) {
return std::ranges::find(vec, find_val) != vec.end();
}

89
themes/adapta.theme Normal file
View file

@ -0,0 +1,89 @@
#Bashtop Adapta theme
#by olokelo
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#ffffff", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]=""
# Main text color
theme[main_fg]="#cfd8dc"
# Title color for boxes
theme[title]="#ff"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#bb0040"
# Foreground color of selected item in processes box
theme[selected_fg]="#ff"
# Color of inactive/disabled text
theme[inactive_fg]="#40"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#55bcea"
# Cpu box outline color
theme[cpu_box]="#00bcd4"
# Memory/disks box outline color
theme[mem_box]="#00bcd4"
# Net up/down box outline color
theme[net_box]="#00bcd4"
# Processes box outline color
theme[proc_box]="#00bcd4"
# Box divider line and small boxes line color
theme[div_line]="#50"
# Temperature graph colors
theme[temp_start]="#00bcd4"
theme[temp_mid]="#d4d400"
theme[temp_end]="#ff0040"
# CPU graph colors
theme[cpu_start]="#00bcd4"
theme[cpu_mid]="#d4d400"
theme[cpu_end]="#ff0040"
# Mem/Disk free meter
theme[free_start]="#00bcd4"
theme[free_mid]="#1090a0"
theme[free_end]="#206f79"
# Mem/Disk cached meter
theme[cached_start]="#991199"
theme[cached_mid]="#770a55"
theme[cached_end]="#550055"
# Mem/Disk available meter
theme[available_start]="#00b0ff"
theme[available_mid]="#1099cc"
theme[available_end]="#2070aa"
# Mem/Disk used meter
theme[used_start]="#ff0040"
theme[used_mid]="#ff2060"
theme[used_end]="#ff4080"
# Download graph colors
theme[download_start]="#00bcd4"
theme[download_mid]="#991199"
theme[download_end]="#ff0040"
# Upload graph colors
theme[upload_start]="#00bcd4"
theme[upload_mid]="#991199"
theme[upload_end]="#ff0040"

100
themes/default.theme-sample Normal file
View file

@ -0,0 +1,100 @@
#Bashtop theme with default colors and black background
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#00"
# Main text color
theme[main_fg]="#cc"
# Title color for boxes
theme[title]="#ee"
# Highlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#7e2626"
# Foreground color of selected item in processes box
theme[selected_fg]="#ee"
# Color of inactive/disabled text
theme[inactive_fg]="#40"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#60"
# Background color of the percentage meters
theme[meter_bg]="#40"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#0de756"
# Cpu box outline color
theme[cpu_box]="#3d7b46"
# Memory/disks box outline color
theme[mem_box]="#8a882e"
# Net up/down box outline color
theme[net_box]="#423ba5"
# Processes box outline color
theme[proc_box]="#923535"
# Box divider line and small boxes line color
theme[div_line]="#30"
# Temperature graph colors
theme[temp_start]="#4897d4"
theme[temp_mid]="#5474e8"
theme[temp_end]="#ff40b6"
# CPU graph colors
theme[cpu_start]="#50f095"
theme[cpu_mid]="#f2e266"
theme[cpu_end]="#fa1e1e"
# Mem/Disk free meter
theme[free_start]="#223014"
theme[free_mid]="#b5e685"
theme[free_end]="#dcff85"
# Mem/Disk cached meter
theme[cached_start]="#0b1a29"
theme[cached_mid]="#74e6fc"
theme[cached_end]="#26c5ff"
# Mem/Disk available meter
theme[available_start]="#292107"
theme[available_mid]="#ffd77a"
theme[available_end]="#ffb814"
# Mem/Disk used meter
theme[used_start]="#3b1f1c"
theme[used_mid]="#d9626d"
theme[used_end]="#ff4769"
# Download graph colors
theme[download_start]="#231a63"
theme[download_mid]="#4f43a3"
theme[download_end]="#b0a9de"
# Upload graph colors
theme[upload_start]="#510554"
theme[upload_mid]="#7d4180"
theme[upload_end]="#dcafde"
# Process box color gradient for threads, mem and cpu usage
theme[process_start]="#80d0a3"
theme[process_mid]="#dcd179"
theme[process_end]="#d45454"

89
themes/dracula.theme Normal file
View file

@ -0,0 +1,89 @@
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#282a36"
# Main text color
theme[main_fg]="#f8f8f2"
# Title color for boxes
theme[title]="#f8f8f2"
# Highlight color for keyboard shortcuts
theme[hi_fg]="#6272a4"
# Background color of selected item in processes box
theme[selected_bg]="#ff79c6"
# Foreground color of selected item in processes box
theme[selected_fg]="#f8f8f2"
# Color of inactive/disabled text
theme[inactive_fg]="#44475a"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#f8f8f2"
# Background color of the percentage meters
theme[meter_bg]="#44475a"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#bd93f9"
# Cpu box outline color
theme[cpu_box]="#bd93f9"
# Memory/disks box outline color
theme[mem_box]="#50fa7b"
# Net up/down box outline color
theme[net_box]="#ff5555"
# Processes box outline color
theme[proc_box]="#8be9fd"
# Box divider line and small boxes line color
theme[div_line]="#44475a"
# Temperature graph colors
theme[temp_start]="#bd93f9"
theme[temp_mid]="#ff79c6"
theme[temp_end]="#ff33a8"
# CPU graph colors
theme[cpu_start]="#bd93f9"
theme[cpu_mid]="#8be9fd"
theme[cpu_end]="#50fa7b"
# Mem/Disk free meter
theme[free_start]="#ffa6d9"
theme[free_mid]="#ff79c6"
theme[free_end]="#ff33a8"
# Mem/Disk cached meter
theme[cached_start]="#b1f0fd"
theme[cached_mid]="#8be9fd"
theme[cached_end]="#26d7fd"
# Mem/Disk available meter
theme[available_start]="#ffd4a6"
theme[available_mid]="#ffb86c"
theme[available_end]="#ff9c33"
# Mem/Disk used meter
theme[used_start]="#96faaf"
theme[used_mid]="#50fa7b"
theme[used_end]="#0dfa49"
# Download graph colors
theme[download_start]="#bd93f9"
theme[download_mid]="#50fa7b"
theme[download_end]="#8be9fd"
# Upload graph colors
theme[upload_start]="#8c42ab"
theme[upload_mid]="#ff79c6"
theme[upload_end]="#ff33a8"
# Process box color gradient for threads, mem and cpu usage
theme[process_start]="#50fa7b"
theme[process_mid]="#59b690"
theme[process_end]="#6272a4"

95
themes/dusklight.theme Normal file
View file

@ -0,0 +1,95 @@
#Bpytop theme comprised of blues, oranges, cyan, and yellow.
#by Drazil100
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#04142E"
# Main text color
theme[main_fg]="#99DFFF"
# Title color for boxes
theme[title]="#99FFFF"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#FF7F00"
# Background color of selected item in processes box
theme[selected_bg]="#722B01"
# Foreground color of selected item in processes box
theme[selected_fg]="#99FFFF"
# Color of inactive/disabled text
theme[inactive_fg]="#052E51"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#79A1B4"
# Background color of the percentage meters
theme[meter_bg]="#052E51"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#B46718"
# Cpu box outline color
theme[cpu_box]="#00FFFF"
# Memory/disks box outline color
theme[mem_box]="#00FFFF"
# Net up/down box outline color
theme[net_box]="#00FFFF"
# Processes box outline color
theme[proc_box]="#00FFFF"
# Box divider line and small boxes line color
theme[div_line]="#A55800"
# Temperature graph colors
theme[temp_start]="#00ADFF"
theme[temp_mid]="#00FFFF"
theme[temp_end]="#FFF86B"
# CPU graph colors
theme[cpu_start]="#00D4FF"
theme[cpu_mid]="#FFF86B"
theme[cpu_end]="#FF7F00"
# Mem/Disk free meter
theme[free_start]="#0187CB"
theme[free_mid]=""
theme[free_end]=""
# Mem/Disk cached meter
theme[cached_start]="#B4BB63"
theme[cached_mid]=""
theme[cached_end]=""
# Mem/Disk available meter
theme[available_start]="#01C0CB"
theme[available_mid]=""
theme[available_end]=""
# Mem/Disk used meter
theme[used_start]="#B46718"
theme[used_mid]=""
theme[used_end]=""
# Download graph colors
theme[download_start]="#009EFF"
theme[download_mid]=""
theme[download_end]="#00FFFF"
# Upload graph colors
theme[upload_start]="#FF7F00"
theme[upload_mid]=""
theme[upload_end]="#FFF86B"

View file

@ -0,0 +1,89 @@
#Bashtop theme with flat-remix colors
#by Daniel Ruiz de Alegría <daniel@drasite.com>
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#ffffff", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#e4e4e7"
# Main text color
theme[main_fg]="#737680"
# Title color for boxes
theme[title]="#272a34"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#b8174c"
# Foreground color of selected item in processes box
theme[selected_fg]="#ff"
# Color of inactive/disabled text
theme[inactive_fg]="#40"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#367bf0"
# Cpu box outline color
theme[cpu_box]="#367bf0"
# Memory/disks box outline color
theme[mem_box]="#19a187"
# Net up/down box outline color
theme[net_box]="#fd3535"
# Processes box outline color
theme[proc_box]="#4aaee6"
# Box divider line and small boxes line color
theme[div_line]="#50"
# Temperature graph colors
theme[temp_start]="#367bf0"
theme[temp_mid]="#b8174c"
theme[temp_end]="#d41919"
# CPU graph colors
theme[cpu_start]="#367bf0"
theme[cpu_mid]="#4aaee6"
theme[cpu_end]="#54bd8e"
# Mem/Disk free meter
theme[free_start]="#811035"
theme[free_mid]="#b8174c"
theme[free_end]="#d41919"
# Mem/Disk cached meter
theme[cached_start]="#2656a8"
theme[cached_mid]="#4aaee6"
theme[cached_end]="#23bac2"
# Mem/Disk available meter
theme[available_start]="#fea44c"
theme[available_mid]="#fd7d00"
theme[available_end]="#fe7171"
# Mem/Disk used meter
theme[used_start]="#12715f"
theme[used_mid]="#19a187"
theme[used_end]="#23bac2"
# Download graph colors
theme[download_start]="#367bf0"
theme[download_mid]="#19a187"
theme[download_end]="#4aaee6"
# Upload graph colors
theme[upload_start]="#8c42ab"
theme[upload_mid]="#b8174c"
theme[upload_end]="#d41919"

89
themes/flat-remix.theme Normal file
View file

@ -0,0 +1,89 @@
#Bashtop theme with flat-remix colors
#by Daniel Ruiz de Alegría <daniel@drasite.com>
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#ffffff", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]=""
# Main text color
theme[main_fg]="#E6E6E6"
# Title color for boxes
theme[title]="#ff"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#b8174c"
# Foreground color of selected item in processes box
theme[selected_fg]="#ff"
# Color of inactive/disabled text
theme[inactive_fg]="#40"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#367bf0"
# Cpu box outline color
theme[cpu_box]="#367bf0"
# Memory/disks box outline color
theme[mem_box]="#19a187"
# Net up/down box outline color
theme[net_box]="#fd3535"
# Processes box outline color
theme[proc_box]="#4aaee6"
# Box divider line and small boxes line color
theme[div_line]="#50"
# Temperature graph colors
theme[temp_start]="#367bf0"
theme[temp_mid]="#b8174c"
theme[temp_end]="#d41919"
# CPU graph colors
theme[cpu_start]="#367bf0"
theme[cpu_mid]="#4aaee6"
theme[cpu_end]="#54bd8e"
# Mem/Disk free meter
theme[free_start]="#811035"
theme[free_mid]="#b8174c"
theme[free_end]="#d41919"
# Mem/Disk cached meter
theme[cached_start]="#2656a8"
theme[cached_mid]="#4aaee6"
theme[cached_end]="#23bac2"
# Mem/Disk available meter
theme[available_start]="#fea44c"
theme[available_mid]="#fd7d00"
theme[available_end]="#fe7171"
# Mem/Disk used meter
theme[used_start]="#12715f"
theme[used_mid]="#19a187"
theme[used_end]="#23bac2"
# Download graph colors
theme[download_start]="#367bf0"
theme[download_mid]="#19a187"
theme[download_end]="#4aaee6"
# Upload graph colors
theme[upload_start]="#8c42ab"
theme[upload_mid]="#b8174c"
theme[upload_end]="#d41919"

89
themes/greyscale.theme Normal file
View file

@ -0,0 +1,89 @@
#Bashtop grayscale theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#00"
# Main text color
theme[main_fg]="#bb"
# Title color for boxes
theme[title]="#cc"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#90"
# Background color of selected item in processes box
theme[selected_bg]="#ff"
# Foreground color of selected item in processes box
theme[selected_fg]="#00"
# Color of inactive/disabled text
theme[inactive_fg]="#30"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#90"
# Cpu box outline color
theme[cpu_box]="#90"
# Memory/disks box outline color
theme[mem_box]="#90"
# Net up/down box outline color
theme[net_box]="#90"
# Processes box outline color
theme[proc_box]="#90"
# Box divider line and small boxes line color
theme[div_line]="#30"
# Temperature graph colors
theme[temp_start]="#50"
theme[temp_mid]=""
theme[temp_end]="#ff"
# CPU graph colors
theme[cpu_start]="#50"
theme[cpu_mid]=""
theme[cpu_end]="#ff"
# Mem/Disk free meter
theme[free_start]="#50"
theme[free_mid]=""
theme[free_end]="#ff"
# Mem/Disk cached meter
theme[cached_start]="#50"
theme[cached_mid]=""
theme[cached_end]="#ff"
# Mem/Disk available meter
theme[available_start]="#50"
theme[available_mid]=""
theme[available_end]="#ff"
# Mem/Disk used meter
theme[used_start]="#50"
theme[used_mid]=""
theme[used_end]="#ff"
# Download graph colors
theme[download_start]="#30"
theme[download_mid]=""
theme[download_end]="#ff"
# Upload graph colors
theme[upload_start]="#30"
theme[upload_mid]=""
theme[upload_end]="#ff"

92
themes/gruvbox_dark.theme Normal file
View file

@ -0,0 +1,92 @@
#Bashtop gruvbox (https://github.com/morhetz/gruvbox) theme
#by BachoSeven
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#1d2021"
# Main text color
theme[main_fg]="#a89984"
# Title color for boxes
theme[title]="#ebdbb2"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#d79921"
# Background color of selected items
theme[selected_bg]="#282828"
# Foreground color of selected items
theme[selected_fg]="#fabd2f"
# Color of inactive/disabled text
theme[inactive_fg]="#282828"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#585858"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#98971a"
# Cpu box outline color
theme[cpu_box]="#a89984"
# Memory/disks box outline color
theme[mem_box]="#a89984"
# Net up/down box outline color
theme[net_box]="#a89984"
# Processes box outline color
theme[proc_box]="#a89984"
# Box divider line and small boxes line color
theme[div_line]="#a89984"
# Temperature graph colors
theme[temp_start]="#458588"
theme[temp_mid]="#d3869b"
theme[temp_end]="#fb4394"
# CPU graph colors
theme[cpu_start]="#b8bb26"
theme[cpu_mid]="#d79921"
theme[cpu_end]="#fb4934"
# Mem/Disk free meter
theme[free_start]="#4e5900"
theme[free_mid]=""
theme[free_end]="#98971a"
# Mem/Disk cached meter
theme[cached_start]="#458588"
theme[cached_mid]=""
theme[cached_end]="#83a598"
# Mem/Disk available meter
theme[available_start]="#d79921"
theme[available_mid]=""
theme[available_end]="#fabd2f"
# Mem/Disk used meter
theme[used_start]="#cc241d"
theme[used_mid]=""
theme[used_end]="#fb4934"
# Download graph colors
theme[download_start]="#3d4070"
theme[download_mid]="#6c71c4"
theme[download_end]="#a3a8f7"
# Upload graph colors
theme[upload_start]="#701c45"
theme[upload_mid]="#b16286"
theme[upload_end]="#d3869b"

92
themes/kyli0x.theme Normal file
View file

@ -0,0 +1,92 @@
#Bashtop Kyli0x Theme
#by Kyli0x <kyli0x@protonmail.ch>
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#23252e"
# Main text color
theme[main_fg]="#f8f8f2"
# Title color for boxes
theme[title]="#f8f8f2"
# Highlight color for keyboard shortcuts
theme[hi_fg]="#21d6c9"
# Background color of selected item in processes box
theme[selected_bg]="#1aaba0"
# Foreground color of selected item in processes box
theme[selected_fg]="#f8f8f2"
# Color of inactive/disabled text
theme[inactive_fg]="#497e7a"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#21d6c9"
# Background color of the percentage meters
theme[meter_bg]="#80638e"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#21d6c9"
# Cpu box outline color
theme[cpu_box]="#d486d4"
# Memory/disks box outline color
theme[mem_box]="#d486d4"
# Net up/down box outline color
theme[net_box]="#d486d4"
# Processes box outline color
theme[proc_box]="#d486d4"
# Box divider line and small boxes line color
theme[div_line]="#80638e"
# Temperature graph colors
theme[temp_start]="#21d6c9"
theme[temp_mid]="#1aaba0"
theme[temp_end]="#497e7a"
# CPU graph colors
theme[cpu_start]="#21d6c9"
theme[cpu_mid]="#1aaba0"
theme[cpu_end]="#497e7a"
# Mem/Disk free meter
theme[free_start]="#21d6c9"
theme[free_mid]="#1aaba0"
theme[free_end]="#497e7a"
# Mem/Disk cached meter
theme[cached_start]="#21d6c9"
theme[cached_mid]="#1aaba0"
theme[cached_end]="#497e7a"
# Mem/Disk available meter
theme[available_start]="#21d6c9"
theme[available_mid]="#1aaba0"
theme[available_end]="#497e7a"
# Mem/Disk used meter
theme[used_start]="#21d6c9"
theme[used_mid]="#1aaba0"
theme[used_end]="#497e7a"
# Download graph colors
theme[download_start]="#21d6c9"
theme[download_mid]="#1aaba0"
theme[download_end]="#497e7a"
# Upload graph colors
theme[upload_start]="#ec95ec"
theme[upload_mid]="#1aaba0"
theme[upload_end]="#497e7a"
# Process box color gradient for threads, mem and cpu usage
theme[process_start]="#21d6c9"
theme[process_mid]="#1aaba0"
theme[process_end]="#d486d4"

View file

@ -0,0 +1,92 @@
#Bashtop matcha-dark-sea theme
#by TheCynicalTeam
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]=""
# Main text color
theme[main_fg]="#F8F8F2"
# Title color for boxes
theme[title]="#F8F8F2"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#2eb398"
# Background color of selected item in processes box
theme[selected_bg]="#0d493d"
# Foreground color of selected item in processes box
theme[selected_fg]="#F8F8F2"
# Color of inactive/disabled text
theme[inactive_fg]="#595647"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#797667"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#33b165"
# Cpu box outline color
theme[cpu_box]="#75715E"
# Memory/disks box outline color
theme[mem_box]="#75715E"
# Net up/down box outline color
theme[net_box]="#75715E"
# Processes box outline color
theme[proc_box]="#75715E"
# Box divider line and small boxes line color
theme[div_line]="#595647"
# Temperature graph colors
theme[temp_start]="#7976B7"
theme[temp_mid]="#D8B8B2"
theme[temp_end]="#33b165"
# CPU graph colors
theme[cpu_start]="#33b165"
theme[cpu_mid]="#F8F8F2" #2eb398"
theme[cpu_end]="#2eb398"
# Mem/Disk free meter
theme[free_start]="#75715E"
theme[free_mid]="#a9c474"
theme[free_end]="#e2f5bc"
# Mem/Disk cached meter
theme[cached_start]="#75715E"
theme[cached_mid]="#66D9EF"
theme[cached_end]="#aae7f2"
# Mem/Disk available meter
theme[available_start]="#75715E"
theme[available_mid]="#E6DB74"
theme[available_end]="#f2ecb6"
# Mem/Disk used meter
theme[used_start]="#75715E"
theme[used_mid]="#2eb398"
theme[used_end]="#33b165"
# Download graph colors
theme[download_start]="#2d2042"
theme[download_mid]="#2eb398"
theme[download_end]="#33b165"
# Upload graph colors
theme[upload_start]="#0d493d"
theme[upload_mid]="#2eb398"
theme[upload_end]="#33b165"

92
themes/monokai.theme Normal file
View file

@ -0,0 +1,92 @@
#Bashtop monokai theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#060604"
# Main text color
theme[main_fg]="#F8F8F2"
# Title color for boxes
theme[title]="#F8F8F2"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#F92672"
# Background color of selected item in processes box
theme[selected_bg]="#7a1137"
# Foreground color of selected item in processes box
theme[selected_fg]="#F8F8F2"
# Color of inactive/disabled text
theme[inactive_fg]="#595647"
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
theme[graph_text]="#797667"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#A6E22E"
# Cpu box outline color
theme[cpu_box]="#75715E"
# Memory/disks box outline color
theme[mem_box]="#75715E"
# Net up/down box outline color
theme[net_box]="#75715E"
# Processes box outline color
theme[proc_box]="#75715E"
# Box divider line and small boxes line color
theme[div_line]="#595647"
# Temperature graph colors
theme[temp_start]="#7976B7"
theme[temp_mid]="#D8B8B2"
theme[temp_end]="#F92672"
# CPU graph colors
theme[cpu_start]="#A6E22E"
theme[cpu_mid]="#F8F8F2" #b05475"
theme[cpu_end]="#F92672"
# Mem/Disk free meter
theme[free_start]="#75715E"
theme[free_mid]="#a9c474"
theme[free_end]="#e2f5bc"
# Mem/Disk cached meter
theme[cached_start]="#75715E"
theme[cached_mid]="#66D9EF"
theme[cached_end]="#aae7f2"
# Mem/Disk available meter
theme[available_start]="#75715E"
theme[available_mid]="#E6DB74"
theme[available_end]="#f2ecb6"
# Mem/Disk used meter
theme[used_start]="#75715E"
theme[used_mid]="#F92672"
theme[used_end]="#ff87b2"
# Download graph colors
theme[download_start]="#2d2042"
theme[download_mid]="#7352a8"
theme[download_end]="#ccaefc"
# Upload graph colors
theme[upload_start]="#570d33"
theme[upload_mid]="#cf277d"
theme[upload_end]="#fa91c7"

89
themes/nord.theme Normal file
View file

@ -0,0 +1,89 @@
#Bashtop theme with nord palette (https://www.nordtheme.com)
#by Justin Zobel <justin.zobel@gmail.com>
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#ffffff", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#2E3440"
# Main text color
theme[main_fg]="#D8DEE9"
# Title color for boxes
theme[title]="#8FBCBB"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#5E81AC"
# Background color of selected item in processes box
theme[selected_bg]="#4C566A"
# Foreground color of selected item in processes box
theme[selected_fg]="#ECEFF4"
# Color of inactive/disabled text
theme[inactive_fg]="#4C566A"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#5E81AC"
# Cpu box outline color
theme[cpu_box]="#4C566A"
# Memory/disks box outline color
theme[mem_box]="#4C566A"
# Net up/down box outline color
theme[net_box]="#4C566A"
# Processes box outline color
theme[proc_box]="#4C566A"
# Box divider line and small boxes line color
theme[div_line]="#4C566A"
# Temperature graph colors
theme[temp_start]="#81A1C1"
theme[temp_mid]="#88C0D0"
theme[temp_end]="#ECEFF4"
# CPU graph colors
theme[cpu_start]="#81A1C1"
theme[cpu_mid]="#88C0D0"
theme[cpu_end]="#ECEFF4"
# Mem/Disk free meter
theme[free_start]="#81A1C1"
theme[free_mid]="#88C0D0"
theme[free_end]="#ECEFF4"
# Mem/Disk cached meter
theme[cached_start]="#81A1C1"
theme[cached_mid]="#88C0D0"
theme[cached_end]="#ECEFF4"
# Mem/Disk available meter
theme[available_start]="#81A1C1"
theme[available_mid]="#88C0D0"
theme[available_end]="#ECEFF4"
# Mem/Disk used meter
theme[used_start]="#81A1C1"
theme[used_mid]="#88C0D0"
theme[used_end]="#ECEFF4"
# Download graph colors
theme[download_start]="#81A1C1"
theme[download_mid]="#88C0D0"
theme[download_end]="#ECEFF4"
# Upload graph colors
theme[upload_start]="#81A1C1"
theme[upload_mid]="#88C0D0"
theme[upload_end]="#ECEFF4"

View file

@ -0,0 +1,89 @@
#Bashtop solarized theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#002b36"
# Main text color
theme[main_fg]="#eee8d5"
# Title color for boxes
theme[title]="#fdf6e3"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#b58900"
# Background color of selected items
theme[selected_bg]="#073642"
# Foreground color of selected items
theme[selected_fg]="#d6a200"
# Color of inactive/disabled text
theme[inactive_fg]="#073642"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#bad600"
# Cpu box outline color
theme[cpu_box]="#586e75"
# Memory/disks box outline color
theme[mem_box]="#586e75"
# Net up/down box outline color
theme[net_box]="#586e75"
# Processes box outline color
theme[proc_box]="#586e75"
# Box divider line and small boxes line color
theme[div_line]="#586e75"
# Temperature graph colors
theme[temp_start]="#268bd2"
theme[temp_mid]="#ccb5f7"
theme[temp_end]="#fc5378"
# CPU graph colors
theme[cpu_start]="#adc700"
theme[cpu_mid]="#d6a200"
theme[cpu_end]="#e65317"
# Mem/Disk free meter
theme[free_start]="#4e5900"
theme[free_mid]=""
theme[free_end]="#bad600"
# Mem/Disk cached meter
theme[cached_start]="#114061"
theme[cached_mid]=""
theme[cached_end]="#268bd2"
# Mem/Disk available meter
theme[available_start]="#705500"
theme[available_mid]=""
theme[available_end]="#edb400"
# Mem/Disk used meter
theme[used_start]="#6e1718"
theme[used_mid]=""
theme[used_end]="#e02f30"
# Download graph colors
theme[download_start]="#3d4070"
theme[download_mid]="#6c71c4"
theme[download_end]="#a3a8f7"
# Upload graph colors
theme[upload_start]="#701c45"
theme[upload_mid]="#d33682"
theme[upload_end]="#f56caf"

89
themes/whiteout.theme Normal file
View file

@ -0,0 +1,89 @@
#Bashtop "whiteout" theme
#by aristocratos
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
# example for white: "#FFFFFF", "#ff" or "255 255 255".
# All graphs and meters can be gradients
# For single color graphs leave "mid" and "end" variable empty.
# Use "start" and "end" variables for two color gradient
# Use "start", "mid" and "end" for three color gradient
# Main background, empty for terminal default, need to be empty if you want transparent background
theme[main_bg]="#ff"
# Main text color
theme[main_fg]="#30"
# Title color for boxes
theme[title]="#10"
# Higlight color for keyboard shortcuts
theme[hi_fg]="#284d75"
# Background color of selected item in processes box
theme[selected_bg]="#15283d"
# Foreground color of selected item in processes box
theme[selected_fg]="#ff"
# Color of inactive/disabled text
theme[inactive_fg]="#dd"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#03521d"
# Cpu box outline color
theme[cpu_box]="#1a361e"
# Memory/disks box outline color
theme[mem_box]="#3d3c14"
# Net up/down box outline color
theme[net_box]="#1a1742"
# Processes box outline color
theme[proc_box]="#3b1515"
# Box divider line and small boxes line color
theme[div_line]="#80"
# Temperature graph colors
theme[temp_start]="#184567"
theme[temp_mid]="#122c87"
theme[temp_end]="#9e0061"
# CPU graph colors
theme[cpu_start]="#0b8e44"
theme[cpu_mid]="#a49104"
theme[cpu_end]="#8d0202"
# Mem/Disk free meter
theme[free_start]="#b0d090"
theme[free_mid]="#70ba26"
theme[free_end]="#496600"
# Mem/Disk cached meter
theme[cached_start]="#26c5ff"
theme[cached_mid]="#74e6fc"
theme[cached_end]="#0b1a29"
# Mem/Disk available meter
theme[available_start]="#ffb814"
theme[available_mid]="#ffd77a"
theme[available_end]="#292107"
# Mem/Disk used meter
theme[used_start]="#ff4769"
theme[used_mid]="#d9626d"
theme[used_end]="#3b1f1c"
# Download graph colors
theme[download_start]="#8d82de"
theme[download_mid]="#413786"
theme[download_end]="#130f29"
# Upload graph colors
theme[upload_start]="#f590f9"
theme[upload_mid]="#722e76"
theme[upload_end]="#2b062d"