Issue 473 in xmonad: Enhancement to GridSelect

Status: New Owner: ---- New issue 473 by andre.ra...@gmail.com: Enhancement to GridSelect http://code.google.com/p/xmonad/issues/detail?id=473 There is a function in XMonad.Actions.GridSelect named "spawnSelected" that allows the user to select a command from a list and then spawns it. The "problem" with this function is that'll use the same String twice: you can't give a "title" to a command. So I suggest that a new function is created, one that'll take [(String,String)] as argument. The first String from the tuple specifies the "pretty name" of the command, and the second one specifies the command to be spawned. For instance: spawnSelected' defaultGSConfig [("Messenger", "pidgin"), ("Mail", "chromium --app=http://gmail.com/")] would show a selection grid showing "Messenger" and "Mail", but that would execute "pidgin" or "chromium --app=http://gmail.com/" depending on which I chose. It can be made with only a simple modification to spawnSelected, but I don't know how it should be named, so for now I'm calling it spawnSelected'. spawnSelected' :: GSConfig String -> [(String, String)] -> X () spawnSelected' conf lst = gridselect conf lst >>= flip whenJust spawn

Comment #1 on issue 473 by MathStuf: Enhancement to GridSelect http://code.google.com/p/xmonad/issues/detail?id=473 Instead of just a prime marker, maybe calling it spawnSelectedWithTitles would be better. AFAIK, the prime usually just indicates extra arguments versus the non-prime (which has sane defaults).
participants (1)
-
codesite-noreply@google.com