make DynamicLog prefix workspace names with number

Hi, Is there any easy way to get DynamicLog to prefix the names of workspaces with numbers? For instance, I have workspaces named "web", "mail" and "local"; I want these to show up in my xmobar as "1:web", "2:mail", and "3:remote". Of course I would just name the workspaces that way, but I also use DynamicWorkspaces, which would make that tricky. Thanks! --Omari

2010/1/30 Omari Norman
Is there any easy way to get DynamicLog to prefix the names of workspaces with numbers? For instance, I have workspaces named "web", "mail" and "local"; I want these to show up in my xmobar as "1:web", "2:mail", and "3:remote".
I do this, but I'm not at my own machine at the moment. I'll email that part of my config later on when I _am_ at my own computer. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html

Hi Ivan, Omari,
Following up on this question, is it possible to have the log automatically set the name of the workspace to the programs running in it?
Currently I use the dynamic log with xmonad-log-applet (http://uhsure.com/xmonad-log-applet.html), but it would be so much more useful if rather than *me* making sure I place each window in the right workspace the system would name the workspaces after the windows each of them contains...
I don't understand Haskell, but I believe this is the part of my xmonad.hs that sets the names of the workspaces as they are shown on the taskbar:
logHook = dynamicLogWithPP $ defaultPP {
ppOutput = \ str -> do
let str' = "" ++ str ++
"</span>"
str'' = sanitize str'
msg <- newSignal "/org/xmonad/Log" "org.xmonad.Log"
"Update"
addArgs msg [String str'']
-- If the send fails, ignore it.
send dbus msg 0 `catchDyn`
(\ (DBus.Error _name _msg) ->
return 0)
return ()
, ppTitle = pangoColor "#003366" . shorten 50
, ppCurrent = pangoColor "#006666" . wrap "[" "]"
, ppVisible = pangoColor "#663366" . wrap "(" ")"
, ppHidden = wrap " " " "
, ppUrgent = pangoColor "red"
}
Any ideas would be most welcome : )
best,
lara
--- On Sat, 1/30/10, Ivan Miljenovic
From: Ivan Miljenovic
Subject: Re: [xmonad] make DynamicLog prefix workspace names with number To: xmonad@haskell.org Date: Saturday, January 30, 2010, 2:23 AM 2010/1/30 Omari Norman : Is there any easy way to get DynamicLog to prefix the names of workspaces with numbers? For instance, I have workspaces named "web", "mail" and "local"; I want these to show up in my xmobar as "1:web", "2:mail", and "3:remote".
I do this, but I'm not at my own machine at the moment. I'll email that part of my config later on when I _am_ at my own computer.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

Hi Lara,
Following up on this question, is it possible to have the log automatically set the name of the workspace to the programs running in it?
Can't help you there :( I'm rudimentary with xmonad and haskell...
2010/1/30 Omari Norman
Is there any easy way to get DynamicLog to prefix the names of workspaces with numbers?
I cobbled together something rudimentary in zsh. Surely this could be done in Haskell using the ppOutput function in dynamicLog, and maybe when I have a few minutes to mess around with Haskell I'll do that. This is very primitive--workspace names can't have spaces--but it does (currently) work, in case someone else finds it handy.

Hi Omari,
Many thanks, I will try it out!
Ivan, that is a good question. One could concatenate the progam names or something... : )
cheers
l
--- On Mon, 2/1/10, Omari Norman
From: Omari Norman
Subject: Re: [xmonad] make DynamicLog prefix workspace names with number To: xmonad@haskell.org Date: Monday, February 1, 2010, 6:41 PM Hi Lara, Following up on this question, is it possible to have the log automatically set the name of the workspace to the programs running in it?
Can't help you there :( I'm rudimentary with xmonad and haskell...
2010/1/30 Omari Norman
: Is there any easy way to get DynamicLog to prefix the names of workspaces with numbers?
I cobbled together something rudimentary in zsh. Surely this could be done in Haskell using the ppOutput function in dynamicLog, and maybe when I have a few minutes to mess around with Haskell I'll do that. This is very primitive--workspace names can't have spaces--but it does (currently) work, in case someone else finds it handy.
-----Inline Attachment Follows-----
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
participants (3)
-
Ivan Miljenovic
-
Lara Michaels
-
Omari Norman