xmobar 0.29.1 → 0.29.2
raw patch · 6 files changed
+28/−16 lines, 6 files
Files
- changelog.md +10/−2
- examples/xmobar.hs +0/−1
- readme.md +1/−2
- src/Xmobar/App/Compile.hs +3/−3
- src/Xmobar/App/Main.hs +13/−7
- xmobar.cabal +1/−1
changelog.md view
@@ -1,9 +1,17 @@+## Version 0.29.2 (December, 2018)++_Bug fixes_++ - Work as usual with .xmobarrc (see [issue #371]).++[issue #371]: https://github.com/jaor/xmobar/issues/371+ ## Version 0.29.1 (December, 2018) _Bug fixes_ - - Honour command line flags (fixes [issue #370])- - Expose Cmd and CmdX in Xmobar interface+ - Honour command line flags (fixes [issue #370]).+ - Expose Cmd and CmdX in Xmobar interface. [issue #370]: https://github.com/jaor/xmobar/issues/370
examples/xmobar.hs view
@@ -16,7 +16,6 @@ -- and xmobar will compile and launch it for you and ------------------------------------------------------------------------------ - import Xmobar -- Example user-defined plugin
readme.md view
@@ -321,7 +321,6 @@ - `template` The output template. - - `wmClass` The value for the window's X11 WM_CLASS property. Defaults to "xmobar". @@ -400,7 +399,7 @@ processes will run without further problems, yet have no dbus interface. -[src/Signal.hs]: https://github.com/jaor/xmobar/raw/master/src/Signal.hs+[src/Signal.hs]: https://github.com/jaor/xmobar/blob/master/src/Xmobar/System/Signal.hs - Bus Name: `org.Xmobar.Control` - Object Path: `/org/Xmobar/Control`
src/Xmobar/App/Compile.hs view
@@ -17,7 +17,7 @@ ------------------------------------------------------------------------------ -module Xmobar.App.Compile(recompile, xmessage) where+module Xmobar.App.Compile(recompile, trace, xmessage) where import Control.Monad.IO.Class import Control.Monad.Fix (fix)@@ -70,12 +70,12 @@ binT <- getModTime bin if any (binT <) (srcT : libTs) then do- trace verb "Xmobar doing recompile because some files have changed."+ trace verb "Xmobar recompiling because some files have changed." return True else do trace verb $ "Xmobar skipping recompile because it is not forced " ++ "(e.g. via --recompile), and not any *.hs / *.lhs / *.hsc"- ++ "files in lib/ have been changed."+ ++ " files in lib/ have been changed." return False where isSource = flip elem [".hs",".lhs",".hsc"] . takeExtension allFiles t = do
src/Xmobar/App/Main.hs view
@@ -28,6 +28,7 @@ import System.Environment (getArgs) import System.FilePath import System.FilePath.Posix (takeBaseName, takeDirectory)+import Text.Parsec.Error (ParseError) import Graphics.X11.Xlib @@ -40,7 +41,7 @@ import Xmobar.X11.Window import Xmobar.App.Opts import Xmobar.App.EventLoop (startLoop, startCommand)-import Xmobar.App.Compile (recompile)+import Xmobar.App.Compile (recompile, trace) import Xmobar.App.Config xmobar :: Config -> IO ()@@ -66,12 +67,17 @@ for_ (concat vars) $ \(asyncs, _) -> for_ asyncs cancel -buildLaunch :: Bool -> Bool -> FilePath -> IO ()-buildLaunch verb force p = do+buildLaunch :: Bool -> Bool -> FilePath -> ParseError -> IO ()+buildLaunch verb force p e = do let exec = takeBaseName p dir = takeDirectory p- recompile dir exec force verb- executeFile (dir </> exec) False [] Nothing+ ext = takeExtension p+ if ext `elem` [".hs", ".hsc", ".lhs"]+ then recompile dir exec force verb >>+ executeFile (dir </> exec) False [] Nothing+ else trace True ("Invalid configuration file: " ++ show e) >>+ trace True "\n(No compilation attempted: \+ \only .hs, .hsc or .lhs files are compiled)" xmobar' :: [String] -> Config -> IO () xmobar' defs cfg = do@@ -93,6 +99,6 @@ _ -> xmobar defaultConfig Just p -> do r <- readConfig defaultConfig p case r of- Left _ ->- buildLaunch (verboseFlag flags) (recompileFlag flags) p+ Left e ->+ buildLaunch (verboseFlag flags) (recompileFlag flags) p e Right (c, defs) -> doOpts c flags >>= xmobar' defs
xmobar.cabal view
@@ -1,5 +1,5 @@ name: xmobar-version: 0.29.1+version: 0.29.2 homepage: http://xmobar.org synopsis: A Minimalistic Text Based Status Bar description: Xmobar is a minimalistic text based status bar.