pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.66k stars 412 forks source link

[F] Add option to automatically switch between workspace layouts depending on window size #2007

Closed fnkabit closed 3 years ago

fnkabit commented 3 years ago

I would like to be able to specify that below a certain window size, use layout x, above that window size, use layout y. For example, my use case:

pbek commented 3 years ago

Sounds like you want to implement:

fnkabit commented 3 years ago

Sounds like you want to implement:

  • a hook that is called when the windows size / state changes
  • a scripting function to switch between workspaces

Yes, I think so :) Do you think it would be useful ? Can I work on it ? Thanks !

pbek commented 3 years ago

Sure and sure. 😁 It would be even better if you then also write a script that allows users to switch between two workspaces in maximized / non-maximized mode.

I guess it would be great if the hook would recognize all kind of layout changes. Moving, resizing, minimizing, maximizing, full-screen, ... And also coordinates and size as parameter (or a way to fetch them, e.g. scripting functions).

fnkabit commented 3 years ago

@pbek Will start working on it ASAP.

pbek commented 3 years ago

Most excellent! 👍🏻

fnkabit commented 3 years ago

Created PR to implement a basic version of this that allows for switching between window maximized workspace / non-maximized workspace.

fnkabit commented 3 years ago

Will update docs once you agree on API changes. :-)

pbek commented 3 years ago

I added my 2c. 😉

pbek commented 3 years ago

Ok, all "mopping up" is done. 😆

21.1.3

There now is a new release, could you please test it and report if it works for you?

fnkabit commented 3 years ago

It works. Thanks for all the reviews @pbek !

pbek commented 3 years ago

Great, thank you for the nice addition and for testing! 😁