codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

Alternative Implementation of WorkspaceDir #433

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hey, I just extracted an alternative implementation of WorkspaceDir from my 
configuration and was wondering what the opinion on this is. Could it go into 
contrib as alternative? Is it better or worse than the original?

It's using ExtensibleState to map WorkspaceIds to directories. It also provides 
a method to execute action that get the current directory as parameter to 
access the information.
There is no need to modify any layouts with this version.

Regards,
Jan

Original issue reported on code.google.com by que...@gmail.com on 11 Feb 2011 at 7:52

Attachments:

GoogleCodeExporter commented 8 years ago
The "method to execute action that get the current directory as parameter to 
access the information" isn't as straightforward to implement as the one in 
Jan's patch. But it should be possible by doing something like the attached 
patch.

The "There is no need to modify any layouts with this version." is probably a 
good enough reason to replace the exsting WorkspaceDir with the ExtensibleState 
version. That'll make it harder to write a config that typechecks but doesn't 
do the right thing.

Original comment by vogt.a...@gmail.com on 12 Jan 2013 at 4:54

Attachments:

GoogleCodeExporter commented 8 years ago
Hey, is there any progress with this? I think it might solve a problem of mine:

In addition to a global xmobar with workspaces, battery info, time, date and so 
on I have one xmobar on each screen with a workspace name and a list of windows 
(just like a hardstatus line in GNU screen). I'd love these per-screen xmobars 
to show me the workspace directory as well.

I solved this by adding modifierDescription that prints the directory to 
instance LayoutModifier WorkspaceDir, but that lacks any configurability 
whatsoever, and adding a function field to data WorkspaceDir is prohibited by 
the Read/Show instances. Therefore, this is definitely not something I could 
possibly submit as a patch.

Now I found this and it seems it may be a cleaner solution. :-)

Original comment by liskni...@gmail.com on 14 May 2014 at 4:44