is there a way to assign apps. to certain activities

Duncan 1i5t5.duncan at cox.net
Sat Apr 23 13:25:06 BST 2011


phanisvara das posted on Sat, 23 Apr 2011 16:05:06 +0530 as excerpted:

> On Sat, 23 Apr 2011 15:39:18 +0530, Alex Schuster <wonko at wonkology.org>
> wrote:
> 
>> phanisvara das writes:
>>
>>> i'm wondering if there's a way, perhaps via qdbus commands, to assign
>>> certain applications to a particular activity, or all activities, when
>>> they start up? even in KDE 4.7 i couldn't find a way to do that,
>>> neither via GUI nor .rc files...
>>
>> In KDE 4.6.2, the 2nd entry 'Actvities' in the window menu (the one
>> left in the title bar) does allow this. Similar to the first entry,
>> where you can set on which desktops the application should show up.
> 
> 
> that i know; it allows me to send the window to one, more, or all
> activities after it's been opened. but i find this quite a botheration,
> since there are several windows i like to have on all activities, like
> messengers, konsole, ktorrent, etc. every time i open one of these i
> have to set that manually. i was hoping for a way to do that via script,
> or in the app.'s config file.

I'd guess, given the activities submenu's parallels to the desktop submenu, 
window rules will eventually include rules for initial-creation and/or 
forcing to a specific activity just as it does for desktops.  Similarly, 
kwin's global shortcuts config would include options for send-to-activity 
as it does for send-to-desktop.

However, while kwin and plasma work in concert to a large degree, they are 
different modules, developed by different people.  Plasma really must have 
the capacities before kwin's rules and hotkeys can be setup to use them, 
and of course, the feature/minor releases come every six months while the 
bugfix/micro releases come every month.  It's likely that plasma developed 
the feature in the 4.6 development cycle, and what amounts to the 
activities submenu stub we see was integrated for 4.6, but that's where 
4.6 stopped, without a chance for kwin to integrate that much with the new 
plasma activity features.  For 4.7, I expect kwin to catch up some, and 
we'll actually start seeing activities turning into something useful on 
their own.

And you mentioned 4.7.  I've not tried the live/betas yet (kde4 only came 
out of beta with 4.5, itself, IMO, and I had my fill of kde4 alpha code 
for the time being with 4.2 and 4.3!), so obviously have nothing first-
hand there, but I *DID* happen across the plasma roadmap for 4.7/4.8, and 
one of the proposals was associating panels with activities as well.  I've 
been waiting for that as it seemed to me to be a necessary step.  I hope 
it gets done.

Meanwhile, 4.7 is still very much in development, and whether the kwin/
plasma coordinated stuff will have hit main trunk yet, or indeed, whether 
it's coded at all, is open to question.  It may be that the features 
you're looking for simply aren't yet in 4.7, but will be by the time it 
freezes and ultimately ships.

Then there's the activity (widgets) per desktop option (checkbox in 
kcontrol, workspace behavior, virtual desktops), which I've not tried 
either but which I think should give you a bit of that now... at the 
expense of linking the activities and desktops concepts together.  When 
activities come into their own, that's going to be a rather crippling 
option as desktops and activities are independent if similar concepts, but 
activities really aren't there yet, and as mentioned, there's already both 
window rules and kwin send-to-desktop shortcuts available, so that option 
could be a reasonable compromise in the mean time.

Finally, given the existence of the activities submenu, I'd /guess/ that 
there's probably a dbus kwin interface that can be taken advantage of in 
scripting, using dbus-send.  But while I fondly remember the dcop-explorer 
or whatever it was tool from kde3, that allowed discovering and playing 
with that interface, I've unfortunately not seen a similar tool for kde4/
dbus.  One would think it has to exist, but...  Anyway, the big problem 
here is actually DISCOVERING the what and how for that dbus interface, if 
it even exists in 4.6.

But, between dbus and the global shortcuts mechanism, I'd be surprised if 
it wasn't possible to, if necessary using the shortcuts mechanism to send 
keystrokes, manually trigger the window menu, then the activities submenu, 
and whatever from there.  Crude, but with a smart use of shortcuts, you 
might at least be able to open the app, then trigger the shortcut to get 
it to the activity you want.  If I were activity trying to utilize them 
ATM, and I couldn't find dbus info after looking around a bit, I'd try the 
shortcut mechanism.  Either that or settle for linking activities and 
desktops thru 4.6 and use the existing desktops mechanisms.  But the 
danger there is getting so used to that, that you can't easily switch to 
the more flexible mode once it comes around with 4.7 or whatever.

Me?  I'll probably wait until 4.7 release and try experimenting with it 
then, hoping activities have come into their own a bit more by then, to 
where it's worth it.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list