Skip to content

Instantly share code, notes, and snippets.

@robatron
Last active January 10, 2016 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robatron/45a568b359f32ef028c1 to your computer and use it in GitHub Desktop.
Save robatron/45a568b359f32ef028c1 to your computer and use it in GitHub Desktop.
Terminal dashboarding tricks

Terminal Dashboard Notes

A few notes for creating a terminal-based dashboard

Example

function _dash_init () {
    tput civis
}

function dash_clock () {
    _dash_init
    while true; do 
        tput clear
        date +"%b %d %n%H : %M : %S" | figlet -f small
        sleep 1
    done
}

function dash_weather () {
    _dash_init
    while true; do 
        tput clear
        wego Seattle 1
        sleep 900 # 15 minutes
    done

Reference

Wigets

Dictionary

Datetime Clock

while true; do tput clear; date +"%b %d %n%H : %M : %S" | figlet -f small; sleep 1; done

Weather

while true; do tput clear; wego Seattle 1; sleep 900; done

Utility

Cursor

tput civis # Make invisible
tput cnorm # Make normal

Screen lock

  • xtrlock - Lock without hiding the screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment