Registered Member
|
Hi,
I have been using this http://hanschen.org/2011/05/20/switch-to-specific-activities-with-keyboard-shortcuts/ method for some time now to assign shortcuts to my activities. Since I had too many and couldn't assign shortcuts to each of them I came up with a small script using qdbus to automatically assign numerical shortcuts to the active ones. I saw something similar in a video about Ubuntu Unity. This makes most sense on a desktop which has the Activity panel visible since they will change when you close/open activities. Unfortunately they are sometimes out of sequence but it's only a hack or proof of concept. Here is what it looks on my Desktop with the activity panel. The numbers in brackets indicate the shortcut e.G. Meta+1, Meta+2 etc. (sry too big for forum) http://i.imgur.com/2MN4H.png First we need an executable bash script saved on your home dir:
Next we need to assign global shortcuts to launch this script and pass the number of the shortcut to the script when it's pressed. You can add new global shortcuts under Systemsettings->Shortcuts And Gestures->Custom Shortcuts. at the bottom click edit -> new -> Global Shortcut I actually exported that so you can import it yourself but you don't seem to be able to attach files to posts. Notice the 3 behind the script’s path for which I have assigned the Trigger Meta+3, 4 for Meta+4 etc. After you have enabled the Global Shortcuts, that’s basically it. Please note not to use () in your activities or the regex might screw up with the name of your activities. I have been using this for a couple of days and apart from the order of the activities I think it's pretty usable for me. If you find some improvements or have some comments please let me know. This is a repost from my blog where there is some more detail if you're interested. http://yadigaga.wordpress.com/2011/07/0 ... es-in-kde/ |
Administrator
|
Great to see that you posted it here as well, thank you for this tip!
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 |
Registered Member
|
Hey Tomsdale,
I have been using your idea of automatically assigning numerical shortcuts to my activities and found it quite useful. The problem with the order of the activities is a small price to pay for the benefits of this concept. |
Registered Member
|
>The problem with the order of the activities is a small price to pay for the benefits of this concept.
Glad you like it. I actually had a look into the activity bar applet sourcecode and this line caught my attention:
I think it always adds the activity to the end of the list while the qdbus command returns a different sorting from the command line, thus the out of sequence result. |
Registered users: Bing [Bot], Evergrowing, Google [Bot]