Last active
November 2, 2022 13:24
-
-
Save lduboeuf/0da84c38469dcf5b77259c0b6d8ee09d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to get: | |
dbus-send --session --print-reply \ | |
--dest=com.canonical.Unity.Launcher \ | |
/com/canonical/Unity/Launcher/dialer_2Dapp \ | |
org.freedesktop.DBus.Properties.Get \ | |
string:com.canonical.Unity.Launcher.Item \ | |
string:'count' | |
to set: | |
//set emblem count , need to set countVisible to true | |
dbus-send --session --print-reply \ | |
--dest=com.canonical.Unity.Launcher \ | |
/com/canonical/Unity/Launcher/messaging_2Dapp \ | |
org.freedesktop.DBus.Properties.Set \ | |
string:com.canonical.Unity.Launcher.Item \ | |
string:count \ | |
variant:int32:2 | |
dbus-send --session --print-reply \ | |
--dest=com.canonical.Unity.Launcher \ | |
/com/canonical/Unity/Launcher/messaging_2Dapp \ | |
org.freedesktop.DBus.Properties.Set \ | |
string:com.canonical.Unity.Launcher.Item \ | |
string:countVisible \ | |
variant:boolean:true | |
qdbus com.canonical.Unity.Launcher /com/canonical/Unity/Launcher/$1 org.freedesktop.DBus.Properties.Set com.canonical.Unity.Launcher.Item countVisible $2 | |
QDBusInterface emblemCounter( "com.canonical.Unity.Launcher", "/com/canonical/Unity/Launcher/messaging_2Dapp", | |
"com.canonical.Unity.Launcher.Item"); | |
emblemCounter.setProperty("count", unreadCount); | |
emblemCounter.setProperty("countVisible", unreadCount > 0); | |
//emblemCounter.call(QLatin1String("countVisible"), true); | |
QVariant vCount = emblemCounter.property("count"); | |
qDebug() << "emblem count:" << vCount.toInt(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For focal:
dbus-send --session --print-reply
--dest=com.lomiri.Shell.Launcher
/com/lomiri/Shell/Launcher/dialer_2Dapp
org.freedesktop.DBus.Properties.Get
string:com.lomiri.Shell.Launcher.Item
string:'count'
dbus-send --session --print-reply
--dest=com.lomiri.Shell.Launcher
/com/lomiri/Shell/Launcher/dialer_2Dapp
org.freedesktop.DBus.Properties.Set
string:com.lomiri.Shell.Launcher.Item
string:count
variant:int32:2
dbus-send --session --print-reply
--dest=com.lomiri.Shell.Launcher
/com/lomiri/Shell/Launcher/dialer_2Dapp
org.freedesktop.DBus.Properties.Set
string:com.lomiri.Shell.Launcher.Item
string:countVisible
variant:boolean:true