Is it possible to add to or edit the Session Indicator menu items?
Is there an easy way to do this, or would it involve recompiling a custom build?
I cannot find much relating to this online.
configurationcustomizationindicatormenu
Is it possible to add to or edit the Session Indicator menu items?
Is there an easy way to do this, or would it involve recompiling a custom build?
I cannot find much relating to this online.
Best Answer
some refs:
- jimi312 / Titlebar Menu / source — Bitbucket:
- Programming with DBus using PyQt
- Unity/QA/StateIntrospection - Ubuntu Wiki: especially example code
At the moment passive querying can extract information such as shown in this post:
How does one find out which application is associated with an indicator icon? .
I am also exploring the answer to this question as it relates to DBus, to use as high a level interface as possible to avoid low level programming. The ultimate objective is to create a utility that minimally identifies the host applications of the indicators and the sub-apps of their component menus. Maximally it would allow modifications to the menus such as the
session-indicator
menu including the top level menu, ie. the icon indicator of the unity-panel itself.It would be good to know which, (if any!) modifier methods exist in the DBus environment to modify the DBus, so the
indicator panel
and it's components, such asSession Indicator
, could be modified as you require.The following commands reveal the interface methods to manipulate the
session indicator
bus information but unfortunately the parameters used in these methods are not described here - the reference above supplies links to the documents describing the general indicator interfacing - but specifics for thesession indicator
are still needed.The output from
implicates the existence of menu interfaces as the items below:
The interfaces can be examined with:
and
Note the internal reference to
interface com.canonical.dbusmenu
.For a real comprehensive dump use:
Several sub-apps are bound to the
session indicator
drop down menu but what is not clear is whether these interface methods just transfer data to the associated sub-menu apps or whether in fact there is a communication channel to the session indicator app itself so its menu can be "methodized".Also,
provides a list of interface menu associations (there are
menus
for the windows and also for the indicators like thesession indicator
, which is which in the list below still needs determination)Examining
it may be these methods are useful:
Note the parameter identified as
menuObjectPath
. These method names are qualified with{un}RegisterWindow
, so the methods perhaps are irrelevant to indicator menues.Once the correct methods with their parameters are identified it is easier to use
qdbus
(cannot use QVariant parameters however) orD-Feet
thangdbus
to invoke the methods.Basically
qdbus
andgdbus
are functionally the same and use identical parameters except:qdbus
does not identify the separate components with--dest, --object-path, --method, ...
but instead requires the corresponding attributes be given in exact ordergdbus
method calls handle more parameter typesqdbus
is not as exhaustive asgdbus
especially w/--recurse
qdbus
can expediently extract its command parameter sequence via double or triple click from its output w/ a middle click to concatenate it to the end of the commandThe answer
How does one find out which application is associated with an indicator icon?
in the post mentioned above describes how to use
qdbus
as an expedient technique to compose the scripts.The manpage
man gdbus
(orgdbus:
) has a better exposition thanman qdbus
but considerD-Feet
.