Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I want to be able to run certain scripts by shortcut the way I do in ubuntu - for example some similar to this awesome script. (On that model I can search google the text selected in any text editor, or even translate it various languages, search it on different sites, etc).

How to use this type of script in elementaryOS?

share|improve this question
    
I guess I'm not in this question's target audience, but I first interpreted the expression “this awesome script” as refering to awesome. –  Gilles Oct 11 '13 at 22:48
    
@Gilles - I am not a native English speaker, but neither am I a computer 'connaisseur' (OR connoisseur, as they say in US), and maybe that is why I'm so impressed by such scripts, which seem mysterious, quite magic, awesome (in the -colloquial- sense of excellent, exciting, remarkable: "Awesome, dude!"). –  cipricus Oct 12 '13 at 6:20

2 Answers 2

up vote 1 down vote accepted

It seems elementary-tweaks has no longer key bindings in elementary Freya. But luckily there is mode to bind keys in Freya also. You can use program named xbindkeys. Details about how to configure and use it you can find here.

excerpt

We only need xbindkeys, a simple yet powerful command line tool to bind commands to a certain key or keys combinations. The program can be installed via terminal typing:

   $ sudo apt-get install xbindkeys

After the installation, if you try to run the application, you will be warmed to create a configuration file. As user, type:

   $ touch ~/.xbindkeysrc

or, alternatively:

   $ xbindkeys --defaults > ~/.xbindkeysrc

Then edit the file:

   $ nano ~/.xbindkeysrc

And type, before the end section:

   "slingshot-launcher"
   Super_L

so it will look like this:

   xbindkeys

Then press CTRL+X to save and exit.

Of course, xbindkeys can be used to bind also different commands to different keys. The values are written as:

   "command"
   state (0x8) and keycode (32)
   keysyms associated with the given keycodes

To find the last two values (which, as we’ve seen, can be used indifferently), type

   $ xbindkeys -k

then, in the blank window that’ll be open, type the key or the desired keys combination. The result will appear in the terminal.

share|improve this answer
    
indeed. thanks for reviving this post. i was already using xbindkeys in Freya after asking on eOS g+, but had lost track of my question here :) -- only that you should edit the answer to add info on the very useful GUI xbindkeys-config, more here. or should i edit your answer? –  cipricus Apr 24 at 7:52
    
xbindkeys is indeed the answer, but setting Super key for slingshot is not what I am asking, you have just pasted from that link. it also interferes with other shortkeys, not only those explicitly using Super key in some combination, but also on many laptops that have the Display key mapped like in windows (Super-p): clicking Display to switch between displays will show slingshot, clicking it again will type P in slingshot. So you should remove that, it is beyond the point of my question –  cipricus Apr 24 at 8:57

Worked in Luna, not available in Freya anymore!

sudo apt-add-repository ppa:versable/elementary-update
sudo apt-get update
sudo apt-get install elementary-tweaks

In System settings -> Tweaks -> Shortcuts

'+' to add new shortkey

use a command like sh /path/to/script

enter image description here


In order to run the script, xclip is needed.

sudo apt-get install xclip    
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.