Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Add reuse window option #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .bin/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REUSE_WINDOW=""
VSCODE_APP_EDITION="Visual Studio Code"

if [ $vscodeEdition == 'code-insiders' ]
Expand All @@ -10,4 +11,9 @@ then
VSCODE_APP_EDITION="VSCodium"
fi

open -a "${VSCODE_APP_EDITION}" "$1"
if [ $reuseWindow == 'true' ]
then
REUSE_WINDOW="-r"
fi

open -a "${VSCODE_APP_EDITION}" "${REUSE_WINDOW}" "$1"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Remember to set the `vscodeEdition` variable to `codium` in the Workflow Configu

It defaults to `code`.

### Reuse window option

If you want to open project with same vscode window, you can use reuse option.

To set the `reuseWindow` variable to `true` in the Workflow Configuration.

## Usage

### Projects
Expand Down
3 changes: 3 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ For furher details see https://github.com/kbshl/alfred-vscode</string>
<string></string>
<key>vscodeEdition</key>
<string>code</string>
<key>reuseWindow</key>
<string></string>
</dict>
<key>variablesdontexport</key>
<array>
<string>vscodeEdition</string>
<string>reuseWindow</string>
</array>
<key>version</key>
<string></string>
Expand Down