You are not logged in.
Pages: 1
I could not find a ready-to-use plugin for xmobar to display volume level (I don't like Run Com) so, I decided to write one myself. Unfortunately, I didn't manage to make use of haskell alsa binding, so this plugin simply reads 'amixer get' output for selected channel. The plugin makes explicit use of regex-tdfa (the most popular regex backend in aur) since I don't know how to use regular expressions backend-independently.
I'm not sure where should I publish the patch, so I do it here.
Well, maybe, I should fork xmobar and make a pkgbuild for xmobar-mrcat-darcs - but I don't think that one minor patch is worth that.
UPD: Also, there is no easy way to publish a hashed-format darcs repository (xmobar uses hashed repo and patch-tag only supports darcs-2).
The patch for xmobar today's source can be found here: http://gist.github.com/218289
To enable the plugin you should rebuild xmobar from source:
1. Get the xmobar source from darcs: http://code.haskell.org/~arossato/xmobar/#download
2. Download the patch.
3. Cd to the root of xmobar source tree and execute 'darcs apply /path/to/patch'.
4. Build xmobar as described here: http://code.haskell.org/~arossato/xmobar/#installation
5. Make sure to update all the references to xmobar binary in your config files.
Now you may use the volume plugin like this (notice 'AlsaVolume'):
Config { font = "xft:Monospace:pixelsize=11:antialias=true:hinting=true"
, bgColor = "black"
, fgColor = "white"
, position = TopW L 95
, lowerOnStart = True
, commands = [ Run Date "%H:%M@%b %d" "date" 600
, Run Battery ["-L","50","-H","75","--high","green","--normal","yellow", "--low", "red", "--template", "bat:<left>"] 100
, Run AlsaVolume "Master" ["--template", "vol:<vol>"] 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ %battery% %alsavol% %date%"
}
Last edited by Mr.Cat (2009-10-26 20:50:48)
Offline
I'm getting an error:
[nognir@hammer ~]$ xmobar &
[1] 16840
[nognir@hammer ~]$ xmobar: /home/nognir/.xmobarrc: configuration file contains errors at:
"Config" (line 6, column 8):
unexpected ","
expecting space or "}"
[1]+ Exit 1 xmobar
[nognir@hammer ~]$
I'm using the above .xmobarrc, copied-pasted. Why is that?
Last edited by Nognir (2009-12-13 21:32:38)
Offline
I'm not sure where should I publish the patch, so I do it here.
Well, maybe, I should fork xmobar and make a pkgbuild for xmobar-mrcat-darcs - but I don't think that one minor patch is worth that.
UPD: Also, there is no easy way to publish a hashed-format darcs repository (xmobar uses hashed repo and patch-tag only supports darcs-2).
If you still want to maintain this as a separate branch (you don't want it merged in?), and those repository format issues still exist, perhaps you could get an account: http://community.haskell.org/
Offline
Nognir, still having problems?
Vogt, I've got nothing against merging this in, just don't know how to offer the patch to xmobar developers. Also the plugin just polls `amixer get` - probably, not the best way to monitor volume level.
Offline
Pages: 1