0

I cannot find any examples on how to use gdbus to get the position and rect size of a window.

I am able to get the window's pid using code from other stackoverflow questions, but there is no way to get that window's current position relative to the screen.

This is bash code I found that can let me get the active window's pid, but I also need its rect

#https://github.com/hseliger/window-calls-extended
if [ ! -d window-calls-extended ]; then
    git clone https://github.com/hseliger/window-calls-extended.git
fi
pushd window-calls-extended
mkdir -p ~/.local/share/gnome-shell/extensions/window-calls-extended@hseliger.eu/
cp extension.js metadata.json ~/.local/share/gnome-shell/extensions/window-calls-extended@hseliger.eu/
popd


#https://github.com/essembeh/gnome-extensions-cli
pip3 install --upgrade gnome-extensions-cli
~/.local/bin/gext install window-calls-extended@hseliger.eu

#gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/WindowsExt --method org.gnome.Shell.Extensions.WindowsExt.List
#gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/WindowsExt --method org.gnome.Shell.Extensions.WindowsExt.FocusTitle
#gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/WindowsExt --method org.gnome.Shell.Extensions.WindowsExt.FocusPID
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
rosewater
  • 604
  • 2
  • 8
  • 22

0 Answers0