A desktop bar similar to xmobar, but with more GUI http://github.com/taffybar/taffybar
|Latest on Hackage:||2.1.2|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Taffybar is a gtk+3 (through gtk2hs and gi-gtk) based desktop information bar, intended primarily for use with XMonad, though it can also function alongside other EWMH compliant window managers. It is similar in spirit to xmobar, but it differs in that it gives up some simplicity for a reasonable helping of eye candy.
Taffybar has a number of non-haskell dependencies. It is recommended that you follow the installation instructions for haskell-gi before attempting to install taffybar.
In addition the the dependencies needed by haskell-gi, taffybar also needs the
libgirepository1.0-dev on Debian.
Taffybar itself can be installed in a number of different ways:
Though it is admittedly a bit complicated to set up properly, using stack is the preferred approach for installing taffybar, because it makes the build process stable and repeatable. Even if you are unfamiliar with stack, or even haskell in general, you should be able to get things working by using the taffybar's quick-start script:
curl -sSL https://raw.githubusercontent.com/taffybar/taffybar/master/quick-start.sh | bash
This script will clone the taffybar repository into a subdirectory of the
default taffybar configuration directory, and copy the example cabal, stack and
taffybar.hs files into the same location. It will then install a binary
$HOME/.local/bin, which can be executed to run taffybar. Note
that with this approach, running the
taffybar binary WILL NOT work; you must
run the binary that is produced by the stack build in your local directory. The
name of the binary can be changed in the cabal file in the taffybar
Running with stack
When you build with stack, it is recommended that you start taffybar with
startTaffybar rather than
dyreTaffybar, and use
https://github.com/yamadapc/stack-run to execute the custom executable specified
by your cabal and stack files. The maintainers have plans for a better solution
(that does not require the user to use stack-run themselves) in #158.
Cabal installation is a simple matter of installing taffybar from hackage:
cabal install taffybar
Like xmobar and XMonad, taffybar is configured in haskell. Taffybar depends on
dyre to automatically detect changes to its configuration file
$XDG_CONFIG_HOME/taffybar/taffybar.hs) and recompile when appropriate.
Taffybar has recently undergone a lot changes recently with the release of 2.0.0, but it's API should be pretty stable moving forward, with the exception of the ongoing gi-gtk migration (see #256. Though it does/will involve significant code changes, this migration should be pretty transparent, especially for users who don't do any advanced widget customization (i.e. that involves actually directly importing gtk2hs).
Taffybar desperately needs contributors. If you want to help, but don't know where to get started you can check out our "help wanted" and "easy" labels:
An entirely new config system has been put in place. TaffybarConfig now lives in System.Taffybar.Context, but for most users, System.Taffybar.SimpleConfig is the configuration interface that should be used.
The main entry point to taffybar is now dyreTaffybar instead of defaultTaffybar.
All widget constructors provided to both config systems must now be of type
TaffyIO Gtk.Widget. If you have an existing
IO Gtk.Widgetyou can convert it using liftIO. All widgets provided by taffybar are now of type
MonadIO m => m Gtk.Widget, or specialized to
graphBorderColorfields are now RGBA quadruples instead of RGB triples.
- WorkspaceSwitcher: Workspaces is much more abstract and makes this widget redundant.
- Pager: The Context module solves the problem that Pager solved in a much more general way. It also makes it so that the user doesn't even need to know about the Pager component at all.
- TaffyPager: Since you no longer need to explicitly initialize a Pager, it's not really very hard to simply add the (Workspaces, Layout, Windows) triple to your config any more.
- XMonadLog: This module has long been deprecated
- Everything in System.Information has been moved to System.Information.Taffybar
- All Widgets that were found in System.Taffybar have been moved to System.Taffybar.Widget
- The helper widgets that were previously located in System.Taffybar.Widgets have been moved to System.Taffybar.Widget.Generic
- WorkspaceHUD -> Workspaces
- WindowSwitcher -> Windows
- LayoutSwitcher -> Layout
- ToggleMonitors -> DBus.Toggle
- System.Taffybar.Widget.Systray (Use SNITray instead)
- System.Taffybar.Widget.NetMonitor (Use System.Taffybar.Widget.Text.NetworkMonitor instead)
Many widgets have subtle interface changes that may break existing configurations.
Widgets can now be placed in the center of taffybar with the
taffybar is now transparent by default, but you will need to use a compositor for transparency to work. https://github.com/chjj/compton is recommended. If you do not want a transparent taffybar set a background color on the class
StatusNotifierItem support has been added to taffybar in the SNITray module.
Monitor configuration changes are handled automatically. Unfortunately the bar must be completely recreated when this happens.
New network monitor widgets
All widgets are now exported in
System.Taffybar.Widget, which should eliminate the need to import widgets explicitly.
- Fix long standing memory leak that was caused by a failure to free memory allocated for gtk pixbufs.
- Widgets unregister from X11 event listening.
Migrate from Gtk2 to Gtk3, which replaces rc theming with css theming (Ivan Malison)
- Support for taffybar on multiple monitors (Ivan Malison)
- D-Bus toggling of taffybar per monitor (Ivan Malison)
- A new workspace switcher widget called WorkspaceHUD (Ivan Malison)
- Support for multiple batteries via
- Add support for IO actions to configure vertical bar widgets
- Images in WorkspaceSwitcher - images are taken from EWMH via _NET_WM_ICON (Elliot Wolk)
- Preliminary support for i3wm (Saksham Sharma)
- Support for multiple network interfaces in NetMonitor (Robert Klotzner)
- Add a pager config field that configures the construction of window switcher titles (Ivan Malison)
- Quick start script for installing from git with stack (Ivan Malison)
- Add a volume widget (Nick Hu and Abdul Sattar)
- Add available memory field to MemoryInfo (Will Price)
- The freedesktop.org notifications widget now allows for notifications to never expire and can handle multiple notifications at once. In particular the default formatter now shows the number of pending notifications (Daniel Oliveira)
- Battery bar is more informative (Samshak Sharma)
- Network monitor speeds are auto formatted to use the most appropriate units (TeXitoi)
- A new freedesktop.org menu widget (u11gh)
...and many smaller tweaks.
- Fixes for outdated weather information sources
- Various styling fixes in the gtkrc code
- Share a single X11Connection between all components to fix the
user error (openDisplay)error (Ivan Malison)
- Call initThreads at startup. This fixes
`taffybar-linux-x86_64: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.` (Ivan Malison)
- Add an eventBox to window switcher to allow setting its background (Ivan Malison)
105 Prevent taffybar from crashing when two windows are closed
simultaneously, or when taffybar otherwise requests data about a window that no longer exists.
- Fix a longstanding bug in loading .rc files (Peder Stray)
- Add support for scrolling in the workspace switcher (Saksham Sharma)
- Improve default formatting of empty workspaces in the pager (Saksham Sharma)
- Relax gtk version bounds
GHC 7.10 compat
Fix compilation with gtk 0.13.1
Try again to fix the network dependency
- Expand the version range for time
- Depend on network-uri instead of network
Make the clock react to time zone changes
- Resize the bar when the screen configuration changes (Robert Helgesson)
- Support bypassing
taffybarMain(Christian Hoener zu Siederdissen)
- Textual CPU and memory monitors (Zakhar Voit)
- A new window switcher menu in the pager (José Alfredo Romero L)
- Dynamic workspace support in the workspace switcher (Nick Hu)
- More configurable network monitor (Arseniy Seroka)
- New widget: text-based command runner (Arseniy Seroka)
- The Graph widget supports lines graphs (via graphDataStyles) (Joachim Breitner)
- Compile with gtk2hs 0.13
- Reduce wakeups by tweaking the default GHC RTS options (Joachim Breitner)
- UTF8 fixes (Nathan Maxson)
- Various fixes to EWMH support (José Alfredo Romero L)
XMonadLog module is deprecated. This module let taffybar display XMonad desktop information through a dbus connection. The EWMH desktop support by José Alfredo Romero L is better in every way, so that (through TaffyPager) is the recommended replacement. Upgrading should be straightforward.
- A new pager (System.Taffybar.TaffyPager) from José A. Romero L. This pager is a drop-in replacement for the dbus-based XMonadLog widget. It communicates via X atoms and EWMH like a real pager. It even supports changing workspaces by clicking on them. I recommend this over the old widget.
- Added an MPRIS2 widget (contributed by Igor Babuschkin)
- Ported to use the newer merged dbus library instead of dbus-client/dbus-core (contributed by CJ van den Berg)
- Finally have the calendar widget pop up over the date/time widget (contributed by José A. Romero)
- GHC 7.6 compatibility
- Vertical bars can now have dynamic background colors (suggested by Elliot Wolk)
- Bug fixes
- More robust strut handling for multiple monitors of different sizes (contributed by Morgan Gibson)
- New widgets from José A. Romero (network monitor, fs monitor, another CPU monitor)
- Allow the bar widget to grow vertically (also contributed by José A. Romero)
- Add some more flexible formatting options for the XMonadLog widget (contributed by cnervi).
- Make the PollingLabel more robust with an exception handler for IOExceptions
- Added more documentation for a few widgets
- Depend on gtk 0.12.1+ to be able to build under ghc 7.2
- Fix the background colors in the calendar so that it follows the GTK theme instead of the bar-specific color settings
- Fix the display of non-ASCII window titles in the XMonad log applet (assuming you use the dbusLog function)
- Add a horrible hack to force the bar to not resize to be larger than the screen due to notifications or long window titles
- Readable widget for freedesktop notifications
- Fixed a few potential deadlocks on startup
- Use the GTK+ rc-file styling system for colors instead of hard coding them