Added metadata for bitbar
This commit is contained in:
parent
01f6b58c4d
commit
21f99d3c03
1 changed files with 11 additions and 5 deletions
14
ping.1m+.py
14
ping.1m+.py
|
@ -2,6 +2,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Simulates httping for `argos <https://github.com/p-e-w/argos>`"""
|
||||
# <bitbar.title>httping</bitbar.title>
|
||||
# <bitbar.version>v1.0</bitbar.version>
|
||||
# <bitbar.author>Tobias Schmidl</bitbar.author>
|
||||
# <bitbar.author.github>schtobia</bitbar.author.github>
|
||||
# <bitbar.desc>Short description of what your plugin does.</bitbar.desc>
|
||||
# <bitbar.image></bitbar.image>
|
||||
# <bitbar.dependencies>python,requests</bitbar.dependencies>
|
||||
# <bitbar.abouturl>https://github.com/schtobia/argos-httping/blob/master/ping.1m+.py</bitbar.abouturl>
|
||||
|
||||
import sys #for redirecting print to stderr
|
||||
import datetime #for the whole ms → s and vice versa stuff
|
||||
|
@ -14,19 +22,17 @@ __license__ = "MIT"
|
|||
__version__ = "0.0.1"
|
||||
__maintainer__ = "Tobias Schmidl"
|
||||
|
||||
# in seconds
|
||||
max_ping = datetime.timedelta(milliseconds = 1000)
|
||||
max_ping = datetime.timedelta(milliseconds = 1000) # in seconds
|
||||
targets = ["https://www.google.de", "https://www.bing.com", "https://www.wikipedia.org"]
|
||||
|
||||
max_ping_in_ms = max_ping.total_seconds() * 1000
|
||||
|
||||
class Themes:
|
||||
# Themes are from http://colorbrewer2.org/
|
||||
purple_green = ["#762a83", "#9970ab","#c2a5cf","#a6dba0","#5aae61","#1b7837"]
|
||||
red_green = ["#d73027", "#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"]
|
||||
# shellcheck disable=SC2034
|
||||
original = ["#acacac","#ff0101","#cc673b","#ce8458","#6bbb15","#0ed812"]
|
||||
|
||||
# Configuration
|
||||
selected_colors = red_green
|
||||
|
||||
def colorize(response_time):
|
||||
|
|
Loading…
Reference in a new issue