FR: runOrToggleVisibility

A useful extension to the existing runOrRaise function would be the ability to runOrToggleVisibility, to allow fast launch and swapping of background windows you don't want visible constantly (ie: pidgin, amarok, network clients, etc). Pseudo-code in xmonad.hs bound to a key: runOrToggleVisibility "pidgin" (className =? "pidgin") where: - if "pidgin" isn't running, launch it (on current workspace?) - if "pidgin" is running - if "pidgin" is hidden, reveal it (floating?) - if "pidgin" is visible, hide it A single keypress (ie: C-A-g) could be used to launch and toggle an application in this manner. Given the example of pidgin, imagine having new conversations popup normally and be tiled, but the "Buddy List" not be visible until you call it up via one key on the current workspace, and use the same key to hide it again. Feedback welcome. Thanks. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3

On Mon, Apr 27, 2009 at 1:39 AM, Russell Adams
A useful extension to the existing runOrRaise function would be the ability to runOrToggleVisibility, to allow fast launch and swapping of background windows you don't want visible constantly (ie: pidgin, amarok, network clients, etc).
NamedScratchpad does exactly this, but always makes windows floating. However, it won't float them if it's manage hook isn't installed but only actions are used. May be I should make this feature official by adding 'float::Bool' to the config?

Excerpts from Konstantin Sobolev's message of Mon Apr 27 09:44:55 -0600 2009:
NamedScratchpad does exactly this, but always makes windows floating. However, it won't float them if it's manage hook isn't installed but only actions are used. May be I should make this feature official by adding 'float::Bool' to the config?
NamedScratchpad is very nice addition; I wonder if it would be better combined into the regular Scratchpad module to avoid some of the code duplication and for simplicity of searching, documenting and remembering. Although I've not gotten around to using it yet, I definitely plan to. I would mainly use this for tiled applications, so I would love to see you merge it into Util.Scratchpad (re-implement existing scratchpad fns in terms of the more general versions from NamedScratchpad) and include the float parameter. Other opinions? Thanks Konstantin! -- wmw

On Mon, Apr 27, 2009 at 1:17 PM, Wirt Wolff
Excerpts from Konstantin Sobolev's message of Mon Apr 27 09:44:55 -0600 2009:
NamedScratchpad does exactly this, but always makes windows floating. However, it won't float them if it's manage hook isn't installed but only actions are used. May be I should make this feature official by adding 'float::Bool' to the config?
NamedScratchpad is very nice addition; I wonder if it would be better combined into the regular Scratchpad module to avoid some of the code duplication and for simplicity of searching, documenting and remembering.
Although I've not gotten around to using it yet, I definitely plan to. I would mainly use this for tiled applications, so I would love to see you merge it into Util.Scratchpad (re-implement existing scratchpad fns in terms of the more general versions from NamedScratchpad) and include the float parameter. Other opinions?
Makes sense, I can do that. I just don't know what is the policy, Scratchpad has it's own maintainer after all.
participants (3)
-
Konstantin Sobolev
-
Russell Adams
-
Wirt Wolff