Make sure you have installed the following commands:
- swaymsg
- jq
- slurp
- awk
curl -L https://gist.github.com/crispyricepc/f313386043395ff06570e02af2d9a8e0/raw/8b06f025a0f34685f5ffc2000fd19a64754c9b29/wlprop.sh > ~/.local/bin/wlprop
chmod +x ~/.local/bin/wlprop
Type wlprop
in a terminal, then click the window you'd like to get the properties of.
Since all wlprop
outputs is JSON, you can filter the values you need using jq
:
# Get just the name of the window
wlprop | jq -r '.name'
# Get the app_id value (useful for `for_window` configs in sway)
wlprop | jq -r '.app_id'
@GOKOP, you're right, I see it on the AUR (where it's maintained by maintained by NicolasVontobel at protonmail dot com, I'm assuming that's @NiciTheNici) and NixOS Hydra (where it has no maintainer). Unfortunately, it's the responsibility of the package maintainers to use the correct script, not @crispyricepc. The naming of the script is unfortunate, but there's no reason why it couldn't handle different compositors. I wonder if @crispyricepc would be up for a pull request? There should be a more sophisticated logic to handle different compositors.