DBus interface for controlling tabs
Hi,
I'd like to turn my laptop screen dark on sundown. I've found Night Theme Switcher GNOME Shell extension which can switch a bunch of light/dark mode settings. It allows you to run custom scripts to switch modes.
I tried to write a small script to change the profile on all open terminals. I do it via DBus, by sending the profile
action to the org.gtk.Actions
interface on all windows in /org/gnome/Terminal/window/*
(C code implementing this). I also use dconf
to change the default profile on new open tabs.
Unfortunately, this does not work on tabs that are currently not open. Sending the action seems to only affect the currently open one. That means that if I have multiple tabs open in a window, my script will leave any tabs except for the active one with the original profile.
I've looked a bit into the C code, and from what I gather, the Terminal0
GObjects do have a "profile"
property that stores the profile UUID for the tab, but it's not exposed in a DBus interface.
I'd like to request either the addition of a DBus interface to get/read the profile UUID on a tab, or exposing of that property by DBus. Terminal objects are already exposing some methods to DBus.