Created
October 25, 2016 21:41
-
-
Save fritschy/f6fddf109f1df8dbc0639aafa9a5328e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| c=$1 | |
| max=$2 | |
| title="" | |
| set -eu | |
| [ "$c" = "" ] && exit 1 | |
| [ "$max" = "" ] && max=100 || { shift 2; title="$@ "; } | |
| [ $c -lt 1 ] && c=1 | |
| [ $c -gt $max ] && c=$max | |
| bar() { | |
| echo -n "$title" | |
| for i in $(seq 1 $c) | |
| do | |
| echo -n "|" | |
| done | |
| for i in $(seq $(expr $c + 1) $max) | |
| do | |
| echo -n "-" | |
| done | |
| echo " ($(printf '%3d' $c)%)" | |
| } | |
| bar | aosd_cat \ | |
| --fade-in=0 \ | |
| --fade-full=200 \ | |
| --fade-out=0 \ | |
| --back-opacity=255 \ | |
| --back-color=grey40 \ | |
| --fore-color='#00ff00' \ | |
| --position=4 \ | |
| --font="Consolas 24" & | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment