zed icon indicating copy to clipboard operation
zed copied to clipboard

Open current folder on shortcut icon

Open rcarlier opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

Maybe it's a setting that I'm unaware of, but I can't configure a shortcut on the finder to open Zed in the current folder (like when you drag&drop on the icon)...

If this is not possible, it would be an interesting feature

If applicable, add mockups / screenshots to help present your vision of the feature

zed

rcarlier avatar Jul 13 '24 09:07 rcarlier

It's possible :) Inspired by this

  1. Open Automation
  2. Choose "Application"
  3. Search for "Run Shell Script" and Drag & Drop onto workspace on the right
  4. Enter this command (assuming you have zed installed with homebrew)
finderPath=`osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)'`
/opt/homebrew/bin/zed "$finderPath"

Should look like this:

image

  1. Save file with the name of your choice
  2. Add it to toolbar (like this)

Optional: follow the link above to change icon image

Final result:

https://github.com/user-attachments/assets/ea9fed34-8869-4ae9-82ee-a5f37ed96b32

dtonda8 avatar Jul 13 '24 12:07 dtonda8

Thanks @dtonda8!

@rcarlier https://github.com/zed-industries/zed/issues/14388#issuecomment-2226876648 satisfy your use-case?

Moshyfawn avatar Jul 15 '24 13:07 Moshyfawn

Yes ! I have installed via download, so the automator line must be:

finderPath=`osascript -e 'tell application "Finder" to get the POSIX path of (target of front window as alias)'`
/Applications/Zed.app/Contents/MacOS/zed "$finderPath"

Many thank's

rcarlier avatar Jul 16 '24 06:07 rcarlier

Going to close this out, as there is a workaround provided. Im not exactly sure what we could do to support this without doing the workaround, as I'm not familiar with the OS <-> Zed layer of code, but if we get enough requests for this, we can look into it.

JosephTLyons avatar Jan 30 '25 16:01 JosephTLyons