provide ability to show unicode "level" notification
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
byobu |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Currently, byoby provides a large number of canned status notifiers. It would be useful if we also provided a means to script notifiers that display certain types of notifier using unicode characters.
For example, any notifier that has the concept of a "level" (volume, disk percentage, wifi quality, load average, memory, swap, etc) could be enhanced to allow some nice graphical sugar by utilizing unicode characters.
Attached is a script I've written (ulevel.sh) that has the following usage:
Usage: ulevel.sh [options]
Options:
-c <num> : Current value of your indicator.
-h : Show this help.
-l : List available themes. If '-t' also specified,
show all values for specified theme.
-m <num> : Minimum value (default=0).
-n : Supress output of newline character.
-t <theme> : Name of theme.
-x <num> : Maximum value (default=100).
Examples:
# display character representing 27% from 'vbars_8' theme.
ulevel.sh -c 27 -t vbars_8
# display all glyphs in 'soli_numbers_a_10' theme
ulevel.sh -l -t solid_numbers_a_10
Notes:
- The final '_<number>' in a theme name denotes how many glyphs are
available in this theme.
Thus, notifiers like /usr/lib/
ulevel.sh -c $quality -t vbars_8
... to provide a nice vertical bar whose height represents the % signal strength ($quality).
Related branches
- Dustin Kirkland : Pending requested
-
Diff: 978 lines (+921/-2)7 files modifieddebian/changelog (+13/-0)
usr/lib/byobu/Makefile.am (+1/-1)
usr/lib/byobu/uclock (+173/-0)
usr/lib/byobu/ugraph (+212/-0)
usr/lib/byobu/ulevel (+481/-0)
usr/lib/byobu/wastebasket (+39/-0)
usr/lib/byobu/wifi_quality (+2/-1)
Removed an rogue theme and added dice_6. We now have:
./ulevel.sh -l|while read theme; do ./ulevel.sh -l -t $theme; done
Listing theme 'shades_4'
░ ▒ ▓ █
Listing theme 'fractions_4'
¼ ½ ¾ ¹
Listing theme 'binary_thin_4'
⠀ ⢀ ⢠ ⢰
Listing theme 'binary_thick_4'
⠀ ⣀ ⣤ ⣶ ⣿
Listing theme 'quadrants_4'
◔ ◑ ◕ ●
Listing theme 'circles_5'
◦ ○ ◎ ◉ ●
Listing theme 'dice_6'
⚀ ⚁ ⚂ ⚃ ⚄ ⚅
Listing theme 'vbars_8'
▁ ▂ ▃ ▄ ▅ ▆ ▇ █
Listing theme 'hbars_8'
▏ ▎ ▍ ▌ ▋ ▊ ▉ █
Listing theme 'solid_ numbers_ a_10'
➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓
Listing theme 'solid_ numbers_ b_10'
❶ ❷ ❸ ❹ ❺ ❻ ❼ ❽ ❾ ❿
Listing theme 'circle_number_10'
➀ ➁ ➂ ➃ ➄ ➅ ➆ ➇ ➈ ➉