Skip to content

Add missing shell methods on atom global#1564

Open
savetheclocktower wants to merge 4 commits into
masterfrom
1563-new-shell-methods
Open

Add missing shell methods on atom global#1564
savetheclocktower wants to merge 4 commits into
masterfrom
1563-new-shell-methods

Conversation

@savetheclocktower
Copy link
Copy Markdown
Contributor

Closes #1563.

This adds in the following methods:

  • atom.trashItem
  • atom.openPath
  • atom.openExternal
  • atom.showItemInFolder

All of these exist on require('electron').shell, but are not 100% able to be called from the renderer for one reason or another. As with many other methods defined on the atom global, these methods proxy to the main process via IPC, then receive the outcome from the main process.

Specs are present for atom.trashItem, but I've got no clue how I'd test the others. That'll require manual testing.

@savetheclocktower savetheclocktower added this to the 1.133.0 milestone May 19, 2026
Comment thread src/application-delegate.js Outdated
@Daeraxa
Copy link
Copy Markdown
Member

Daeraxa commented May 19, 2026

I tried them all out in the dev tools console and they seem to work fine. Even substituted the shell.trashItem in my init script for atom.trashItem and it is still working.

Also checked that atom.trashItem still honours $ELECTRON_TRASH, was able to set that to kioclient and watch it fail in the same way as if it was set on shell.trashItem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shell methods not already implemented

2 participants