mirror of https://github.com/aristocratos/btop.git
Compare commits
10 Commits
763f9f5d56
...
5ed21f4320
Author | SHA1 | Date |
---|---|---|
isak102 | 5ed21f4320 | |
Jakob P. Liljenberg | d1680735d9 | |
Jakob P. Liljenberg | a535a6eb92 | |
Jakob P. Liljenberg | b1b8249d55 | |
kk9uk | 4a82105547 | |
kz6fittycent | 8af8389bd0 | |
kz6fittycent | adaea59a2a | |
kz6fittycent | 2aa2c90f41 | |
Davide Conti | a60c969533 | |
Isak | ec641d4de2 |
|
@ -1,5 +1,4 @@
|
|||
name: 🧪 Test snap can be built on x86_64
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
|
@ -28,7 +27,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [20.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
@ -6,7 +6,7 @@ description: |
|
|||
C++ version and continuation of bashtop and bpytop.
|
||||
license: Apache-2.0
|
||||
|
||||
base: core20
|
||||
base: core22
|
||||
grade: stable
|
||||
confinement: strict
|
||||
compression: lzo
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Config {
|
|||
"#* Use whitespace \" \" as separator between different presets.\n"
|
||||
"#* Example: \"cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty\""},
|
||||
|
||||
{"vim_keys", "#* Set to True to enable \"h,j,k,l,g,G\" keys for directional control in lists.\n"
|
||||
{"vim_keys", "#* Set to True to enable \"h,j,k,l,g,G,ctrl+u/d/b/f\" keys for directional control in lists.\n"
|
||||
"#* Conflicting keys for h:\"help\" and k:\"kill\" is accessible while holding shift."},
|
||||
|
||||
{"rounded_corners", "#* Rounded corners on boxes, is ignored if TTY mode is ON."},
|
||||
|
|
|
@ -1505,11 +1505,11 @@ namespace Proc {
|
|||
}
|
||||
else selected++;
|
||||
}
|
||||
else if (cmd_key == "page_up") {
|
||||
else if (cmd_key == "page_up" or (vim_keys and cmd_key == "ctrl+b")) {
|
||||
if (selected > 0 and start == 0) selected = 0;
|
||||
else start = max(0, start - select_max);
|
||||
}
|
||||
else if (cmd_key == "page_down") {
|
||||
else if (cmd_key == "page_down" or (vim_keys and cmd_key == "ctrl+f")) {
|
||||
if (selected > 0 and start >= numpids - select_max) selected = select_max;
|
||||
else start = clamp(start + select_max, 0, max(0, numpids - select_max));
|
||||
}
|
||||
|
@ -1521,6 +1521,21 @@ namespace Proc {
|
|||
start = max(0, numpids - select_max);
|
||||
if (selected > 0) selected = select_max;
|
||||
}
|
||||
else if (vim_keys and cmd_key == "ctrl+u") {
|
||||
if (start > 0 and selected <= 10) {
|
||||
start = max(0, start - 10);
|
||||
}
|
||||
else selected = max(0, selected - 10);
|
||||
if (Config::getI("proc_last_selected") > 0) Config::set("proc_last_selected", 0);
|
||||
}
|
||||
else if (vim_keys and cmd_key == "ctrl+d") {
|
||||
if (start < numpids - select_max and selected == select_max) start += 10;
|
||||
else if (selected == 0 and last_selected > 0) {
|
||||
selected = last_selected;
|
||||
Config::set("proc_last_selected", 0);
|
||||
}
|
||||
else selected += 10;
|
||||
}
|
||||
else if (cmd_key.starts_with("mousey")) {
|
||||
int mouse_y = std::stoi(cmd_key.substr(6));
|
||||
start = clamp((int)round((double)mouse_y * (numpids - select_max - 2) / (select_max - 2)), 0, max(0, numpids - select_max));
|
||||
|
|
|
@ -66,6 +66,10 @@ namespace Input {
|
|||
{"[6~", "page_down"},
|
||||
{"\t", "tab"},
|
||||
{"[Z", "shift_tab"},
|
||||
{"\x15", "ctrl+u"},
|
||||
{"\x04", "ctrl+d"},
|
||||
{"\x06", "ctrl+f"},
|
||||
{"\x02", "ctrl+b"},
|
||||
{"OP", "f1"},
|
||||
{"OQ", "f2"},
|
||||
{"OR", "f3"},
|
||||
|
@ -410,7 +414,7 @@ namespace Input {
|
|||
Menu::show(Menu::Menus::SignalChoose);
|
||||
return;
|
||||
}
|
||||
else if (is_in(key, "up", "down", "page_up", "page_down", "home", "end") or (vim_keys and is_in(key, "j", "k", "g", "G"))) {
|
||||
else if (is_in(key, "up", "down", "page_up", "page_down", "home", "end") or (vim_keys and is_in(key, "j", "k", "g", "G", "ctrl+d", "ctrl+u", "ctrl+f", "ctrl+b"))) {
|
||||
proc_mouse_scroll:
|
||||
redraw = false;
|
||||
auto old_selected = Config::getI("proc_selected");
|
||||
|
|
|
@ -247,6 +247,8 @@ namespace Menu {
|
|||
"Enable vim keys.",
|
||||
"Set to True to enable \"h,j,k,l\" keys for",
|
||||
"directional control in lists.",
|
||||
"Also enables ctrl + u/d for quicker scrolling",
|
||||
"and ctrl + b/f for page up/down.",
|
||||
"",
|
||||
"Conflicting keys for",
|
||||
"h (help) and k (kill)",
|
||||
|
|
|
@ -160,6 +160,7 @@ namespace Gpu {
|
|||
namespace Rsmi {
|
||||
#if !defined(RSMI_STATIC)
|
||||
//? RSMI defines, structs & typedefs
|
||||
#define RSMI_DEVICE_NAME_BUFFER_SIZE 128
|
||||
#define RSMI_MAX_NUM_FREQUENCIES_V5 32
|
||||
#define RSMI_MAX_NUM_FREQUENCIES_V6 33
|
||||
#define RSMI_STATUS_SUCCESS 0
|
||||
|
@ -1396,8 +1397,8 @@ namespace Gpu {
|
|||
for (uint32_t i = 0; i < device_count; ++i) {
|
||||
if constexpr(is_init) {
|
||||
//? Device name
|
||||
char name[NVML_DEVICE_NAME_BUFFER_SIZE]; // ROCm SMI does not provide a constant for this as far as I can tell, this should be good enough
|
||||
result = rsmi_dev_name_get(i, name, NVML_DEVICE_NAME_BUFFER_SIZE);
|
||||
char name[RSMI_DEVICE_NAME_BUFFER_SIZE];
|
||||
result = rsmi_dev_name_get(i, name, RSMI_DEVICE_NAME_BUFFER_SIZE);
|
||||
if (result != RSMI_STATUS_SUCCESS)
|
||||
Logger::warning("ROCm SMI: Failed to get device name");
|
||||
else gpu_names[Nvml::device_count + i] = string(name);
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
# Btop gruvbox_light theme
|
||||
# by kk9uk
|
||||
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
theme[main_bg]="#fbf1c7"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="#3c3836"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="#3c3836"
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]="#cc241d"
|
||||
|
||||
# Background color of selected items
|
||||
theme[selected_bg]="#f2e5bc"
|
||||
|
||||
# Foreground color of selected items
|
||||
theme[selected_fg]="#8f3f71"
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]="#ebdbb2"
|
||||
|
||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||
theme[graph_text]="#a89984"
|
||||
|
||||
# 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]="#98971a"
|
||||
theme[temp_mid]=""
|
||||
theme[temp_end]="#cc241d"
|
||||
|
||||
# CPU graph colors
|
||||
theme[cpu_start]="#427b58"
|
||||
theme[cpu_mid]="#d79921"
|
||||
theme[cpu_end]="#cc241d"
|
||||
|
||||
# Mem/Disk free meter
|
||||
theme[free_start]="#cc241d"
|
||||
theme[free_mid]="#d79921"
|
||||
theme[free_end]="#427b58"
|
||||
|
||||
# Mem/Disk cached meter
|
||||
theme[cached_start]="#458588"
|
||||
theme[cached_mid]="#076678"
|
||||
theme[cached_end]="#427b58"
|
||||
|
||||
# Mem/Disk available meter
|
||||
theme[available_start]="#cc241d"
|
||||
theme[available_mid]="#d65d0e"
|
||||
theme[available_end]="#b57614"
|
||||
|
||||
# Mem/Disk used meter
|
||||
theme[used_start]="#427b58"
|
||||
theme[used_mid]="#d65d0e"
|
||||
theme[used_end]="#cc241d"
|
||||
|
||||
# Download graph colors
|
||||
theme[download_start]="#98971a"
|
||||
theme[download_mid]="#689d6a"
|
||||
theme[download_end]="#79740e"
|
||||
|
||||
# Upload graph colors
|
||||
theme[upload_start]="#cc241d"
|
||||
theme[upload_mid]="#d65d0e"
|
||||
theme[upload_end]="#b57614"
|
||||
|
||||
# Process box color gradient for threads, mem and cpu usage
|
||||
theme[process_start]="#427b58"
|
||||
theme[process_mid]="#af3a03"
|
||||
theme[process_end]="#cc241d"
|
Loading…
Reference in New Issue