A plugin for QuickLook that adds auto-reload on file change and per-file-type window positioning.
一款 QuickLook 插件,提供文件修改自动刷新和按文件类型设置预览窗口位置两项功能。
Automatically refreshes the preview when the file is modified externally (e.g., edited by another application).
Uses both FileSystemWatcher and a 1-second polling timer for maximum reliability (including network drives).
当文件被外部程序修改时(如用其它编辑器保存了 .ini 文件),预览窗口会自动刷新内容。
同时使用 FileSystemWatcher 和每秒轮询机制,确保在网络驱动器等场景下也能可靠检测变化。
Set where the preview window appears on screen based on file extension.
Default QuickLook behavior is always centered — this plugin lets you pin specific file types to corners or edges.
根据文件扩展名设置预览窗口在屏幕上的显示位置。
QuickLook 默认总是居中展开,本插件允许你将特定类型的文件预览固定到屏幕的角落或边缘。
Available positions / 可用位置:
| Value | 位置 |
|---|---|
TopLeft |
左上角 |
TopCenter |
顶部居中 |
TopRight |
右上角 |
MiddleLeft |
左侧居中 |
MiddleRight |
右侧居中 |
BottomLeft |
左下角 |
BottomCenter |
底部居中 |
BottomRight |
右下角 |
-
Download the latest
QuickLook.Plugin.EnhancedPreview.dllfrom Releases.
从 Releases 下载最新的QuickLook.Plugin.EnhancedPreview.dll。 -
Place it in a folder named
QuickLook.Plugin.EnhancedPreviewunder QuickLook's plugin directory:
将其放入 QuickLook 插件目录下的QuickLook.Plugin.EnhancedPreview文件夹中:%APPDATA%\pooi.moe\QuickLook\QuickLook.Plugin\QuickLook.Plugin.EnhancedPreview\ └── QuickLook.Plugin.EnhancedPreview.dll -
Restart QuickLook.
重启 QuickLook。
-
Preview any file with QuickLook (select a file and press
Space).
用 QuickLook 预览任意文件(选中文件后按空格键)。 -
Click the More menu (?) in the title bar → "Enhanced Preview Settings...".
点击标题栏的更多菜单 (?) → "Enhanced Preview Settings..."。 -
Configure the two features (settings are saved automatically as you type):
配置两项功能(输入内容时自动保存):
Enter semicolon-separated file extensions:
输入以分号分隔的文件扩展名:
.ini;.txt;.log;.csv;.xml;.json
Format: extensions:Position
格式:扩展名:位置
.ini,.cfg:TopRight
.txt,.log:MiddleLeft
.png,.jpg:BottomRight
Multiple rules are separated by semicolons (;).
多条规则用分号 (;) 分隔。
Requires the QuickLook source code (v4.5.0+).
- Place this project folder under
QuickLook.Plugin\in the QuickLook source tree. - Add the project to the solution:
dotnet sln QuickLook.sln add QuickLook.Plugin\QuickLook.Plugin.EnhancedPreview\QuickLook.Plugin.EnhancedPreview.csproj - Build:
dotnet build QuickLook.Plugin\QuickLook.Plugin.EnhancedPreview\QuickLook.Plugin.EnhancedPreview.csproj -c Release - Output DLL is at
Build\Release\QuickLook.Plugin\QuickLook.Plugin.EnhancedPreview\.
This plugin implements IViewer (with CanHandle returning false) and IMoreMenuExtended.
IMoreMenuExtended: QuickLook callsMenuItemsfor every preview regardless of the matched plugin. This getter is used as the hook to activate both features.- Auto-reload: Detects file modification via
FileSystemWatcher+ pollingFile.GetLastWriteTimeUtc. On change, it retrieves the active plugin andContextObjectfrom theViewerWindowvia reflection, then callsCleanup()+View()to refresh content in-place. - Window positioning: Reads the
ViewerWindowinstance fromViewWindowManager, then directly setsWindow.Left/Window.Topbased on screen working area and DPI scaling.
本插件实现了 IViewer(CanHandle 始终返回 false)和 IMoreMenuExtended 接口。
IMoreMenuExtended:QuickLook 在每次预览时都会访问所有IMoreMenuExtended插件的MenuItems,插件以此为入口激活功能。- 自动重载:通过
FileSystemWatcher+ 轮询File.GetLastWriteTimeUtc检测文件变化。变化时通过反射获取当前活动插件和ContextObject,直接调用Cleanup()+View()刷新内容。 - 窗口定位:通过反射获取
ViewerWindow实例,根据屏幕工作区和 DPI 缩放直接设置Window.Left/Window.Top。
GPL-3.0 — same as QuickLook.