SUMMARY I want to get the name of the current activity via dbus. But I always get the same information. STEPS TO REPRODUCE While running the following code, I should get the current activity information: ---- while :; do CurrentActivity=$(dbus-send --session --dest=org.kde.ActivityManager \ --type=method_call --print-reply=literal /ActivityManager/Activities \ org.kde.ActivityManager.Activities.CurrentActivity | tr -d "[:blank:]") dbus-send --session --dest=org.kde.ActivityManager --type=method_call \ --print-reply /ActivityManager/Activities \ org.kde.ActivityManager.Activities.ActivityInformation \ "string:$CurrentActivity" sleep 1 done ---- OBSERVED RESULT I always get the following output: ---- method return time=1652890189.574943 sender=:1.16 -> destination=:1.3398 serial=3376 reply_serial=2 struct { string "4904d430-4ad8-40bf-80bf-ab19fb833260" string "Default" string "" string "" int32 2 } ---- After switching focus or starting another app, the output does not change. EXPECTED RESULT The command outputs the correct information. SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION Wayland.
The script works for me. I copied it right into my terminal on wayland. Still broken for you?
Yes, it is still broken. I ran the script again, but always got the following result. ``` method return time=1660564057.531871 sender=:1.19 -> destination=:1.608 serial=548 reply_serial=2 struct { string "4904d430-4ad8-40bf-80bf-ab19fb833260" string "Default" string "" string "" int32 2 } ```
Are you on the latest version of plasma? 5.25.4
I updated to 5.25.4 now, but still the same. ---- luna:~ % pacman -Qs plasma | grep local/plasma- local/plasma-browser-integration 5.25.4-1 (plasma) local/plasma-desktop 5.25.4-1 (plasma) local/plasma-disks 5.25.4-1 (plasma) local/plasma-firewall 5.25.4-1 (plasma) local/plasma-framework 5.97.0-1 (kf5) local/plasma-integration 5.25.4-1 (plasma) local/plasma-nm 5.25.4-1 (plasma) local/plasma-pa 5.25.4-1 (plasma) local/plasma-sdk 5.25.4-1 (plasma) local/plasma-systemmonitor 5.25.4-1 (plasma) local/plasma-thunderbolt 5.25.4-1 (plasma) local/plasma-vault 5.25.4-1 (plasma) local/plasma-wayland-session 5.25.4-1 local/plasma-workspace 5.25.4-1 (plasma) local/plasma-workspace-wallpapers 5.25.4-1 (plasma) luna:~ % ---- ---- method return time=1660663193.116811 sender=:1.19 -> destination=:1.162 serial=128 reply_serial=2 struct { string "4904d430-4ad8-40bf-80bf-ab19fb833260" string "Default" string "" string "" int32 2 } ----
- Does Plasma react to activity change? - What do you get when you try to change the current activity via dbus? - What do you get when you list all activities via dbus?
I'm very very sorry! I have misunderstood "activity". I have thought it is something like "application". Now, I created a new activity, switched between it and the default, and I could get the current activity name. ---- method return time=1660711391.549389 sender=:1.20 -> destination=:1.170 serial=196 reply_serial=2 struct { string "4b80d0b3-7c4a-4b31-b537-1f5b3d6d729b" string "Mine2" string "" string "activities" int32 2 } ---- I'm closing this issue.