{"id":13632045,"url":"https://github.com/tmux-plugins/tmux-cpu","last_synced_at":"2025-04-18T01:32:23.190Z","repository":{"id":24258826,"uuid":"27652576","full_name":"tmux-plugins/tmux-cpu","owner":"tmux-plugins","description":"Plug and play cpu percentage and icon indicator for Tmux. ","archived":false,"fork":false,"pushed_at":"2023-05-31T22:22:35.000Z","size":104,"stargazers_count":417,"open_issues_count":12,"forks_count":64,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-01T22:51:32.721Z","etag":null,"topics":["bsd","linux","shell","tmux-cpu","tmux-plugins","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmux-plugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-12-06T23:20:30.000Z","updated_at":"2024-07-28T16:13:54.000Z","dependencies_parsed_at":"2023-10-21T13:10:24.023Z","dependency_job_id":null,"html_url":"https://github.com/tmux-plugins/tmux-cpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmux-plugins%2Ftmux-cpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmux-plugins%2Ftmux-cpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmux-plugins%2Ftmux-cpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmux-plugins%2Ftmux-cpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmux-plugins","download_url":"https://codeload.github.com/tmux-plugins/tmux-cpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223772123,"owners_count":17199968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsd","linux","shell","tmux-cpu","tmux-plugins","windows"],"created_at":"2024-08-01T22:02:49.461Z","updated_at":"2024-11-09T00:30:35.024Z","avatar_url":"https://github.com/tmux-plugins.png","language":"Shell","readme":"# Tmux CPU and GPU status\n\nEnables displaying CPU and GPU information in Tmux `status-right` and `status-left`.\nConfigurable percentage and icon display.\n\n## Installation\n### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)\n\nAdd plugin to the list of TPM plugins in `.tmux.conf`:\n\n```shell\nset -g @plugin 'tmux-plugins/tmux-cpu'\n```\n\nHit `prefix + I` to fetch the plugin and source it.\n\nIf format strings are added to `status-right`, they should now be visible.\n\n### Manual Installation\n\nClone the repo:\n\n```shell\n$ git clone https://github.com/tmux-plugins/tmux-cpu ~/clone/path\n```\n\nAdd this line to the bottom of `.tmux.conf`:\n\n```shell\nrun-shell ~/clone/path/cpu.tmux\n```\n\nReload TMUX environment:\n\n```shell\n# type this in terminal\n$ tmux source-file ~/.tmux.conf\n```\n\nIf format strings are added to `status-right`, they should now be visible.\n\n### Optional requirements (Linux, BSD, OSX)\n\n- `iostat` or `sar` are the best way to get an accurate CPU percentage.\nA fallback is included using `ps aux` but could be inaccurate.\n- `free` is used for obtaining system RAM status.\n- `lm-sensors` is used for CPU temperature.\n- `nvidia-smi` is required for GPU information.\nFor OSX, `cuda-smi` is required instead (but only shows GPU memory use rather than load).\nIf \"No GPU\" is displayed, it means the script was not able to find `nvidia-smi`/`cuda-smi`.\nPlease make sure the appropriate command is installed and in the `$PATH`.\n\n## Usage\n\nAdd any of the supported format strings (see below) to the existing `status-right` tmux option.\nExample:\n\n```shell\n# in .tmux.conf\nset -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '\n```\n\n### Supported Options\n\nThis is done by introducing 12 new format strings that can be added to\n`status-right` option:\n\n- `#{cpu_icon}` - will display a CPU status icon\n- `#{cpu_percentage}` - will show CPU percentage (averaged across cores)\n- `#{cpu_bg_color}` - will change the background color based on the CPU percentage\n- `#{cpu_fg_color}` - will change the foreground color based on the CPU percentage\n- `#{ram_icon}` - will display a RAM status icon\n- `#{ram_percentage}` - will show RAM percentage (averaged across cores)\n- `#{ram_bg_color}` - will change the background color based on the RAM percentage\n- `#{ram_fg_color}` - will change the foreground color based on the RAM percentage\n- `#{cpu_temp_icon}` - will display a CPU temperature status icon\n- `#{cpu_temp}` - will show CPU temperature (averaged across cores)\n- `#{cpu_temp_bg_color}` - will change the background color based on the CPU temperature\n- `#{cpu_temp_fg_color}` - will change the foreground color based on the CPU temperature\n\nGPU equivalents also exist:\n\n- `#{gpu_icon}` - will display a GPU status icon\n- `#{gpu_percentage}` - will show GPU percentage (averaged across devices)\n- `#{gpu_bg_color}` - will change the background color based on the GPU percentage\n- `#{gpu_fg_color}` - will change the foreground color based on the GPU percentage\n- `#{gram_icon}` - will display a GPU RAM status icon\n- `#{gram_percentage}` - will show GPU RAM percentage (total across devices)\n- `#{gram_bg_color}` - will change the background color based on the GPU RAM percentage\n- `#{gram_fg_color}` - will change the foreground color based on the GPU RAM percentage\n- `#{gpu_temp_icon}` - will display a GPU temperature status icon\n- `#{gpu_temp}` - will show GPU temperature (average across devices)\n- `#{gpu_temp_bg_color}` - will change the background color based on the GPU temperature\n- `#{gpu_temp_fg_color}` - will change the foreground color based on the GPU temperature\n\n## Examples\n\nCPU usage lower than 30%:\u003cbr/\u003e\n![low_fg](/screenshots/low_fg.png)\n![low_bg](/screenshots/low_bg.png)\n![low_icon](/screenshots/low_icon.png)\n\nCPU usage between 30% and 80%:\u003cbr/\u003e\n![medium_fg](/screenshots/medium_fg.png)\n![medium_bg](/screenshots/medium_bg.png)\n![medium_icon](/screenshots/medium_icon.png)\n\nCPU usage higher than 80%:\u003cbr/\u003e\n![high_fg](/screenshots/high_fg.png)\n![high_bg](/screenshots/high_bg.png)\n![high_icon](/screenshots/high_icon.png)\n\n## Customization\n\nHere are all available options with their default values:\n\n```shell\n@cpu_low_icon \"=\" # icon when cpu is low\n@cpu_medium_icon \"≡\" # icon when cpu is medium\n@cpu_high_icon \"≣\" # icon when cpu is high\n\n@cpu_low_fg_color \"\" # foreground color when cpu is low\n@cpu_medium_fg_color \"\" # foreground color when cpu is medium\n@cpu_high_fg_color \"\" # foreground color when cpu is high\n\n@cpu_low_bg_color \"#[bg=green]\" # background color when cpu is low\n@cpu_medium_bg_color \"#[bg=yellow]\" # background color when cpu is medium\n@cpu_high_bg_color \"#[bg=red]\" # background color when cpu is high\n\n@cpu_percentage_format \"%3.1f%%\" # printf format to use to display percentage\n\n@cpu_medium_thresh \"30\" # medium percentage threshold\n@cpu_high_thresh \"80\" # high percentage threshold\n\n@ram_(low_icon,high_bg_color,etc...) # same defaults as above\n\n@cpu_temp_format \"%2.0f\" # printf format to use to display temperature\n@cpu_temp_unit \"C\" # supports C \u0026 F\n\n@cpu_temp_medium_thresh \"80\" # medium temperature threshold\n@cpu_temp_high_thresh \"90\" # high temperature threshold\n\n@cpu_temp_(low_icon,high_bg_color,etc...) # same defaults as above\n```\n\nAll `@cpu_*` options are valid with `@gpu_*` (except `@cpu_*_thresh` which apply to both CPU and GPU). Additionally, `@ram_*` options become `@gram_*` for GPU equivalents.\n\nNote that these colors depend on your terminal / X11 config.\n\nYou can can customize each one of these options in your `.tmux.conf`, for example:\n\n```shell\nset -g @cpu_low_fg_color \"#[fg=#00ff00]\"\nset -g @cpu_percentage_format \"%5.1f%%\" # Add left padding\n```\n\nDon't forget to reload the tmux environment (`$ tmux source-file ~/.tmux.conf`) after you do this.\n\n### Tmux Plugins\n\nThis plugin is part of the [tmux-plugins](https://github.com/tmux-plugins) organisation. Checkout plugins as [battery](https://github.com/tmux-plugins/tmux-battery), [logging](https://github.com/tmux-plugins/tmux-logging), [online status](https://github.com/tmux-plugins/tmux-online-status), and many more over at the [tmux-plugins](https://github.com/tmux-plugins) organisation page.\n\n### Maintainers\n\n- [Camille Tjhoa](https://github.com/ctjhoa)\n- [Casper da Costa-Luis](https://github.com/casperdcl)\n\n### License\n\n[MIT](LICENSE.md)\n","funding_links":[],"categories":["Shell","Status Bar"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmux-plugins%2Ftmux-cpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmux-plugins%2Ftmux-cpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmux-plugins%2Ftmux-cpu/lists"}