Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adroste/macgetactivewindowid
https://github.com/adroste/macgetactivewindowid
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/adroste/macgetactivewindowid
- Owner: adroste
- Created: 2018-05-22T16:31:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-22T20:07:42.000Z (over 6 years ago)
- Last Synced: 2024-11-07T06:27:31.685Z (about 2 months ago)
- Language: Objective-C
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# macGetActiveWindowID
Command line utility that outputs the `windowid` of the current foremost/active window.
Download precompiled binary or compile yourself:
`gcc -framework cocoa -x objective-c -o getActiveWindowID getActiveWindowID.m`### usage
`./getActiveWindowID`
### examples
* `./getActiveWindowID` ==> `280972`
* Use in combination with screencapture to screenshot currently active / foremost window: `screencapture -l "$(./getActiveWindowID)" screenshot.png`