xmobar 0.46 → 0.47
raw patch · 7 files changed
+37/−13 lines, 7 files
Files
- changelog.md +8/−1
- doc/quick-start.org +11/−1
- readme.org +6/−1
- src/Xmobar/App/Opts.hs +2/−2
- src/Xmobar/Draw/Cairo.hs +2/−2
- src/Xmobar/System/DBus.hs +6/−4
- xmobar.cabal +2/−2
changelog.md view
@@ -1,8 +1,15 @@+## Version 0.47 (August, 2023)++- Fix: center middle section for templates of the for }M{+- Documentation fixes and improvements+- Better error handling in network connections+- Dependency fixes (libmpd excluded for GHC > 9.2)+ ## Version 0.46 (January, 2023) - New bar position specifiers TopHM, BottomHM. - New configuration option, `dpi`, to set the font scaling factor.-- Fixes and extensions for section aligment behaviour (#650, #655).+- Fixes and extensions for section alignment behaviour (#650, #655). - Fix: honour fc/bg specs for icons (#663). ## Version 0.45 (October, 2022)
doc/quick-start.org view
@@ -146,6 +146,15 @@ to use Source Code Pro Semi-Bold 10 when possible, and fall back to Noto Color Emoji Regular 12 for characters that the former cannot display. +**** X11 Bitmap fonts++ If you want to use traditional, non-aliased X11 fonts, you can do so via+ the [[https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html][Unicode fonts and tools for X11]] package, which provides bitmap+ versions of them, with a specification of the stytle ~"Fixed 8"~ for what+ in the old days would have been something like+ ~-Misc-Fixed-Medium-R-Normal--13-120-75-75-C-70-ISO10646-1~. See also+ discussion in [[https://codeberg.org/xmobar/xmobar/issues/658][issue #658]].+ *** Colors - =bgColor= Background color.@@ -455,7 +464,8 @@ - If the template has the form =L}M{R=, with L, R, M arbitrary specs, the monitors in =L= are drawn first, aligned to the left, then =R=, aligned to the right, and finally =M= is drawn centered in the bar. =R= is trimmed to- the space left by =L=, and =M= is trimmed to the space left by =L= and =R=.+ the space left by =L=, and =M= is trimmed to the space left by =L= and =R=. As+ a particular case, =}M{= will draw a single segment centered in the bar. - If the template has the form =L}{R=, =L= is drawn aligned to the left first and then =R=, aligned to the right and trimmed if needed to fit in the
readme.org view
@@ -75,6 +75,11 @@ emerge --ask xmobar #+end_src + - FreeBSD+ #+begin_src shell+ pkg install hs-xmobar+ #+end_src+ ** Using cabal or stack Xmobar is available from [[http://hackage.haskell.org/package/xmobar/][Hackage]], and you can compile and install it using@@ -190,6 +195,6 @@ This software is released under a BSD-style license. See [[https://codeberg.org/xmobar/xmobar/src/branch/master/license][license]] for more details. - Copyright © 2010-2022 Jose Antonio Ortega Ruiz+ Copyright © 2010-2023 Jose Antonio Ortega Ruiz Copyright © 2007-2010 Andrea Rossato
src/Xmobar/App/Opts.hs view
@@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.App.Opts--- Copyright: (c) 2018, 2019, 2020, 2022 Jose Antonio Ortega Ruiz+-- Copyright: (c) 2018, 2019, 2020, 2022, 2023 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: jao@gnu.org@@ -116,7 +116,7 @@ info :: String info = "xmobar " ++ showVersion version- ++ "\n (C) 2010 - 2022 Jose A Ortega Ruiz"+ ++ "\n (C) 2010 - 2023 Jose A Ortega Ruiz" ++ "\n (C) 2007 - 2010 Andrea Rossato\n " ++ mail ++ "\n" ++ license ++ "\n"
src/Xmobar/Draw/Cairo.hs view
@@ -2,7 +2,7 @@ ------------------------------------------------------------------------------ -- | -- Module: Xmobar.X11.Cairo--- Copyright: (c) 2022 Jose Antonio Ortega Ruiz+-- Copyright: (c) 2022, 2023 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: jao@gnu.org@@ -185,7 +185,7 @@ (lend, as, bx) <- foldM (drawSegment dctx surf dw) (0, [], []) llyts let [rw, cw] = map sWidth [rlyts, clyts] rstart = max lend (dw - rw)- cstart = if lend > 1 then max lend ((dw - cw) / 2.0) else lend+ cstart = if lend > 1 || rw == 0 then max lend ((dw - cw) / 2.0) else lend (_, as', bx') <- if cw > 0 then foldM (drawSegment dctx surf rstart) (cstart, as, bx) clyts else return (0, as, bx)
src/Xmobar/System/DBus.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : DBus@@ -17,9 +18,10 @@ import DBus import DBus.Client hiding (interfaceName) import qualified DBus.Client as DC+import DBus.Socket import Data.Maybe (isNothing) import Control.Concurrent.STM-import Control.Exception (handle)+import Control.Exception import System.IO (stderr, hPutStrLn) import Control.Monad.IO.Class (liftIO) @@ -35,10 +37,10 @@ interfaceName = interfaceName_ "org.Xmobar.Control" runIPC :: TMVar SignalType -> IO ()-runIPC mvst = handle printException exportConnection+runIPC mvst = exportConnection `catches` [+ Handler(\ (ex :: ClientError) -> hPutStrLn stderr (clientErrorMessage ex)),+ Handler(\ (ex :: SocketError) -> hPutStrLn stderr (socketErrorMessage ex))] where- printException :: ClientError -> IO ()- printException = hPutStrLn stderr . clientErrorMessage exportConnection = do client <- connectSession requestName client busName [ nameDoNotQueue ]
xmobar.cabal view
@@ -1,5 +1,5 @@ name: xmobar-version: 0.46+version: 0.47 homepage: https://codeberg.org/xmobar/xmobar synopsis: A Minimalistic Text Based Status Bar description: Xmobar is a minimalistic text based status bar.@@ -255,7 +255,7 @@ cereal >= 0.5.8.1 cpp-options: -DUSE_NL80211 - if flag(with_mpd) || flag(all_extensions)+ if (flag(with_mpd) || flag(all_extensions)) && impl(ghc < 9.4) build-depends: libmpd >= 0.9.2.0 other-modules: Xmobar.Plugins.Monitors.MPD cpp-options: -DLIBMPD