packages feed

taffybar 7.4.2 → 7.4.3

raw patch · 6 files changed

+50/−10 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ System.Taffybar.Util: catchGErrorsAsNothing :: IO a -> IO (Maybe a)

Files

CHANGELOG.md view
@@ -1,3 +1,15 @@+# 7.4.3++## Fixes++* Load icons that live only in `share/pixmaps` (for example VS Code and+  Joplin) by name. GTK's `iconThemeHasIcon` ignores these unthemed icons, so+  they previously missed the theme lookup, logged+  `Failed to load icon from filepath ...` on every workspace refresh, and+  showed no icon on Hyprland (#607).+* Icon names from desktop entries are only loaded as files when they are+  absolute paths.+ # 7.4.2  ## Packaging
doc/contrib.md view
@@ -8,3 +8,19 @@ - [Help Wanted](https://github.com/taffybar/taffybar/labels/help%20wanted) - [Easy](https://github.com/taffybar/taffybar/labels/easy) +## Building local WirePlumber bindings++The default `cabal.project` leaves `gi-wireplumber` out of the local package+list so that disabling Taffybar's `wireplumber` flag also removes the need for+WirePlumber development libraries. When the flag is enabled, Cabal uses the+published bindings from Hackage.++To develop against the bindings in `packages/gi-wireplumber`, use the development+project (requires Cabal 3.8 or newer and the WirePlumber development libraries):++```sh+cabal build all --project-file=cabal.project.dev+```++The Nix flake always uses the local bindings.+
doc/install.md view
@@ -75,3 +75,14 @@ ``` cabal install taffybar ```++To install from a checkout without WirePlumber/PipeWire audio support, disable+the `wireplumber` flag:++```sh+cabal install -f -wireplumber+```++This does not require the WirePlumber development libraries. With the flag+enabled (the default), Cabal obtains `gi-wireplumber` from Hackage and requires+the `wireplumber-0.5` system library.
src/System/Taffybar/Util.hs view
@@ -22,6 +22,7 @@      -- * GLib     catchGErrorsAsLeft,+    catchGErrorsAsNothing,      -- * Logging     logPrintF,
src/System/Taffybar/Widget/Util.hs view
@@ -307,21 +307,21 @@  -- | Resolve and load an icon by theme name or filesystem path. getImageForIconName :: T.Text -> Int32 -> IO (Maybe GI.Pixbuf)-getImageForIconName iconName size =-  maybeTCombine-    (loadPixbufByName size iconName)-    ( getPixbufFromFilePath (T.unpack iconName)+getImageForIconName iconName size+  | isAbsolute iconPath =+      getPixbufFromFilePath iconPath         >>= traverse (scalePixbufToSize size Gtk.OrientationHorizontal)-    )+  | otherwise = loadPixbufByName size iconName+  where+    iconPath = T.unpack iconName  -- | Load an icon pixbuf from the current icon theme by symbolic name. loadPixbufByName :: Int32 -> T.Text -> IO (Maybe GI.Pixbuf) loadPixbufByName size name = do   iconTheme <- Gtk.iconThemeGetDefault-  hasIcon <- Gtk.iconThemeHasIcon iconTheme name-  if hasIcon-    then Gtk.iconThemeLoadIcon iconTheme name size themeLoadFlags-    else return Nothing+  -- iconThemeHasIcon ignores unthemed icons (e.g. share/pixmaps); lookup does not.+  Gtk.iconThemeLookupIcon iconTheme name size themeLoadFlags+    >>= fmap join . traverse (catchGErrorsAsNothing . Gtk.iconInfoLoadIcon)  -- | Center a widget in both axes. alignCenter :: (Gtk.IsWidget o, MonadIO m) => o -> m ()
taffybar.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: taffybar-version: 7.4.2+version: 7.4.3 synopsis: A desktop bar similar to xmobar, but with more GUI description: Taffybar is a desktop status bar with GTK widgets for window   manager state, system information, tray icons, and custom user modules.