Commit Graph

50 Commits

Author SHA1 Message Date
henry.potgieter
d900b3a546 Merge branch 'nerdfont_graph' into improved_segment_adjacency
Merge vertical graph branch with improved_segment_adjacency branch
2023-03-29 22:39:48 -04:00
henry.potgieter
94aed0352c Corrected a character in usage output and updated README.rst 2023-03-27 12:21:36 -04:00
henry.potgieter
e232eef156 Change naming from --nerd-graph to --vertical-graph 2023-03-27 11:57:01 -04:00
henry.potgieter
f9663c8f2f Add options to allow embedding tmux-mem-cpu-load segments within/beside other segments 2023-03-27 11:11:55 -04:00
henry.potgieter
dc298e162a Prepend nerd_graph boolean with use_ so it doesn't look odd 2023-03-26 08:52:59 -04:00
henry.potgieter
6178ba9aa3 Add option to display CPU graph as vertical bar chart 2023-03-25 11:07:55 -04:00
Adam Weinberger
2b19ca8a0a Increase CPU percent width by 1 (fixes #81)
CPU percent width is 5, which accommodates the maximum possible width
(100.0). When it's at full width, though, the percent string runs right
up against the item before it.

When the graph is enabled, running up against the graph just looks
strange, but still readable ([   |||]100.0%). With the graph disabled
(-g 0) though, it runs into the memory widget, which makes both of them
very difficult to read (11/32GB100%).

This commit adds one space to the CPU percent width. It offsets
a non-pegged load by one, but it ensures there's always at least one
space to separate the widgets.
2023-03-06 15:56:05 -05:00
Matt McCormick
8052318680 Undefined references to std::string in aarch64 build 2022-02-17 12:32:51 -05:00
Gautier DI FOLCO
1ac6729ef1 Less sensitive memory default thresholds 2021-12-07 23:19:49 +01:00
Gautier DI FOLCO
04419c8cdf Progressive colors for CPU usage 2021-12-07 23:19:09 +01:00
Matt McCormick
4be44f35f7 Specify precision in CPU percent output
More consistent formatting.
2021-08-03 18:38:28 -04:00
Matt McCormick
8c2f0e2cfd Use consistent precision for load output
Reduce variations in output.
2021-08-03 18:29:09 -04:00
WuYiyang
10ad0b29fd delete the accidentally added header 2020-03-01 09:53:37 +00:00
WuYiyang
fc78a0bdad display mem in GB when >100000MB in default mode 2020-03-01 09:44:31 +00:00
WuYiyang
d34821cb95 uint32_t get_cpu_count() : support >255 threads 2020-02-23 02:40:10 +00:00
Matt McCormick
7cf58a8367 windows: Initial addition 2018-04-23 21:52:17 -04:00
Matt McCormick
e5595e21f4 Fix memory background color with --powerline-right 2016-08-02 18:48:43 -04:00
Matt McCormick
13c3205ec0 Remove extra spaces with --powerline-right 2016-08-02 18:41:13 -04:00
Matt McCormick
1b11c308ac Remove extra space with --powerline-left 2016-08-01 12:46:31 -04:00
Matt McCormick
dcadec63a2 Remove implementation details from --powerline- docs 2016-07-31 22:06:56 -04:00
Matt McCormick
0941898c02 Document --powerline-left 2016-07-31 22:03:18 -04:00
Matt McCormick
6960e27dc4 Implement --powerline-left 2016-07-31 21:57:56 -04:00
Matt McCormick
a26f0ae59d Recognize the documented -p flag 2016-07-28 21:25:58 -04:00
Josh Davies
b7d2d2a73e Print CPU usage without decimal point if >= 100
Also:
add --colours shortopt to help/readme,
Conform to coding style.
2016-06-27 08:00:09 +01:00
Josh Davies
4a2c4efb9a Added tests for "cpu-mode", short opt --colour
Also fixed (properly) ad83d9b
2016-06-26 14:47:02 +01:00
Josh Davies
ad83d9b3a9 Fix: allow -c short option for --color 2016-06-26 14:33:05 +01:00
Josh Davies
c623ca889d Added cpu-mode option
Default as before, full load = 100%.
Option 1, full load = 100% * number of cpu threads.
2016-06-26 14:31:34 +01:00
Compilenix
97a655c856 cleanup 2016-04-28 22:27:19 +02:00
Compilenix
1d1a516eda added averages-count option 2016-04-28 22:05:43 +02:00
Matt McCormick
34b9d39b57 Merge pull request #34 from golinski/master
Adding powerline support
2016-04-14 07:01:33 -04:00
Michał Goliński
bac831cd69 Code refactoring for merging
- license header in new files
- changed "powerline" into "powerline-right"
- added braces around one-liners
- small fixes concerning whitespace
2016-04-14 12:30:20 +02:00
Matt McCormick
b8594ecb82 Correct total memory output for the default mode. 2016-03-06 10:57:38 -05:00
Michał Goliński
cc59b4952f Powerline support 2016-03-05 11:19:31 +01:00
Matt McCormick
6938941b99 Add help for memory display mode. 2016-02-14 23:52:56 -05:00
Matt McCormick
42275e094d Memory mode output for platforms other than osx.
Refactor status string generation into a common function.
2016-02-14 23:47:02 -05:00
Matt McCormick
e50d34873f Add header guard to conversions.h 2016-02-10 16:54:09 -05:00
Matt McCormick
4fd854ce16 Give the MEMORY_MODE enum a name.
This improves readability. Also, set the default value in one place in the
declaration.
2016-02-10 16:47:29 -05:00
Matt McCormick
81fea73e79 Move MEMORY_MODE enum inside include guard. 2016-02-10 16:38:50 -05:00
cousine
635334b141 Adhere to the styling guide, added enum for memory modes, refractored memory mode if block to use switch instead and added test cases for free memory and user percentage memory modes 2016-02-10 22:49:49 +02:00
cousine
451aed4530 added memory mode to calculate %, and free memory 2016-02-10 17:32:01 +02:00
Matt McCormick
557528b946 Merge pull request #25 from jasperla/ws
Don't print trailing whitespace for last element
2015-04-02 09:49:51 -04:00
Matt McCormick
a8367d7f86 Fix color of space preceding the load.
The color preceding of the space preceding the load is
made to be consistent with the load color instead of the default. This is
consistent with the CPU percentage color and easier to read.
2015-04-02 09:37:58 -04:00
Jasper Lievisse Adriaanse
512185a6b3 Don't print trailing whitespace for last element
it's easier to add it in your tmux.conf, then it's to remove it.
2015-04-02 15:35:16 +02:00
Pawel "l0ner" Soltys
87cc9b1ce8 Code Refactoring part 2: unified load_string() function on all platforms
All the platforms were using identical logic based on getloadavg() function to
get the load avg stats (except linux, which was using sinfo struct, but can use getloadavg() function). I've noticed this while working on NetBSD port.

Also: fixed a typo on freebsd.
2015-02-19 21:26:35 +01:00
Pawel "l0ner" Soltys
240752d800 Code Refactornig
Since the headers for cpu, memory and load functions are virtually the same for
all platforms, I've decided to move them into common/ dir and do some
refacotring:

* removed per-platform header files
* implemented get_cpu_count() function across all platforms. We are using it cpu
  on every platform, yet not on every one this was implemented as a separate
  function.
* removed platform detection through preprocessor from main: we don't need this
  there anymore, since the headers are common for all platforms. CMake will
  handle setting of correct source files for us now.
* Unified used defines for CPU states across all platforms and made linux use
  them. Added some platform detection to cpu.h in order to set them correctly
  across the platforms.
* moved getsysctl.h to common/ dir, since it's used on Net and Free BSD, and
  thus become a common include.
2015-02-19 19:47:45 +01:00
Pawel "l0ner" Soltys
1512a0bda0 NetBSD port.
NetBSD port shares with FreeBSD:
 - load_string()
 - getsysctl()

With OpenBSD:
 - error()
2015-02-16 23:29:27 +01:00
Pawel "l0ner" Soltys
80d70b7a4d fix for cpu systctl failing on 64 bit OpenBSD
On 64bit system KERN_CPTIME systctl gets returned as 64bit uint.
On 32bit system it's returned as 32bit uint. This is not documented anywhere
(or maybe I've missed it). I've added preprocessor test for 64bit system.
2015-02-12 20:00:30 +01:00
Pawel "l0ner" Soltys
112004f3db FreeBSD and OpenBSD ports
- Removed OpenBSD stuff from freebsd port
- Renamed bsd folder to freebsd since now it contains only
  freebsd-relevant files.
- Changed CMake instructions to account for bsd port changes
- modified main source file to account for openbsd port
2015-01-20 15:03:48 +01:00
Matt McCormick
68ab061cb4 Rename tmux-mem-cpu-load.cc to main.cc. 2015-01-20 08:05:28 -05:00
Matt McCormick
9498e06ac4 Collect top level code files into common directory.
A little more organized.
2015-01-20 08:04:02 -05:00