Skip to content
dsh.fish
Bundle

dsh-quicklook

QuickLook-style space-key large preview for dsh-better-sidebar: press Space on the active file tab for an instant image / PDF / text overlay

Source
Hoemr
License
MIT
Updated
Updated 6 days ago

Readme

# dsh-quicklook

QuickLook-style space-key large preview for
[dsh-better-sidebar](https://www.npmjs.com/package/dsh-better-sidebar): press
<kbd>Space</kbd> on the active file tab for an instant image / PDF / text
overlay.

## How it works

```
active file tab (dsh-better-sidebar) ── Space ──▶ large overlay preview
                                                    ├── images / PDF  → sidebar media route
                                                    └── text-like     → fs.read
Space / Escape ──▶ close overlay
```

- **client-only plugin**: the host half is a dormant stub; all behavior lives in
  the browser half (`src/client/` → `lib/client.js`).
- <kbd>Space</kbd> outside any input opens the overlay for the sidebar's active
  file tab; pressing it again (or <kbd>Escape</kbd>) closes it.
- Zoom scale is remembered across sessions via `localStorage`
  (`dsh-quicklook:size`).
- Optional peer contract: without `dsh-better-sidebar` mounted, the plugin
  contributes nothing (hot-pluggable, either activation order works).

## Install

```sh
dsh plugin --profile desktop add dsh-better-sidebar@0.13.1   # or @0.14+ on DSH rc.8
dsh plugin --profile desktop add dsh-quicklook@0.1.0
# then restart the app so bundles mount; hard-refresh the web view

# dev flow:
# dsh plugin --profile desktop add link:D:/Coding/dsh-quicklook
```

## Config

None — the bundle patch simply mounts the client-only plugin:

```yaml
- insert:
    - id: quicklook
      name: 'dsh-quicklook'
```

## Development

```sh
pnpm install
pnpm build       # tsc -b && tsdown
pnpm test        # vitest run
pnpm typecheck
```

## License

[MIT](LICENSE)

Install

dsh plugin --profile web add github:Hoemr/dsh-quicklook

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source