Tweaked weather script to add better icon support and location caching
parent
83eb0d8537
commit
5bb4143b68
@ -0,0 +1,66 @@
|
||||
package main
|
||||
|
||||
var USStates = map[string]string{
|
||||
"New Jersey": "NJ",
|
||||
"Ohio": "OH",
|
||||
"Pennsylvania": "PA",
|
||||
"Vermont": "VT",
|
||||
"Georgia": "GA",
|
||||
"Hawaii": "HI",
|
||||
"New Hampshire": "NH",
|
||||
"Utah": "UT",
|
||||
"Oklahoma": "OK",
|
||||
"South Carolina": "SC",
|
||||
"South Dakota": "SD",
|
||||
"Illinois": "IL",
|
||||
"New York": "NY",
|
||||
"Armed Forces Europe": "AE",
|
||||
"Armed Forces Pacific": "AP",
|
||||
"Connecticut": "CT",
|
||||
"Kansas": "KS",
|
||||
"Wisconsin": "WI",
|
||||
"Tennessee": "TN",
|
||||
"Palau": "PW",
|
||||
"California": "CA",
|
||||
"Louisiana": "LA",
|
||||
"Michigan": "MI",
|
||||
"Rhode Island": "RI",
|
||||
"Armed Forces Americas": "AA",
|
||||
"Alabama": "AL",
|
||||
"Arizona": "AZ",
|
||||
"North Dakota": "ND",
|
||||
"Colorado": "CO",
|
||||
"Guam": "GU",
|
||||
"Virgin Islands": "VI",
|
||||
"Alaska": "AK",
|
||||
"Indiana": "IN",
|
||||
"Iowa": "IA",
|
||||
"District of Columbia": "DC",
|
||||
"Marshall Islands": "MH",
|
||||
"Puerto Rico": "PR",
|
||||
"Montana": "MT",
|
||||
"New Mexico": "NM",
|
||||
"North Carolina": "NC",
|
||||
"Arkansas": "AR",
|
||||
"Maryland": "MD",
|
||||
"Massachusetts": "MA",
|
||||
"Delaware": "DE",
|
||||
"Maine": "ME",
|
||||
"Northern Mariana Islands": "MP",
|
||||
"West Virginia": "WV",
|
||||
"Idaho": "ID",
|
||||
"Mississippi": "MS",
|
||||
"Washington": "WA",
|
||||
"Nevada": "NV",
|
||||
"Oregon": "OR",
|
||||
"Virginia": "VA",
|
||||
"Wyoming": "WY",
|
||||
"Federated States of Micronesia": "FM",
|
||||
"Kentucky": "KY",
|
||||
"Minnesota": "MN",
|
||||
"Nebraska": "NE",
|
||||
"American Samoa": "AS",
|
||||
"Florida": "FL",
|
||||
"Missouri": "MO",
|
||||
"Texas": "TX",
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# sets enviroment variables on login
|
||||
CURRENT_LOCATION=$(curl --silent http://ip-api.com/csv)
|
||||
CITY=$(echo "$CURRENT_LOCATION" | cut -d , -f 6)
|
||||
LAT=$(echo "$CURRENT_LOCATION" | cut -d , -f 8)
|
||||
LON=$(echo "$CURRENT_LOCATION" | cut -d , -f 9)
|
||||
|
||||
export LAT LON CITY
|
||||
|
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
# prints all symbols that can be used to test output with font
|
||||
echo -e '\ue30d Clear (Day)'
|
||||
echo -e '\ue32b Clear (Night)'
|
||||
echo -e '\ue302 Partly Cloud (Day)'
|
||||
echo -e '\ue379 Partly Cloudy (Night)'
|
||||
echo -e '\ue312 Cloud'
|
||||
echo -e '\ue318 Rain'
|
||||
echo -e '\ue31d Thunderstorm'
|
||||
echo -e '\ue31a Snow'
|
||||
echo -e '\ue313 Fog'
|
Binary file not shown.
Loading…
Reference in New Issue