This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Retrieve activity name in a bash script

Tags: None
(comma "," separated)
technononsense
Registered Member
Posts
4
Karma
0
OS
I can grab the string for the activity using a dbus call, but i'd like to grab the name of the activity, is it possible?
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
In 4.8 and beyond, you can possibly use

Code: Select all
qdbus org.kde.kactivitymanagerd /ActivityManager ActivityName <ID>


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Don't know if there's a better way, but this returns the name of the current activity:
Code: Select all
qdbus org.kde.kactivitymanagerd /ActivityManager ActivityName `qdbus org.kde.kactivitymanagerd /ActivityManager CurrentActivity`


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
technononsense
Registered Member
Posts
4
Karma
0
OS
Perfect! thanks chaps.

Do you know of any good resource documenting these calls?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I use qdbusviewer to find them. :)


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
technononsense
Registered Member
Posts
4
Karma
0
OS
Awesome!

Thanks again!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
In general, the source code of KDE is the only other documentation source, other than api.kde.org.
You can find the KDE source code on http://projects.kde.org/ and http://websvn.kde.org/


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]