- Getting the source
- C library dependencies
- Compilation using cabal
- Compilation using stack
- Compilation flags
Getting the source
If you don't have
cabal-install installed, you can get xmobar's source
code in a variety of ways:
- From Hackage. Just download the latest release from xmobar's hackage page.
- From Codeberg. There are also tarballs available for every tagged release on Codeberg's releases page
From the bleeding edge repo. If you prefer to live dangerously, just get the latest and greatest (and buggiest, I guess) using git:
git clone git://codeberg.org/xmobar/xmobar
C library dependencies
To build xmobar you will need the Xorg and Pango/Cairo C-libraries and headers installed in your system. In Debian and derivatives that's easily accomplished via
apt-get install -y xorg-dev libxrandr-dev libpango1.0-dev
and, optionally, in order to be able to build all available extensions and plugins:
apt-get install -y libasound2-dev libxpm-dev libmpd-dev
Compilation using cabal
If you have cabal installed, you can now use it from within xmobar's source tree:
cabal install --flags="all_extensions"
Compilation using stack
There is also a
stack.yaml file that will allow you to install the
xmobar executable with
stack.yaml file for the enabled extensions. You can also pass
stack install --flag xmobar:all_extensions
You can configure xmobar to include some optional plugins and features, which are not compiled by default. To that end, you need to add one or more flags to either the cabal install command or the configure setup step.
Extensions need additional Haskell packages (listed below) that will be automatically downloaded and installed if you're using cabal install. Otherwise, you'll need to install them yourself.
with_dbusEnables support for DBUS by making xmobar to publish a service on the session bus. Requires the dbus package.
with_threadedUses GHC's threaded runtime. Use this option if xmobar enters a high-CPU regime right after starting.
with_xrenderEnables the main bar background alpha parameter. Requires the X11-xft package. The Xrender extension is not compatible with 10-bit colour modes, i.e., setting
DefaultDepthto 30 in your Xorg configuration. See discussion in issue 651 for details.
with_xpmSupport for xpm image file format. This will allow loading .xpm files in
<icon>. Requires the libXpm C library.
The following plugins and monitors are optional. You can enable them all
at once using the flag
all_extensions, or one by one with the following
with_mpdEnables support for the MPD daemon. Requires the libmpd package.
with_mprisEnables support for MPRIS v1/v2 protocol used by the plugins of the same name. Requires the dbus and text packages.
with_inotifySupport for inotify in modern Linux kernels. This option is needed for the
with_nl80211Support for wireless cards on Linux via nl80211 (all upstream drivers). Enables the
Wirelessplugin. Requires netlink and cereal packages.
with_alsaSupport for ALSA sound cards. Enables the Volume plugin. Requires the alsa-mixer package. To install the latter, you'll need the libasound C library and headers in your system (e.g., install
libasound2-devin Debian-based systems).
with_datezoneSupport for other timezones. Enables the DateZone plugin. Requires timezone-olson and timezone-series package.
with_weatherSupport to display weather information. Enables Weather plugin.
Finally, the following flags enable plugins not included by
UVMeterplugin. The plugin shows UV data for Australia.
with_iwlibSupport for wireless cards via Wext ioctls (deprecated). Enables the
Wirelessplugin. You will need the iwlib C library and headers in your system (e.g., install
libiw-devin Debian-based systems or
wireless_toolson Arch Linux). Conflicts with