Fri Oct 3 19:18:40 CEST 2008 Dominik Bruhn * Make the Battery-Plugin better - Detect whether charging or discharging - Display the time remaining until charged (if on AC) or discharged - Added possibility to colorize the output whether you are on AC or not New patches: [Make the Battery-Plugin better Dominik Bruhn **20081003171840 - Detect whether charging or discharging - Display the time remaining until charged (if on AC) or discharged - Added possibility to colorize the output whether you are on AC or not ] { hunk ./Plugins/Monitors/Batt.hs 21 -data Batt = Batt Float +data Batt = Batt Bool Float Float hunk ./Plugins/Monitors/Batt.hs 27 - ["left"] -- available replacements + ["left", "lefttime", "state", "statecolor", "statecolorend"] -- available replacements hunk ./Plugins/Monitors/Batt.hs 47 - (f0, p0) = (sp (3,2) a0, sp (2,4) b0) - (f1, p1) = (sp (3,2) a1, sp (2,4) b1) - (f2, p2) = (sp (3,2) a2, sp (2,4) b2) - left = (p0 + p1 + p2) / (f0 + f1 + f2) --present / full - return $ if isNaN left then NA else Batt left + s0 = case (stringParser (2,2) b0) of + "discharging" -> True + "charging" -> False + "charged" -> False + [] -> False + _ -> True + (f0, p0, r0) = (sp (3,2) a0, sp (2,4) b0, sp (2,3) b0) + s1 = case (stringParser (2,2) b1) of + "discharging" -> True + "charging" -> False + "charged" -> False + [] -> False + _ -> True + (f1, p1, r1) = (sp (3,2) a1, sp (2,4) b1, sp (2,3) b1) + s2 = case (stringParser (2,2) b2) of + "discharging" -> True + "charging" -> False + "charged" -> False + [] -> False + _ -> True + (f2, p2, r2) = (sp (3,2) a2, sp (2,4) b2, sp (2,3) b2) + present = (p0 + p1 + p2) + full = (f0 + f1 + f2) + rate = (r0 + r1 + r2) + state = (s0 || s1 || s2) --One Bat discharging -> every discharging + + left = present / full --present / full + lefttime = if rate>250 then --Check if (dis)charging at all + case state of + True -> present / rate --discharge + False -> (full-present) / rate --charge + else + 0 + return $ if isNaN left then NA else Batt state left lefttime hunk ./Plugins/Monitors/Batt.hs 82 -formatBatt :: Float -> Monitor [String] -formatBatt x = - do let f s = floatToPercent (s / 100) - l <- showWithColors f (x * 100) - return [l] + +formatState :: Bool -> Monitor String +formatState st = do + case st of + True -> return "Discharging" + False -> return "Charging" + +formatStateColor :: Bool -> Monitor String +formatStateColor st = do + case st of + True -> return "" + False -> return "" + + +formatTime :: Float -> String +formatTime t = if t==0 then "" else + (show hours)++":"++sminutes++":"++sseconds + where + tseconds = (round (t*60*60)) + hours = tseconds `div` (60*60) + r1 = tseconds `mod` (60*60) + minutes = r1 `div` 60 + sminutes = if minutes < 10 then "0"++(show minutes) else (show minutes) + seconds = r1 `mod` 60::Integer + sseconds = if seconds < 10 then "0"++(show seconds) else (show seconds) + +formatTime2 :: Float -> Monitor String +formatTime2 t = do return $ formatTime t + +formatBatt :: Bool -> Float -> Float -> Monitor [String] +formatBatt st x xl = + do let fp s = floatToPercent (s / 100) + l <- showWithColors fp (x * 100) + l1 <- formatTime2 xl + sts <- formatState st + stc <- formatStateColor st + return [l,l1,sts,stc,""] hunk ./Plugins/Monitors/Batt.hs 127 - Batt x -> do l <- formatBatt x - parseTemplate l + Batt st x xl -> do l <- formatBatt st x xl + parseTemplate l hunk ./README 295 - `left` + `left`,`lefttime`, `state`, `statecolor`, `statecolorend` hunk ./README 297 +Example: + , Run Battery ["-t"," ()", + "--High=66","--high=#65FF2D","--normal=#FFFF14","--Low=33","--low=#FF0000"] 60 + } Context: [Lower the window, so as not to cover other windows Spencer Janssen **20080918213721] [code formatting Andrea Rossato **20080901180020] [xmobar_different_heights_generalized Jan Vornberger **20080901124315 Set _NET_WM_STRUT_PARTIAL correctly when dealing with multiple screens of different heights ] [onscreen-pos-strut-property-fix Jan Vornberger **20080831171930 The _NET_WM_STRUT_PARTIAL property is now also set correctly when using the position command OnScreen ] [Add documentation for Mail plugin Roman Cheplyaka **20080822204746] [Fix README to use :*: Roman Cheplyaka **20080822202604] [Typos Roman Cheplyaka **20080822191327] [use LANGUAGE pragmas Andrea Rossato **20080823112141] [README: better links Andrea Rossato **20080730120345] [A brief comment for Plugins.Mail Spencer Janssen **20080806205537] [Use type operators to reduce ))))))) madness Spencer Janssen **20080806205051] [Add Support for positioning on certain screens Spencer Janssen **20080806205029] [Add mail watcher plugin Spencer Janssen **20080806204047] [cabal: remove useless flags Andrea Rossato **20080501095808] [TAG 0.9 release Andrea Rossato **20080501082629] [style, pointfree and trailing spaces Andrea Rossato **20080429125953] [Parsers: code and comment cleanup Andrea Rossato **20080429123603] [cabal update Andrea Rossato **20080429122729] [README: updated to latest changes Andrea Rossato **20080429103312] [email address, copyright date and more Andrea Rossato **20080429103242] [bump cabal version to 0.9 Andrea Rossato **20080429103215] [Weather: close handles when successfully retrieving the data Andrea Rossato **20080429102944] [style Andrea Rossato **20080429102848] [Parser: '<' and '>' are not reserved characters anymore and can be used in the template Andrea Rossato **20080429094341 Consider this the first 0.9 release candidate. ] [config-sample: use Top for positioning Andrea Rossato **20080419090032 With Static xmobar does not set _NET_WM_STRUT_PARTIAL, which causes troubles to novice xmonad users. ] [Remove -threaded from ghc-options. Spencer Janssen **20080418185336 GHC's -threaded scheduler seems to wake up more frequently even when all threads are idle. These frequent wakeups are detrimental to laptop battery life. ] [move "use_xft" to "with_xft" Andrea Rossato **20080330203722] [XUtil: fix UTF-8 check. Dmitry Kurochkin **20080330200115] [Fix _NET_WM_STRUT_PARTIAL implementation Andrea Rossato **20080330091537] [Set _NET_WM_STRUT_PARTIAL instead of _NET_WM_STRUT and change mkUnmanageWindow to newWindow Andrea Rossato **20080329103834] [Automate version generation Andrea Rossato **20080318101858] [README: typos Andrea Rossato **20080317122327] [README: updated to latest changes Andrea Rossato **20080316164642] [Add BatteryP a monitor for batteries Andrea Rossato **20080316160115 With this monitor is possible to set specific location where to retrieve battery information. For example: Run BatteryP ["BAT0","BAT1","BAT2"] [] 10 this will read the following files: /proc/acpi/battery/BAT0/info and /proc/acpi/battery/BAT0/state /proc/acpi/battery/BAT1/info and /proc/acpi/battery/BAT1/state /proc/acpi/battery/BAT1/info and /proc/acpi/battery/BAT2/state ] [Config: use more xmonad friendly defaults Andrea Rossato **20080316122805] [add XFT support and make UTF-8 support configurable Andrea Rossato **20080316121100 This patch includes many changes: - moved font and printing functions to XUtil.hs and created an abstraction layer to font management; - ported the core, StdinReader and PipeReader to the new font management system. To enable UTF-8 support configure with the "with_utf8" flag (requires utf8-string): runhaskell Setup.lhs configure --flags="with_utf8" To enable XFT (which will turn on UTF-8 support too) configure with the "with_utf8" flag (requires utf8-string and X11-xft): runhaskell Setup.lhs configure --flags="use_xft" ] [Date: haddock fixes Andrea Rossato **20080227190051] [remove xmobar.css from repository Andrea Rossato **20080227133829] [Add reference to curl dependency of the Weather plugin in the README Andrea Rossato **20080226151918 and remove README.html from the repository ] [Xmobar: vertical align after wc string Andrea Rossato **20080219011909] [Adjusted filter used for digging out information from /sys directory Juraj Hercek **20080216160650 - As of 2.4.24 kernel you might experience same frequency for all cores, because cpufreq directory is a link for cores 1 and higher ] [cabal: remove unneeded -liconv linker flag Andrea Rossato **20080216081458] [PipeReader: add utf8 support Andrea Rossato **20080216080421] [StdinReader: add utf8 support Andrea Rossato **20080216080306] [add utf8 support to the core system Andrea Rossato **20080216080151] [cabal: add HsLocale and dependency on utf8-string Andrea Rossato **20080216080104] [Add HsLocale to support utf8 Andrea Rossato **20080216080026] [trailing spaces Andrea Rossato **20080216075842] [Set strut value for BottomW and TopW too Andrea Rossato **20080109094354] [Added documentation. Juraj Hercek **20071222231419 - added Thermal, CoreTemp, CpuFreq documentation to README file - added haddock documentation ] [Adjusted thermal monitor. Juraj Hercek **20071222231039 - Thermal monitor can handle more thermal zones now ] [Remove -O2 -fasm from ghc-options, allow Cabal to determine the best flags Spencer Janssen **20071216001326] [cabal: directory needed only with small_base Andrea Rossato **20071204145449] [Added thermal, cpufreq and coretemp monitors. Juraj Hercek **20071130205430 Prerequisities: thermal - thermal module should be loaded/compiled in kernel - available in (at least) intel centrino processors cpufreq - acpi_cpufreq module should be loaded/compiled in kernel - available in modern processors coretemp - coretemp module should be loaded/compiled in kernel - available (at least) in core 2 duo processors ] [Typo fixes Alexander Solovyov **20071118120723] [Now that a cold winter is approaching I added a new feature to Weather: the capacity of reading negative temperature. Andrea Rossato **20071115134905 This feature is generally not needed in Summertime. ] [README: typo Andrea Rossato **20071114074708] [TAG 0_8_release Andrea Rossato **20071111163112] [cabal: updated cabal file to work with 1.2 and both ghc-6.6 and 6.8 Andrea Rossato **20071111095956] [README: added reference to a source tree that works with Cabal-1.1.x Andrea Rossato **20071111095919] [StdinReader: exit when stdin has been closed Spencer Janssen **20071107231028] [Plugins/Monitors/Common.hs: fix a bug in stringParser Andrea Rossato **20071105102354] [README:updated to latest changes Andrea Rossato **20071104175856] [A new implementation of the position configuration option Andrea Rossato **20071104174551 WARNING: this patch breaks previous configuration files. A new implementation of the position configuration option: - Top and Bottom have non arguments - TopW and BottomW have now 2 arguments: Align (L, C or R) and Int - setting a width % greater than 100 means a 100% width ] [helloworld.config updated to recent changes Andrea Rossato **20071104153244] [Preserve backward compatibility Andrea Rossato **20071104152626 WARNING: this patch changes the configuration file This patch reintroduces backward compatibility with recent changes in the configuration option. Now Top and Bottom do not take any argument. To set the width and alignment used TopW (Align Int) and BottomW (Align Int) instead, where Align is either C, L or R. ] [helloworld.config: updated to latest configuration changes Andrea Rossato **20071104112106] [Added an argument to Top and Bottom type contructors Andrea Rossato **20071104111731] [Added an argument to Top and Bottom type contructors Andrea Rossato **20071104111655] [Added possibility to set the main window's width Andrea Rossato **20071104111221 WARNING: this patch breaks previous configuration files! Changed the position configuration option: now Top and Bottom require one argument, the width of the main window. 4 possibilities are given: - A means all the screen width - C Int means centered, with the Int percentage of screen width - L Int means left aligned, with the Int percentage of screen width - R Int means right aligned, with the Int percentage of screen width Examples: position = Top A or position = Bottom (C 50) ] [Window is mapped after properties have been set Andrea Rossato **20071104111200] [Fixed a compilation issue on non 32bit machines Andrea Rossato **20071104111111] [Removed X11-extras-0.4 and bump X11 to 1.3.0 Andrea Rossato **20071103130306] [README: added reference to a screenshot Andrea Rossato **20071101091109] [README: added link to xmonad home page Andrea Rossato **20071031113714] [README updated darcs repository link Andrea Rossato **20071031112810] [README added position examples Andrea Rossato **20071031112507] [css: fixed a validation error Andrea Rossato **20071031105834] [README add link to Ion Andrea Rossato **20071031104933] [Added README.html and xmobar.css Andrea Rossato **20071031104247] [README now uses pandoc: this way we can also generate a nice home page Andrea Rossato **20071031103900] [Bump version to 0.8 and updated homepage Andrea Rossato **20071031103831] [Code formatting only Andrea Rossato **20071029073826] [Avoid irrefutable pattern in handling text alignment Andrea Rossato **20071028223837] [README: latest updates Andrea Rossato **20071028220305] [Added support for alignment commands in the output template Andrea Rossato **20071028215651] [Main: removed align and added alignSep configuration option Andrea Rossato **20071028215515] [Added support for text alignment commands in the output template Andrea Rossato **20071028214720 WARNING: this patch breaks old configuration files. - removed align configuration option - added alignSep configuration option, a 2 character string: the text before the first character will be align to left, the text in between the 2 characters will be centered, and the text after the second character will be align to the right. For instance: with alignSep="][" the following output template "left text ] %date% [ right text" will display "left text" aligned to the left, a centered date, and "right text" aligned to the right See xmobar.config-sample or /Plugins/helloworld.config for examples ] [README: added credits to Lennart Kolmodin Andrea Rossato **20071028154923] [Bump version requirement of X11-extras to 0.4 Lennart Kolmodin **20071028134451 The constructor ExposeEvent appered in X11-extras-0.4 ] [README: updated to latest changes Andrea Rossato **20071028132804] [Now we use information returned by getScreenInfo to draw the main window and more Andrea Rossato **20071028131956 - we now cache the FontStruct - position is automatically calculated and updated in reposn to XRandR events ] [Main: removed old options and added the new ones Andrea Rossato **20071028131910] [updated config-sample to latest changes Andrea Rossato **20071028124034] [updated config-sample to latest changes Andrea Rossato **20071028124010] [Removed xPos yPos width and height configuration option and added position Andrea Rossato **20071028123638 WARNING: this patch breaks old configuration files: - removed xPos, yPos, width and height - a "position" configuration option has been added: this can be set to: Top Bottom Static {xpos = Int, ypos = Int, width = Int, height = Int} See xmobar.config-sample for an example ] [We must listen for ConfigureNotify events on the root window for xrandr Spencer Janssen **20071027220550] [Added credits to Dmitry Kurochkin Andrea Rossato **20071027220135] [README screenshot url Andrea Rossato **20071027114437] [README some updates Andrea Rossato **20071027113325] [Added XRandR support Andrea Rossato **20071027111127 - Added support for XRandR: if the screen configuration changes, Xmobar will use the configured width only if smaller than the screen width, otherwise the later will be used instead. - Now Xmonad will set _NET_WM_STRUT and will present itself as a DOCK application ] [Bump version to 0.8 Andrea Rossato **20071027111032] [Main will now open the connection with the X server Andrea Rossato **20071027110932] [Added X11-extras dependeny Andrea Rossato **20071027110834] [Fix text vertical alignment. Dmitry Kurochkin **20071023165430] [Allow setting the foreground color Andrea Rossato **20071012193944 Now it is possible dynamically set the foreground color of strings to be displayed with the string tag. ] [Parser: semplify color parsing Andrea Rossato **20071012193920] [The MVar is needed to avoid a race condition Andrea Rossato **20071011203029 As Spencer noted the checker thread may be throwing an exception immediately, thus producing a race condition. ] [Remove MVar from eventLoop. Dmitry Kurochkin **20071006105447] [Use dynamic exceptions. Dmitry Kurochkin **20071003085806] [Fix race conditions in Xmobar.eventLoop Spencer Janssen **20071004223921] [Weather plugin: accept temperatures with decimal points Spencer Janssen **20071004000348] [README updated to recent API changes (the last hopefully) Andrea Rossato **20071003142758] [Date: now implemented using rate and run Andrea Rossato **20071003142700] [Reintroduced rate with a default implementation (1 second) to be used in the default implementation of start Andrea Rossato **20071003142549] [README: updated to recent API change Andrea Rossato **20071003110814] [HelloWorld defines only run Andrea Rossato **20071003110743] [reintroduced run as an Exec method: this way it is possible to write plugins by defining either run or start Andrea Rossato **20071003110609] [more code formatting Andrea Rossato **20071002184500] [coding style consistency Andrea Rossato **20071002184057] [updated README Andrea Rossato **20071002181134] [Removed unneeded stuff Andrea Rossato **20071002150404 Removed StateT: now we only use a ReaderT Some more code and comments cleanup ] [updated helloworld.config-sample to latest changes Andrea Rossato **20071002115319] [updated config-sample to latest changes Andrea Rossato **20071002115244] [cabal: added stm to the dependency list Andrea Rossato **20071002115049] [Updated Parsers to latest changes Andrea Rossato **20071002115014] [updated Main to lates changes Andrea Rossato **20071002114937] [Config: removed the refresh configuration option Andrea Rossato **20071002114813 WARNING: this patch breaks previous configuration files. To update just get rid of the refresh configuration option ;) ] [Now Xmobar uses STM concurrency Andrea Rossato **20071002114538 Now every time a TVar is updated the output window is redrawn. ] [Added a plugin to read from stdin Andrea Rossato **20070928120432 Try it with: xmobar -t "%StdinReader%" -c '[Run StdinReader]' then start writing ;) ] [Removed unused rate method Andrea Rossato **20070928120413] [code formatting Andrea Rossato **20070928120344] [Removed unused rate method Andrea Rossato **20070928120255] [Removed unused rate method Andrea Rossato **20070928120218] [more cleanup Andrea Rossato **20070927194026] [PipeReader: added a configurable alias Andrea Rossato **20070927175144] [Monitors: updated to recent API changes - code formatting Andrea Rossato **20070927173711] [HelloWorld: updated to recent API changes Andrea Rossato **20070927173651] [Date: updated to recent API changes Andrea Rossato **20070927173557] [Added a plugin to read named pipes (such as an XMonad logger) Andrea Rossato **20070927173529] [Confg.hs: added PipeReader to the default configuration Andrea Rossato **20070927173449] [Setup: waiting for Cabal-1.2 :) Andrea Rossato **20070927173151] [Main.hs: updated to reflect the API change - code formatting and cleanup Andrea Rossato **20070927173109] [Xmobas.hs: updated to reflect the API change - code formatting and cleanup Andrea Rossato **20070927172951] [Added Show instance to Runnable Andrea Rossato **20070927172924] [Plugins: added tenthSeconds to the exported API Andrea Rossato **20070927172848] [Updated Runnable to the new API - added Show instance Andrea Rossato **20070927172751] [API change in the Exec class Andrea Rossato **20070927172506 Changed run :: a -> IO String to start :: a -> (String -> IO ()) -> IO () Suggested by Spencer Janssen. ] [code formatting Andrea Rossato **20070915163846] [Added Date to default config Andrea Rossato **20070915163633] [Added a date plugin Andrea Rossato **20070915140143] [Added creadits to Jens Andrea Rossato **20070914163019] [Parse the temperature separately in Celcius and Fahrenheit. Jens Petersen **20070912070949 Parse the pressure in hPa. Generalize showWithColors to (Num a, Ord a) so it works for both Int's and Float's. Use an Int for temperature, pressure, and relative humidity. ] [only use 1 decimal place for showing floating numbers Jens Petersen **20070912065803] [include BAT0 acpi battery status too Jens Petersen **20070912065420] [README: fixed some types Andrea Rossato **20070909222051] [Plugins.Swap: check for SwapFree and SwapTotal Andrea Rossato **20070827105902 In some system SwapFree and SwapTotal are in different position, so we need to check for the string. Reported by Stan Behrens ] [Monitors.Common: parseString must use ByteStrings Andrea Rossato **20070724203554] [loadQueryFont must be protected by catch Andrea Rossato **20070724173047 Expecially now that fonts can be easily choose with a command line options. ] [Batt: we check if the file exists instead of catching an exception Andrea Rossato **20070724170643] [Monitors.Commons: more code cleanup Andrea Rossato **20070724142205] [Config.hs: removed %memory%" from default template Andrea Rossato **20070724133244] [README: some more editing Andrea Rossato **20070724131658] [if an invalid color name or value is given the black pixel will used instead Andrea Rossato **20070724125120] [README: added an example of command line options usage Andrea Rossato **20070724120131] [better error handling in Main.hs Andrea Rossato **20070724120106] [Batt: better error handling Andrea Rossato **20070724114047] [./Plugins/Monitors.hs: corrected module information Andrea Rossato **20070724111019] [README: added download information Andrea Rossato **20070724110541] [changed home page to http://gorgias.mine.nu/xmobar/ Andrea Rossato **20070724102226] [README: updated to latest changes Andrea Rossato **20070724101322] [The help output must be visible in a terminal 80 characters wide Andrea Rossato **20070724100029] [code and output cleanup Andrea Rossato **20070724094435] [Batt.hs: refactor to reduce resource usage Andrea Rossato **20070724094402] [Monitors.Common: parseString will not produce exceptions anymore Andrea Rossato **20070724092701 An empty string will be returned instead. ] [Main.hs: removed exception Andrea Rossato **20070724092551 Check for default configuration file existence instead. ] [Added support for command line options Andrea Rossato **20070723200852 Configuration options will override configuration files, or default configuration. ] [the normal color is set when normal > low Andrea Rossato **20070723114936] [Moved battery line parsing into the Maybe monad. Krzysztof Kosciuszkiewicz **20070719101505] [Safer parsing without parsec in battery monitor Krzysztof Kosciuszkiewicz **20070719015530] [Fix parsing and processing data in Batt monitor. Krzysztof Kosciuszkiewicz **20070716003448 Sometimes the monitor would crash due to bad index given to (!!). Now it should be safe, as parsing is done differently. ] [X code cleanup Andrea Rossato **20070720113917] [oops, I forgot to add Monitors.hs (it's not possible to build xmobar without it!) Andrea Rossato **20070719054059] [Get rid of floats in scientific notation. Krzysztof Kosciuszkiewicz **20070712013626 Use 'showDigits n' instead of 'show . takeDigits n'. As this example shows explicit precision specifications would be appreciated ;) ] [Allow reverse "high" and "low" thresholds Krzysztof Kosciuszkiewicz **20070712010911] [Monitors are now a Plugin that can be removed from Config.hs Andrea Rossato **20070718151211] [Use asynchronous exceptions to obviate the need for forkOS and threaded Spencer Janssen **20070717225131] [execCommands is a mapM Spencer Janssen **20070717211138] [threads are now started with forkOS Andrea Rossato **20070717171307 This is required by the fact that calling nextEvent will block all other running threads. So we need forkOS, which requires the -threaded ghc flag ] [cabal: corrected x11-extras version number Andrea Rossato **20070717161200] [XEvents code cleanup Andrea Rossato **20070717160756] [XExposeEvent handling: that requires X11-extras Andrea Rossato **20070717131411 XExposeEvent is now properly (sort of) handled, with an hackish approch: before nextEvent, that will block Xmobar since an Expose event is captured, we create a background thread that will send an Expose event after the configured refresh interval. So, either a real of a fake Expose event will reach our window within the configured interval. Quite cool, after all. ] [changed runXmobar to runXbar Andrea Rossato **20070717091438] [README and Cabal edits Andrea Rossato **20070714103913 Added some more credits, corrected typos, updated darcs version to 0.7, changed name to Xmonbar and removed references to XMonad. Xmobar is now just a minimalistic text based status bar for any kind of WM (the XMonad community adopted the more advanced and stable dzen, after all ;-) ] [haddock tuning Andrea Rossato **20070713123707] [cabal: added Plugins to the list of modules Andrea Rossato **20070713111302] [Plugins.hs: some haddock corrections Andrea Rossato **20070713111229] [README: updated to the latest changes Andrea Rossato **20070713111148] [Config.hs: more code cleanup Andrea Rossato **20070713101329] [Runnable: cleanup and some comments Andrea Rossato **20070713093647] [added Plugins.hs for exporting the needed plugin API Andrea Rossato **20070713093613] [Plugins now import Plugins.hs Andrea Rossato **20070713093516] [Commands.hs: more code cleanup Andrea Rossato **20070713093402] [removed the Show instance requirement for plugins Andrea Rossato **20070712215615] [cabal updates Andrea Rossato **20070712180516] [added a plugin example with the needed runtime configuration file Andrea Rossato **20070712180434] [credits to Claus Reinke and removed debugging code Andrea Rossato **20070712180405] [use of existential types for plugin support Andrea Rossato **20070712175034 This patch, which *changes the configuration format*, adds easy plugin support by using an existential type for storing the list of commands to be executed. Adding a plugin is just a matter of writing the appropriate instance of the Exec class, after importing Commands.hs. I must thank Claus Reinke for the help in understanding the mysteries of reading existential types. The Read instance of Runnable must be credited to him. See here: http://www.haskell.org/pipermail/haskell-cafe/2007-July/028227.html ] [Commands.hs: monitors take only one action now Andrea Rossato **20070711183131] [Weather.hs: code clean up Andrea Rossato **20070711182221] [config-sample: eyes candy Andrea Rossato **20070711180630] [more unused stuff removed Andrea Rossato **20070711180437] [updated README to latest changes Andrea Rossato **20070711165426] [Net.hs: removed parserc. Now using list function to parse Andrea Rossato **20070711165247 Profiling shows that Net.hs and getNumbers specifically takes a huge ammount of resources. Hope to reduce them with this patch. ] [removed from monitors code not used anymore Andrea Rossato **20070711165035] [Net.hs: removed old code Andrea Rossato **20070711164819] [some colors please! Andrea Rossato **20070711150221 Krzysztof says that we cannot set default colors without embedding a Turing-complete language in the templates, so that we can take account of different unit of measurement. May I set some colors in the configuration example?? ] [gettin' rid of Krzysztof's object-oriented attitude...;-) Andrea Rossato **20070711150201] [Formatting usedratio in Monitors.Swap Krzysztof Kosciuszkiewicz **20070710141550] [Fix takeDigits so it doesn't use read. Krzysztof Kosciuszkiewicz **20070710141406] [Typos in Monitors.Common Krzysztof Kosciuszkiewicz **20070710141329] [Clean up default options for monitors. Krzysztof Kosciuszkiewicz **20070710140845 * Moved default configuration to Monitors.Common * Colors are optional and are off by default ] [Read default configuration from ~/.xmobarrc Krzysztof Kosciuszkiewicz **20070705160320 I am not sure if handling of other exceptions is acceptable, the assumption is that failure to read ~/.xmobarrc because of other errors than parsing should not blow up the whole program. Otherwise explicit test for file existence would be required etc. ] [new working version and named colors in config-sample Andrea Rossato **20070709002947] [comments only Andrea Rossato **20070709001203] [fixes a bug in the copyArea function Andrea Rossato **20070708234304] [added a short-hand for fromintegral (much used here) Andrea Rossato **20070708232338] [This should fix the flickering problem on window's updates Andrea Rossato **20070708224854] [typo Andrea Rossato **20070708183742] [editing to README Andrea Rossato **20070708171330] [added info to Commands.hs Andrea Rossato **20070708171309] [TAG 0.5 Andrea Rossato **20070708102841] [updated to version 0.5 Andrea Rossato **20070708102459] [updated (I actually wrote some) documentation about configuring XMobar Andrea Rossato **20070708102418] [hope this fixes the "flickering text" problem reported by Krzysztof Andrea Rossato **20070708101702] [some monitors are now run internally Andrea Rossato **20070708101628] [updated configurations to reflect code changes Andrea Rossato **20070708101430] [the output template is now parsed with the help of a finite map Andrea Rossato **20070708101208 This way we can quickly implement program name aliasing. ] [monitors are now run internally Andrea Rossato **20070708101033] [better error handling when parsing weather information Andrea Rossato **20070708100320] [better error handling when parsing weather information Andrea Rossato **20070708100148] [added runM to run monitors internally Andrea Rossato **20070708100120] [added Commands Andrea Rossato **20070708095521 Command is the data type for configuring command execution in XMobar. The idea came in a discussion with Spencer Janssen. At first XMobar was intended to be used only to display the output of external commands, but it came clear that the main performance bottle neck was running external programs. Now, some monitors are run internally, even if in separated threads. ] [Add support for named colors. Krzysztof Kosciuszkiewicz **20070706010124 If bad color name is specified then exception is thrown by Xlib. This should be probably handled in a more elegant way. ] [Fix centered text align. Krzysztof Kosciuszkiewicz **20070706024814] [Swap: usedratio reported free ratio Andrea Rossato **20070705204721] [Fix few config name typos Krzysztof Kosciuszkiewicz **20070705152815] [Add dependency on filepath Krzysztof Kosciuszkiewicz **20070705150407] [TAG 0.4 Andrea Rossato **20070705132814] [updated sample configuration Andrea Rossato **20070705132427] [updated to version 0.4 and added new monitors Andrea Rossato **20070705132221] [updated to use the new Common.hs Andrea Rossato **20070705132145] [updated to use the new Common.hs Andrea Rossato **20070705132115] [added a swap monitor Andrea Rossato **20070705132022] [updated to use the new Common.hs and split the swap part in a new monitor Andrea Rossato **20070705131949] [updated Cpu.hs to work with the new Common.hs Andrea Rossato **20070705131915] [added a small library for writing monitors Andrea Rossato **20070705131835] [added a battery monitor Andrea Rossato **20070705131749] [minor Andrea Rossato **20070705131611] [Cpu.hs more code clean up Andrea Rossato **20070627221346] [Cpu.hs now requires -threaded Andrea Rossato **20070627214957] [typos Andrea Rossato **20070627214913] [Cpu.hs: removed Parsec and switched to ByteString Andrea Rossato **20070627214531] [possibility to delay a thread for more than (maxBound :: Int) microseconds Andrea Rossato **20070627094446] [version 0.3.1 Andrea Rossato **20070626225538] [default is Glasgow ;-) Andrea Rossato **20070626225234] [fixed an out of bount bug that could cause a flood to http://weather.noaa.gov/ Andrea Rossato **20070626225156] [removed debug output Andrea Rossato **20070626184542] [added cabal and config reference to the weather monitor Andrea Rossato **20070626180714] [corrected the threadDelay arguments Andrea Rossato **20070626180627] [added a weather monitor to retrieve weather information from http://weather.noaa.gov/ Andrea Rossato **20070626180537] [splitted files Andrea Rossato **20070626113948] [now the Xbar monad is similar to the one of XMonad Andrea Rossato **20070626110104] [cosmetics Andrea Rossato **20070626094452] [Added -threaded option for ghc Andrea Rossato **20070626094357] [added refresh rate config option for each command to be run Andrea Rossato **20070626080619] [now each command is run in a separate thread and MVars are used for interprocess communication Andrea Rossato **20070626074239] [better error handling Andrea Rossato **20070626051747] [createWin will now return Xbar (Display, Window) Andrea Rossato **20070626051622] [updated the README Andrea Rossato **20070625164419] [* fixes some memory leak problems Andrea Rossato **20070625122159 After calling loadQueryFont the FontStruct returned must be freed after using it. runInteractiveProcess leaks memory. runInteractiveCommand does not. ] [README and description Andrea Rossato **20070622130709] [updated example config Andrea Rossato **20070622125303] [cabal updates Andrea Rossato **20070622125229] [added some monitors with output formatted for xmobar Andrea Rossato **20070622125152] [comments Andrea Rossato **20070622125133] [removed monitor.hs (useless now) Andrea Rossato **20070622105128] [big update: this is a status bar now Andrea Rossato **20070622104852 Added a lot of features. ] [added a refresh rate configuration option Andrea Rossato **20070619174006] [haddock and other minor editing Andrea Rossato **20070619105235] [added cabal support Andrea Rossato **20070619105150] [added license (bsd3) Andrea Rossato **20070619105132] [added a sample config file Andrea Rossato **20070619091216] [added license and some info Andrea Rossato **20070619090018] [some changes to monitor.hs to test xmobar Andrea Rossato **20070619080745] [added a monitoring script found here http://blog.csdn.net/danranx/archive/2007/06/10/1646608.aspx Andrea Rossato **20070619080625] [init Andrea Rossato **20070619080355] Patch bundle hash: f0c40510ad1eaac39026080f0bc2d5d905ea1b45