{"id":25702986,"url":"https://github.com/Freed-Wu/tmux-status-bar","last_synced_at":"2025-02-25T05:05:19.295Z","repository":{"id":190424571,"uuid":"682635824","full_name":"Freed-Wu/tmux-status-bar","owner":"Freed-Wu","description":"A not out-of-box but more flexible and powerful tmux plugin to control status bar. NOT a IDE-like plugin like oh-my-tmux.","archived":false,"fork":false,"pushed_at":"2024-10-22T04:51:26.000Z","size":16,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-23T07:06:50.763Z","etag":null,"topics":["oh-my-tmux","perl","plugin","status-bar","tmux"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Term::Tmux::StatusBar","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Freed-Wu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png","https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png","https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"]}},"created_at":"2023-08-24T15:38:50.000Z","updated_at":"2024-10-17T06:39:38.000Z","dependencies_parsed_at":"2023-08-30T15:45:06.490Z","dependency_job_id":"53478a7c-b2be-416b-ad13-bc8529e67e2c","html_url":"https://github.com/Freed-Wu/tmux-status-bar","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"09b32c8ff321cd8da950e5dd32c16e983eef9782"},"previous_names":["freed-wu/make-language-server","freed-wu/tmux-status-bar"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freed-Wu%2Ftmux-status-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freed-Wu%2Ftmux-status-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freed-Wu%2Ftmux-status-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freed-Wu%2Ftmux-status-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freed-Wu","download_url":"https://codeload.github.com/Freed-Wu/tmux-status-bar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240605835,"owners_count":19827983,"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":["oh-my-tmux","perl","plugin","status-bar","tmux"],"created_at":"2025-02-25T05:03:25.993Z","updated_at":"2025-02-25T05:05:19.278Z","avatar_url":"https://github.com/Freed-Wu.png","language":"Perl","funding_links":["https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png","https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png","https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"],"categories":["C"],"sub_categories":[],"readme":"# tmux-status-bar\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Freed-Wu/tmux-status-bar/main.svg)](https://results.pre-commit.ci/latest/github/Freed-Wu/tmux-status-bar/main)\n[![github/workflow](https://github.com/Freed-Wu/tmux-status-bar/actions/workflows/main.yml/badge.svg)](https://github.com/Freed-Wu/tmux-status-bar/actions)\n[![codecov](https://codecov.io/gh/Freed-Wu/tmux-status-bar/branch/main/graph/badge.svg)](https://codecov.io/gh/Freed-Wu/tmux-status-bar)\n[![DeepSource](https://deepsource.io/gh/Freed-Wu/tmux-status-bar.svg/?show_trend=true)](https://deepsource.io/gh/Freed-Wu/tmux-status-bar)\n\n[![github/downloads](https://shields.io/github/downloads/Freed-Wu/tmux-status-bar/total)](https://github.com/Freed-Wu/tmux-status-bar/releases)\n[![github/downloads/latest](https://shields.io/github/downloads/Freed-Wu/tmux-status-bar/latest/total)](https://github.com/Freed-Wu/tmux-status-bar/releases/latest)\n[![github/issues](https://shields.io/github/issues/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/issues)\n[![github/issues-closed](https://shields.io/github/issues-closed/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/issues?q=is%3Aissue+is%3Aclosed)\n[![github/issues-pr](https://shields.io/github/issues-pr/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/pulls)\n[![github/issues-pr-closed](https://shields.io/github/issues-pr-closed/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/pulls?q=is%3Apr+is%3Aclosed)\n[![github/discussions](https://shields.io/github/discussions/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/discussions)\n[![github/milestones](https://shields.io/github/milestones/all/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/milestones)\n[![github/forks](https://shields.io/github/forks/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/network/members)\n[![github/stars](https://shields.io/github/stars/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/stargazers)\n[![github/watchers](https://shields.io/github/watchers/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/watchers)\n[![github/contributors](https://shields.io/github/contributors/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/graphs/contributors)\n[![github/commit-activity](https://shields.io/github/commit-activity/w/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/graphs/commit-activity)\n[![github/last-commit](https://shields.io/github/last-commit/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/commits)\n[![github/release-date](https://shields.io/github/release-date/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/releases/latest)\n\n[![github/license](https://shields.io/github/license/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar/blob/main/LICENSE)\n[![github/languages](https://shields.io/github/languages/count/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n[![github/languages/top](https://shields.io/github/languages/top/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n[![github/directory-file-count](https://shields.io/github/directory-file-count/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n[![github/code-size](https://shields.io/github/languages/code-size/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n[![github/repo-size](https://shields.io/github/repo-size/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n[![github/v](https://shields.io/github/v/release/Freed-Wu/tmux-status-bar)](https://github.com/Freed-Wu/tmux-status-bar)\n\n[![cpan/v](https://img.shields.io/cpan/v/Term-Tmux-StatusBar)](https://metacpan.org/pod/Term::Tmux::StatusBar)\n\n![screenshot](https://github.com/Freed-Wu/tmux-status-bar/assets/32936898/ecd6dd2e-fdbc-43fd-a245-a8b2df058202)\n\nA **not out-of-box** but **more flexible and powerful** tmux plugin to\ncustomize tmux status bar. The biggest difference between other similar plugins\nis it doesn't provide any variables to control status bar like other plugins,\nbut provides some functions to `~/.config/tmux/tmux.conf` and make it\npossible to cooperate with other tmux plugin, which let users to control tmux\nby a more \"tmux\" method.\n\n## Similar Projects\n\n- [powerline](https://github.com/powerline/powerline): use\n  `~/.config/powerline/config.json` to configure\n- [tmux-powerline](https://github.com/erikw/tmux-powerline): use\n  `.tmux-powerlinerc`, which is a bash script, to configure\n- There are many [tmux themes](https://github.com/rothgar/awesome-tmux#themes),\n  which provide some variables to allow user to customize separators, colors and\n  some less attributions on `~/.config/tmux/tmux.conf` by tmux script.\n- [Oh My Tmux!](https://github.com/gpakosz/.tmux): it is not a tmux plugin, it\n  is a tmux configuration, which contains some variables to configure tmux status\n  bar like tmux themes. It is too large and perhaps separate some functions of\n  its code to many different tmux plugins can be better.\n\n## Usage\n\n`~/.config/tmux/tmux.conf`:\n\n```tmux\n# [XXX] can be ignored\nset -g status-left \"#{status-left:[[format;][fg_color,bg_color,text;][sep];]...}\"\nset -g status-right \"#{status-right:[[format;][sep;][fg_color,bg_color,text];]...}\"\nset -g window-status-current-format \"#{window-status-current-format-left:[format;][sep;]fg_color,bg_color,text;[sep]}\"\n# or\nset -g window-status-current-format \"#{window-status-current-format-right:[format;][sep;]fg_color,bg_color,text;[sep]}\"\n```\n\nFor example, in `~/.config/tmux/tmux.conf`:\n\n```tmux\nset -g status-left \"#{status-left:%s;#fffafa,black,a;;%s ;blue,green,b;; %s ;red,colour04,c;}\"\n```\n\nIt will be translated to:\n\n\u003c!-- markdownlint-disable MD013 --\u003e\n\n```sh\n$ tmux show -gqv status-left\n#[fg=#fffafa,bg=black]a#[fg=black,bg=green]#[fg=blue]b #[fg=green,bg=colour04]#[fg=red] c #[fg=colour04,bg=default]\n```\n\n\u003c!-- markdownlint-enable MD013 --\u003e\n\nand output:\n\n![example](https://github.com/Freed-Wu/tmux-status-bar/assets/32936898/769a5926-c428-4156-89db-e10c9b64406d)\n\nYes, this plugin is not out-of-box. You must call this function by yourself. As\na reward, you have more freedom to control tmux status line. Let us see a more\ncomplex example, how to get the right status line of the first screenshot. The\ncode is copied from [my dotfiles](https://github.com/Freed-Wu/Freed-Wu):\n\n```tmux\nset -g status-right \\\n\"#{status-right:%s;\\\nwhite,colour04,#{prefix_highlight}#[bg=colour04];\\\nblack,yellow,#{pomodoro_status};\\\n\\\nblack,#9370db,\\\n#{?#{==:#{bitahub_status_gtx1080ti},},,1080ti #{bitahub_status_gtx1080ti}}\\\n#{?#{||:#{==:#{bitahub_status_rtx3090},},#{==:#{bitahub_status_gtx1080ti},}},,}\\\n#{?#{==:#{bitahub_status_rtx3090},},,3090 #{bitahub_status_rtx3090}};\\\n\\\nwhite,#b34a47,\\\n#{?#{||:#{==:#{battery_percentage},0%},#{==:#{battery_percentage},}},\\\n#{net_speed},#{battery_icon_status}#{battery_remain}\\\n#{battery_color_status_fg}#[bg=#b34a47]\\\n#{battery_icon_charge}#{battery_percentage}};\\\n\\\nblack,#87ceeb,%F%H:%M%a}\"\n```\n\nWe can see there are 5 sections. `%s` strips the default around white spaces to\nsave length.\n\n1. Display if prefix key is pressed. Provided by\n   [tmux-prefix-highlight](https://github.com/tmux-plugins/tmux-prefix-highlight).\n2. A pomodoro timer. Provided by\n   [tmux-pomodoro-plus](https://github.com/olimorris/tmux-pomodoro-plus).\n3. Display number of GPU servers of my laboratory. Provided by\n   [my plugin](https://github.com/Freed-Wu/tmux-bitahub). It can be split to\n   three parts:\n   1. `#{?#{==:#{bitahub_status_gtx1080ti},},,1080ti #{bitahub_status_gtx1080ti}}`:\n      if `#{bitahub_status_gtx1080ti}` get empty result, which means network is\n      offline. We don't display `1080ti` to save length.\n   2. `#{?#{||:#{==:#{bitahub_status_rtx3090},},#{==:#{bitahub_status_gtx1080ti},}},,}`:\n      when only both `#{bitahub_status_gtx1080ti}` and\n      `#{bitahub_status_rtx3090}` are not empty, a separator will be displayed.\n   3. Same as first part.\n4. Display battery percentage and charge time or net speed. That is because for\n   desktop, which doesn't have a battery. So we display battery information for\n   the laptop and net speed for the desktop. The code is similar to above section.\n   Provided by [tmux-net-speed](https://github.com/tmux-plugins/tmux-net-speed) and\n   [tmux-battery](https://github.com/tmux-plugins/tmux-battery).\n5. Display date and time.\n\n## Motivations\n\nI create this plugin for two purposes:\n\n- This plugin don't attach any other plugin which display useful information. You\n  can search it in [awesome-tmux](https://github.com/rothgar/awesome-tmux) and\n  [tmux-plugins/list](https://github.com/tmux-plugins/list). In fact, some\n  IDE-like tmux plugin attach many parts to display some information, which are\n  not general -- other tmux plugin cannot use them! Imitate Unix philosophy,\n  every tmux plugin should do one thing, and do best. This plugin just provides\n  some functions to control tmux status bar. Display useful information? That are\n  other plugin's jobs.\n- This plugin use tmux script which is the language `~/.config/tmux/tmux.conf`\n  uses to configure. I know `powerline`s python, `tmux-powerline`'s bash is\n  more advanced language, However, tmux script is more easy to call other tmux\n  plugins, which cannot be ignored.\n\nBTW, at the first screenshot, 0, 1, 2, ... is displayed to `⓪` `①`, `②`, which\nis done by [my another plugin](https://github.com/Freed-Wu/tmux-digit). Don't\nforget one plugin do one thing. :smile: If you want to use similar style of\nprompt/status bar for other programs (gdb, lftp, ...), Here is\n[an incomplete list](https://github.com/gnu-octave/prompt#similar-projects).\n\n## Install\n\n### [tpm](https://github.com/tmux-plugins/tpm)\n\n```tmux\nset -g @plugin Freed-Wu/tmux-status-bar\nrun ~/.config/tmux/plugins/tpm/tpm\n```\n\n### [CPAN](https://metacpan.org/dist/Term::Tmux::StatusBar)\n\n```sh\ncpan tmux-status-bar\n```\n\n```tmux\nrun-shell tmux-status-bar\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFreed-Wu%2Ftmux-status-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFreed-Wu%2Ftmux-status-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFreed-Wu%2Ftmux-status-bar/lists"}