1472 Commits

Author SHA1 Message Date
John
abcb906c95 chore: add brace wrapping rule to .editorconfig (#1524) 2026-02-02 09:51:21 +00:00
Jakob P. Liljenberg
58c89fdacb Merge pull request #1521 from TheSovietPancakes/main 2026-01-31 09:51:37 +01:00
TheSovietPancakes
f643a3a793 Fix -Wparentheses warning 2026-01-30 19:02:52 -06:00
TheSovietPancakes
d33dbd8481 Tweaked RX/TX collection and drawing 2026-01-30 18:58:00 -06:00
Barry Van Deerlin
6598b7d2f6 fix: net min size for gpu compiled build (#1516)
Closes: https://github.com/aristocratos/btop/issues/1509
2026-01-27 14:33:51 +00:00
Barry Van Deerlin
0b9bd79f1b fix: mem bottom border when net is not shown (#1510)
Closes: https://github.com/aristocratos/btop/issues/1508
2026-01-26 07:51:38 +00:00
Steffen Winter
633b4ba5c4 fix: suppress warning of redefined C++ keyword
Suppresses the diagnostic for clang but adds an explainatory comment why
this is needed.
2026-01-21 21:26:28 +00:00
Barry Van Deerlin
37737387ac revert: fix: don't always update metrics on redraw (#1502)
Closes: https://github.com/aristocratos/btop/issues/1500
2026-01-21 14:50:12 +00:00
Barry Van Deerlin
c611fe0e9d fix: don't always update metrics on redraw
This prevents the graphs values from updating overly fast if you hold down the preset cycle key bind or the 1, 2, 3, or 4 keys.

Closes: https://github.com/aristocratos/btop/issues/1497
2026-01-20 20:45:06 +00:00
Steffen Winter
0c11d73494 chore: move renovate config out of repo root 2026-01-17 21:02:55 +00:00
Jakob P. Liljenberg
c754ca1b6e Merge pull request #1491 from vandabbin/preset-change-update-clock 2026-01-17 21:49:42 +01:00
Barry Van Deerlin
7b41990a69 Update clock with preset change or show/hide box 2026-01-17 12:29:19 -08:00
Steffen Winter
5b44daa956 chore: set all file permissions to 644 2026-01-17 18:46:33 +00:00
Steffen Winter
75e6d5819e fix: avoid useless string cast, replace with fmt::format
Bug: https://github.com/aristocratos/btop/issues/535
Ref: https://github.com/aristocratos/btop/actions/runs/21095975158/job/60673473485#step:5:39
2026-01-17 17:39:07 +00:00
Steffen Winter
c4c6bf1fee chore: add rule to use fmt::format to guidelines 2026-01-16 19:31:47 +01:00
Steffen Winter
881f994290 refactor: format exit messages with fmt::format
Bug: https://github.com/aristocratos/btop/issues/535
2026-01-16 19:31:47 +01:00
Steffen Winter
084b49e4f7 refactor: get rid of extern runner thread id 2026-01-16 19:31:34 +01:00
Jakob P. Liljenberg
5521ba3b4c Merge pull request #1409 from deckstose/push-wooszqkrztws 2026-01-15 20:51:36 +01:00
Jakob P. Liljenberg
86d83cc238 Merge pull request #1445 from deckstose/push-muwuouvpqswu 2026-01-15 20:50:53 +01:00
Jakob P. Liljenberg
8a0edbb42d Merge branch 'main' into push-muwuouvpqswu 2026-01-15 20:19:13 +01:00
Jakob P. Liljenberg
45358f3352 Merge pull request #1458 from vandabbin/list-end-selection-fixes 2026-01-15 20:15:33 +01:00
Barry Van Deerlin
dca53f87e4 Fixes and Improvements for Pause and Follow modes
Reselection Issues with Pause and Follow

- I found an edge case I had missed before for the very end of the process
  list (not view). For the process list pausing feature, if the process
  selected was the very last item in the whole list then the selection was
  moved up one. And vice versa when the list is paused and the very last
  item is selected, unpausing would also move it up one item in the list.
  For the process following feature the same thing would happen when
  unfollowing (if not using the detailed view follow) but for the last few
  items (upto halfway up the view)

  - This was fixed by adding 1 to either `selected` or `start` when
    required.

- When process following with detailed view. unfollowing by clicking the
  process and then clicking again to close detail view threw the view
  off because following was disengaged.

  - Fixed with the modification to the code block that handles
    following. It now also restores the selection and view when exiting
    detailed view also. (I had a different fix for this but the fix for
    the next issue made it irrelevant and was removed)

- If following a process with detailed view and it is one of the first
  or last few items in the whole list (not view) then if you change the
  reverse sort mode and then unfollow the process, instead of the
  selection returning to the process that was being followed it returns
  to where the process would have been if the sorting wasn't reversed.

  - I struggled to figure out a fix for this but landed on reusing the
    code block that locates the followed process to restore the
    selection when detailed view closes.
  - I actually quite like this fix since it also centers the selection
    if possiple when closing the detailed view.

- The change that removed selection for detailed view following caused
  an issue where if the list was paused holding up would cause the
  selection to loop from the list position where the followed process
  was after reaching the top of the list.

  - This was fixed by adding some additional conditions before changing
    the selection back to the followed process when selected is 0
  - This gets rid of this issue so that when paused scrolling to the
    top of the list doesn't loop back to the followed process location

- When following a process and the view was at the end of the list, if
  the process died and following disengaged, a blank line would be left
  at the bottom of the list until the next collection cycle.

  - fixed this by making select_max not a const and adding 1 to it when
    the following mode disengaged.

- When the followed process is the first process in the list, pressing
  up doesn't redraw the screen and get rid of the following banner
  until the next collection cycle.

  - I fixed this by moving `bool changed = false` to the top of the
    selection function and setting `changed` to true when reselecting
    the followed process before moving back up and `selected` is 0
    again.

- When following a process clicking on the banner with the mouse would
  exit following mode and select the last line. I am not sure if this is
  desirable or not.

  - I have fixed this with an extra condition in the mouse input logic
  - This can be reverted if you feel it is good for clicking the banner
    to exit following in that way.

Improvements to follow mode list centering

- The followed process was centered using select_max / 2. this works
  but would leave it off center by 2 if select_max was odd.

  - it has been updated to use select_max / 2 if select_max is even
    which has the followed process off center as close as it can be
    but slightly closer to the top of list. if select_max is odd then
    it uses select_max / 2 + 1 which places the process dead center.

- If follow-detailed is disabled and a process is being followed while
  paused, opening or closing the detailed view doesn't recenter the
  followed process.

  - fixed this by relocating a line that sets update_following

Issue with tree expand/collapse when following

- When I made the change that set `selected = 0` when following the
  detailed process. I did not realize that this would prevent the user
  from being able to expand or collapse the tree of the process being
  followed without first unfollowing it.

  - I fixed this by slightly reworking the input code for
    expand/collapse with some extra conditions

Misc improvement to follow mode

- Added a line in the F input handling code that sets the selection to
  the followed process before exiting follow mode. This means that if
  if you press F after opening a detailed view and following that it
  will exit follow mode and move selected to the followed process
  location instead of leaving selected as 0. This is equivalent to
  pressing down after opening a detailed view when not following the
  process.

- Since when following the detailed view process the selection can be
  moved up or down from the followed process, the up arrow for the
  select button should not be greyed out if following the detailed view
  process and `should_selection_return_to_followed` is false.

- Added a comment in the selection function to explain what the
  following mode code block does there.

Small optimization for Pause mode

- I moved `Config::getB("keep_dead_proc_usage")` outside of the for loop
  that goes through all the current procs while paused.
2026-01-14 14:31:45 -08:00
Barry Van Deerlin
64476b5d08 refactor: remove redundant erasing of mouse mapping (#1473) 2026-01-14 12:13:01 +00:00
Ruaneri Ferreira Portela
3bffc086d3 chore: add portuguese translations to btop.desktop (#1471) 2026-01-13 22:57:42 +00:00
Barry Van Deerlin
39f8ebe133 fix: properly highlight down arrow if it's actionable (#1462)
Closes: #1461
2026-01-11 15:36:49 +01:00
Jakob P. Liljenberg
2e41e7686d Merge pull request #1456 from vandabbin/small-following-fix 2026-01-10 12:44:36 +01:00
aristocratos
ea977a02c4 Update widechar detection and fix replace_ascii_control() removing wide characters 2026-01-10 12:42:32 +01:00
Barry Van Deerlin
756af831c2 following mode fixes 2026-01-10 03:33:10 -08:00
Jakob P. Liljenberg
3f6815012f Merge pull request #1443 from hastinbe/theme-twilight 2026-01-10 10:42:45 +01:00
Jakob P. Liljenberg
a22f371a99 Merge pull request #1454 from vandabbin/fix-kill-buttons 2026-01-10 10:40:43 +01:00
Jakob P. Liljenberg
54fa3bc481 Merge pull request #1452 from vandabbin/fix-mouse-selection-following 2026-01-10 10:39:31 +01:00
Barry Van Deerlin
1c873b08fd Fix mouse mapping for process kill buttons with vim keys enabled
The mouse mappings were only mapped as 'k' and did not change to 'K' when vim keys are enabled.
Change made so that they now map correctly

I also corrected the code that was clearing mouse mappings as it was using some uppercase letters
for keybinds that are lowercase.
2026-01-09 16:00:12 -08:00
Barry Van Deerlin
7e1e309e67 Following mode improvements
fix mouse selection when following is active

When making the change to the process following PR that made moving the selection
disengage following mode, I missed a couple points in the mouse input code that was
preventing following mode from being disengaged when clicking on the detailed info box
or on the upper border of the proc box/label line.

This alteration fixes that.

Also made a change so that if the detailed view is open/opened and
following mode engages. If the detailed view process is the one being
followed then the selection is set to 0 and the detailed view buttons
are active instead of the bottom bar buttons.

added follow button to detailed view buttons
2026-01-09 15:55:21 -08:00
Steffen Winter
8c9695d1fa ci: revert fix for netbsd workflow 2026-01-08 23:40:29 +01:00
Steffen Winter
bc2f2cba8e fix: remove busy waiting when checking runner thread state
Running btop with valgrind shows that when the `atomic_wait` function is
called that a couple of million instructions being executed in a short
amount of time.

The replacement puts the thread to sleep and waits for a notification
which is much more efficient.
2026-01-08 13:00:52 +01:00
Beau Hastings
4703578df7 Add twilight theme
Color scheme resembling the original TextMate Twilight color theme
2026-01-06 07:36:39 -06:00
Steffen Winter
8d84cf18b4 ci: enable manual triggering of cmake workflows 2026-01-05 00:16:59 +01:00
Steffen Winter
4867fd4159 feat: add config option to disable mouse events 2026-01-05 00:16:39 +01:00
John
ad4e3d6d4f Change color of 'tab' in options menu for parity (#1434)
* Change color of tab in options menu

* Change tab color to use format
2026-01-04 22:29:54 +00:00
Steffen Winter
c6533b5d56 chore: set permissions of Makefile to 644 2026-01-04 12:11:58 +01:00
Steffen Winter
d4a58c91ec fix: adjust for additional menu tab with gpu support
The mouse click coordinates where only mapped to the first 5 tabs, but
since width of each tab decresed to make room for the gpu tab, the
mapping was of the shown strings.

Introduce a named constant that is different with gpu support enabled.

Closes: https://github.com/aristocratos/btop/issues/1430
2026-01-04 12:11:40 +01:00
Steffen Winter
fd9cd479ad refactor: use fmt::format like interface for logger
This will only allocate the log message if a log file exists and the log
level is enabled. The interface forwards it's arguments to fmt::format.
This gets also rid of some global state and hides it in the btop_log.cpp
translation unit.

Closes: https://github.com/aristocratos/btop/issues/1347
2026-01-04 12:11:21 +01:00
Jakob P. Liljenberg
e26f59a487 Merge pull request #1433 from TheSovietPancakes/main 2026-01-04 11:10:26 +01:00
TheSovietPancakes
2da2e5d44c Fix network graphs overlap 2026-01-03 18:25:40 -06:00
TheSovietPancakes
462372f5b3 Fixed speed max indicator 2026-01-03 17:31:01 -06:00
TheSovietPancakes
f87d7d4b39 Add Swap upload/download speed graph option 2026-01-03 17:18:52 -06:00
Jakob P. Liljenberg
c8b277d1d7 Merge pull request #1326 from vandabbin/follow-selected 2025-12-30 11:17:37 +01:00
Barry Van Deerlin
3ca8994e33 Reassign tree-children-toggle keybind
the tree-children-toggle feature introduced in f8b4217 from PR #1274
was using the "u" key as a binding.

This conflicts with pause using the "u" key now.

Since the "u" key was chosen without any real reason for the
tree-children-toggle feature. It will be changed to "C" and
"u" can safely be used for pause.
2025-12-30 01:43:21 -08:00
Barry Van Deerlin
6c4f019953 Feat: Process following
- Added menu options to automatically enable process following for selected process from Detailed View

- Changed Pause keybinding to 'u'

- Added keybinding 'F' (Shift+F) to follow selected process

- Added Follow and Pause buttons

- Processes are followed through sorting, tree mode, and reverse mode changes.

- Process following disengages if the process is no longer in the list.
  - Either because it died or it was filtered out

- Changing the selection exits following mode unless the list is paused.
  - While paused, changing sorting method returns the selection to the followed process.
  - Unpausing also returns the selection to the process being followed.
  - Opening a new detailed view will change the process being followed.

- Pause banner has been upgraded to a Pause and Following banner.
  - Text on banner reflects current state.
  - Banner background color changes depending on mode.
  - Currently:
    - Red Banner (Process list paused)
    - Blue Banner (Following process)
    - Purple Banner (Paused list and following process)
2025-12-30 01:42:54 -08:00
Jakob P. Liljenberg
78e7763db8 Merge pull request #1427 from barracuda156/btop_collect 2025-12-29 21:03:05 +01:00