gnome-shell-extension-ddterm icon indicating copy to clipboard operation
gnome-shell-extension-ddterm copied to clipboard

D-Bus interface for open tabs

Open bialad opened this issue 4 years ago • 5 comments

Thank you for a great extension!

I'm trying to get the number of opened tabs from the d-bus interface, and looked into the GetAll property, but I get this error. Is it not implemented?

gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell/Extensions/ddterm --method org.freedesktop.DBus.Properties.GetAll

Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.DBus.Properties” on object at path /org/gnome/Shell/Extensions/ddterm

bialad avatar Sep 01 '21 13:09 bialad

The d-bus interface has almost nothing in it: https://github.com/amezin/gnome-shell-extension-ddterm/blob/master/com.github.amezin.ddterm.Extension.xml No properties at all. Also, it's the interface exported by the extension, not the application...

In short, yep, it's not implemented

amezin avatar Sep 01 '21 14:09 amezin

Ah, I see. Is it possible to get the opened tabs through bash? I was hoping a call to GetAll properties would return a list of tabs. :)

bialad avatar Sep 01 '21 15:09 bialad

No, it's not possible. If it were, it would be implemented as a D-Bus call.

Why do you need to count open tabs?

amezin avatar Sep 02 '21 19:09 amezin

My idea was to attach a remote tmux session to each tab, so that each tab is the same server every time. Just a convenient feature to have.

If I were to implement this, I could use the ExtensionDBusInterface class, and get the tabs from current_window?

bialad avatar Sep 03 '21 07:09 bialad

You could use ExtensionDBusInterface as an example only. You'll need to design and implement a new interface. The extension doesn't have access to open tabs (or any other window internals), it can only move/resize the window. Look at appwindow.js

amezin avatar Sep 07 '21 05:09 amezin