diff options
| -rw-r--r-- | changelog.md | 11 | ||||
| -rw-r--r-- | doc/plugins.org | 4 | ||||
| -rw-r--r-- | readme.org | 7 | ||||
| -rw-r--r-- | src/Xmobar.hs | 5 | ||||
| -rw-r--r-- | src/Xmobar/Plugins/Monitors/MPD.hs | 5 | ||||
| -rw-r--r-- | src/Xmobar/Plugins/Monitors/Swap/FreeBSD.hsc | 5 | ||||
| -rw-r--r-- | xmobar.cabal | 8 |
7 files changed, 22 insertions, 23 deletions
diff --git a/changelog.md b/changelog.md index 36f0c52..aeb07e3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,16 @@ -## Version 0.50 (unreleased) +## Version 0.51 (unrelease) -- New plugins: `PacmanUpdates` +- base dependency relaxed to 4.21 + +## Version 0.50 (June, 2025) + +- New plugins: `PacmanUpdates` (thanks, Alexander) - `ArchUpdates` deprecated in favor of `PacmanUpdates` - a deprecation notice will be shown to users of that plugin in the bar in the zero updates case +- `Accordion`: new constructor to allow short version to have plugins too +- `Swap`: update for FreeBSD 15 +- `MPD` compiled again by default with `all_extensions`. ## Version 0.49 (April, 2025) diff --git a/doc/plugins.org b/doc/plugins.org index 6f474e1..5cc7e79 100644 --- a/doc/plugins.org +++ b/doc/plugins.org @@ -1077,8 +1077,8 @@ ** Music monitors *** =MPD Args RefreshRate= - - This monitor will only be compiled if you ask for it using the - =with_mpd= flag. It needs [[http://hackage.haskell.org/package/libmpd/][libmpd]] 5.0 or later (available on Hackage). + - This monitor will only be compiled if you ask for it using the =with_mpd= + flag. It needs [[http://hackage.haskell.org/package/libmpd/][libmpd]] 0.10.1 or later (available on Hackage). - Aliases to =mpd= @@ -28,13 +28,6 @@ channel, ~#xmobar~, at [[ircs://irc.libera.chat][Libera]]. * Breaking news - - Starting with version 0.47.1, we are excluding MPD from the extensions - included with ~all_extensions~ when GHC version is 9.4 or greater, because - that seems to break cabal compilation. However, it's been reported that - in some installations compilation with ~libmpd~ works fine: just add - explicitly the ~with_mpd~ flag to include MPD and check for yourself. - Compilation with stack has also been reported to work. Please see the - comments in issue #679 for details. - Starting with version 0.45, we use cairo/pango as our drawing engine (instead of plain X11/Xft). From a user's point of view, that change should be mostly transparent, except for the facts that it's allowed diff --git a/src/Xmobar.hs b/src/Xmobar.hs index 664d86c..a6f86eb 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module : Xmobar --- Copyright : (c) 2011, 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2022 Jose Antonio Ortega Ruiz +-- Copyright : (c) 2011-2015, 2017-2019, 2022, 2025 Jose Antonio Ortega Ruiz -- (c) 2007 Andrea Rossato -- License : BSD-style (see LICENSE) -- @@ -19,11 +19,10 @@ module Xmobar (xmobar , xmobarMain , defaultConfig , configFromArgs - , tenthSeconds , Runnable (..) - , Exec (..) , Command (..) , SignalType (..) + , module Xmobar.Run.Exec , module Xmobar.Config.Types , module Xmobar.Config.Parse , module Xmobar.Plugins.Accordion diff --git a/src/Xmobar/Plugins/Monitors/MPD.hs b/src/Xmobar/Plugins/Monitors/MPD.hs index 7ecbc0c..b091147 100644 --- a/src/Xmobar/Plugins/Monitors/MPD.hs +++ b/src/Xmobar/Plugins/Monitors/MPD.hs @@ -109,8 +109,9 @@ parseMPD (Right st) song opts = do si = stateGlyph s opts vol = int2str $ fromMaybe 0 (M.stVolume st) (p, t) = fromMaybe (0, 0) (M.stTime st) - [lap, len, remain] = map showTime - [floor p, floor t, max 0 (floor t - floor p)] + lap = showTime $ floor p + len = showTime $ floor t + remain = showTime $ max 0 (floor t - floor p) b = if t > 0 then realToFrac $ p / t else 0 plen = int2str $ M.stPlaylistLength st ppos = maybe "" (int2str . (+1)) $ M.stSongPos st diff --git a/src/Xmobar/Plugins/Monitors/Swap/FreeBSD.hsc b/src/Xmobar/Plugins/Monitors/Swap/FreeBSD.hsc index 9c74e36..90c58c1 100644 --- a/src/Xmobar/Plugins/Monitors/Swap/FreeBSD.hsc +++ b/src/Xmobar/Plugins/Monitors/Swap/FreeBSD.hsc @@ -71,11 +71,10 @@ instance Storable SwapData where poke _ _ = pure () - isEnabled :: IO Bool isEnabled = do - enabled <- sysctlReadUInt "vm.swap_enabled" - return $ enabled == 1 + nswapdev <- sysctlReadUInt "vm.nswapdev" + return $ nswapdev > 0 parseMEM' :: Bool -> IO [Float] parseMEM' False = return [] diff --git a/xmobar.cabal b/xmobar.cabal index a413c29..3fc45a9 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -1,5 +1,5 @@ name: xmobar -version: 0.49 +version: 0.51 homepage: https://codeberg.org/xmobar/xmobar synopsis: A Minimalistic Text Based Status Bar description: Xmobar is a minimalistic text based status bar. @@ -201,7 +201,7 @@ library build-depends: aeson >= 1.4.7.1, async, - base >= 4.11.0 && < 4.21, + base >= 4.11.0 && < 4.22, bytestring >= 0.10.8.2, cairo >= 0.13, colour >= 2.3.6, @@ -266,8 +266,8 @@ library cereal >= 0.5.8.1 cpp-options: -DUSE_NL80211 - if flag(with_mpd) || (flag(all_extensions) && impl(ghc < 9.4)) - build-depends: libmpd >= 0.9.2.0 + if flag(with_mpd) || flag(all_extensions) + build-depends: libmpd >= 0.10.0.1 other-modules: Xmobar.Plugins.Monitors.MPD cpp-options: -DLIBMPD |
