makes your windows stay on top, toggle it.
August 11th, 2007 mysurface Posted in Misc, fluxbox, wmctrl | Hits: 26105 |
Do you wish to have a shortcut way to make your window stay on top and toggle it after without needing it anymore ? Any EWMH compatible Windows Manager(WM) may support it, WM such as GNOME (metacity), fluxbox, xfce, compiz, beryl etc.
You can find the option at Window Menu, where it usually appear as “On top” for compiz, “Always On Top” for Metacity. For Fluxbox, it appears in Layer.
Key bindings
To toggle ‘always on top’ with a shortcut key, you need to have some manual tweaking. I have tested 3 different windows manager(WM) installed in my box ( Fluxbox, Metacity, Compiz), below are the steps for each WM.
Fluxbox
My favorite WM. Adding a key binding for Fluxbox is flexible, you just need to edit the file ~/.fluxbox/keys.
If you are using Fluxbox v1.0rc3 or above, then append the line below to the keys file.
Mod1 a :ToggleCmd {RaiseLayer} {LowerLayer}
Mod1 indicates Alt key, ToggleCmd used to implement key toggle , for more info regarding key bindings on Fluxbox, refers to fluxbox-wiki.
If you are reading the manual of Fluxbox, you may notice that RaiseLayer and LowerLayer was not included. It is a hidden magic code!
Anyway when you trigger it, the Layer state is not change. You can check the state at Fluxbox window layer menu, the state is not define after you trigger it. To workaround the problem, replace the line as below:
Mod1 a :ToggleCmd {MacroCmd {RaiseLayer} {RaiseLayer}} {MacroCmd {LowerLayer} {LowerLayer}}
Thanks to _mark for the line, now it behaves the way it suppose to be.
For those who are using older version of Fluxbox, you can make use of wmctrl.
Mod1 a :ExecCommand wmctrl -r :ACTIVE: -b toggle,above
Compiz
For compiz, Enable Extra WM Actions. Check the properties, and insert ALT+A to Key field for Toggle Always-On-Top action.
Gnome( Metacity )
You need to edit the registry using gconf-editor. Goto apps -> metacity -> windows_keybindings, insert a value <Alt>a to toggle_above.
ï¼»ä¸æ–‡ç¿»è¯‘ï¼½
Live Chat!









August 13th, 2007 at 10:25 am
Linux By Examples - We explain every GNU/Linux command line by examples…
Commands, commands, commands!! I saw this site on delicious and the concept is great. They take Linux commands and show examples of the usage. How novel!…
August 13th, 2007 at 7:38 pm
KDE via kwin:
kcontrol.
either search for “keyboard shortcuts” or navigate “Regional & Accessibility” -> “Keyboard Shortcuts” -> Shortcut Schemes -> “Keep Window Above Others.”
Set your key there.