maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [HOWTO] Global shortcuts & Launchy/QuickSilver functionality (https://talk.maemo.org/showthread.php?t=83643)

computerinfo21 2012-04-15 03:11

[HOWTO] Global shortcuts & Launchy/QuickSilver functionality
 
Like many who have used Launchy, Gnome-Do, QuickSilver, or even the Windows 7 Start Menu search to quickly & easily find programs, I now have a hard time using any computer, even my n900 without that ability. Instead of tons of program shortcuts on the desktop or digging through the menus I assigned app-search-app a global shortcut key.

As a bonus this also provides a way to set up other global shortcut keys, which for frequently run programs or scripts could really be a speed boost. This is all done without using a modified hildon desktop, which means we can stay with the CSSU updates too.

Here's the basics of how that is done.

Download and install app-search-app


Download xbindkeys zip file & extract to MyDocs

Make a permanent home for xbindkeys exe (use terminal for following commands)
Code:

cd MyDocs
sudo gainroot
mkdir /opt/xbindkeys
cp xbindkeys /opt/xbindkeys/
chmod 755 /opt/xbindkeys/xbindkeys

Create or modify a .xbindkeysrc text file in leafpad or other editor as desired.
Note: Mod5 is the function (blue arrow key)
There are good resources online for what can be put in the file, here are examples of key combinations to toggle fullscreen (Ctrl + Space) and to bring up the app-search-app (Function + Left arrow). On the n900 version with 4 arrow keys there is nothing assigned to them with the Function key, so they are prime candidates to use for this.
.xbindkeysrc
Code:

"wmctrl -r :ACTIVE: -b toggle,fullscreen"                       
  m:0x4 + c:65                                                   
  Control + space

"/opt/app-search-app/app-search-app"
  Mod5 + Left

Put it in /home/usr & be sure permissions are correct:
Code:

chmod 644 /home/user/.xbindkeysrc
You can start xbindkeys manually from the terminal as user by typing:
Code:

/opt/xbindkeys/xbindkeys
Or if you want xbindkeys to start automatically each time the phone is turned on you will need the following upstart file put in /etc/event.d

xbindkeys startup file:
Code:

start on started hildon-desktop
exec run-standalone.sh su user -c /opt/xbindkeys/xbindkeys
stop on starting shutdown

Hope someone else finds this as useful as i do. Even though Catorise makes the menus much better than standard, this is still much faster to access things.

computerinfo21 2012-04-15 21:32

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Oh yeah, forgot to mention permissions for the /etc/init.d/xbindkeys file.
They should be rw-r--r--
Code:

sudo gainroot
chmod 644 /etc/event.d/xbindkeys


gttnnn 2012-05-07 06:29

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
It's useful. Thanks.
Is there any way to start an app by press a key at desktop like m-h-d does?
Sorry for my pool English.

computerinfo21 2012-05-08 15:27

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Yes actually, and not just at the desktop, these hot keys work no matter what app you are in at the time.
A couple of lines in the .xbindkeysrc is all it takes to define a shortcut for any program you want.

For example I use "conboy" all the time for making notes. I have the keyboard shortcut Function + Shift + c to open it.
Lines for that in .xbindkeysrc are:
Code:

"conboy"
  Mod5 + Shift + c

I have a couple of spreadsheets I work with all of the time, and by specifying the program and the path to the file gnumeric will open up ready to work with instead of browsing for the file everytime I open it.

That looks like:
Code:

"gnumeric /home/user/MyDocs/.documents/myfile.gnumeric"
  Mod5 + Shift + m

If you need more examples or want an example .xbindkeysrc file posted let me know.

All in all it greatly decreased the time I take navigating to things on the phone. The app-search-app is just a bonus for anything I use infrequently enough I don't need a specific shortcut assigned to it.

mr_pingu 2012-05-14 21:04

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Thank you for this wonderful guide, it's really useful! Simply and clean, now I can make my own keyboard shortcuts :)

Any reason why you use your version of xbindkeys and not the version from the repositories?

computerinfo21 2012-05-15 03:11

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Quote:

Originally Posted by mr_pingu (Post 1206741)
Thank you for this wonderful guide, it's really useful! Simply and clean, now I can make my own keyboard shortcuts :)

Any reason why you use your version of xbindkeys and not the version from the repositories?

Is there a version in the repos that actually built? The only one I was aware of was this one and it doesn't have any files. Or are you using the Diablo repo?
Actually I saw the thread I referenced that had a downoad and went to work trying to get it to going. The startup script was the hardest part actually. Lots of prayers and frustrations went into that, I tried so many combinations & gave up at first and made a desktop file for it & was starting it manually. When I finally got it working I decided I should help anyone else out so they wouldn't waste as much time as I did.

sifo 2012-05-15 04:03

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
thank you man. working great !

./sifo

bingomion 2012-07-13 15:48

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Excellent !!!
This, xsel and espeak and I don't have to read my phone again!!
Thanks for your work... It's not for the faint hearted!!

malfunctioning 2013-05-14 01:28

Re: [HOWTO] Global shortcuts & Launchy/QuickSliver functionality
 
Quote:

Originally Posted by bingomion (Post 1237064)
Excellent !!!
This, xsel and espeak and I don't have to read my phone again!!
Thanks for your work... It's not for the faint hearted!!

Cool tip! I haven't yet even set up xbindkeys on my N900, but this is an awesome idea. You could even incorporate a Select All before the espeak "`xsel`" command, and then you would get the whole document text read out to you with a single shortcut. Nice. :)

By the way, is xbindkeys somewhere in the repos? I see it under Diablo but not Fremantle. Maybe it's on a differently named package? If not, no trouble grabbing the binary computerinfo21 kindly provided.

Estel 2013-05-14 08:34

Re: [HOWTO] Global shortcuts & Launchy/QuickSilver functionality
 
Xbindkeys should be in extras-devel, I'm using it ;)


All times are GMT. The time now is 07:16.

vBulletin® Version 3.8.8