ddterm / gnome-shell-extension-ddterm

Another drop down terminal extension for GNOME Shell. With tabs. Works on Wayland natively
https://extensions.gnome.org/extension/3780/ddterm/
GNU General Public License v3.0
298 stars 26 forks source link

D-Bus interface for open tabs #79

Open bialad opened 3 years ago

bialad commented 3 years ago

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

amezin commented 3 years ago

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

bialad commented 3 years ago

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. :)

amezin commented 3 years ago

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?

bialad commented 3 years ago

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?

amezin commented 3 years ago

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