Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ping.10s.sh with color themes and refresh #307

Merged
merged 2 commits into from
Mar 17, 2016

Conversation

vogonistic
Copy link
Contributor

  • Added a few color themes, including for color blind people
  • Added header documentation so it'll look more interesting
  • Added preview image
  • Added FONT and MENUFONT settings to make tweaks easier
  • Added Refresh button
  • Changed how color is applied, so it can be applied on all rows

@vogonistic
Copy link
Contributor Author

@thealmightygrant: What are your thoughts?

@tresni
Copy link
Collaborator

tresni commented Mar 17, 2016

@vogonistic / @thealmightygrant - Please address the the following linter issues (for the themes I would use # shellcheck disable=2034 before those lines)

Projects/bitbar-plugins ●» ./.test.py Network/ping.10s.sh                                                                                                                                                                                                                                                                                                        « [master]

In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 19:
PURPLE_GREEN_THEME=("#762a83" "#9970ab" "#c2a5cf" "#a6dba0" "#5aae61" "#1b7837")
^-- SC2034: PURPLE_GREEN_THEME appears unused. Verify it or export it.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 21:
ORIGINAL_THEME=("#acacac" "#ff0101" "#cc673b" "#ce8458" "#6bbb15" "#0ed812")
^-- SC2034: ORIGINAL_THEME appears unused. Verify it or export it.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 45:
    SITE_INDEX=$(( $SITE_INDEX + 1 ))
                   ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 52:
    AVG=$(( ($AVG + ${PING_TIMES[$SITE_INDEX]}) ))
             ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 53:
    SITE_INDEX=$(( $SITE_INDEX + 1 ))
                   ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 55:
AVG=$(( $AVG / ${#SITES[@]} ))
        ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 61:
    AVG_DEVS=$(( $AVG_DEVS + (${PING_TIMES[$SITE_INDEX]} - $AVG)**2 ))
                 ^-- SC2004: $/${} is unnecessary on arithmetic variables.
                                                           ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 62:
    SITE_INDEX=$(( $SITE_INDEX + 1 ))
                   ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 64:
AVG_DEVS=$(( $AVG_DEVS / ${#SITES[@]} ))
             ^-- SC2004: $/${} is unnecessary on arithmetic variables.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 74:
  if [ $1 -ge $MAX_PING ]; then
       ^-- SC2086: Double quote to prevent globbing and word splitting.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 76:
  elif [ $1 -ge 600 ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 78:
  elif [ $1 -ge 300 ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 80:
  elif [ $1 -ge 100 ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 82:
  elif [ $1 -ge 50 ]; then
         ^-- SC2086: Double quote to prevent globbing and word splitting.


In /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh line 101:
    SITE_INDEX=$(( $SITE_INDEX + 1 ))
                   ^-- SC2004: $/${} is unnecessary on arithmetic variables.

ERR! /Volumes/Home/bhartvigsen/Documents/Projects/bitbar-plugins/Network/ping.10s.sh failed linting, see above errors

ERR! failed with 1 errors

- Added a few color themes, including for color blind people
- Added header documentation so it'll look more interesting
- Added preview image
- Added FONT and MENUFONT settings to make tweaks easier
- Added Refresh button
- Changed how color is applied, so it can be applied on all rows
@vogonistic
Copy link
Contributor Author

Should now lint cleanly

tresni added a commit that referenced this pull request Mar 17, 2016
Updated ping.10s.sh with color themes and refresh
@tresni tresni merged commit 5d0491a into matryer:master Mar 17, 2016
@vogonistic vogonistic deleted the update-ping branch March 17, 2016 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants