add swayprop

This commit is contained in:
2025-06-26 19:01:39 +02:00
parent 7829af72ac
commit 8741765c2d
9 changed files with 848 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# swayprop
Xprop for Sway. Inspired by https://github.com/vilari-mickopf/hyprprop, but
shares almost no code with it anymore.
## Dependencies
- Sway
- jq for parsing `swaymsg` output
- slurp for window selection
## Installation
### Basher
[![basher-install](https://www.basher.it/assets/logo/basher_install.svg)](https://www.basher.it/package/)
```bash
basher install git.alternerd.tv/alterNERDtive/swayprop
```
(Github mirror: `basher install alterNERDtive/swayprop`)
### Manual
Clone the repository
(`git clone https://git.alternerd.tv/alterNERDtive/swayprop.git`) or download
and extract a repository archive, then link / copy `swayprop` into your `PATH`.
## Usage
Just run
```bash
swayprop
```
and select desired window.
The tool will print the selected Windows JSON output from `swaymsg -t
get_tree`, or nothing on error/cancel.
If you cancel the selection it will `exit 1`, in case slurp errors out it relays
the exit code.
In case you miss `xkill`, run
```bash
swaykill
```
:)