8000 GitHub - afrianska/xmobar: A minimalistic status bar
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

afrianska/xmobar

 
 

Repository files navigation

https://img.shields.io/hackage/v/xmobar.svg

About

Xmobar is a minimalistic status bar. It was originally designed and implemented by Andrea Rossato to work with xmonad, but it is actually usable with any window manager.

Xmobar was inspired by the Ion3 status bar, and supports similar features, like dynamic color management, icons, output templates, and extensibility through plugins.

These are some xmobar screenshots using the author’s configuration:

doc/screenshots/xmobar-top.png

doc/screenshots/xmobar-bottom.png

doc/screenshots/xmobar-exwm.png

This is the changelog for recent releases.

Installation

From your Systems Package Manager

Xmobar is probably available from your distribution package manager! Most distributions do compile with the all_extensions flag, so you don’t have to. For more information on that, see the optional features item below.

Arch Linux

pacman -S xmobar

Debian/Ubuntu based

apt install xmobar

Void Linux

xbps-install xmobar

Using cabal-install

Xmobar is available from Hackage, and you can install it using cabal-install:

cabal install xmobar

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

See below for a list of optional compilation flags that will enable some optional plugins. For instance, to install xmobar with all the bells and whistles, use:

cabal install xmobar --flags="all_extensions"

From 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 Github. There are also tarballs available for every tagged release on Github’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://github.com/jaor/xmobar
        

If you have cabal installed, you can now use it from within xmobar’s source tree:

cabal install --flags="all_extensions"

There is also a barebones stack.yaml file that will allow you to install the xmobar executable with

stack install

See the stack.yaml file for the enabled extensions. You can also pass them to stack directly:

stack install --flag xmobar:all_extensions

Optional features

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, as shown in the examples above.

Extensions need additional libraries (listed below) that will be automatically downloaded and installed if you’re using cabal install. Otherwise, you’ll need to install them yourself.

  • with_dbus Enables support for DBUS by making xmobar to publish a service on the session bus. Requires the dbus package.
  • with_threaded Uses GHC’s threaded runtime. Use this option if xmobar enters a high-CPU regime right after starting.
  • with_utf8 UTF-8 support. Requires the utf8-string package.
  • with_xft Antialiased fonts. Requires the X11-xft package. This option automatically enables UTF-8. To use XFT fonts you need to use the xft: prefix in the font configuration option. For instance:
    font = "xft:Times New Roman-10:italic"
        

    Or to have fallback fonts, just separate them by commas:

    font = "xft:Open Sans:size=9,WenQuanYi Zen Hei:size=9"
        
  • with_mpd Enables support for the MPD daemon. Requires the libmpd package.
  • with_mpris Enables support for MPRIS v1/v2 protocol. Requires the dbus and text packages.
  • with_inotify Support for inotify in modern Linux kernels. This option is needed for the MBox and Mail plugins to work. Requires the hinotify package.
  • with_nl80211 Support for wireless cards on Linux via nl80211 (all upstream drivers). Enables the Wireless plugin. Requires [netlink] and [cereal] packages.
  • with_iwlib Support for wireless cards via Wext ioctls (deprecated). Enables the Wireless plugin. No Haskell library is required, but you will need the iwlib C library and headers in your system (e.g., install libiw-dev in Debian-based systems or wireless_tools on Arch Linux). Conflicts with with_nl80211.
  • with_alsa Support 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-dev in Debian-based systems).
  • with_datezone Support for other timezones. Enables the DateZone plugin. Requires timezone-olson and timezone-series package.
  • with_xpm Support for xpm image file format. This will allow loading .xpm files in <icon>. Requires the libXpm C library.
  • with_uvmeter Enables UVMeter plugin. The plugin shows UV data for Australia.
  • with_weather Support to display weather information. Enables Weather plugin.
  • all_extensions Enables all the extensions above.

Running xmobar

You can now run xmobar with:

7BC7
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.

Signal Handling

Since 0.14 xmobar reacts to SIGUSR1 and SIGUSR2:

  • After receiving SIGUSR1 xmobar moves its position to the next screen.
  • After receiving SIGUSR2 xmobar repositions itself on the current screen.

Configuration and Further Links

  • If you want to jump straight into configuring xmobar, head over to the quick-start guide.
  • If you want to know how to write your own plugin, or 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 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, John Goerzen, Reto Hablützel, Juraj Hercek, Tomáš Janoušek, Ada Joule, Spencer Janssen, Roman Joost, Jochen Keil, Lennart Kolmodin, Krzysztof Kosciuszkiewicz, Dmitry Kurochkin, Todd Lunter, Vanessa McHale, Robert J. Macomber, Dmitry Malikov, David McLean, 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, Markus Scherer, Daniel Schüssler, Olivier Schneider, Alexander Shabalin, Valentin Shirokov, Peter Simons, Alexander Solovyov, Will Song, 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, Edward Z. Yang and Norbert Zeh.

Thanks

Andrea Rossato:

Thanks to Robert Manea and Spencer Janssen for their help in understanding how X works. They gave me suggestions on how to solve many problems with xmobar.

Thanks to Claus Reinke for make me understand existential types (or at least for letting me think I grasp existential types…;-).

jao:

Thanks to Andrea for creating xmobar in the first place, and for giving me the chance to contribute.

Related

  • To understand the internal mysteries of xmobar you may try reading this tutorial on X Window Programming in Haskell.

License

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

Copyright © 2010-2020 Jose Antonio Ortega Ruiz

Copyright © 2007-2010 Andrea Rossato

About

A minimalistic status bar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 99.5%
  • Nix 0.5%
0