dsh-quicklook
开发工具 活跃维护

dsh-quicklook

Hoemr/dsh-quicklook

轻量级文件预览工具,为DSH better-sidebar提供类QuickLook的空格键即时预览能力,按下空格即可在当前激活文件标签上弹出覆盖层,支持图片、PDF、文本等格式直接查看,操作流畅无需额外跳转。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
59 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Hoemr/dsh-quicklook
git clone https://github.com/Hoemr/dsh-quicklook.git
git clone git@github.com:Hoemr/dsh-quicklook.git
README.md main

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.

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).
  • Space outside any input opens the overlay for the sidebar's active
    file tab; pressing it again (or Escape) 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

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:

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

Development

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

License

MIT