Wednesday, December 1, 2010

Windows 7 HotKey in Ubuntu

As a bi-OS user, I am always confused with the hot-key setting while I switch between Operating System. No offense, while I said bi-OS user, I refer to Windows 7 and Ubuntu Lucid. (Not Mac OS).

Some hotkeys introduced in Windows 7 are very userful for myself. For example, Windows + Left / Right / Up / Down

If you never try above hotkeys, try it on a Windows O/S, and you will know what would happen.
Long story short, I would like to resize my windows the the left/right window. What should I do?

(1) You have to install wmctrl package
 sudo apt-get install wmctrl


(2) Open "System"-->"Preference"-->"Keyboard Shortcuts".
Bound Windows + Left to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,0,20,1920,1150
Bound Windows + Right to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,960,20,960,1150

To Maximize a windows:
Bound Windows + Up to ==> wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz;wmctrl -r :ACTIVE: -e 0,0,20,1925,1150


Would you like to learn more?
Read here: wmctrl tutorial

No comments:

Post a Comment