Remember xmlad workspace layout?

Using XMonad.Layout.PerWorkspace, you can set up independent layouts for each workspace and customize them for your applications. However, I would like some workspaces to track my settings. For instance. if I press Mod-h on Workspace 2 using the Tall layout, I want Tall layout on workspace 2 to have a small master panel the next time I load (or restart X, for that matter).

This is often a required feature, but I cannot find a solution anywhere.

Ideally, we would save this in some ~/.xmonad/persistentLayouts/workspace*/layout*.conf files, which you could delete or edit manually if necessary. But it will be just a bonus.

I could live with the implementation of this myself if it does not exist, but my haskell I / O file is a little affectionate, so maybe someone can provide some pointers.

+6
source share
1 answer

xmonad already saves its state through executable reboots (for example, mod + q and the like), so why not steal this mechanism? I think it just uses reading and showing, so you don't need particularly strong I / O skills; readFile and writeFile should be enough. You can steal some code from xmonad. The serialization code is represented by restart , and the deserialization code is xmonad . You will need to change it a bit - you do not want to save information about the window identifier, as this will be invalidated for the new X session, but most of it can probably be replaced by a wholesale one.

+6
source

Source: https://habr.com/ru/post/904757/


All Articles