PersistentWindows README

The project's README from github.com/kangyu-california/PersistentWindows. As one markdown file: README.md.

PersistentWindows

This project addresses a long-standing issue in Windows 7, 10, and 11, where windows get repositioned after events such as the system waking up, external monitor connections or disconnections, changes in monitor resolution (e.g., exiting full-screen gaming), or during RDP reconnections. The code was forked from ninjacrab.com/persistent-windows.

Original Description

What is PersistentWindows?

A poorly named utility that persists window positions and size when the monitor display count/resolution adjusts and restores back to its previous settings.

For those of you with multi-monitors running on a mixture of DisplayPort and any other connection, you can run this tool and not have to worry about re-arranging when all is back to normal.

Key Features

Installation

Method 1.

Method 2.

For PersistentWindows to be able to restore windows with elevated privileges (for tools like Task Manager or Event Viewer), it needs to be run with Administrator privileges.

To set up PersistentWindows to automatically start at user login:

This can be done by creating a task in Task Scheduler, or by adding a shortcut to the Startup Folder (shell:startup).

Choose one of the three methods:

Method 1. Task Scheduler (Windows 10/11)

Method 2. Task Scheduler (Windows 7/10/11)

  start "" /B "%~dp0PersistentWindows.exe" -splash=0
schtasks /create /sc onlogon /tn "StartPersistentWindows" /f /tr "'%~dp0pw.bat'" /rl HIGHEST
REM Override High DPI Scaling
REG ADD "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0PersistentWindows.exe" /t REG_SZ /d "~ HIGHDPIAWARE" /f

Method 3. Startup Folder (Windows 7/10/11)

Uninstall

Step 1. run uninstall.bat as admin to delete private appdata folder created by PersistentWindows and remove auto start task

Step 2. if installed using winget, run "winget uninstall PersistentWindows", otherwise remove the directory containing PersistentWindows.exe

Usage Instructions

Privacy Statement

Known Issues

Tips To Digest Before Reporting A Bug or Enhancement Request

PersistentWindows (kangyu-california/PersistentWindows)

Searching Database…

这是什么?PersistentWindows 是一个 Windows 桌面实用工具,会记住你的窗口位置,并在从睡眠唤醒、显示器连接/断开、分辨率变化或 RDP 重连等事件之后自动恢复那套布局。
这是一个我运行的应用,还是后台服务?它是一个独立 .exe,运行时没有主窗口,隐藏在系统托盘里;你通过右键菜单和它交互。
怎么安装并运行它?通过“winget install PersistentWindows”安装,或者从 Releases 页面下载 PersistentWindows.zip 解压到任意位置,然后运行 PersistentWindows.exe。
它需要管理员权限才能正常工作吗?要获得完整功能,比如恢复提权窗口(任务管理器、事件查看器),它需要以管理员权限运行。
有什么已知的怪癖要留意?在按分数缩放的显示器(125%、150% 等)上,如果不是通过自启动任务启动,它可能出问题,而且你可能需要把它的高 DPI 缩放属性覆盖为“Application”。如果某个无响应的窗口卡住了恢复操作,它也可能卡在红图标的“忙碌”状态。
它在 Windows 7 上也能用,还是只支持 10/11?能用,它面向 Windows 7、10 和 11,三者都有开机自启动的设置说明。
它收集哪些数据,数据去了哪里?它记录窗口的位置/大小/Z 顺序、标题、进程 ID,以及与它自身 UI 操作相关的键盘/鼠标事件;按键/鼠标历史在收到约 1 秒后就被清除,窗口历史则保存在 RAM 里,或以 LiteDB 文件的形式保存在本地。
可以手动给我的窗口布局拍快照吗?可以,你可以手动把布局捕获到 RAM 作为快照(每种显示器配置最多 36 个),或者以 LiteDB 格式存到磁盘,这样重启后还在。
它能恢复窗口的堆叠顺序,而不只是位置吗?能,手动快照会保留窗口 Z 顺序,也可以用 -fixzorder=1 选项让自动恢复也启用该功能。
“webpage commander”功能是什么?它是一套 vi 编辑器风格的单字母键盘快捷键系统(按 Alt+W 触发),用于在任何主流浏览器里更高效地浏览网页。
怎么让它登录时自动启动?三种办法:运行自带的 autostartpw.bat 注册一个任务计划程序任务;用 .bat/.vbs 包装器手动创建一个以获得管理员权限;或者把快捷方式放进启动文件夹(shell:startup)。
Size
2.4 MB
Stars
2.1K
Age
6y
Commits · 90 Days