showit-0.1.12 is not a library.
showit
Bring any Windows window to the foreground by searching its title — fast, coloured, interactive.
Features
- Substring / wildcard / regex search — plain text,
*/?globs, or full regex with-r - Vivid hex-colour output — each title gets its own colour from a configurable palette; the matched portion is highlighted
- Interactive REPL — after results appear, type a number to focus,
[n]cto close, or any text to search again - Config file —
config.tomllets you set any colour in the palette, the index colour, match highlight, errors, success messages - Single static binary — no runtime dependencies; ships as a native Windows
.exe
Installation
From crates.io
From source
# binary at: target/release/showit.exe
Usage
showit [OPTIONS] [PATTERN]
| Argument / Flag | Description |
|---|---|
PATTERN |
Title to search (substring by default) |
-r, --regex |
Treat PATTERN as a regular expression |
-l, --list |
List all visible windows |
--config-path |
Print the path to the config file |
--init-config |
Write a default config file (won't overwrite) |
-h, --help |
Print help |
-V, --version |
Print version |
Examples
# Substring match (case-insensitive)
# Wildcard — any window whose title starts with "Visual"
# Regex — windows containing "term" or "bash"
# List every visible window
Interactive commands
After results are displayed:
| Input | Effect |
|---|---|
3 |
Bring window #3 to the front |
2c |
Close window #2 (sends WM_CLOSE) |
notepad |
Start a new search for "notepad" |
x / q |
Quit |
Configuration
Run showit --init-config to create a starter config, then open it:
Windows: %APPDATA%\showit\config.toml
Linux/macOS: ~/.config/showit/config.toml
Example config.toml
# showit configuration file
# Colors must be valid hex strings: "#RRGGBB" or "#RGB"
# Palette cycled through for each window title in the list
= [
"#00FFFF", # Cyan
"#FF6B6B", # Coral red
"#FFD700", # Gold
"#7CFC00", # Lawn green
"#FF69B4", # Hot pink
"#00CED1", # Dark turquoise
"#FFA500", # Orange
"#DA70D6", # Orchid
"#ADFF2F", # Green-yellow
"#1E90FF", # Dodger blue
"#FF4500", # Orange-red
"#98FB98", # Pale green
]
# Color for the index numbers (e.g. 1. 2. 3.)
= "#888888"
# Color for the prompt line
= "#00BFFF"
# Color used to highlight the matched portion inside a title
= "#FFFF00"
# Color for error messages
= "#FF4444"
# Color for success messages (focused / closed confirmations)
= "#44FF88"
Architecture
src/
├── main.rs — CLI args (clap), interactive REPL, command dispatch
├── config.rs — Config struct, TOML load/write, hex-color parsing
├── display.rs — Coloured output helpers (colorize, highlight_match, …)
├── search.rs — Substring / wildcard / regex filtering
└── windows_api.rs — Win32 EnumWindows, SetForegroundWindow, PostMessage(WM_CLOSE)
(non-Windows stub for CI)
Development
License
MIT — see LICENSE.
