Skip to content

pieman72/dash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dash

dash is a command-line dashboard for the bash shell. It can display local weather, an email inbox synopsis, system stats, and other data streams, each in individual panes in the terminal. The size and number of panes adjusts automatically to fit the content requested and the available terminal screen space. This works really well with terminal servers like tmux and Screen.

Compatibility

I test dash only on Ubuntu 14.04 Trusty. Though dash is written in pretty generic bash script, I make no claims of compatibility on other systems :-) . A few 'not-totally-standard' packages (e.g. curl) are needed for some panes. To what extent I know about them, I list them in the help sections for each pane. If you discover any overlooked dependencies, please post an issue. dash is really only meant for use with the bash shell, however with a few modifications, it can probably be adapted for use with other shells. If this is of interest to you, feel free to leave an issue, or by all means, a pull request!

Installation

This repository only has two code files. The executable dash script, and the configuration (.ini) file. After downloading these files, he script can be placed anywhere, but the config file should go in your home directory (much like a .bashrc file would). Next, read the following section on configuration (in case the default dash settings do not match your needs) then create a useful shortcut to the dash script:

`$ alias bash-dash=/your/path/to/dash`

In the example above, I created a shortcut called bash-dash, but you can call it whatever you like.

Configuration

dash has a number of configurable settings, which can be set in the config file dash.ini. They are separated into global, display, and specific settings, and are outlined below:

General settings These control the overall behavior of the dash script:

  • DBG ([bit]) - This is a debugging flag. You probably don't want to use it.
  • REFRESH_RATE_SECONDS ([int]) - The default number of seconds between pane refreshes. Refreshes are also triggered anytime the screen is resized. Note that refreshes are somewhat intelligent. Each pane has an individual minimum time between data fetches, and also checks the current screen size. During a refresh, panes with current data will not fetch new data, and if the screen size has not changed, they will reuse their old rendering.
  • SECTION_MIN_COLS ([int]) - The minimum number of characters-wide a pane needs to be.
  • SECTION_MIN_ROWS ([int]) - The minimum number of characters-tall a pane needs to be.

Display settings These change the way dash renders content, based on your system's available settings:

  • DISPLAY_ENCODING (UTF8|ASCII) - If UTF-8 encoding is used, output will display fancy line-drawing and other characters (like │, ─, ┼, and ❄), otherwise somewhat ugly ASCII substitutes will be used (like |, -, +, and *).
  • DISPLAY_COLOR_PALETTE (256|16|8|1) - The number of terminal colors available for your display output. Most terminals support at least 16, or have an option to enable 256. Only go monochrome if you really have to...
  • DISPLAY_SEPARATOR_V ([char]) - Character to use for vertical pane separations
  • DISPLAY_SEPARATOR_H ([char]) - Character to use for horizontal pane separations
  • DISPLAY_SEPARATOR_C ([char]) - Character to use for pane separation intersections
  • DISPLAY_SEPARATOR_CA ([char]) - Character to use for pane separation intersections with no lower pane (won't occur until 7 panes?)

Specific settings These settings are specific to individual panes Email

  • EMAIL_SECONDS_PER_POLL ([int]) - The number of seconds data is considered to be "fresh". A larger number may mean fewer distractions :-)
  • EMAIL_SOURCE (Gmail) - Currently only Gmail is supported, but I intend to add other mail sources eventually. If you use Gmail, you will need to enable access. Weather
  • WEATHER_SECONDS_PER_POLL ([int]) - The number of seconds data is considered to be "fresh". Weather.gov data updates only once an hour, and is subject to a request limit, so it's advisable to make this number no smaller than 30 minutes (1800 seconds).
  • WEATHER_NOAA_STATION_CODE ([string]) - This is your ICAO code, and is used to search the weather API. ICAO codes in the USA start with 'K' followed by the value from the "CALL-ID" column in this list (e.g. central park, New York City gets "KNYC").
  • WEATHER_TEMPERATURE_UNITS (F|C) - Get weather temperature readout in degrees Fahrenheit or Celsius. System Stats
  • STATS_SECONDS_PER_POLL ([int]) - The number of seconds data is considered to be "fresh". It's generally safe to keep this pretty low.
  • STATS_TEMPERATURE_UNITS (F|C) - Get core temperature readout in degrees Fahrenheit or Celsius.

About

A dashboard for bash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages