Skip to content

A GNOME Shell extension that gives you vscode workspace management features

License

Notifications You must be signed in to change notification settings

ZanzyTHEbar/vscode-nautilus

Repository files navigation

VSCode Nautilus Extension

GitHub License Lint

Description

VSCode Nautilus Extension is a project that provides a GNOME Shell extension for accessing visual studio code/codium recently opened workspaces/directories.

With workspace support, you can open a workspace in Visual Studio Code with a single click.

Provided are two other, optional, extensions for Nautilus.

The first, vscode_nautilus_workspaces.py, adds a right-click context menu to select from a list of recently accessed workspaces or directories and open in Visual Studio Code.

The second, vscode_nautilus_open.py, adds a right-click context menu to open a folder or file in Visual Studio Code.

Features

  • Supports GNOME Shell 45 - 46
  • List all your local VSCode workspaces
  • List all your remote VSCode projects
  • Add a custom workspace by path
  • Supports both Visual Studio Code and Codium
  • Nautilus extensions for opening folders and files in Visual Studio Code

Install Extension

Install from GNOME Extensions

Install from Source

bash <(wget -qO- https://github.com/raw/ZanzyTHEbar/vscode-nautilus/main/install.sh)

Uninstall GNOME Shell Extension

To uninstall a GNOME Shell extension, you can use the GNOME Tweaks application or the gnome-extensions command.

gnome-extensions disable vscode-workspaces@prometheontechnologies.com
gnome-extensions uninstall vscode-workspaces@prometheontechnologies.com

You can also remove the directory manually.

rm -rf ~/.local/share/gnome-shell/extensions/vscode-workspaces@prometheontechnologies.com

Uninstall Nautilus Extensions

rm -f ~/.local/share/nautilus-python/extensions/vscode_nautilus_workspaces.py
rm -f ~/.local/share/nautilus-python/extensions/vscode_nautilus_open.py

Usage

Nautilus Extensions

To open a folder or file in Visual Studio Code, right-click on an item in Nautilus and select the "Open in Code" option.

To open a recent folder or workspace, right-click on an empty space in Nautilus and select the "Open Recent Workspaces" option.

GNOME Shell Extension

To open a recent folder or workspace, click on the Visual Studio Code icon in the top bar and select a recent folder or workspace.

You also have various options to configure the extension in the GNOME Tweaks application.

Integrates well with the VSCode Search Provider.

Development

The latest development version requires git, node, and make.

I use pnpm, but you can use npm or yarn if you prefer. It is up to you to modify the scripts to use your preferred package manager.

Navigate to your desired directory and execute following commands in the terminal:

GNOME 45+

git clone https://github.com/ZanzyTHEbar/vscode-nautilus.git
cd vscode-nautilus/gnome-extension

make && make pack && make install

You can run make help to see all available commands.

Enabling the extension

After installation you need to enable the extension.

  • First restart GNOME Shell (ALt + F2, r, Enter, or Log-Out/Log-In if you use Wayland)
  • Now you should see the VSCode W extension in the Extensions application (reopen the app if needed to load new data), where you can enable it.

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome 😄