Open VS Code recent projects from a rofi menu.
Project description
code-recent-rofi
Open VS Code recent projects, files, and workspaces from a rofi popup.
The intended desktop workflow is:
keyboard shortcut -> code-recent-rofi
-> rofi popup
-> select a recent VS Code target
-> code opens the selection
Requirements
- Linux desktop session with
rofi - VS Code CLI available as
code - Python 3.12+
The tool reads VS Code's history.recentlyOpenedPathsList value from state.vscdb
in read-only SQLite mode. It checks common VS Code locations, VS Code product
metadata, and $VSCODE_RECENT_DB when set.
Install
After the package is published to PyPI, run it directly with uvx:
uvx code-recent-rofi
Or install it as a persistent user-level tool:
uv tool install code-recent-rofi
Before the first PyPI release, install the command from this repository checkout:
uv tool install . --force
If your desktop shortcut editor requires an absolute command path, resolve the installed command from your current environment instead of hard-coding one:
command -v code-recent-rofi
For editable development:
uv sync
uv run code-recent-rofi
Usage
Run the default workflow:
code-recent-rofi
Use a specific VS Code database, useful for debugging or tests:
code-recent-rofi --database ~/.config/Code/sharedStorage/state.vscdb
Override desktop command names:
code-recent-rofi --rofi-command rofi --code-command code
Show the installed version:
code-recent-rofi --version
Behavior
- Local
file://targets open withcode --reuse-window <path>. vscode-remote://andvscode://targets open withcode --folder-uri <uri>.- Duplicate recent targets are hidden while preserving VS Code's recency order.
- Cancelling rofi exits without opening anything.
- If no recent data is found, the tool sends a best-effort desktop notification.
Development
Install dependencies:
uv sync
Run the full quality gate:
uv run poe check
Individual commands:
uv run poe format
uv run poe lint
uv run poe type-check
uv run poe test
uv run poe deptry
Build and validate the PyPI distributions:
uv run poe build
uv run poe dist-check
Publishing
PyPI publishing is wired through .github/workflows/release.yml using Trusted
Publishing, so no long-lived PyPI token is needed in GitHub Actions.
For the first upload, create a pending publisher in PyPI with:
- PyPI project name:
code-recent-rofi - Owner:
sean2077 - Repository name:
code-recent-rofi - Workflow filename:
release.yml - Environment name:
pypi
Publishing follows the same shape as jsonpath-python: push conventional commits
to main, wait for CI to pass, and the release workflow runs from the successful
CI run. semantic-release updates the version first, builds the distributions
from that updated version, creates the GitHub release, and only then publishes
the built artifacts to PyPI.
If a Git tag already exists for a version that was not uploaded to PyPI, publish the next release version instead of trying to reuse the existing tag.
Manual local publishing remains possible when you have a PyPI token:
uv run poe build
uv run poe dist-check
UV_PUBLISH_TOKEN=... uv publish
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code_recent_rofi-1.0.1.tar.gz.
File metadata
- Download URL: code_recent_rofi-1.0.1.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a783808d891da392f305dd5c6ef54da8f196d995bef868875d9e0726525315a
|
|
| MD5 |
0524b65c0006045a855795081102b750
|
|
| BLAKE2b-256 |
5cbe737e9d47d38c0a9e89495fb7f01e09e44c399d72934da920e5b477169717
|
Provenance
The following attestation bundles were made for code_recent_rofi-1.0.1.tar.gz:
Publisher:
release.yml on sean2077/code-recent-rofi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_recent_rofi-1.0.1.tar.gz -
Subject digest:
4a783808d891da392f305dd5c6ef54da8f196d995bef868875d9e0726525315a - Sigstore transparency entry: 1407132600
- Sigstore integration time:
-
Permalink:
sean2077/code-recent-rofi@3fe58d61911cf8a9dea05e12550141ff8c98fe24 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sean2077
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3fe58d61911cf8a9dea05e12550141ff8c98fe24 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file code_recent_rofi-1.0.1-py3-none-any.whl.
File metadata
- Download URL: code_recent_rofi-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae4cf7a201bbf29f92a8b31c40585f6a06a528e57e7879db37af3cdd020a3ef
|
|
| MD5 |
3aa26ec411d787f327746e122c5f80c7
|
|
| BLAKE2b-256 |
09cd80dcdf5bf081a1c621cf8492177f1c8e6f585cfb2cb6d15faf407dd2166d
|
Provenance
The following attestation bundles were made for code_recent_rofi-1.0.1-py3-none-any.whl:
Publisher:
release.yml on sean2077/code-recent-rofi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_recent_rofi-1.0.1-py3-none-any.whl -
Subject digest:
1ae4cf7a201bbf29f92a8b31c40585f6a06a528e57e7879db37af3cdd020a3ef - Sigstore transparency entry: 1407132650
- Sigstore integration time:
-
Permalink:
sean2077/code-recent-rofi@3fe58d61911cf8a9dea05e12550141ff8c98fe24 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sean2077
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3fe58d61911cf8a9dea05e12550141ff8c98fe24 -
Trigger Event:
workflow_run
-
Statement type: