Chimrod / i3_workspaces

Workspace manager for i3-wm
63 stars 1 forks source link

Possibility of a persistent workspace #3

Open DoTheEvo opened 4 years ago

DoTheEvo commented 4 years ago

Any possibility to have a feature that would trick i3wm to not close workspaces that are empty?

As discussed for example here

Chimrod commented 4 years ago

This is proposition I can implement :

Add a persistence option in the configuration file with two possible values : on_last_move and on_last_close.

This will create a new window in the workspace when the last container is moved away or closed in order to prevent the workspace destruction by i3. This window will be destroyed as soon as new container is created in the workspace (moved from another workspace, or created directly).

Of course, closing the window should be handled and shall not trigger the window creation again :)

I have to improve the application a bit, as I do not have any X dependency right now. I've started to write a binding to xcb for OCaml so be patient. This is the kind of challenge I like, I'll give you a solution !

Chimrod commented 4 years ago

Hi DeTheEvo,

I've publish a first version which operate as describe in the branch persistence. You can install it with the following command :

opam pin add https://github.com/Chimrod/i3_workspaces.git#persistence

Can you test if the behavior is the expected one (I do not have multi-screen, and cannot test exactly your use case) ?

A minimal configuration is :

[global]
persistence=on_last_move
DoTheEvo commented 4 years ago

cant compile, I get error on the base package, I am on arch

https://i.imgur.com/CCU9kdZ.png

output of base.out from the ~/.opam/log directory

ocamlopt compiler-stdlib/gen/.gen.eobjs/native/gen.{cmx,o} (exit 2) (cd _build/default && /usr/bin/ocamlopt.opt -w -40 -g -I compiler-stdlib/gen/.gen.eobjs/byte -I compiler-stdlib/gen/.gen.eobjs/native -I /usr/lib/ocaml/compiler-libs -intf-suffix .ml -no-alias-deps -o compiler-stdlib/gen/.gen.eobjs/native/gen.cmx -c -impl compiler-stdlib/gen/gen.ml) File "compiler-stdlib/gen/gen.ml", line 61, characters 14-32: 61 | let toc : Cmo_format.library = input_value ic in ^^^^^^^^^^^^^^^^^^ Error: Unbound module Cmo_format

Chimrod commented 4 years ago

This is an issue in the base library which seems to be not compatible with ocaml 4.09.

If ocaml is provided by the system, can you downgrade to an older version ?

DoTheEvo commented 4 years ago

downgraded ocaml to v4.08.1 reinit the .opam but more things got out of wack

https://i.imgur.com/eRLsuZS.png

downgraded opam one version down to v2.0.4 but same thing

Chimrod commented 4 years ago

I'm using ocaml4.07 myself (on debian). I have to check if the compilation chain works fine on other versions.

Sorry for this annoyment…