mirror of
https://github.com/thewtex/tmux-mem-cpu-load.git
synced 2026-09-12 08:16:26 -04:00
Compare commits
No commits in common. "master" and "v3.8.2" have entirely different histories.
2
.github/workflows/expired.yml
vendored
2
.github/workflows/expired.yml
vendored
|
|
@ -6,7 +6,7 @@ jobs:
|
|||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v11
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
exempt-issue-milestones: 'future,alpha,beta,release'
|
||||
|
|
|
|||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
build_type: [Release, Debug]
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
|
|
|
|||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
arch_name: [linux-arm64, linux-arm64-musl, linux-armv5, linux-armv5-musl, linux-armv6, linux-armv6-musl, linux-armv7, linux-armv7a, linux-armv7l-musl, linux-x64-clang, linux-s390x, linux-x64, linux-x86, linux-mips, linux-ppc64le, manylinux1-x64, manylinux1-x86, manylinux2010-x64, manylinux2010-x86, manylinux2014-x64, manylinux2014-x86, manylinux2014-aarch64, linux-riscv64, linux-riscv32]
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
|
|
@ -29,26 +29,25 @@ jobs:
|
|||
- name: "🗜️ compress"
|
||||
run: cd build-${{ matrix.arch_name }} && find . -maxdepth 1 -name "tmux-mem-cpu-load*" -o -name "*.sha256" | XZ_OPT=-e9 tar -cJf tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz -T - && mv tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz ..
|
||||
- name: "💾 save binaries"
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bin-artifact-${{ matrix.arch_name }}
|
||||
name: bin-artifact
|
||||
path: tmux-mem-cpu-load-${{ matrix.arch_name }}.tar.xz
|
||||
retention-days: 1
|
||||
retention-days: 1
|
||||
release:
|
||||
name: release
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: "📥 Checkout Code"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 0
|
||||
- name: get artifact
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: bin-artifact-*
|
||||
merge-multiple: true
|
||||
name: bin-artifact
|
||||
path: .
|
||||
- name: "✅ checksum"
|
||||
run: find . -maxdepth 1 -name "*.tar.xz" | xargs sha256sum > checksum_all.sha256
|
||||
|
|
@ -60,4 +59,4 @@ jobs:
|
|||
files: |
|
||||
LICENSE
|
||||
*.tar.xz
|
||||
*.sha256
|
||||
*.sha256
|
||||
|
|
@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 3.5)
|
|||
project(tmux-mem-cpu-load)
|
||||
set(tmux-mem-cpu-load_VERSION_MAJOR 3)
|
||||
set(tmux-mem-cpu-load_VERSION_MINOR 8)
|
||||
set(tmux-mem-cpu-load_VERSION_PATCH 3)
|
||||
set(tmux-mem-cpu-load_VERSION_PATCH 2)
|
||||
#Compute full version string
|
||||
set(tmux-mem-cpu-load_VERSION
|
||||
${tmux-mem-cpu-load_VERSION_MAJOR}.${tmux-mem-cpu-load_VERSION_MINOR}.${tmux-mem-cpu-load_VERSION_PATCH})
|
||||
|
|
@ -121,7 +121,7 @@ if(BUILD_TESTING)
|
|||
)
|
||||
|
||||
add_test(NAME invalid_graph_lines
|
||||
COMMAND tmux-mem-cpu-load --graph-lines -2
|
||||
COMMAND tmux-mem-cpu-load --graph_lines -2
|
||||
)
|
||||
|
||||
add_test(NAME old_option_specification
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ Install with Package Managers
|
|||
|
||||
* Gentoo: ``emerge tmux-mem-cpu-load``
|
||||
* Homebrew: ``brew install tmux-mem-cpu-load``
|
||||
* FreeBSD: ``pkg install tmux-mem-cpu-load``
|
||||
|
||||
Build and Install Using Antigen_
|
||||
--------------------------------
|
||||
|
|
@ -120,7 +119,7 @@ Edit ``$HOME/.tmux.conf`` to display the program's output in *status-left* or
|
|||
If you installed using tpm, you must specify the full path to the
|
||||
``tmux-mem-cpu-load`` script, like below::
|
||||
|
||||
set -g status-right "#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]"
|
||||
set -g status-right '#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]'
|
||||
|
||||
Note that the *interval* argument to `tmux-mem-cpu-load` should be the same number
|
||||
of seconds that *status-interval* is set at.
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ std::string load_string( bool use_colors,
|
|||
std::ostringstream ss;
|
||||
ss.setf( std::ios::fixed, std::ios::floatfield );
|
||||
ss.precision( 2 );
|
||||
double averages[num_averages];
|
||||
// based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c
|
||||
|
||||
if( num_averages <= 0 || num_averages > 3)
|
||||
{
|
||||
|
|
@ -49,9 +51,6 @@ std::string load_string( bool use_colors,
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
double averages[3];
|
||||
// based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c
|
||||
|
||||
if( getloadavg( averages, num_averages ) < 0 )
|
||||
{
|
||||
ss << " 0.00 0.00 0.00"; // couldn't get averages.
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ void powerline_char( std::ostringstream & oss, const char dynamic_color[],
|
|||
sprintf(write_color, "%d", static_color);
|
||||
switch( direction )
|
||||
{
|
||||
case NONE:
|
||||
break;
|
||||
case POWERLINE_LEFT:
|
||||
if ( eol )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue