1
0
Fork
You've already forked xmobar
0
forked from xmobar/xmobar
A minimalist status bar
  • Haskell 97.6%
  • Emacs Lisp 1.3%
  • Shell 0.8%
  • Nix 0.3%
Find a file
2023年09月01日 00:57:04 +01:00
app Self-compilation a la xmonad 2018年11月30日 05:27:53 +00:00
bench Optimize Date plugin again (refresh timezone only once a minute) 2020年11月13日 02:10:31 +00:00
doc center middle section for templates of the form "}M{" ( fixes #677 ) 2023年06月02日 23:45:55 +01:00
etc cairo: box drawing 2022年09月15日 05:56:55 +01:00
src changelog and copyright years 2023年08月30日 13:37:46 +01:00
test old, unusable CI ymls moved to examples/ 2022年07月16日 03:17:50 +01:00
.envrc Updates nix flake for local development 2022年08月23日 13:45:27 +02:00
.gitignore Updates nix flake for local development 2022年08月23日 13:45:27 +02:00
.hlint.yaml hlinting 2018年06月24日 01:54:28 +01:00
.woodpecker.yml woodpecker: pipeline -> steps 2023年08月30日 13:47:40 +01:00
changelog.md changelog and copyright years 2023年08月30日 13:37:46 +01:00
contributing.org documentation: improvements for xmobar-in-haskell docs 2022年07月24日 16:03:15 +01:00
flake.lock Add flake.nix 2022年06月05日 23:13:51 +02:00
flake.nix Updates nix flake for local development 2022年08月23日 13:45:27 +02:00
license License file updated 2020年06月27日 00:36:51 +01:00
readme.org changelog and copyright years 2023年08月30日 13:37:46 +01:00
setup.lhs lowercase ftw 2018年02月01日 05:25:18 +01:00
stack.yaml stack dependencies for cairo/pango ( fixes #666 ) 2023年01月17日 17:02:31 +00:00
xmobar.cabal allow requesting explicitly libmpd with with_mpd for any ghc version 2023年09月01日 00:57:04 +01:00

xmobar, a minimalistic status bar

hackage ci

Xmobar is a minimalistic status bar. It was originally designed and implemented to work with xmonad, but it is actually usable with any window manager in X11 and also (via its text output mode) Wayland.

Xmobar was inspired by the Ion3 status bar, and supports similar features, like dynamic color management, icons, output templates, and extensibility through plugins. It is also able to write to standard output, in a variety of formats.

/exorcist/xmobar/media/branch/master/doc/screenshots/xmobar-top.png

/exorcist/xmobar/media/branch/master/doc/screenshots/xmobar-bottom.png

/exorcist/xmobar/media/branch/master/doc/screenshots/xmobar-exwm.png

Check the change log for our release history. We also have an IRC channel, #xmobar, at Libera.

Breaking news

  • 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 fixing quite a few bugs and that your font names in your configuration, if you used xft ones, might need to be adapted to Pango's syntax: please see this section of the documentation for all the details. If you're compiling your own xmobar, there's a new dependency on libpango (see C library dependencies).

Installation

From your system's package manager

Xmobar is probably available from your distributions package manager! Most distributions compile xmobar with the all_extensions flag, so you don't have to.

  • Arch Linux

     pacman -S xmobar
  • Debian/Ubuntu based

     apt install xmobar
  • OpenSUSE

     zypper install xmobar
  • Void Linux

     xbps-install xmobar
  • Gentoo

     emerge --ask xmobar
  • FreeBSD

     pkg install hs-xmobar

Using cabal or stack

Xmobar is available from Hackage, and you can compile and install it using cabal-install, making sure the required C libraries are in place. For a full build with all available extensions:

 # required C librarises
 apt-get install xorg-dev libxrandr-dev libpango1.0-dev
 # optional C libraries for additional plugins
 apt-get install libasound2-dev libxpm-dev libmpd-dev
 cabal install xmobar -fall_extensions

Starting with version 0.35.1, xmobar requires at least GHC version 8.4.x. to build. See this issue for more information.

See here for a list of optional compilation flags that will enable some optional plugins.

See compiling for full compilation instructions starting from source.

Running xmobar

Running xmobar with a configuration file

You can run xmobar with:

 xmobar /path/to/config &

or

 xmobar &

if you have the default configuration file saved as $XDG_CONFIG_HOME/xmobar/xmobarrc (defaulting to ~/.config/xmobar/xmobarrc), or ~/.xmobarrc.

All the available command line switches and configuration parameters are described in the quick start guide and the plugins index.

Writing your own xmobar in Haskell

As shown above, one can use xmobar as a regular program, via its configuration file, without having to write any code. It also is possible to install xmobar as a library and use it to write your own xmobar using Haskell instead of using a configuration file. (This is very similar to how xmonad works.) That gives you the ability of using Haskell and its libraries to extend xmobar to your heart's content. If you are a programmer, take a look here to learn more.

Running xmobar in text mode

By default, xmobar will run as an X11 application, in a docked window, but it is possible to redirect xmobar's output to the standard output, optionally with color escape sequences. In this mode, xmobar can be run inside a terminal o console, or its output piped to other applications, and there is no need for an X11 display. See Running xmobar in text mode for details. Using this mode, you could pipe xmobar's output to, say, swaybar, and use it in wayland, or, with the xmobar.el package, show it in Emacs's tab bar.

Configuration and further documentation

  • If you want to jump straight into running xmobar, head over to the quick start guide.
  • If you want to get a detailed overview of all available plugins and monitors, visit the plugins index.
  • For more information on how to use xmobar as a Haskell library see the using Haskell guide.
  • If you want to know how to contribute to the xmobar project, check out contributing.

Authors and credits

Andrea Rossato originally designed and implemented xmobar up to version 0.11.1. Since then, it is maintained and developed by jao, with the help of the greater xmobar and Haskell communities.

In particular, xmobar incorporates patches by Kostas Agnantis, Mohammed Alshiekh, Alex Ameen, Axel Angel, Dhananjay Balan, Claudio Bley, Dragos Boca, Ben Boeckel, Ivan Brennan, Duncan Burke, Roman Cheplyaka, Patrick Chilton, Antoine Eiche, Nathaniel Wesley Filardo, Guy Gastineau, John Goerzen, Jonathan Grochowski, Patrick Günther, Reto Hablützel, Juraj Hercek, Tomáš Janoušek, Ada Joule, Spencer Janssen, Roman Joost, Pavel Kalugin, Jochen Keil, Sam Kirby, Lennart Kolmodin, Krzysztof Kosciuszkiewicz, Dmitry Kurochkin, Todd Lunter, Vanessa McHale, Robert J. Macomber, Dmitry Malikov, David McLean, Joan Milev, Marcin Mikołajczyk, Dino Morelli, Tony Morris, Eric Mrak, Thiago Negri, Edward O'Callaghan, Svein Ove, Martin Perner, Jens Petersen, Alexander Polakov, Sibi Prabakaran, Pavan Rikhi, Petr Rockai, Andrew Emmanuel Rosa, Sackville-West, Amir Saeid, Markus Scherer, Daniel Schüssler, Olivier Schneider, Alexander Shabalin, Valentin Shirokov, Peter Simons, Alexander Solovyov, Will Song, John Soo, John Soros, Felix Springer, Travis Staton, Artem Tarasov, Samuli Thomasson, Edward Tjörnhammar, Sergei Trofimovich, Thomas Tuegel, John Tyree, Jan Vornberger, Anton Vorontsov, Daniel Wagner, Zev Weiss, Phil Xiaojun Hu, Nikolay Yakimov, Edward Z. Yang, Leo Zhang, Norbert Zeh, and Michał Zielonka.

Andrea wants to thank Robert Manea and Spencer Janssen for their help in understanding how X works. They gave him suggestions on how to solve many problems with xmobar. He also thanks Claus Reinke for making him understand existential types (or at least for letting him think he grasps existential types...;-).

License

This software is released under a BSD-style license. See license for more details.

Copyright © 2010-2023 Jose Antonio Ortega Ruiz

Copyright © 2007-2010 Andrea Rossato