Improved system_paths list generation for Windows.#1835
Improved system_paths list generation for Windows.#1835Enyium wants to merge 8 commits intotalonhub:mainfrom
system_paths list generation for Windows.#1835Conversation
- Added various paths including for virtual folders. - Corrected resolving of paths like "Downloads", which the user may have changed using the Explorer properties dialog of the respective virtual or resolved folder. - Fixed bug where path adjustments made by the algorithm weren't reflected in aliases.
d65967f to
e80b02d
Compare
There was a problem hiding this comment.
Thanks, this seems a useful thing to have on Windows. I made a small code comment, but three larger issues:
- This change adds a lot of new system paths, but host-specific .talon-list files don't get regenerated to add them if they already exist, so existing users won't get any of these new paths.
- I'm not sure we need to have so many ways to say something, e.g. 3 ways to say "virtual desktop", particularly when this adds 3 identical .talon-list entries. Please just pick one.
- Virtual folders don't work in CMD or PowerShell. They may want to be separated out into a separate list to be Windows Explorer-only.
I think #3 may be a good solution for #1; just separate the virtual folders out into a separate list. By definition they don't need to be customized per-host like the other system paths.
`address.talon` already handles this with `go [to] <user.address>`.
Also provided a capture that combines non-virtual and virtual system paths.
for more information, see https://pre-commit.ci
Should the previously existing aliases "desk" and "docks" also be removed? I defined "virtual desk", e.g., because of the existence of "desk". If "desktop" is worthy of a shorter alias, I thought "virtual desktop" is too. I don't understand the necessity of the pass-through capture Also, theres the explanation at the top of There seems to be a problem which may be out of the scope of this PR:
@ctx_file_manager.capture("user.address", rule="{user.system_paths}")
def address(m) -> str:
return str(m)If you'd change the rule to
|
For platforms other than Windows, I left the
# TODO: Correct this for Mac and Linux.Since I only use Windows, I don't know whether this needs any adjustments. But the behavior for these platforms shouldn't have changed. So, even if what directly follows the todo is incorrect, then it already was before, and fixing it wouldn't need to be done by this PR.I also don't use OneDrive, so couldn't fix any possible problems with the code that adds OneDrive subpaths. But I kept it.