You are not logged in.
Hi there,
How can I start multiple dzen2 instances from xmonad in order to display info such as workspaces and window title in different dzens?
Here is the relevant bit of my xmonad.hs
main = do
dzen <- spawnPipe varDzenCommandLine
xmonad $ defaultConfig
{
-- ...
, logHook = dynamicLogWithPP $ myDzenPP dzen
-- ...
}
myDzenPP h = defaultPP
{
-- ...
}
What I want is to have, for example, one dzen receiving workspace names and another receiving the Window Title
Thanks in advance
Offline
This is possible but I don't know of an off the shelf solution. Of course there may be one that I'm not aware of.
What I would do is pipe xmonad's output into a python script that reads the input and breaks it up into it's various items and then outputs them to multiple spawned dzen's. Use subprocess.Popen to spawn the dzens.
Offline
Thanks, mikesd, that's a good idea indeed :)
I'll still leave the thread open just in case some enlightened soul comes by and answers :D
Offline
I start 4 dzen's on startup:
myStatusBar = "dzen2 -x '0' -y '0' -h '24' -w '960' -ta 'l' -fg '#FFFFFF' -bg '#000000' -fn '-*-bitstream vera sans-medium-r-normal-*-11-*-*-*-*-*-*-*'"
conkyStatsBar = "conky -c .conkyrc_console | dzen2 -x '960' -y '0' -h '24' -w '885' -ta 'l' -fg '#FFFFFF' -bg '#000000' -fn '-*-bitstream vera sans-medium-r-normal-*-11-*-*-*-*-*-*-*'"
conkyMpdBar = "conky -c .conkyrc_mpd | dzen2 -x '0' -y '1176' -h '24' -w '960' -ta 'l' -fg '#FFFFFF' -bg '#000000' -fn '-*-bitstream vera sans-medium-r-normal-*-11-*-*-*-*-*-*-*'"
conkyTimeBar = "conky -c .conkyrc_date | dzen2 -x '960' -y '1176' -h '24' -w '960' -ta 'r' -fg '#FFFFFF' -bg '#000000' -fn '-*-bitstream vera sans-medium-r-normal-*-11-*-*-*-*-*-*-*'"
main = do
workspaceBar <- spawnPipe myStatusBar
conkyStats <- spawnPipe conkyStatsBar
conkyMpd <- spawnPipe conkyMpdBar
conkyTime <- spawnPipe conkyTimeBar
xmonad $ withUrgencyHook NoUrgencyHook gnomeConfig {
...
, logHook = myLogHook workspaceBar >> fadeInactiveLogHook 0xdddddddd >> setWMName "LG3D"
...
}
One is formatted with the myLogHook (which I didn't include in this fragment), the rest is judt launched.
Offline
One is formatted with the myLogHook (which I didn't include in this fragment), the rest is judt launched.
The thing is I wanted to format two of them with a logHook. Nevertheless, thanks! :)
Offline
One is formatted with the myLogHook (which I didn't include in this fragment), the rest is judt launched.
The thing is I wanted to format two of them with a logHook. Nevertheless, thanks!
That isn't a problem, just set the output of the PP to the pipe you want. You can also use several PP's to have different output on the two dzens of you want
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
That isn't a problem, just set the output of the PP to the pipe you want. You can also use several PP's to have different output on the two dzens of you want
So, my question is: "How can I use two PP's simultaneously?" :)
I'm not very used to haskell.. so I have some trouble with these things... Could you please explain?
Offline
logHook pipe1 pipe2 = dynamicLogWithPP $ fooPP { ppOutput = hPutStrLn pipe1 } >> dynamicLogWithPP $ barPP { ppOutput = hPutStrLn pipe2 }
or something like that, I havn't tried it myself.
#xmonad is a nice place btw (but quiet sometimes)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline