Giter VIP home page Giter VIP logo

gauge's Introduction

GAUGE for TUI

Usage:

$ gauge [<type=float>] <value=0> [<scale=100>]
$ gauge-<type> <value=0> [<scale=100>]

Type: float (% of <scale>)

Maps value to a float percentage value in range 0..<scale>, where <scale> is 100%.

$ gauge 1000 4000
25.00%
$ gauge float 1000 4000
25.00%
$ gauge-float 1000 4000
25.00%

Type: battery (% in range 0..100 in 5 steps)

$ eq 0 24 99 | xargs -n1 gauge battery
0% 
24% 
48% 
72% 
96% 

Type: temp (% in range 0..100 in 5 steps)

$ seq 0 24 99 | xargs -n1 gauge temp
0% 
24% 
48% 
72% 
96% 

Type: domino (% in range -10..0..10)

Maps value to a value in range 0..10 with domino glyph:

+n glyph -n
0 .. 9 [ 0 : 0 ] -0 .. -9
10 .. 19 [ 1 : 0 ] | [ 0 : 1 ] -10 .. -19
20 .. 29 [ 2 : 0 ] | [ 0 : 2 ] -20 .. -29
30 .. 39 [ 3 : 0 ] | [ 0 : 3 ] -30 .. -39
40 .. 49 [ 4 : 0 ] | [ 0 : 4 ] -40 .. -49
50 .. 59 [ 5 : 0 ] | [ 0 : 5 ] -50 .. -59
60 .. 69 [ 6 : 0 ] | [ 0 : 6 ] -60 .. -69
70 .. 79 [ 6 : 1 ] | [ 1 : 6 ] -70 .. -79
80 .. 89 [ 6 : 2 ] | [ 2 : 6 ] -80 .. -89
90 .. 99 [ 6 : 3 ] | [ 3 : 6 ] -90 .. -99
100 .. 109 [ 6 : 4 ] | [ 4 : 6 ] -100 .. -109
$ gauge domino 50
$ 🁔
$ gauge-domino -50
$ 🀶

Each domino glyph represents a 10% range:

$ seq 109 -5 -109 | xargs -I{} sh -c 'echo -n "gauge-domino {}: "; ./gauge-domino {}' | column -t
gauge-domino  109:   🁓
gauge-domino  104:   🁓
gauge-domino  99:    🁌
gauge-domino  94:    🁌
gauge-domino  89:    🁅
gauge-domino  84:    🁅
gauge-domino  79:    🀾
gauge-domino  74:    🀾
gauge-domino  69:    🀷
gauge-domino  64:    🀷
gauge-domino  59:    🀶
gauge-domino  54:    🀶
gauge-domino  49:    🀵
gauge-domino  44:    🀵
gauge-domino  39:    🀴
gauge-domino  34:    🀴
gauge-domino  29:    🀳
gauge-domino  24:    🀳
gauge-domino  19:    🀲
gauge-domino  14:    🀲
gauge-domino  9:     🀱
gauge-domino  4:     🀱
gauge-domino  -1:    🀱
gauge-domino  -6:    🀱
gauge-domino  -11:   🀸
gauge-domino  -16:   🀸
gauge-domino  -21:   🀿
gauge-domino  -26:   🀿
gauge-domino  -31:   🁆
gauge-domino  -36:   🁆
gauge-domino  -41:   🁍
gauge-domino  -46:   🁍
gauge-domino  -51:   🁔
gauge-domino  -56:   🁔
gauge-domino  -61:   🁛
gauge-domino  -66:   🁛
gauge-domino  -71:   🁜
gauge-domino  -76:   🁜
gauge-domino  -81:   🁝
gauge-domino  -86:   🁝
gauge-domino  -91:   🁞
gauge-domino  -96:   🁞
gauge-domino  -101:  🁟
gauge-domino  -106:  🁟

gauge's People

Contributors

dberstein avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.