PhoshShellState exported as a DBus signal
(Copied/paraphrased from the chat on the matrix channel)
I'm trying to detect when Phosh is showing a desktop, or showing notifications, or showing the app screen.
I know that the keyboard shortcuts "Super+V" toggles the notification tray, but if the tray is already showing, then it hides the tray. I want it to essentially be toggled and then stay down after repeated presses.
To do this, I've been trying to detect the state of the desktop via dbus-monitor. The best signals I have right now though are a little bit ambiguous:
Desktop → Call Appscreen (Super + s)
signal time= sender=org.freedesktop.DBus -> destination=:1.332 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.332"
signal time= sender=org.freedesktop.DBus -> destination=:1.332 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.332"
method call time= sender=:1.101 -> destination=:1.86 serial=474 path=/org/gnome/Mutter/DisplayConfig; interface=org.freedesktop.DBus.Properties; member=Set
string "org.gnome.Mutter.DisplayConfig"
string "PowerSaveMode"
variant int32 0
method return time= sender=:1.86 -> destination=:1.101 serial=1927 reply_serial=474
signal time= sender=:1.112 -> destination=(null destination) serial=182 path=/sm/puri/OSK0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "sm.puri.OSK0"
array [
dict entry(
string "Visible"
variant boolean true
)
]
array [
]
Appscreen → Call Desktop (Super + a)
signal time=1716792388.716121 sender=:1.112 -> destination=(null destination) serial=183 path=/sm/puri/OSK0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "sm.puri.OSK0"
array [
dict entry(
string "Visible"
variant boolean false
)
]
array [
]
Okay, so it looks like I can use qdbus sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0.Visible
to detect whether or not the desktop or appscreen is showing based on those true/false differences above.
But for notification tray: Desktop → Call Notifications (Super + v)
nothing printed
No messages in DBUS. How can I detect the state of the notification tray?