taffybar 4.0.0 → 4.0.1
raw patch · 7 files changed
+36/−28 lines, 7 filesdep ~scottyPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: scotty
API changes (from Hackage documentation)
- System.Taffybar.Information.SafeX11: data ClassHint
+ System.Taffybar.Information.SafeX11: data () => ClassHint
- System.Taffybar.Information.SafeX11: data ErrorEvent
+ System.Taffybar.Information.SafeX11: data () => ErrorEvent
- System.Taffybar.Information.SafeX11: data Event
+ System.Taffybar.Information.SafeX11: data () => Event
- System.Taffybar.Information.SafeX11: data SizeHints
+ System.Taffybar.Information.SafeX11: data () => SizeHints
- System.Taffybar.Information.SafeX11: data TextProperty
+ System.Taffybar.Information.SafeX11: data () => TextProperty
- System.Taffybar.Information.SafeX11: data WMHints
+ System.Taffybar.Information.SafeX11: data () => WMHints
- System.Taffybar.Information.SafeX11: data WindowAttributes
+ System.Taffybar.Information.SafeX11: data () => WindowAttributes
- System.Taffybar.Information.SafeX11: data WindowChanges
+ System.Taffybar.Information.SafeX11: data () => WindowChanges
- System.Taffybar.Information.SafeX11: newtype FontSet
+ System.Taffybar.Information.SafeX11: newtype () => FontSet
- System.Taffybar.SimpleConfig: data StrutSize
+ System.Taffybar.SimpleConfig: data () => StrutSize
- System.Taffybar.Widget.SNITray: data TrayParams
+ System.Taffybar.Widget.SNITray: data () => TrayParams
Files
- CHANGELOG.md +7/−0
- README.md +2/−2
- src/System/Taffybar/Context.hs +1/−1
- src/System/Taffybar/Information/Memory.hs +12/−10
- src/System/Taffybar/Widget/Crypto.hs +8/−5
- taffybar.cabal +2/−6
- taffybar.css +4/−4
CHANGELOG.md view
@@ -1,3 +1,10 @@+# Unreleased++## Bug Fixes++ * Gtk.widgetShowAll is run on the widget created by `cryptoPriceLabelWithIcon`,+ so that it shows up by default.+ # 4.0.0 ## Breaking Changes
README.md view
@@ -1,6 +1,6 @@ # Taffybar - [](https://hackage.haskell.org/package/taffybar) [](https://github.com/taffybar/taffybar/compare/latest-release...master) [](http://stackage.org/lts/package/taffybar) [](http://stackage.org/nightly/package/taffybar) [](https://github.com/taffybar/taffybar/labels/help%20wanted) [](https://matrix.to/#/#taffybar:matrix.org) [](https://gitter.im/taffybar/Lobby) [](https://github.com/taffybar/taffybar/blob/master/LICENSE) +[](https://github.com/taffybar/taffybar/actions/workflows/nix.yml) [](https://hackage.haskell.org/package/taffybar) [](https://github.com/taffybar/taffybar/compare/latest-release...master) [](http://stackage.org/lts/package/taffybar) [](http://stackage.org/nightly/package/taffybar) [](https://github.com/taffybar/taffybar/labels/help%20wanted) [](https://matrix.to/#/#taffybar:matrix.org) [](https://gitter.im/taffybar/Lobby) [](https://github.com/taffybar/taffybar/blob/master/LICENSE)  Taffybar is a gtk+3 [(through gi-gtk)](https://github.com/taffybar/taffybar/issues/256) based desktop@@ -151,7 +151,7 @@ For more details about how to configure taffybar, see the [full documentation](https://hackage.haskell.org/package/taffybar). You can find a list of available widgets-[here](http://hackage.haskell.org/package/taffybar-2.0.0/docs/System-Taffybar-Widget.html)+[here](http://hackage.haskell.org/package/taffybar-2.0.0/docs/System-Taffybar-Widget.html). FAQ ---
src/System/Taffybar/Context.hs view
@@ -226,7 +226,7 @@ } _ <- runMaybeT $ MaybeT GI.Gdk.displayGetDefault >>= (lift . GI.Gdk.displayGetDefaultScreen) >>=- (lift . (\x y -> GI.Gdk.afterScreenMonitorsChanged y x)+ (lift . flip GI.Gdk.afterScreenMonitorsChanged -- XXX: We have to do a force refresh here because there is no -- way to reliably move windows, since the window manager can do -- whatever it pleases.
src/System/Taffybar/Information/Memory.hs view
@@ -26,16 +26,18 @@ parseLines :: [String] -> MemoryInfo -> MemoryInfo parseLines (line:rest) memInfo = parseLines rest newMemInfo- where (label:size:_) = words line- newMemInfo = case label of- "MemTotal:" -> memInfo { memoryTotal = toMB size }- "MemFree:" -> memInfo { memoryFree = toMB size }- "MemAvailable:" -> memInfo { memoryAvailable = toMB size }- "Buffers:" -> memInfo { memoryBuffer = toMB size }- "Cached:" -> memInfo { memoryCache = toMB size }- "SwapTotal:" -> memInfo { memorySwapTotal = toMB size }- "SwapFree:" -> memInfo { memorySwapFree = toMB size }- _ -> memInfo+ where newMemInfo = case words line of+ (label:size:_) ->+ case label of+ "MemTotal:" -> memInfo { memoryTotal = toMB size }+ "MemFree:" -> memInfo { memoryFree = toMB size }+ "MemAvailable:" -> memInfo { memoryAvailable = toMB size }+ "Buffers:" -> memInfo { memoryBuffer = toMB size }+ "Cached:" -> memInfo { memoryCache = toMB size }+ "SwapTotal:" -> memInfo { memorySwapTotal = toMB size }+ "SwapFree:" -> memInfo { memorySwapFree = toMB size }+ _ -> memInfo+ _ -> memInfo parseLines _ memInfo = memInfo parseMeminfo :: IO MemoryInfo
src/System/Taffybar/Widget/Crypto.hs view
@@ -48,11 +48,12 @@ -- | Extends 'cryptoPriceLabel' with an icon corresponding to the symbol of the -- purchase crypto that will appear to the left of the price label. See the -- docstring for 'getCryptoPixbuf' for details about how this icon is retrieved.--- As with 'cryptoPriceLabel', this function must be invoked with a type--- application with the type string that expresses the symbol of the relevant--- token and the underlying currency its price should be expressed in. See the--- docstring of 'cryptoPriceLabel' for details about the exact format that this--- string should take.+-- Note that automatic icon retrieval requires a coinmarketcap api key to be set+-- at taffybar startup. As with 'cryptoPriceLabel', this function must be+-- invoked with a type application with the type string that expresses the+-- symbol of the relevant token and the underlying currency in which its price+-- should be expressed. See the docstring of 'cryptoPriceLabel' for details+-- about the exact format that this string should take. cryptoPriceLabelWithIcon :: forall a. KnownSymbol a => TaffyIO Gtk.Widget cryptoPriceLabelWithIcon = do label <- cryptoPriceLabel @a@@ -68,6 +69,8 @@ Gtk.containerAdd hbox image Gtk.containerAdd hbox label++ Gtk.widgetShowAll hbox Gtk.toWidget hbox
taffybar.cabal view
@@ -1,5 +1,5 @@ name: taffybar-version: 4.0.0+version: 4.0.1 synopsis: A desktop bar similar to xmobar, but with more GUI license: BSD3 license-file: LICENSE@@ -21,10 +21,6 @@ dbus-xml/org.mpris.MediaPlayer2.Player.xml dbus-xml/org.mpris.MediaPlayer2.xml -flag cryptocurrency- description: Enable crypto assets widget.- default: True- library default-extensions: TupleSections@@ -76,7 +72,7 @@ , rate-limit >= 1.1.1 , regex-compat , safe >= 0.3 && < 1- , scotty >= 0.11.0 && < 0.12.0+ , scotty >= 0.11 && < 0.13 , split >= 0.1.4.2 , status-notifier-item >= 0.3.1.0 , stm
taffybar.css view
@@ -1,4 +1,4 @@-@define-color transparent rgba(0.0, 0.0, 0.0, 0.0);+@define-color transparent rgba(0, 0, 0, 0.0); @define-color white #FFFFFF; @define-color black #000000; @define-color taffy-blue #0c7cd5;@@ -25,7 +25,7 @@ .taffy-box { border-radius: 10px;- background-color: rgba(0.0, 0.0, 0.0, 0.3);+ background-color: rgba(0, 0, 0, 0.3); } .inner-pad {@@ -53,11 +53,11 @@ } .active .contents {- background-color: rgba(0.0, 0.0, 0.0, 0.5);+ background-color: rgba(0, 0, 0, 0.5); } .visible .contents {- background-color: rgba(0.0, 0.0, 0.0, 0.2);+ background-color: rgba(0, 0, 0, 0.2); } .window-icon-container {