Hi sebas,
On 13.07.2016 02:18, Sebastian Kügler wrote:
During the Plasma sprint in March, we've been fleshing out plans to create a
mechanisms for apps to be represented by the shell.
The goals it to achieve a richer integration between apps and the workspace.
The idea is that windows can announce a richer set of metadata that can be
used to enhance the window's representation in the workspace/shell. Think of
- task switchers with more meaningful thumbnails of better quality
Exciting times :)
- server-side decoration actions to "remote-control" the app
- user-visible features similar to the mpris-controls in the task bar
So does that mean that parts (or all) of the DWD ideas will be implemented
using WindowMetadata?
- currently open document
Don't most applications expose that in their window title, anyway?
More thoughts on this are explained on this wiki page
https://community.kde.org/KWin/Window_Metadata (which is not quite up-to-date
with the implementation I'm proposing here).
These features are achieved by using D-Bus for client-server communication.
I've written some basic components that provide the basic mechanisms for that.
There's a library for the clients, one for the server, qtquick components for
both sides, autotests and interactive testing apps. The functionality is
fairly slim, I've only implemented to allow apps to announce titles and
thumbnails. The title property is rather simple, the thumbnail property is a
bit more involved -- the server (compositor, task manager, task switcher,
etc.) requests thumbnails to be passed via a connection-private file
descriptor and communicates the semantics over D-Bus.
Here's a run-down of what's currently there. I think it provides a good base
for the above goals. It's not complete by any means, api docs are also missing
still (I expect some semantics to change).
Attached, find a README.md file that explains the implementation and its
components.
The code can be found in the kde:scratch/sebas/windowmetadata repository.
Feedback is most welcome.
The caveat that writing text into the thumbnail is problematic is a pretty big
problem
from my perspective. For example in a text editor, I don't see how relevant
information
can be represented by a "pretty picture". I'd rather put e.g. the first X
characters into
the thumbnail there, so that even if the document does not have a name yet, it
can
be recognized by its context.
Or in a terminal I'd show the last output line or something.
Outside of graphics applications or media players, I don't see how anything
without text
is supposed to transport meaningful information.
Isn't there any way to work around the DPI problem?
If not, I'd suggest to allow the application to choose whether it wants a
thumbnail or text
to be shown. Then graphical applications could render a thumbnail, while most
others
would just make it show text.
I'm super-excited to see the window metadata idea come to life, as it promises
tons of
possibilities. It would be sad if we'd limit these possibilities by restricting
ourselves to
"pretty pictures". The goal is to create actually useful thumbnails, after all.
Hope that helps!
- Thomas
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel