summaryrefslogtreecommitdiffhomepage
path: root/xmobar.cabal
AgeCommit message (Collapse)Author
2020-06-12Optimize weather plugin by reusing manager and other refactorsSibi Prabakaran
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.
2020-04-27Base for ghc 8.10 (fixes #440)jao
2020-04-12Version bumpjao
2020-04-12Add a HandleReader PluginPavan Rikhi
This adds a new `HandleReader` plugin, which displays data from a Haskell `Handle`. This is really only useful if you are running xmobar from within another Haskell program, but lets you avoid the mechanics of creating a named pipe with the proper file permissions. Instead, you can use `System.Process.createPipe` to make a pair of read & write Handles. If you pass the read handle to HandleReader, you can use hPutStr on the write Handle to send data to xmobar from your application code.
2020-04-12Require bytestring >= 0.10.8.2.Zev Weiss
Version 0.10.8.1 contains a bug in the readFile function that misbehaves on things like magic procfs files where stat(2) returns an st_size of zero, which breaks the Net monitor and such; 0.10.8.2 contains the fix.
2020-03-05Not exposing modules outside Xmobarjao
2020-02-26Version 0.330.33jao
2020-02-25Wireless: support NL80211 userspace <-> kernelspace APIPaul Fertser
NL80211 was introduced in Linux 2.6.24 in 2007 as a new extensible universal API, replacing "wireless extensions" ioctls. It works on top of netlink, and allows direct communication to cfg80211 kernel subsystem. Since then it became a hard requirement for all upstream wireless drivers to hook into cfg80211 (SoftMAC drivers do it via the common mac80211 layer). There's still additional compatibility code that allows limited Wext functionality for cfg80211 drivers but it's buggy and can be disabled altogether when CONFIG_CFG80211_WEXT is not set. This patch makes use of "netlink" Haskell library which doesn't have any additional runtime dependencies (so neither iwlib nor libnl are required). The operation is the same as performed by "iw dev <devname> link" command. The signal level is transformed to "quality" by first clamping it to [-110; -40], then adding 110 and dividing by 70 (same meaningless formula as used by the cfg80211 Wext compatibility layer). "essid" template argument is replaced by more appropriate "ssid" (with the old variant still available for backwards compatibility)
2020-02-23Timer coalescing: handle exceptions in timer coordination threadTomas Janousek
This corrects my (wrong) assumption that the timer coordination thread will only fail if there's an error in the code, and in that case any attempt to recover is futile. It turns out that the thread does fail recoverably in one notable case: when running in the non-threaded RTS, registerDelay fails immediately. And we probably still wish for xmobar to support the non-threaded RTS. One way to solve this issue is to add a bunch of #ifdefs and compile the code only in the threaded case. This would double the number of configurations that need to be tested, though. Instead, let's make the code robust against all kinds of exceptions in the timer coordination thread, and get non-threaded RTS support for free.
2020-02-22Implement timer coalescing (noticeably less CPU/power usage)Tomas Janousek
xmobar currently runs every monitor in its own thread. Monitors that do periodic updates simply sleep and loop. This unfortunately leads to these threads coming out of sync, and xmobar ends up waking up and redrawing for every periodic monitor. In my case, that is 7 times per second, which is enough for xmobar to be at the top of "top" with more than 1% CPU usage, and to have a noticeable impact on battery life. This commit adds a central timer coordination thread which makes sure that periodic updates happen together and that we only redraw once they're all done. Together with PR #409, I managed to lower the idle power draw of my laptop from 4W to 3W.
2020-01-27Revert "Use a single Manager across the whole application"jao
This reverts commit 1f1f0bd8b811740c84215f9ed4fa5ebd8309a990.
2020-01-27Revert "Only require http-conduit when absolutely necessary"jao
This reverts commit efb6d6817c092fe08e9b0f1b8a17bddd29d97cdb.
2020-01-16Only require http-conduit when absolutely necessaryslotThe
2020-01-16Use a single Manager across the whole applicationslotThe
2020-01-08Enable FreeBSD features implicitly from build platformDhananjay Balan
2020-01-06Support for freebsd battery status:Dhananjay Balan
Exposed via -f with_freebsd flag, uses sysctl to query battery status.
2019-10-15Changelog updatesjao
2019-10-15Allow latest GHCVanessa McHale
2019-10-10Credits and version bumpjao
2019-10-10libmpd 0.9.0.10jao
2019-08-23Version 0.300.30jao
2019-07-12fixed old CoreTemp in Monitors.hs, set up xmobar.cabal for MultiCoreTempFelix Springer
2019-02-07Always require http-conduit for weather (fixes #378)jao
2019-01-27Changelog for 0.29.5jao
2018-12-24Marks for 0.29.4jao
2018-12-24Upgrade to alsa-mixer 0.3.0 (cf. #372, #373)jao
2018-12-100.29.30.29.3jao
2018-12-10Set max version for alsa-mixerAndrzej Ressel
2018-12-080.29.20.29.2jao
2018-12-050.29.10.29.1jao
2018-12-03CoreCommon -> Common.Filesjao
2018-12-03Unit test fixesjao
2018-12-02Example xmobar.hsjao
2018-12-02Fix: exposing the Command constructors in libjao
2018-12-02Plugins.Monitors.Common refactored into submodulesjao
2018-12-01Version 0.290.29jao
2018-12-01Propagating RTS compilation flags to recompilejao
2018-11-30Self-compilation a la xmonadjao
2018-11-30XMobar.App.Optsjao
2018-11-26Compilation functions lifted from xmonadjao
2018-11-26Utilities for dealing with config and data directoriesjao
2018-11-26App.Defaults -> App.Configjao
2018-11-26Xmobar.Config.Parsejao
2018-11-25Xmobar.System.Utils, Xmobar.X11.Eventsjao
2018-11-25X11.XUtil -> X11.Textjao
2018-11-25Xmobar.App.Defaults and Xmobar.Config.Typesjao
2018-11-25Xmobar.App.Mainjao
2018-11-25Xmobar.App and small refactoringsjao
2018-11-25Test namespaces inside Xmobarjao
2018-11-25doc, examplesjao