Age | Commit message (Collapse) | Author |
|
Provide an option the user can specify any number of times to add to the
additionalFonts config field.
|
|
|
|
|
|
|
|
|
|
With this change, xmobar should respect the data which it gets. Xmobar
should just render the data instead of trying to encode it.
|
|
spotifyd is funky that way
|
|
|
|
Both functions had a default parameter for use in some error cases. Now each accepts only one parameter (a
PerChannel), and return Nothing on an error.
The definition of 'channel' confused me, so I simplified it. Hopefully it's now
more clear that it just applies 'toInteger' to the 'IO (Maybe
CLong)' that 'channel'' returns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColorInfo contains background offsets, it is no longer only about colors
TextRenderInfo can hold information such as color, offsets, etc
|
|
Implemented only for XFT fonts.
Adds a new "part" in the fc tag.
> Example: <fc=white,gray:0>foo bar</fc> will make the font background
as tall as the bar (absolute offset, here set to 0 for both top &
bottom)
Changes ColorString to ColorInfo, containing both top and bottom
offsets. The "colors string" is still in only one string.
|
|
|
|
By checking full paths, instead of just dirs (option 1).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As documented in the http-client library, calling newManager is an
expensive operation:
```
Creating a new Manager is a relatively expensive operation, you are
advised to share a single Manager between requests instead.
```
But inspite of the haddocks in xmobar claiming that once 'Manager' is
created, it will be used throughout the monitor is not true. Because for
every call of `startWeather` a new manager is being created.
Also I removed the option in WeatherOpts because even if it is false,
it will be ultimately created in `getData` function. Also without
using a manager - the plugin won't really work. So, I don't think
there is any reason for this option to exist.
I have introduced a new dependency http-client-tls to use the shared
global manager so that we reuse the same manager every time. This
simplifies a lot of code. Note that this is not really a new
dependency because http-conduit already depends on it transitively.
|
|
We avoid calling getTimeZone for each of the time the date has to be
updated. Instead, it's computed once at the start and re-used for each
invocation.
Looking at the implementation of 'getTimeZone', we can see that it's
very expensive:
https://www.stackage.org/haddock/lts-15.15/time-1.9.3/src/Data-Time-LocalTime-Internal-TimeZone.html#getTimeZone
It calls a C FFI each time to get the time
zone (getTimeZoneCTime). This is something which we can avoid and the
MR implements that.
I have been using my xmobar with this patch and the result has been
quite good. My xmobar CPU usage has used to hit 3~7%
intermittently. With this MR, It hits only 0.7% intermittently which
is nice. :-)
|
|
|
|
Fixes https://github.com/jaor/xmobar/issues/442
|
|
|
|
|
|
|
|
Right now, with the `StdinReader` plugin enabled - you can crash/cause
busy looping of xmobar if the following html file is opened:
```
<html>
<head>
<title>hello <fn=1>string</fn> </title>
</head>
</html>
```
More details about this bug is here:
https://github.com/jaor/xmobar/issues/442#issuecomment-625706001
This MR also fixes another bug which produces a crash in xmobar if you
pass non integer items between fn:
<fn=crash>
|
|
|
|
|
|
|
|
This specifically avoids situation described in this issue
https://github.com/jaor/xmobar/issues/438 where the handle was
throwing the IOException continously in a loop:
<stdin>: hGetLine: invalid argument (invalid byte sequence)
It happened because my system's environment was right, but the proper
behaviour hear would be to let it to throw the exception rather than
leading to a busy loop.
I did some git blame to find out that this commit introduced the
behaviour:
https://github.com/jaor/xmobar/commit/fc24dc1874dcf7c9e66e21502a58b40cbe627c85
but there was no reason mentioned in the commit for trying to capture
all exceptions.
|
|
|
|
hGetLineSafe is always hGetLine and hence we can directly use it.
|