Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In 12.04 (Unity), I would like to assign a shortcut to the "always on top option" for a window. Probably something like Ctrl+Shift+Home to turn on and Ctrl+Shift+End to turn off, or whatever. Is there an option to do this somewhere in the Compiz Settings Manager?

This (old) post claimed that

For compiz, Enable Extra WM Actions. Check the properties, and insert ALT+A to Key field for Toggle Always-On-Top action.

But I couldn't find that.

share|improve this question
1  
Did anyone here managed to make this work in Ubuntu 12.10 without using ccsm ? thanks –  Suhaib Feb 7 '13 at 5:12

4 Answers 4

up vote 6 down vote accepted

If not install CCSM and extra compiz plugins via:

sudo apt-get install compizconfig-settings-manager compiz-plugins-extra

Be aware please. CCSM can kill Unity3D on some systems.

If you have not had compiz-plugins-extra already installed, you need to restart Compiz to load them (even though they display in CCSM just fine before the restart) with Alt+F2 and

compiz --replace

You can see Extra WM Actions under Windows Management section on CCSM as explained in the post you found. You can set the desired action there easily.

share|improve this answer
    
Actually, restarting compiz is only needed so that it is aware of the new plugins. Afterwards, you can change the shortcuts on the fly (i.e. you do not need to restart Compiz after every change of a shortcut) –  sup Jan 16 '13 at 11:45
    
Thank you for the info @sup. I just explained it using the given post. Actually I did not tried it myself. –  heartsmagic Jan 17 '13 at 18:59
    
Well, I reworded it to make it even clearer:-). –  sup Jan 19 '13 at 13:27

It should work on every UbuntuOS since version 9.04.

Without installing anything, modifying of creating any shortcuts.

Try this:

'ALT+SPACE' + ' T'

  • 'ALT+SPACE' as the first shortcut brings up the right-click mouse menu

  • '+T' selects the Always On Top" function.

    ALT+SPACE + T

share|improve this answer

Since no one has mentioned this yet, I'll just leave a solution that worked for me on Ubuntu 12.04.

You could setup a regular keyboard shortcut and use wmctrl to toggle the "Always on Top" option.

Go to System Settings > Keyboard > Shortcuts > Custom Shortcuts. Hit the + and give your shortcut a name. Then enter the following command.

wmctrl -r :ACTIVE: -b toggle,above

If you don't have it already, you can install wmctrl from the repos using

sudo apt-get install wmctrl

You should have something that looks similar to this.

Screenshot showing a custom keyboard shortcut setup screen

Hit apply and you should be good to go!

This solution came from a discussion on Ubuntu forums.

share|improve this answer

Another, better I think, solution is to add Alt+A as a shortcut to toggle the "Always on Top" property of a window. This can be done via gconf-editor. Just follow the simple instructions given in this video.

EDIT : Copied from the video

  1. if you are using 12.04 && 12.10 you have to install gconf-editor

    sudo apt-get install gconf-editor

  2. Type gconf-editor in terminal.

  3. Click on apps

  4. Go to metacity

  5. window_keybindings

  6. right click inside the right box and click on new key

  7. Choose string from the dropdown list.

  8. Add the word toggle_above

  9. Write any command you want. i.e : A and press OK

Done :-)

share|improve this answer
    
it didn't work :-( –  Suhaib Nov 18 '12 at 18:15
    
Yes, it does not work for 12.10 either. –  sup Jan 16 '13 at 11:39
    
It should be dconf-editor in 14.04... but it doesn't work either. –  Ed Villegas May 1 at 18:23

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.