Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fubarhouse/mycorona
A tiny Polybar extension to show local data for coronavirus statistics
https://github.com/fubarhouse/mycorona
Last synced: 5 days ago
JSON representation
A tiny Polybar extension to show local data for coronavirus statistics
- Host: GitHub
- URL: https://github.com/fubarhouse/mycorona
- Owner: fubarhouse
- License: mit
- Created: 2020-04-13T13:05:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-15T05:32:13.000Z (over 4 years ago)
- Last Synced: 2023-08-06T11:42:58.944Z (over 1 year ago)
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polybar: Corona Stats
Polybar information script/tool that will show you local statistics from the global datasets (updated once daily at UTC 00:00)
## Installation
For convenience, you can either use `mkpkg` for Arch-based linux distributions or you can build from source. Makepkg will also compile from source, but it is an alternative go using the go toolchain.
### Method 1: `makepkg`
1. `makepkg -i`
### Method 2: from source
2. `go build -o /usr/bin/mycorona .` or `go install .`
## Flags
```
$ mycorona -h
-a Show 'active' data.
-c Show 'confirmed' data.
-d Show 'dead' data.
-g Show global location data
-l string
Specify the primary location
-o string
Specify the secondary/alternative location
-r Show 'recovered' data.
```## Polybar Configuration
Make sure the command, `` icons and hexadecimal below are changed to your liking.
### Module configuration
```
[module/coronavirus-stats-active]
type = custom/script
label = %output%
exec = /path/to/mycorona -l "Location String" -o "Alternative Location String" -a -g
interval = 3600
format-underline = #3333FF[module/coronavirus-stats-confirmed]
type = custom/script
label = %output%
exec = /path/to/mycorona -l "Location String" -o "Alternative Location String" -c
interval = 3600
format-underline = #3333FF[module/coronavirus-stats-dead]
type = custom/script
label = %output%
exec = /path/to/mycorona -l "Location String" -d
interval = 3600
format-underline = #FF3333[module/coronavirus-stats-recovered]
type = custom/script
label = %output%
exec = /path/to/mycorona -l "Location String" -r
interval = 3600
format-underline = #33FF33
```### Extras
An extra button I have which simply points to common locations where data can be found. It uses a red biohazard icon, but you can change this up to meet your needs/taste.
```
[module/coronavirus]
type = custom/text
content =
content-padding = 1
content-foreground = #FF3333
content-underline = #FF3333
; change the URL's below to your taste
click-left = /usr/bin/firefox https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6
click-right = /usr/bin/firefox https://www.covid19.act.gov.au
```### Coronavirus Bar
Optionally, you could create a dedicated polybar like I have. In your launch script, just the following:
```
polybar -r coronavirus &
```The bar configuration (including the extra) button described under [extras](#Extras):
```
[bar/coronavirus]
width = 100%
height = 40
radius = 6.0
fixed-center = false
bottom = truebackground = ${colors.background}
foreground = ${colors.foreground}line-size = 5
line-color = #f00
module-margin-left = 1
module-margin-right = 1border-size = 4
border-color = #000000font-0 = Fira\ Code:style=Bold
font-1 = FontAwesome:style=Regular
font-2 = GLYPHICONS\ Basic\ Set:style=Regularmodules-center = coronavirus coronavirus-stats-confirmed coronavirus-stats-recovered coronavirus-stats-active coronavirus-stats-dead
cursor-click = pointer
cursor-scroll = ns-resize
```