https://github.com/digitronik/python-xrectsel
Geometry of a rectangular screen region
https://github.com/digitronik/python-xrectsel
area geometry-library python-xrectsel xrectsel
Last synced: 3 months ago
JSON representation
Geometry of a rectangular screen region
- Host: GitHub
- URL: https://github.com/digitronik/python-xrectsel
- Owner: digitronik
- License: other
- Created: 2019-05-04T06:45:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-29T18:35:48.000Z (over 2 years ago)
- Last Synced: 2024-10-07T07:07:18.050Z (8 months ago)
- Topics: area, geometry-library, python-xrectsel, xrectsel
- Language: Python
- Size: 30.3 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
python-xrectsel
Geometry of a rectangular screen region
The project idea based on [xrectsel](https://github.com/lolilolicon/xrectsel). Its Python variant with some enhancements.
### Installation:
```bash
pip install python-xrectsel
```### Usage:
```shell
❯ xrectsel --help
Usage: xrectsel [OPTIONS]Options:
-f, --format TEXT Format output string with fallowing options:%x - start x-coordinate
%y - start y-coordinate
%X - start
%Y - end
%w - width
%h - height
Note: default output is in "%wx%h+%x+%y"
format.-ci, --cursor-icon [crosshair|cross|pencil|dotbox]
Select cursor icon
-cf, --cursor-foreground ...
Select cursor foreground color
-cb, --cursor-background ...
Select cursor background color
-h, --help Show this message and exit.```
- We can collect selected region geometry just by command `xrectsel`. Default format is `%wx%h+%x+%y`
```bash
$ xrectsel
$ # select rectangle on sreen
901x634+44+7 #(x-coordinate, y-coordinate, width, height)
```
- We can format output geometry string
```bash
$ xrectsel -f "--x=%x --y=%y --width=%w --height=%h"
--x=264 --y=387 --width=1204 --height=519
```