New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inter-operate with platform-specific "favorite directories" #1238
Comments
These files contain the bookmarks on different systems:
|
This is going to be a lot of work especially as we consider all the different linux desktops and distributions. |
My $0.02 -- we should build a library that solves this on it's own, and then use it as an internal dependency of Fyne. People building other programs could well want that as an independent thing from Fyne also. |
In the meantime i found this; which basically implements what @charlesdaniels described, though it might need some platform specific adjustments, as windows afaik does not follow XDG ;) |
As far as I know XDG is only followed on Linux. None of Windows, macOS, iOS or Android use this spec. Also, as you noted before, the user-configured list of directories (which this ticket aims to match) is not part of the XDG but instead specific to the desktop shell that the user prefers. |
Linux global: FreeDesktop Bookmark Specification I can also put together a list of known XDG formats for this if it will help this along, having implemented favourites in my app already. |
The files in the CustomDestinations folder on windows follow the Structured Storage format by Microsoft; it reads (from their docs) like someone on a night out designed the format while unable to function. |
Going to see if I can use some off the shelf reference code to read (C#) https://github.com/ironfede/openmcdf If I can find a way to read in this and the C/CPP microsoft examples; it might become more obvious what they are doing and why. Frustratingly guidance on This stackoverflow on the files suggests the format has changed; Update None of these files were structured storage format that I attempted to open. |
Interestingly I can enumerate all the values in powershell using the following
I need to find out where the heck |
Honest question, does it matter? Powershell is available in every supported
version of windows, why not just fetch it through powershell?
…On Sat., Dec. 11, 2021, 10:26 a.m. Lewis Cowles, ***@***.***> wrote:
Interestingly I can enumerate all the values in powershell using the
following
$QuickAccess = New-Object -ComObject shell.application
$QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items()
I need to find out where the heck {679f85cb-0220-4080-b29b-5540cc05aab6}
exists as regedit cannot find it; and neither can find.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1238 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSNPLXLRMWC5WBR77HQOLUQOJVRANCNFSM4PX2K2OA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Do you mean sub-process, and then interpret the output? |
No, literally speak to the powershell host inside golang, there are
multiple packages to do this with, here is an example:
https://github.com/KnicKnic/go-powershell
…On Sat., Dec. 11, 2021, 10:36 a.m. Lewis Cowles, ***@***.***> wrote:
Do you mean sub-process, and then interpret the output?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1238 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOSNPLM2COPZOFFH7VLXMDUQOK3HANCNFSM4PX2K2OA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
That particular package is probably overkill for what you want to do here,
execute a single command and get it output, but you could look at that code
as a good example for how they did that, and just use that one routine.
On Sat., Dec. 11, 2021, 10:38 a.m. Damon Blais, ***@***.***>
wrote:
… No, literally speak to the powershell host inside golang, there are
multiple packages to do this with, here is an example:
https://github.com/KnicKnic/go-powershell
On Sat., Dec. 11, 2021, 10:36 a.m. Lewis Cowles, ***@***.***>
wrote:
> Do you mean sub-process, and then interpret the output?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1238 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOSNPLM2COPZOFFH7VLXMDUQOK3HANCNFSM4PX2K2OA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
|
If you would like to chase that path, feel free. I'm trying to extract the win32 API calls. It'll just make me feel better. |
In case it matters, I'm on Windows 10 64-bit home, Version 10.0.19044 Build 19044 I've still not found a way to ensure this is the right file or get this information in go. |
Interestingly enough this link about backing up those explorer pinned items suggests that the same file as I found my pinned items in, should be backed up. Perhaps there is a standard list, or a canonical path to the file? |
|
https://github.com/EricZimmerman/OleCf/blob/master/OleCf/Header.cs is about reading this file-type. Which is apparently shared with old pre docx word documents. https://github.com/richardlehane/mscfb/network is a go reader of the file-type; so something akin to https://github.com/EricZimmerman/JumpList should be used to parse out the locations. ~I Think a benefit of this will also be that for windows, this software currently seems to assume Here is a sample repo I made using richardlehane with EricZimmerman C# code as a reference I hacked it together https://github.com/Lewiscowles1986/read-pinned-folders There seems no ability to rename the folder, so the |
We should consider adding some kind of capability, possible as part of the driver, that exposes the platform's "favorite directories". For a start, we could just read them and add to the side-bar, but in a perfect world we would interact with these bi-bidirectionally.
The text was updated successfully, but these errors were encountered: