bspcpy-1.0.2
توضیحات
bspc wrapper for python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bspcpy-1.0.2 |
| نام | bspcpy |
| نسخه کتابخانه | 1.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | AlanJS26 |
| ایمیل نویسنده | AlanJS26 <alanjoses.29@gmail.com> |
| آدرس صفحه اصلی | https://github.com/AlanJs26/bspcpy |
| آدرس اینترنتی | https://pypi.org/project/bspcpy/ |
| مجوز | - |
# bspcpy
> It's a wrapper for the bspwm command line utility `bspc`.
bspwm is an awesome tiling window manager with a bunch of features, but when I need to develop some script that is a bit more advanced, there are not many options other than using a bash script ~~(which I hate)~~. So, to address this problem, I wrote this simple API.
## Usage
Since everything has the same names as the original bspc, It should be very easy to use.
For now, I have only implemented the query commands
```python
nodes(selector: str) -> Node_set()
desktops(selector: str) -> set[Desktop]
monitors(selector: str) -> set[Monitor]
```
and the classes that represent nodes, desktops, and monitors.
All query methods return Python sets, so it is possible to filter the nodes using set notation.
```python
from bspc import query
floating_nodes = query.nodes('.floating')
for node in floating_nodes:
if 'firefox' in node.name:
node.layout = 'tiled'
```
> This snippet finds all floating Firefox windows and puts them in tiled layout.
I wrote an implementation of a scratchpad using bspcpy in the `examples` folder.
## Requirements
- [xwininfo](https://archlinux.org/packages/extra/x86_64/xorg-xwininfo/)
## Installation
### Via pip
```bash
python -m pip install bspcpy
```
### Upgrade
```bash
python -m pip install --upgrade bspcpy
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl bspcpy-1.0.2:
pip install bspcpy-1.0.2.whl
نصب پکیج tar.gz bspcpy-1.0.2:
pip install bspcpy-1.0.2.tar.gz