forked from damianatorrpm/wayfire-plugin_dbus_interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwf-prop
More file actions
executable file
·30 lines (28 loc) · 2.77 KB
/
wf-prop
File metadata and controls
executable file
·30 lines (28 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
busctl --user call org.wayland.compositor /org/wayland/compositor org.wayland.compositor enable_property_mode b true
( gdbus monitor --session --dest org.wayland.compositor --object-path /org/wayland/compositor & echo $! >&3 ) 3>gdbus_pid |
while read -r line; do
if [[ $line == *"/org/wayland/compositor: org.wayland.compositor.view_pressed (uint32"* ]]; then
busctl --user call org.wayland.compositor /org/wayland/compositor org.wayland.compositor enable_property_mode b false
VIEW_ID=$(echo $line| cut -d'2' -f 2)
VIEW_ID="${VIEW_ID%,*}"
printf "\n\n"
echo app id: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_app_id 0)
echo title: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_title 0)
echo PID/UID/GID: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_credentials 0)
echo active: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_active 0)
echo minimized: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_minimized 0)
echo maximized: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_maximized 0)
echo fullscreen: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_fullscreen 0)
echo above: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_above 0)
echo workspaces: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_workspaces 0)
echo role: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_role 0)
echo ****XWayland Information - no data means this native wayland window***
# Extend with properties you like
# query_view_xwayland_atom_string for string
# query_view_xwayland_atom_cardinal for int
echo WID: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_xwayland_wid 0)
echo _NET_WM_NAME: $(gdbus call --session --dest org.wayland.compositor --object-path /org/wayland/compositor --method org.wayland.compositor.query_view_xwayland_atom_string 0 _NET_WM_NAME)
kill $(<gdbus_pid)
fi
done