summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-11-13Another image in readme.mdjao
2020-11-13Optimize Date plugin again (refresh timezone only once a minute)Tomas Janousek
This makes the Date plugin approximately twice as fast, and makes xmobar up to about 5–10 % faster if Date is the only active plugin. (If more expensive plugins like Network or MultiCpu are used, it doesn't make any measurable difference.) Micro-benchmark results on my HW: Date Benchmarks/Date mean 2.833 μs ( +- 16.08 ns ) Date Benchmarks/DateZonedTime mean 5.020 μs ( +- 32.91 ns ) Date Benchmarks/DateWithTimeZone mean 2.827 μs ( +- 20.52 ns ) (DateZonedTime is the original implementation and DateWithTimeZone is the implementation we had since 0.34 which never refreshes timezone.) Real-life measurements (done overnight on an idle laptop, with all measured xmobars running in parallel to ensure comparable conditions; xmobars configured to only display date and with rate 10 — once per second): $ time timeout 6h xmobar .xmobarrc-DateZonedTime real 360m0,010s user 0m9,867s sys 0m4,644s (9.867 + 4.644) / (360 * 60) = 0.000672 $ time timeout 6h xmobar .xmobarrc-Date real 360m0,008s user 0m9,535s sys 0m4,327s (9.535 + 4.327) / (360 * 60) = 0.000642 $ time timeout 6h xmobar .xmobarrc-Date-10m real 360m0,010s user 0m9,780s sys 0m4,215s (9.780 + 4.215) / (360 * 60) = 0.000648 $ time timeout 6h xmobar .xmobarrc-DateWithTimeZone real 360m0,006s user 0m9,658s sys 0m4,166s (9.658 + 4.166) / (360 * 60) = 0.000640 (.xmobarrc-Date-10m is the proposed implementation, but with timezone refresh every 10 minutes instead of every 1 minute) Interpretation of these results: * refreshing xmobar with just date takes around 650 μs * that is xmobar with just date uses around 0.065 % of CPU time * refreshing timezone takes additional cca 30 μs When we only refresh timezone once a minute, these 30 μs become 0.5 μs amortized, and that should be acceptable to even the most dedicated perfectionist :-) Fixes: a58e32f7c8af ("Revert "Optimize date plugin"") Fixes: 878db3908060 ("Optimize date plugin") Co-authored-by: Sibi Prabakaran <sibi@psibi.in>
2020-11-13bench: Clean up a bitTomas Janousek
2020-11-08Changelog entry for Revert "Optimize date plugin"Tomas Janousek
A missing bit from a58e32f7c8af7b03410ab6693019cfc92c9cfca3.
2020-11-02Revert "Optimize date plugin"ivanbrennan
This reverts commit 878db39080607ba476ba8d8f547ad28259efb6a9. That commit optimized the date plugin by avoiding calling getTimeZone on each execution, instead calling it just once upon startup and reusing that zone. As a result, the time zone will not be updated dynamically, e.g. when shifting in or out of daylight savings time. I noticed this after my local time zone had shifted from EDT to EST. My xmobar showed 4:30 when the local time was in fact 3:30 (and running date on the command line confirmed that my system clock was actually aware of this shift). I had to restart xmobar in order to pick up the new time zone. I repro'd the unexpected behavior by temporarily disabling my system's time syncing, setting the time to 30 seconds before the zone shift, running date to confirm I'd set the correct time, restarting xmobar, and observing. sudo systemctl stop systemd-timesyncd.service date --set="01:59:30" date I observed my xmobar clock go from 1:59 to 2:00, rather than from 1:59 to 1:00 as expected. Following the same steps, I was able to verify that this commit fixes the issue.
2020-10-25Fix for broken DateZone monitorDino Morelli
There's a longstanding bug in timezone-olson that causes it to fail to read some zoneinfo files (but not all, oddly). This was resolved in timezone-olson-0.2.0 which can be built against by using a later Stackage snapshot than master currently points to. This fix pushes the snapshot up to lts-16.0 and also modifies the cabal version range for timezone-olson to set 0.2.0 as the minimum.
2020-10-24Adding example xmobar library install with cabalMark Watts
- Relates to #491
2020-10-10update libmpd to 0.9.2.0Olivier Schneider
2020-10-09Changelog and friendsjao
2020-10-09update readme: -N --add-font optionivanbrennan
2020-10-09additionalFonts command-line option: --add-fontivanbrennan
Provide an option the user can specify any number of times to add to the additionalFonts config field.
2020-10-09hlintingjao
2020-08-220.360.36jao
2020-08-09Doc fixesjao
2020-08-09A bit more documentation for <box>jao
2020-08-09readme tweaksjao
2020-08-09A bit of documentation for <box>jao
2020-08-09Update changelog and add commentSibi Prabakaran
2020-08-09Conditional encoding of xft stringSibi Prabakaran
2020-08-09Avoid double utf8 encodingSibi Prabakaran
With this change, xmobar should respect the data which it gets. Xmobar should just render the data instead of trying to encode it.
2020-08-08Mpris2: accepting Word32 as type for trackNumberjao
spotifyd is funky that way
2020-08-08Fix: don't go below zero in indexed barsjao
2020-08-07removed default arg of channel', channel (Plugins.Monitors.Volume)Keith
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.
2020-08-07Haskell action only for PRs, for realjao
2020-08-07Switch from Travis to Github actions (#480)jao
2020-08-07Github action for running hlint and testsjao
2020-08-07Changelog updatesjao
2020-08-07fix non-exhaustive pattern warningUnoqwy
2020-08-07revert broken indents on readmeUnoqwy
2020-08-07remove outdated <box> docUnoqwy
2020-08-07better parsing for boxes + add marginsUnoqwy
2020-08-07fix line width for boxesUnoqwy
2020-08-07readme: box default valuesUnoqwy
2020-08-07readme: update fc tag and add boxUnoqwy
2020-08-07make hlint happyUnoqwy
2020-08-07Fix 1px-off bordersUnoqwy
2020-08-07Add the <box> tag to set borders around textUnoqwy
2020-08-07Refactor ColorInfo to TextRenderInfoUnoqwy
ColorInfo contains background offsets, it is no longer only about colors TextRenderInfo can hold information such as color, offsets, etc
2020-08-07Allow font bg to be taller (or smaller)Unoqwy
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.
2020-08-07travis testsjao
2020-08-07travis testsjao
2020-08-07travis: cabal install 3.0jao
2020-08-07travis: bionicjao
2020-08-07Redundant imports (mostly <$>) removedjao
2020-08-07Don't get confused by empty configuration dirs (fixes #313)jao
By checking full paths, instead of just dirs (option 1).
2020-08-07Changelog and unreleased version bumpjao
2020-08-07String index as progress barjao
2020-07-23readme: Document escaping in UnsafeStdinReaderTomáš Janoušek
2020-07-22readme: Fix duplicated NamedXPropertyLogTomáš Janoušek
2020-06-27License file updatedjao