diff options
-rw-r--r-- | changelog.md | 7 | ||||
-rw-r--r-- | doc/plugins.org | 4 | ||||
-rw-r--r-- | readme.org | 7 | ||||
-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 | 6 |
6 files changed, 15 insertions, 19 deletions
diff --git a/changelog.md b/changelog.md index 36f0c52..5e4fde6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,9 +1,12 @@ -## Version 0.50 (unreleased) +## Version 0.50 (June, 2025) -- New plugins: `PacmanUpdates` +- 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/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..e6ad605 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -1,5 +1,5 @@ name: xmobar -version: 0.49 +version: 0.50 homepage: https://codeberg.org/xmobar/xmobar synopsis: A Minimalistic Text Based Status Bar description: Xmobar is a minimalistic text based status bar. @@ -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 |