tmux-battery | play battery percentage and icon indicator | Command Line Interface library

 by   tmux-plugins Shell Version: v1.3.0 License: MIT

kandi X-RAY | tmux-battery Summary

kandi X-RAY | tmux-battery Summary

tmux-battery is a Shell library typically used in Utilities, Command Line Interface applications. tmux-battery has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Enables displaying battery percentage and status icon in tmux status-right.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tmux-battery has a low active ecosystem.
              It has 422 star(s) with 80 fork(s). There are 5 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 9 open issues and 37 have been closed. On average issues are closed in 107 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of tmux-battery is v1.3.0

            kandi-Quality Quality

              tmux-battery has 0 bugs and 0 code smells.

            kandi-Security Security

              tmux-battery has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tmux-battery code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tmux-battery is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              tmux-battery releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tmux-battery
            Get all kandi verified functions for this library.

            tmux-battery Key Features

            No Key Features are available at this moment for tmux-battery.

            tmux-battery Examples and Code Snippets

            No Code Snippets are available at this moment for tmux-battery.

            Community Discussions

            Trending Discussions on tmux-battery

            QUESTION

            Tmux pad format string
            Asked 2021-Jan-14 at 18:53

            I want to pad a format string to a certain length. For example, the Tmux Battery plugin introduces the battery_percentage format string. I can use this in the status bar as #{battery_percentage}. The battery percentage values can be:

            1. Between 0% and 9% (One Digit).
            2. Between 11% and 99% (Two Digits).
            3. Exactly 100% (Three Digits).

            I want the format string to always be displayed 3 digits, padded with spaces at the end, how can I achieve that?

            I saw that there is the format #{pN:variable} in this page, but it did not work when I tried to use it with format strings, even though at the end they are variables. Maybe I just did not know how to use it, I don't know...

            ...

            ANSWER

            Answered 2021-Jan-14 at 18:53

            Looking at the plugin startup code, battery.tmux, you can see that ${battery_percentage} is actually converted to #($CURRENT_DIR/scripts/battery_percentage.sh), which is a request to run a script. I don't know if #{p3:#(...)} can be made to work since this is not a simple variable.

            You could always edit the plugin shell script to return the padded string (assuming tmux keeps the leading spaces).

            Source https://stackoverflow.com/questions/65708320

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tmux-battery

            In order to read the battery status, this plugin depends on having one of the following applications installed:. In a normal situation, one of the above should be installed on your system by default and thus it should not be necessary to specifically install one of them. That being said, the acpi utility is currently recommended for use over upower where possible due to ongoing CPU usage issues.
            pmset (MacOS only)
            acpi
            upower
            termux-battery-status
            apm
            Add plugin to the list of TPM plugins in .tmux.conf:. Hit <prefix> + I to fetch the plugin and source it. If format strings are added to status-right, they should now be visible.
            Add this line to the bottom of .tmux.conf:.

            Support

            * These format strings can be further customized via options as described below.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/tmux-plugins/tmux-battery.git

          • CLI

            gh repo clone tmux-plugins/tmux-battery

          • sshUrl

            git@github.com:tmux-plugins/tmux-battery.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Command Line Interface Libraries

            ohmyzsh

            by ohmyzsh

            terminal

            by microsoft

            thefuck

            by nvbn

            fzf

            by junegunn

            hyper

            by vercel

            Try Top Libraries by tmux-plugins

            tmux-resurrect

            by tmux-pluginsShell

            tpm

            by tmux-pluginsShell

            tmux-continuum

            by tmux-pluginsShell

            tmux-yank

            by tmux-pluginsShell

            tmux-sensible

            by tmux-pluginsShell