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