information for multiple batteries

Tamas Papp tkpapp at gmail.com
Sun Jun 30 15:06:51 BST 2013


Hi Jose,

On Fri, Jun 28 2013, jao at gnu.org wrote:

> On Fri, Jun 28 2013, Tamas Papp wrote:
>
>> Is there a way to do this with xmobar, or should I just hack something
>> together using external commands and a shell script?
>
> There was no way... if you can use the git version of xmobar, i've just
> pushed a patch that provides BatteryN, which works like BatteryP except
> that in the configuration you pass a name for the alias; that should
> allow you set up a monitor per battery.  If you have a chance to try it,
> let me know if it works!

Thanks for the quick fix -- I managed to recompile from source and now
it works fine.

I have a couple of (somewhat unrelated) questions:

1. How can I restart xmobar, eg with a signal?  Currently I use 

$ killall xmobar; ~/.cabal/bin/xmobar

2. Can I start xmobar from xmonad?  Using suggestions on the web, my
xmonad.hs now looks like this:

--8<---------------cut here---------------start------------->8---
import XMonad 
import XMonad.Hooks.ManageDocks
import XMonad.Config.Desktop
import XMonad
import XMonad.Hooks.DynamicLog (xmobar)
  
main = xmonad =<< xmobar desktopConfig
         { modMask = mod4Mask
         , terminal = "xfce4-terminal -e screen" 
         }
--8<---------------cut here---------------end--------------->8---

but when xmonad is restarted (Mod4-Q) xmobar is not started, I still
have to start it manually.  I am using the latest xmonad, xmonad-contrib
and xmobar from cabal.

3. I cannot install xmobar with all extensions, because I am missing
alsa-core:

--8<---------------cut here---------------start------------->8---
~/src/xmobar$ cabal install -fall_extensions
Resolving dependencies...
Configuring alsa-core-0.5.0.1...
cabal: The pkg-config package alsa version >=1.0.14 is required but it could
not be found.
Failed to install alsa-core-0.5.0.1
cabal: Error: some packages failed to install:
alsa-core-0.5.0.1 failed during the configure step. The exception was:
ExitFailure 1
alsa-mixer-0.1.2 depends on alsa-core-0.5.0.1 which failed to install.
xmobar-0.18 depends on alsa-core-0.5.0.1 which failed to install.
--8<---------------cut here---------------end--------------->8---

What can I do to remedy this (I am on Debian, could not figure out which
package to install).

Best,

Tamas



More information about the Xmobar mailing list