App-rainbarf

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    --[no]tmux

      Force tmux colors mode. By default, rainbarf detects automatically if
      it is being called from tmux or from the interactive shell.

    --screen

      screen(1)
      <http://manpages.ubuntu.com/manpages/hardy/man1/screen.1.html> colors
      mode. Experimental. See "CAVEAT".

    --width NUMBER

      Chart width. Default is 38, so both the chart and the battery
      indicator fit the tmux status line. Higher values may require
      disabling the battery indicator or raising the status-right-length
      value in ~/.tmux.conf.

    --datfile FILENAME

      Specify the file to log CPU stats to. Default: $HOME/.rainbarf.dat

    --skip NUMBER

      Do not write CPU stats if file already exists and is newer than this
      many seconds. Useful if you refresh tmux status quite frequently.

CAVEAT

 Time remaining

    If the --remaining option is present but you do not see the time in
    your status bar, you may need to increase the value of
    status-right-length to 48.

 Color scheme

    If you only see the memory usage bars but no CPU utilization chart,
    that's because your terminal's color scheme need an explicit
    distinction between foreground and background colors. For instance,
    "red on red background" will be displayed as a red block on such
    terminals. Thus, you may need the ANSI bright attribute for greater
    contrast, or maybe consider switching to the 256-color palette. There
    are some issues with that, though:

      1. Other color schemes (notably, solarized
      <http://ethanschoonover.com/solarized>) have different meaning for
      the ANSI bright attribute. So using it will result in a quite
      psychedelic appearance. 256-color pallette, activated by the --rgb
      flag, is unaffected by that.

      2. The older versions of Term::ANSIColor dependency do not recognize
      bright/RGB settings, falling back to the default behavior (plain 16
      colors). However, the whole Term::ANSIColor is optional, it is only
      required to preview the effects of the "OPTIONS" via command line
      before actually editing the ~/.tmux.conf. That is, rainbarf --bright
      --tmux is guaranteed to work despite the outdated Term::ANSIColor!

    Another option is skipping the system colors altogether and use the RGB
    palette (rainbarf --rgb). This fixes the issue 1, but doesn't affect
    the issue 2. It still looks better, though.

 Persistent storage

    CPU utilization stats are persistently stored in the ~/.rainbarf.dat
    file. Every rainbarf execution will update and rotate that file. Since
    tmux calls rainbarf periodically (every 15 seconds, by default), the
    chart will display CPU utilization for the last ~9.5 minutes (15 * 38).
    Thus, several tmux instances running simultaneously for the same user
    will result in a faster chart scrolling.

 screen

    Stable screen version unfortunately has a broken UTF-8 handling
    specifically for the status bar. Thus, I have only tested the rainbarf
    with the variant from git://git.savannah.gnu.org/screen.git. My
    ~/.screenrc contents:

     backtick 1 15 15 rainbarf --bright --screen
     hardstatus string "%1`"
     hardstatus lastline

REFERENCES

      * top(1)
      <http://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/top.1.html>
      is used to get the CPU/RAM stats if no /proc filesystem is available.

      * ioreg(8)
      <http://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/ioreg.8.html>
      is used to get the battery status on Mac OS X.

      * ACPI <http://www.tldp.org/howto/acpi-howto/usingacpi.html> is used
      to get the battery status on Linux.

      * Battery <https://github.com/Goles/Battery> was a source of
      inspiration.

      * Spark <http://zachholman.com/spark/> was another source of
      inspiration.

AUTHOR

    Stanislaw Pusep <stas@sysd.org>

CONTRIBUTORS

      * Chris Knadler <https://github.com/cknadler>

      * cinaeco <https://github.com/cinaeco>

      * Clemens Hammacher <https://github.com/hammacher>

      * H.Merijn Brand <https://github.com/Tux>

      * Henrik Hodne <https://github.com/henrikhodne>

      * Joe Hassick <https://github.com/jh3>

      * Josh Matthews <https://github.com/jmatth>



( run in 1.813 second using v1.01-cache-2.11-cpan-0d23b851a93 )