raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

The -c option isn't equivalent to using the .notion directory. #286

Open kristopolous opened 4 years ago

kristopolous commented 4 years ago

I'm going to be investigating this so no need to take action unless you really want to.

Expected:

I could move ~/.notion to say another name, let's call it .notion-another-name.

Then I could do $ notion -c ~/.notion-another-name and have it treat the new name as if it was named .notion. It will process the .lua files in the same way, place session files in it in the same way as well.

This allows for multiple self-contained configuration directories for testing and and development.

Actual:

-c needs to point to a .lua file, not a directory. Pointing it to a lua file with a bunch of do_paths in there to load everything seems to load without producing an error however the contents appear to either be partially or completely ignored. Any key mappings or definitions don't; seem to work.

Additionally, if in so doing the above, "~/.notion" no longer exists, it gets created and a session file goes into it. Additionally, the welcome screen comes up as if it was the first time using the software.

Notes:

There of course could be a difference between my assumed purpose of the -c option and what it is indeed intended for. I'm going to assume, at least for now, that the description as described in the "expected" section is what we intend it for, that is to say an ability to completely substitute .notion with a different directory for the duration of the execution of the program

raboof commented 4 years ago

Indeed the -c option doesn't replace your ~/.notion, it lets you select an alternative to the root cfg_notion.lua.

If you want to use a .notion-another-name, you can add it to the search path with -s.

Indeed we hardcode ~/.notion in a couple of places, including completeman, notionflux and dev-search-dirs.sh. I don't know how the location of the session file is determined. I agree it seems useful to be able to override this.