
On 03/24/2017 11:43 PM, Sam Halliday wrote:
[..] Just thinking aloud, another way I could do this would be to have rules in place that always assign a new app to a given workspace. Then I could start my main apps as usual from .xsession. But sometimes I move a chromium window to a different workspace, so it would need to allow that.
Hi. Some time ago i've written a [module for tracking PIDs][1] of launched programs and not launching them again, if process still running. But.. - It was not released yet, because i think about rewriting (part of) it. - It depends on other modules from my config. Not that many and not really big, but still.. - I don't know (and heven't tried) how to build a config with this module alone (perhaps, place it in `.xmonad/lib` directory?). Now i build using `stack` and rebuild work through [X.H.EntryHelper][4]. I've heard, that xmonad 0.13 supports different build systems, but i haven't tried. - Part of this module (related to docks, not needed in your config) is broken with `xmonad-contrib-0.13` (the struts are no longer honored and panels are covered by windows). - Program pid tracking will move *all* new windows of a multi-window application to defined workspace. That may be not convenient at all in some cases: e.g. you want to start a new browser window on another workspace, but the new window will still appear on a workspace assigned to it. The same applies to a windows, like password manager prompts, etc. But, that's said, it still works with `xmonad-0.12` and stack will install all necessary dependencies for you. [Here][2] is your config, which starts programs using my module `Sgf.XMonad.Restartable` and the listed programs do not restart after `xmonad --restart`, if they're still running. To build your config i replaced mine (`src/xmonad.hs`) in [my repository][3] and installed it with `make install`. **NOTE** : `make install` will also install `xmobarrc`, `Xsession` and other stuff. You may either try `make install_xmonad` or (better) create a new user for trying this. [1]: https://github.com/sgf-dma/sgf-xmonad-modules/blob/master/src/Sgf/XMonad/Res... [2]: https://gist.github.com/sgf-dma/2709f8279365b262f567d3d99f43dfc1 [3]: https://github.com/sgf-dma/sgf-xmonad-config [4]: https://hackage.haskell.org/package/xmonad-entryhelper