Bug 390797 - Feature request: macOS-like titlebar proxy icon
Summary: Feature request: macOS-like titlebar proxy icon
Status: REPORTED
Alias: None
Product: plasma-activities
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-20 17:27 UTC by Nate Graham
Modified: 2023-03-02 06:06 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-02-20 17:27:23 UTC
This was discussed in the VDG Telegram room and received strong support.

One Productivity feature that macOS benefits from is the titlebar proxy icon: every document-based program gets a little proxy icon in its titlebar corresponding to the open document. This icon is interactive: you can drag it as if it were the actual file itself; right-click on it to expose the path it lives at and open its containing folder; and even rename it. Some more examples:

http://osxdaily.com/2014/08/20/open-files-new-app-proxy-icon-mac-os-x/
http://osxdaily.com/2012/08/01/rename-file-mac-os-x-easy-way-title-bar/
http://osxdaily.com/2014/03/17/move-file-mac-window-titlebar/

These features add a mind-blowing level of productivity for advanced users. Eike was saying that this seemed possible to add to Plasma through the KActivities framework.
Comment 1 Kai Uwe Broulik 2018-02-20 20:14:14 UTC
Wouldn't that be a job for the WindowMetadata framework? +1 on having a proxy icon
Comment 2 Øystein Steffensen-Alværvik 2018-02-21 12:35:11 UTC
Wow, that looks like a really useful feature!
Comment 3 David Edmundson 2020-07-23 20:50:56 UTC
I don't see where activities would come into this.

Ultimately you need to start a drag event with a URL as mimedata.

Bigger challenges you need to face are:
 - what's the URL for an unsaved document? 
 - it's also one of those things that if it isn't done consistently the UX is useless. Even if we ported all KDE apps that still leaves a problem.
 - kdecorations are themable, introducing new behaviour into something themeable in a way that works for all is always a messy nightmare

If we're copying down to the point of it being something in the titlebar the actions that would be needed to be done are:
  - export the current file URL as a window property (like the DBus menu paths)
  - update decoration to have the URL
  - include custom drag and drop handling within kwin's decorations with a URL as metadata.
Comment 4 Nate Graham 2020-07-23 20:53:49 UTC
The icon could be disabled for an unsaved document. That's what macOS does. You can't drag it until the document has been saved.

If doing this in the titlebar is not feasible, someone just proposed handling it in the Task Manager in Bug 423938 which could be an easier option, maybe.
Comment 5 Nate Graham 2020-07-23 22:21:38 UTC
What would be responsible for

> export the current file URL as a window property
KWin? KWindowSystem? The app itself?
Comment 6 David Edmundson 2020-07-23 22:23:37 UTC
the app itself so whoever provides the dragging can read it
Comment 7 Nate Graham 2020-07-23 22:49:06 UTC
I think that's why Kai was thinking that KActivities could help here. IIRC he was thinking that KActivities knew the URLs of each app's open documents or something?
Comment 8 Mathieu Jobin 2023-03-02 06:06:27 UTC
I am also interested seeing this feature implemented.

I wonder if the "client app" could not communicate to kwin that it has a file open.
very much like showing the file need saving.

I tried to find the API doc for this but I got lost...