Skip to content

About

Tiny Windows daemon for dual-monitor gamers: game on the big screen, everything else on the other, without stealing focus.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

screen-split

A tiny Windows daemon for dual-monitor gamers: keep the game on the big screen and everything else on the small one, without fighting you.

When a new top-level window appears, screen-split decides once, within its first few seconds, which monitor it belongs on:

  • Game family (WeGame launcher, Riot Client, League client, or any executable under -GameRoots) goes to the big screen (default 2560x1440).
  • Everything else goes to the small screen (default 1920x1080), centered and kept maximized if it was maximized.

After that the window is yours. Drag it anywhere and it stays there. The in-match window (League of Legends.exe) is never touched, because moving it breaks mouse input.

Why

Many full-screen games behave only on the primary display. If you also work on a second monitor, every new browser, chat, or terminal window opens on the game screen and steals focus mid-match. Changing the primary display doesn't help because the game breaks. screen-split keeps the primary display as it is and routes new windows instead.

Usage

# try it first: log decisions without moving anything
powershell -NoProfile -ExecutionPolicy Bypass -File .\screen-split.ps1 -DryRun

# run for real
powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File .\screen-split.ps1

Parameters:

Parameter Default Meaning
-GameRoots C:\Program Files (x86)\WeGame\, C:\Riot Games\ Install folders whose executables count as "game" windows
-BigWidth / -BigHeight 2560 / 1440 Resolution that identifies the game monitor
-SmallWidth / -SmallHeight 1920 / 1080 Resolution that identifies the work monitor
-LogFile %LOCALAPPDATA%\screen-split\screen-split.log Decision log (auto-truncated at 300 KB)
-DryRun off Log only, never move windows

To start it at logon, register a scheduled task with trigger "At log on" and the "run for real" command above.

How it works

  • Polls EnumWindows every 300 ms (negligible CPU) and skips owned dialogs, tool windows, cloaked UWP shells, and shell classes.
  • Enumerates monitors live with EnumDisplayMonitors on every pass. System.Windows.Forms.Screen.AllScreens is cached per process, and a windowless daemon never receives WM_DISPLAYCHANGE, so the cached list goes stale after the display layout changes.
  • Moves with SetWindowPos(NOZORDER|NOACTIVATE), so it never steals focus from the game.

Support / 打赏

If this project saved you time, you can buy the author a coffee in crypto. Thank you! 如果这个项目帮到了你,欢迎用加密货币打赏支持,谢谢!

Network Asset Address
TRON (TRC20) USDT TNGdTwE6opH6rmUyoG1JUR7FSyEb4k273R
Ethereum / BNB Chain / Polygon USDT 0x59c43144a862b351fa1086ae842d1327c9d91613
Ethereum / Arbitrum / Base ETH 0x59c43144a862b351fa1086ae842d1327c9d91613
Bitcoin BTC 1RS6tWXHregLfEsiPzVUCUBuhgDg5uTSV
Solana USDT HZguEXfTtLChNdJTxAYCbcGscaqikz8JYrEpUhEyeVd9

Please send only the listed asset on the listed network — other tokens or networks may be lost. 请按表中对应的网络转对应的币种,转错币种或网络可能无法找回。

License

MIT

About

Tiny Windows daemon for dual-monitor gamers: game on the big screen, everything else on the other, without stealing focus.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages