xmobar 0.11 → 0.11.1
raw patch · 4 files changed
+33/−24 lines, 4 files
Files
- README +22/−22
- StatFS.hsc +9/−0
- XUtil.hsc +1/−1
- xmobar.cabal +1/−1
README view
@@ -2,7 +2,7 @@ % Andrea Rossato About------+===== [xmobar] is a minimalistic, text based, status bar. It was designed to work with the [xmonad] Window Manager.@@ -19,7 +19,7 @@ sample configuration. Download---------+======== You can get the [xmobar] source code from [Hackage]. @@ -39,7 +39,7 @@ and ghc-6.8.1. Bug Reports------------+=========== To submit bug reports you can use the Google code bug tracking system available at the following address:@@ -48,7 +48,7 @@ Installation-------------+============ To install simply run: @@ -81,7 +81,7 @@ if you have the default configuration file saved as `~/.xmobarrc` Utf-8 and Xft Support----------------------+===================== [xmobar] can be compiled with UTF-8 and XFT support. If you want UTF-8 support only, you just need to run the configuration script with the@@ -105,9 +105,9 @@ font = "xft:Times New Roman-10:italic" Configuration--------------+============= -### Quick Start+## Quick Start See `xmobar.config-sample` for an example. @@ -173,7 +173,7 @@ `template` : The output template. -### Running xmobar with i3status+## Running xmobar with i3status [xmobar] can be used to display information gathered by [i3status], a small program that gathers information and formats it suitable for@@ -194,7 +194,7 @@ ./i3status -c i3status.conf | xmobar -o -t "%StdinReader%" -c "[Run StdinReader]" -### Command Line Options+## Command Line Options [xmobar] can be either configured with a configuration file or with command line options. In the second case, the command line options@@ -226,7 +226,7 @@ -x screen --screen=screen On which X screen number to start Mail bug reports and suggestions to <andrea.rossato@unibz.it> -### The Output Template+## The Output Template The output template must contain at least one command. [xmobar] will parse the template and will search for the command to be executed in@@ -240,7 +240,7 @@ template. If the execution is not successful an error will be reported. -### The `commands` Configuration Option+## The `commands` Configuration Option The `commands` configuration option is a list of commands information and arguments to be used by [xmobar] when parsing the output template.@@ -272,7 +272,7 @@ Other commands can be created as plugins with the Plugin infrastructure. See below Writing a Plugin -### System Monitor Plugins+## System Monitor Plugins This is the description of the system monitor plugins that are installed by default.@@ -497,7 +497,7 @@ a space in front of the printed string (when it's not empty); it can be used in the template with the alias `mbox`. -### Monitor Plugins Commands Arguments+## Monitor Plugins Commands Arguments These are the arguments that can be used for internal commands in the `commands` configuration option:@@ -529,7 +529,7 @@ Glasgow Airport: 16.0C -### Executing External Commands+## Executing External Commands In order to execute an external command you can either write the command name in the template, in this case it will be executed without@@ -553,7 +553,7 @@ can be used in the output template as `%mydate%` -### Other Plugins+## Other Plugins `Date Args Alias RefreshRate` @@ -564,9 +564,9 @@ `PipeReader "/path/to/pipe" Alias` Plugins--------+======= -### Writing a Plugin+## Writing a Plugin Writing a plugin for [xmobar] should be very simple. You need to create a data type with at least one constructor.@@ -627,7 +627,7 @@ For a very basic example see `Plugins/HelloWorld.hs` or the other plugins that are distributed with [xmobar]. -### Installing/Removing a Plugin+## Installing/Removing a Plugin Installing a plugin should require 3 steps. Here we are going to install the HelloWorld plugin that comes with [xmobar]:@@ -680,7 +680,7 @@ 3. rebuild [xmobar]. Credits--------+======= Thanks to Robert Manea and Spencer Janssen for their help in understanding how X works. They gave me suggestions on how to solve@@ -694,7 +694,7 @@ Norbert Zeh. Useful links-------------+============ The [xmobar] home page @@ -706,14 +706,14 @@ this tutorial [on X Window Programming in Haskell]. Author-------+====== Andrea Rossato `andrea.rossato at ing.unitn.it` Legal------+===== This software is released under a BSD-style license. See LICENSE for more details.
StatFS.hsc view
@@ -23,7 +23,12 @@ import Data.ByteString (useAsCString) import Data.ByteString.Char8 (pack) +#if defined (__FreeBSD__)+# include <sys/param.h>+# include <sys/mount.h>+#else #include <sys/vfs.h>+#endif data FileSystemStats = FileSystemStats { fsStatBlockSize :: Integer@@ -42,7 +47,11 @@ data CStatfs +#if defined(__FreeBSD__)+foreign import ccall unsafe "sys/mount.h statfs"+#else foreign import ccall unsafe "sys/vfs.h statfs64"+#endif c_statfs :: CString -> Ptr CStatfs -> IO CInt toI :: CLong -> Integer
XUtil.hsc view
@@ -69,7 +69,7 @@ #endif -- Hide the Core Font/Xft switching here-data XFont =Core FontStruct+data XFont = Core FontStruct | Utf8 FontSet #ifdef XFT | Xft XftFont
xmobar.cabal view
@@ -1,5 +1,5 @@ name: xmobar-version: 0.11+version: 0.11.1 homepage: http://code.haskell.org/~arossato/xmobar synopsis: A Minimalistic Text Based Status Bar description: Xmobar is a minimalistic text based status bar.