Skip to content

b03tz/closent

Repository files navigation

Closent

Closent

Keep your Windows apps alive. A tiny tray utility that watches the apps you pin and re-opens them the moment they close or crash.


Why

Some apps you just want running, always — your timer, your messenger, the PWA you live inside all day. If they crash or you accidentally close them, you want them back without thinking about it.

Closent runs in the system tray, polls every 5 seconds, and restarts anything that's gone missing.

Features

  • Tray app — opens on demand from the system tray, hides on close
  • Pin running apps — pick from a list of currently visible windows and pin them to stay alive
  • Pin shortcuts — pin from a .lnk file directly (handy for Chrome/Edge PWAs)
  • Three match strategies
    • ProcessName — matches any running instance of an exe (default for normal apps)
    • CommandLine — matches a substring of any visible-window process's command line
    • WindowTitle — matches a substring of any visible window's title (default for browser-hosted apps)
  • Smart shortcut auto-discovery — when you pin a Chrome/Edge window, Closent searches your Desktop and Start Menu for the matching .lnk so it captures the real launch command (because chrome.exe's own command line rarely tells you which PWA it's running)
  • Edit anything — every field of every pin is editable; double-click a row
  • Per-app pause + global pause toggle
  • Start with Windows — one checkbox, no admin needed (uses HKCU\…\Run)

Install

  1. Download the latest release for your architecture from Releases:
    • Closent-win-x64.zip for 64-bit Windows
    • Closent-win-x86.zip for 32-bit Windows
  2. Extract the whole folder anywhere (e.g. C:\Tools\Closent).
  3. Run Closent.exe.

The build is self-contained — no .NET runtime install required.

Usage

Pin a running app

  1. Click the tray icon to open the window.
  2. Pick the app from the Currently running apps list.
  3. Click Pin selected (or double-click the row).
  4. Review the auto-detected match strategy in the Edit dialog and click Save.

Pin a Chrome/Edge PWA

Pin Selected works for PWAs — Closent will auto-find the desktop/Start Menu shortcut by name and pull the launch command from it. If no shortcut is found you can also use Pin shortcut… to pick the .lnk directly.

Match strategies — when to use which

Strategy When to use
ProcessName Standalone apps with a unique exe name (Notepad, VS Code, Spotify).
CommandLine Multiple instances of the same exe distinguished by an argument.
WindowTitle Anything hosted inside a shared process — Chrome PWAs, Edge PWAs, ApplicationFrameHost-based UWP apps.

You can change any pin's strategy at any time via Edit….

Config location

%AppData%\Closent\config.json — plain JSON, hand-editable.

Build from source

Requires the .NET 9 SDK.

git clone https://github.com/b03tz/closent.git
cd closent
dotnet build -c Release

Produces bin\Release\net9.0-windows\Closent.exe.

To produce a release zip:

dotnet publish -c Release -r win-x64 --self-contained true -o publish\win-x64
Compress-Archive -Path publish\win-x64\* -DestinationPath Closent-win-x64.zip

Swap win-x64 for win-x86 for the 32-bit build.

Regenerating the icon

powershell -ExecutionPolicy Bypass -File tools\Make-Icon.ps1

Generates Closent.ico with frames at 16, 24, 32, 48, 64, 128, and 256 px.

Tech

  • .NET 9 / Windows Forms
  • WMI (Win32_Process) for command-line capture
  • Win32 EnumWindows + DwmGetWindowAttribute for window enumeration (catches PWAs/UWP that Process.MainWindowHandle misses)
  • WScript.Shell COM for .lnk reading
  • Registry (HKCU\…\Run) for the startup toggle

License

MIT.

About

A simple UI app that keeps apps open after crash or after closing - including PWA's from browsers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors