-
Notifications
You must be signed in to change notification settings - Fork 120
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
Bring me updates #614
Bring me updates #614
Conversation
I think it's a very reasonable way to go as it reduces duplicate commands and provides a standard workflow. It would be interesting to see what other areas we can brainstorm to expand this functionality further for the roadmap. Did you run into this issue while working on the Bring me updates? |
This is a good example of a |
A significant improvement and definitely much easier to read code. Everything works the expected except for "restore bring me defaults" producing no error message or restoring the default bringme keys. A not as clean workaround is to overwrite the bringme.toml with the default instead of trying to load the defaults from the source location. Overall I prefer the second method. Edit: "restore bring me defaults" does load the defaults. bringme keys that are default function as expected however they are not saved back into bringme.toml and if bringme.toml is deleted the files not restored. One suggestion is to include the context for windows powershell as well. |
Regarding defaults, I think it makes sense to define them in a dictionary in the same file rather than a separate toml file. Mainly because it keeps everything in one place and easily readable. I've also modified the functionality so that restoring defaults also overwrites the config file. Thoughts? |
Perfect a bit of clean up to remove the |
After further testing #575 is an issue however I'm not sure if that's what you want in the scope of this pull request. Second thoughts on a spec change It's not an issue for me personally as I can modify it through filter rules. |
Another concept that I thought interesting. The command |
I'll think about it, can probably use a context action for this as well |
This is debatable but possibly functional for those that manually edit the
Your new additions test out and function as expected. |
All of these additions seem to work well. What do you think about adding the following:
This one would always open a new window to open the desired item. If the current context is a terminal, folders would open in a new terminal window.
These would operate by 1) looking for an open instance of one of these types of windows, 2) navigating to that folder in an open instance if one exists; if one does not exist, opening a new window at that folder.
Like the above but it always opens a new window. |
Would also be good to incorporate all of this into the |
Okay I've done another rearrange and implemented some of the above. Websites and programs/files work the same but for folders:
I'm not a powershell user so not sure how well this will work for that. I think having a separate method for each item type is neater and will make for easier scaling if we need to add more categories. |
Updated hyperlink for caster and dragonfly. Tweaked order of keys For Caster and dragonfly add "documentation <project>" per project.
@mrob95 I made a few tweaks and if you don't feel of the relevant they can be removed.
|
A bug for those that don't use the default location of my documents or any other configurable library. Therefore with
When dictating There is not an easy solution due to there is no environmental variable for my documents. Another alternative with power shell and you could grab Edited @mrob95: demo code def check_output():
try:
output = subprocess.check_output(
["powershell.exe", "[environment]::getfolderpath('mydocuments')"],
shell=True)
except subprocess.CalledProcessError, e:
print "subproces CalledProcessError.output = " + e.output
print output
check_output() Prints |
You may not be aware but you could leverage these as well. Dragonflies runcommand-action |
Hmm, I'm surprised that it works in one context but not in another. Maybe try adding the following to
I'm aware of |
I assume you mean
Edit @mrob95 if I type
I would say it's not as clean, However think there's also utility and advantage to leveraging |
I've tidied up this code following the basic pattern of #577 , using a single object to keep track of config rather than calling a bunch of separate functions.
I've also implemented context dependent folder actions for terminal and Windows Explorer as mentioned in #476, so "bring me my documents" will "cd" if a terminal window is active, and will use a focused file explorer window instead of creating a new one.
Happy to get feedback on whether or not people think this is the right approach.