diff options
| author | Josh Rahm <rahm@google.com> | 2021-11-05 16:23:46 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 41fea501b325bd25588e7ccd5c20bf46fdd9b916 (patch) | |
| tree | bfc390bfadb80009eda845d2ce5d459aeedb1555 /extras | |
| parent | 0b8d6be9e33d643ddfdca6d4b5560259f4a881b8 (diff) | |
| download | rde-41fea501b325bd25588e7ccd5c20bf46fdd9b916.tar.gz rde-41fea501b325bd25588e7ccd5c20bf46fdd9b916.tar.bz2 rde-41fea501b325bd25588e7ccd5c20bf46fdd9b916.zip | |
Fix more things with the weather.
Diffstat (limited to 'extras')
| -rw-r--r-- | extras/HOME/.config/compton.conf | 4 | ||||
| -rw-r--r-- | extras/HOME/.xmobarrc | 7 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-weather | 35 |
3 files changed, 31 insertions, 15 deletions
diff --git a/extras/HOME/.config/compton.conf b/extras/HOME/.config/compton.conf index 828d949..c669100 100644 --- a/extras/HOME/.config/compton.conf +++ b/extras/HOME/.config/compton.conf @@ -13,8 +13,8 @@ shadow-red = 0.0; shadow-green = 0.0; shadow-blue = 0.0; -inactive-dim=0.1 -inactive-opacity=0.99 +inactive-dim=0.2 +inactive-opacity=0.98 shadow-exclude = [ # From the Ubuntu forums link ('screaminj3sus') diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 90141e7..e2a3e9f 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -1,12 +1,13 @@ Config - { font = "xft:Monofur Nerd Font:size=15" + { font = "xft:Monofur Nerd Font:size=12" , additionalFonts = [ "xft:Monofur bold Nerd Font:style=bold:size=12", "xft:Monofur Nerd Font:size=9", "xft:Monofur Nerd Font:size=9", "xft:Monofur Nerd Font:size=6", "xft:Monofur bold Nerd Font:size=15", - "xft:Monofur Nerd Font:style=bold:size=10" + "xft:Monofur Nerd Font:style=bold:size=10", + "xft:Noto Sans Mono CJK JP:style=bold:size=10" ] , borderColor = "black" , border = FullBM -1 @@ -14,7 +15,7 @@ Config , bgColor = "#000000" , fgColor = "white" , alpha = 220 -- default: 255 - , position = TopSize L 100 40 + , position = TopSize L 100 50 , textOffset = -1 -- default: -1 , iconOffset = -1 -- default: -1 , lowerOnStart = True diff --git a/extras/HOME/.xmonad/xmobar-weather b/extras/HOME/.xmonad/xmobar-weather index bf84870..d9dc88b 100755 --- a/extras/HOME/.xmonad/xmobar-weather +++ b/extras/HOME/.xmonad/xmobar-weather @@ -4,8 +4,15 @@ use LWP::Simple; use Time::Local; use POSIX; +$content = get("https://ipinfo.io"); + +die "Unable to get IP info" unless defined $content; + +($city, $lat, $lon) = + ($content =~ m/.*"city":\s+"([^"]+)".*"loc":\s+"(-?[0-9.]+),(-?[0-9.]+).*"/ims); + $content = get( - "https://api.sunrise-sunset.org/json?lat=40.1672117&lng=-105.1019286&formatted=0"); + "https://api.sunrise-sunset.org/json?lat=$lat&lng=$lon&formatted=0"); die "Unable to get sunrise/sunset data" unless defined $content; @@ -40,14 +47,22 @@ if ($current_str gt $sunrise_str and $current_str lt $sunset_str) { } %directions = ( - NE => "↙", - SE => "↖", - NW => "↘", - SW => "↗", - N => "↓", - S => "↑", - W => "→", - E => "←" ); + NE => "", + NNE => "", + ENE => "", + SE => "", + SSE => "", + ESE => "", + NW => "", + NNW => "", + WNW => "", + SW => "", + SSW => "", + WSW => "", + N => "", + S => "", + W => "", + E => "" ); $dir=%directions{$wind_direction}; @@ -83,4 +98,4 @@ if ($is_day) { $conditions = %conditions_night{$sky_conditions}; } -printf("<fc=#a0a0a0>$dir <fn=3>${wind_speed}mph</fn></fc> $conditions</fc><fn=3> <fc=#a0a0a0>%.0f°F</fc></fn>\n", $temp); +printf("<fc=#a0a0a0><fn=3>$city</fn> <fn=3>$dir</fn> <fn=3>${wind_speed}</fn></fc> $conditions</fc><fn=3> <fc=#a0a0a0>%.0f°F</fc></fn>\n", $temp); |