Closed SyntaxBlitz closed 10 months ago
Does gapplication action com.github.amezin.ddterm hide
not work for you?
Doing this through the extension API may have a few positive effects - like not starting the app if it's not running, and waiting for the window to actually hide. But is it necessary in your case?
By the way, v47 should also work fine on GNOME 42, if I'm not mistaken.
Ah, thanks for the pointer! I jumped to D-Bus because the last extension I used (before I upgraded to jammy
yesterday) only had a D-Bus API; when I saw this extension also had D-Bus listeners, that's where I started looking for a hide
action. Indeed, the extension API you mentioned does work for me.
v46 was a bit of an arbitrary choice I made from skimming the release notes, since I was more sure it would work. I figured this diff probably wouldn't touch the ESM updates either way.
Wonderful extension! Thanks again.
On the other hand, adding this method shouldn't cause any issues, and it'll make the interface logically complete.
I have some scripts that I mostly only run from the dropdown terminal, and I like them to be able to close the dropdown automatically when they finish.
Toggle
works, but on the rare occasions when I run these scripts from other terminals, I don't want it to open the dropdown. UsingActivate
thenToggle
is a workaround, but it causes the terminal to flicker when the dropdown is not already active.This PR exposes the idempotent
Hide
action over the D-Bus API. I think I hit all the spots where the code needed to be updated -- I just greppedtoggle
andactivate
and looked for all the spots where it looked like I needed to wire things up. Apologies if I missed anything; I haven't fully wrapped my head around the extension architecture, so this is mostly a copy-paste job.I wrote this against the v46 tag because I'm running GNOME shell 42.9 (on
jammy
), but it merges fine against master as well. Tested manually on my machine with:which seems to work the same way as
.Activate
. I don't see anything breaking if I call it when the terminal is already hidden.