1

I would like to setup polybar to show KDE activities:

  • List all activities
  • Highlight current activity
  • Click to change

For example:

"Std | Dev | Video"

I already have set up the standard KDE dock to do this, which works wonderfully and gives a thumbnail render of the activities -- however, I want to experiment with a minimalist style.

I cannot figure out how to use qdbus to do this, based on other questions: Expand KDE activities concept to the shell

Where do I find man pages or dev resources?

➤ man qdbus
No manual entry for qdbus

1 Answer 1

0

After much more google-fu, I think I am able to answer my own question. No doubt it is a little naive, so better answers appreciated.

Where do I find man pages or dev resources

My solution

#!/bin/sh
dbus-send --session --dest=org.kde.ActivityManager --type=method_call --print-reply /ActivityManager/Activities org.kde.ActivityManager.Activities.ListActivities
dbus-send --session --dest=org.kde.ActivityManager --type=method_call --print-reply /ActivityManager/Activities org.kde.ActivityManager.Activities.ActivityName string:"721d6c82-12b1-4a3f-8f0b-97b1765faeb3"
dbus-send --session --dest=org.kde.ActivityManager --type=method_call --print-reply /ActivityManager/Activities org.kde.ActivityManager.Activities.ActivityState string:"721d6c82-12b1-4a3f-8f0b-97b1765faeb3"
dbus-send --session --dest=org.kde.ActivityManager --type=method_call --print-reply /ActivityManager/Activities org.kde.ActivityManager.Activities.CurrentActivity

Output:

method return time=1616745604.890259 sender=:1.57 -> destination=:1.88 serial=73 reply_serial=2
   array [
      string "721d6c82-12b1-4a3f-8f0b-97b1765faeb3"
      string "e40ecce6-7002-47e8-81d0-835eb4461a26"
      string "47552415-c847-435b-b96c-7467c53ef489"
   ]
method return time=1616745604.892564 sender=:1.57 -> destination=:1.89 serial=74 reply_serial=2
   string "_std"
method return time=1616745604.894646 sender=:1.57 -> destination=:1.90 serial=75 reply_serial=2
   int32 2
method return time=1616745604.896475 sender=:1.57 -> destination=:1.91 serial=76 reply_serial=2
   string "721d6c82-12b1-4a3f-8f0b-97b1765faeb3"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .