a commandline utility to list and filter macOS process and window names
Project description
macos-lswin
lswin: a commandline utility to list and filter macOS process and window names.
Background
This utility provides filtering for windows based on parent process name, window name, and whether or not the process is on the screen.
A similar project, mac_list_windows_pids, revealed how straightforward the necessary Quartz core graphics lookups are; so, I reviewed Apple's developer documentation for CGWindowListCopyWindowInfo
and set out to add primitive UNIX shell style wildcard filtering for process and window names with a simple command line interface.
Supported Platforms
This utility has been tested on macOS Catalina 10.15.
Usage
Development Environment
Initialize a development environment by executing tox
; the lswin
utility
will be installed in the .tox
Python virtual environment binary path.
Examples
List all windows with process names or window names beginning with "term":
$ lswin -a -f "term*"
PID WID Process: Window X Y
------ ------ ------------------------------------------- ----- -----
4953 4805 Terminal: <4805> 0 0
4953 4806 Terminal: <4806> 0 0
4953 4813 Terminal: Focus Proxy 100 100
4953 7208 Terminal: <7208> 628 95
4953 7268 Terminal: Colors 0 612
4953 7269 Terminal: <7269> 951 433
4953 8639 Terminal: <8639> -1920 0
4953 8657 Terminal: <8657> 0 0
4953 13111 Terminal: <13111> 318 68
4953 13984 Terminal: <13984> 80 0
4953 14588 Terminal: Terminal — -bash — 129×22 395 201
4953 14890 Terminal: Terminal — lswin.py -a -f term... 395 201
List onscreen windows with process names or window names beginning with "term":
$ lswin -f "term*"
PID WID Process: Window X Y
------ ------ ------------------------------------------- ----- -----
4953 14588 Terminal: Terminal — -bash — 129×25 173 496
4953 14890 Terminal: Terminal — lswin.py -f term* —... 395 201
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file macos-lswin-0.2.tar.gz
.
File metadata
- Download URL: macos-lswin-0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9dbba09b690991eae8a1b40f2523ba17dfd711fd893dc8b642d7fe50532bd4f |
|
MD5 | 1940120c4902ea40c00bd3a9694a4bf2 |
|
BLAKE2b-256 | ce24bcf5ded678ad9185c107c3d12e9210d4c0bfa3320a5a41a45f8890fc4e5a |
File details
Details for the file macos_lswin-0.2-py3-none-any.whl
.
File metadata
- Download URL: macos_lswin-0.2-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0db12fc55f9b9ccab4e413823158be69673031ecd013424f7e98db9c4e8d94 |
|
MD5 | 57bb0988e5d859f5916837f0d6a64c34 |
|
BLAKE2b-256 | bb3d9f93503e843b6813b582eb23850632fda1ed42194b09c59601a41df75d31 |