diff options
-rw-r--r-- | src/TopC.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/TopC.hs b/src/TopC.hs index 46d45bc..894fd98 100644 --- a/src/TopC.hs +++ b/src/TopC.hs @@ -45,8 +45,9 @@ music = concatMonitor " " (fni "\xf1bc")) -- "https://wttr.in?format=" ++ fnn 3 "%c" ++ "+%t+%C+%w++" ++ fnn 1 "%m" -wttrURL = "https://wttr.in?format=" ++ fnn 2 "+%c+" ++ "+%t+%C+" ++ fn 5 "%w" - where fnn n x = urlEncode ("<fn=" ++ show n ++ ">") ++ x ++ urlEncode "</fn>" +wttrURL l = "https://wttr.in/" ++ l ++ "?format=" ++ fmt + where fmt = fnn 2 "+%c+" ++ "+%t+%C+" ++ fn 5 "%w" + fnn n x = urlEncode ("<fn=" ++ show n ++ ">") ++ x ++ urlEncode "</fn>" encode c | c == ' ' = "+" | Char.isAlphaNum c || c `elem` "-._~" = [c] @@ -80,7 +81,7 @@ config p = (baseConfig p) { , Run laTime , Run localTime -- , Run w -- LEGE, LEBL, KCV0 - , Run (ComX "curl" [wttrURL] "" "wttr" 18000) + , Run (ComX "curl" [wttrURL "Edinburgh"] "" "wttr" 18000) ] , template = " " ++ "|batt0| " |