1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
#+title: Compiling xmobar
* Getting the source
If you don't have =cabal-install= installed, you can get xmobar's source
code in a variety of ways:
- From [[http://hackage.haskell.org/package/xmobar/][Hackage]]. Just download the latest release from xmobar's hackage
page.
- From [[http://codeberg.org/xmobar/xmobar/][Codeberg]]. There are also tarballs available for every tagged
release on [[https://codeberg.org/xmobar/xmobar/releases][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:
#+begin_src shell
git clone git://codeberg.org/xmobar/xmobar
#+end_src
* C library dependencies
:PROPERTIES:
:CUSTOM_ID: c-libraries
:END:
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
#+begin_src shell
apt-get install -y xorg-dev libxrandr-dev libpango1.0-dev
#+end_src
and, optionally, in order to be able to build all available extensions and
plugins:
#+begin_src shell
apt-get install -y libasound2-dev libxpm-dev libmpd-dev
#+end_src
* Compilation using cabal
If you have cabal installed, you can now use it from within xmobar's source
tree:
#+begin_src shell
cabal install --flags="all_extensions"
#+end_src
* Compilation using stack
There is also a =stack.yaml= file that will allow you to install the
xmobar executable with
#+begin_src shell
stack install
#+end_src
See the =stack.yaml= file for the enabled extensions. You can also pass
them to =stack= directly:
#+begin_src shell
stack install --flag xmobar:all_extensions
#+end_src
* Compilation flags
:PROPERTIES:
:CUSTOM_ID: optional-features
:END:
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.
** Optional features
- =with_dbus= Enables support for DBUS by making xmobar to publish a
service on the session bus. Requires the [[http://hackage.haskell.org/package/dbus][dbus]] package.
- =with_threaded= Uses GHC's threaded runtime. Use this option if xmobar
enters a high-CPU regime right after starting.
- =with_xrender= Enables the main bar background alpha parameter. Requires
the [[http://hackage.haskell.org/package/X11-xft/][X11-xft]] package. The Xrender extension is not compatible with 10-bit
colour modes, i.e., setting ~DefaultDepth~ to 30 in your Xorg
configuration. See discussion in [[https://codeberg.org/xmobar/xmobar/issues/651][issue 651]] for details.
- =with_xpm= Support for xpm image file format. This will allow loading
.xpm files in =<icon>=. Requires the [[http://cgit.freedesktop.org/xorg/lib/libXpm][libXpm]] C library.
** Optional plugins
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
flags:
- =with_mpd= Enables support for the [[http://mpd.wikia.com/][MPD]] daemon. Requires the [[http://hackage.haskell.org/package/libmpd/][libmpd]]
package.
- =with_mpris= Enables support for MPRIS v1/v2 protocol used by the plugins
of the same name. Requires the [[http://hackage.haskell.org/package/dbus][dbus]] and [[http://hackage.haskell.org/package/text][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 [[http://hackage.haskell.org/package/hinotify/][hinotify]]
package.
- =with_nl80211= Support for wireless cards on Linux via nl80211 (all
upstream drivers). Enables the ~Wireless~ plugin. Requires [[http://hackage.haskell.org/package/netlink][netlink]] and
[[http://hackage.haskell.org/package/cereal/][cereal]] packages.
- =with_alsa= Support for ALSA sound cards. Enables the Volume plugin.
Requires the [[http://hackage.haskell.org/package/alsa-mixer][alsa-mixer]] package. To install the latter, you'll need
the [[http://packages.debian.org/stable/libasound2-dev][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 [[http://hackage.haskell.org/package/timezone-olson][timezone-olson]] and [[http://hackage.haskell.org/package/timezone-series][timezone-series]] package.
- =with_weather= Support to display weather information. Enables Weather
plugin.
Finally, the following flags enable plugins not included by ~all_extensions~:
- =with_uvmeter= Enables the ~UVMeter~ plugin. The plugin shows UV data for
Australia.
- =with_kraken= Enables the ~Kraken~ plugin.
- =with_iwlib= Support for wireless cards via Wext ioctls (deprecated).
Enables the ~Wireless~ plugin. You will need the [[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html][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=.
|