- changed title to Make it possible to open directory/file using drag & drop to the app icon or using "open -a HiFile /file/path"
Make it possible to open directory/file using drag & drop to the app icon or using "open -a HiFile /file/path"
On macOS often we can drag a file or a directory on an application icon and the application will open with that file. On file manager, when a directory or file is dragged, often the file manager will open a new tab or a new window pointed at that directory or file.
I often search for files using the Alfred app and do “Open with…” and select my file manager of choice to access the selected file directory. It would be great to be able to use HiFile with this macOS feature.
From the Terminal, normally we can normally do it with the “open” command like:
open -a HiFile /file/path
Having the option between opening the directory on the active tab or a new tab would be great.
Comments (6)
-
reporter -
reporter Just an update on that one since this would be one feature that I would often use. From a brief look at it, this seems to be implemented using the QFileOpenEvent Class on macOS.
- Here is the doc + example: https://doc.qt.io/qt-6/qfileopenevent.html
- Here is another example (may be a bit outdated, but gives some ideas): https://stackoverflow.com/questions/26849866/unable-to-open-file-with-qt-app-on-mac
It would be great that when we send a directory this way, HiFile opens a new tab (or uses the current tab) and access that directory. When a file is sent this way, then a new tab (or the current tab) is opened and the parent directory is opened and the file we sent is then highlighted.
-
repo owner Thank you very much for this excellent idea and also for exploring the way to implement this. It seems that this way which you suggested really works.
It will be implemented in HiFile 0.9.9.4 which can be expected to be released within a week or two.
-
reporter Great! I’m glad you liked the idea and that my research was useful! I’m looking forward to that new feature!
Best!
-
repo owner Fixed in HiFile 0.9.9.4 and released as of 2023-09-28.
-
repo owner - changed status to closed
done in HiFile 0.9.9.4
- Log in to comment