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
Include machine name in default target note name #7
Comments
Hi @claremacrae, thanks, that's an excellent suggestion! Also, your thanks make me unreasonably happy. I'm a big fan of your work and now I am able to give something back, which feels really nice. 🙌🏼 |
Wow - thank you for the kind words! |
@claremacrae Do you happen to know how to get the device name on mobile? On desktop, it's straightforward ( |
I’m on mobile at the moment so can’t check. Sorry. I think if you console.log Otherwise, I might search in #plugin-dev on Discord. And then ask there. When using Obsidian Sync, the log shows machine name in a particular format, I think. And I feel it would be good to try to use that same value, if possible. |
Good suggestion, thanks! After some serious digging around in Discord, I came across this post:
Looks like it fits the bill! |
OK. What happens if Sync is disabled? Worth testing with that, I feel. |
This is all really interesting. There is also a nearby post: See above message for way to grab the Device Name that Sync is using (whether system default or specified by the user) from the Sync plugin internals 🙂 let syncPlugin = app.internalPlugins.plugins["sync"].instance;
console.log(syncPlugin.deviceName ? syncPlugin.deviceName : syncPlugin.getDefaultDeviceName()); |
In my case, Sync is disabled but Sync is in by default because it's a core plugin and all that. I'm certain |
OK great. It's not obvious from the Sync docs but it's possible for users to rename their machine for sync: I think that code snippet I posted above would help you, if you wanted to use the user's own name, if supplied... |
Oh, now I see, I misread your post, then. Yes, that's true, it should adhere to the user's preference. |
Added in 1.2.0, just released. (Found some time and energy, it was a slow Sunday.) |
It works great. Thank you! |
Huge thanks for this plugin. It is really going to help with user support on the Tasks plugin.
This is a slightly more simpler alternative to #2, as it does not require adding any settings code and UI.
Scenario
I have a vault which is synced via Obsidian Sync across 3 devices.
If I have the plugin enabled on more than one of these devices, then there will be constant contention and sync conflicts between devices in the content of
LOGGING-NOTE.md
.Suggested solution
Please could you consider appending the name of the device to the default filename automatically, so that users get non-conflicting behaviour out of the box.
The text was updated successfully, but these errors were encountered: