In Windows I can press Windows + (left/right/up/down) keys to press a window against the upper, right, down, or left side respectively. Is there an equivalent in Ubuntu?
Distro: Ubuntu 12.04, using Gnome.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There's no predefined shortcut, but you can make your own. Install the xdotool utility. The following commands move a window to the top and bottom respectively:
xdotool windowmove $(xdotool getwindowfocus) x 0 xdotool windowmove $(xdotool getwindowfocus) x 9999
(Some installations have the unfortunate bug that using
y, which is supposed to leave that coordinate unchanged, doesn't take the width of the window border into account.)
To bind a command like this to a key, go to the system settings, in the “Keyboard” panel, in the “Shortcuts” tab. Select “Custom Shortcuts” and click the
+ sign to add a new shortcut.
Taken from comments, here's the answer that helped me, no tools needed.
Ubuntu 16.04 LTS.
Ctrl+Super+Left Arrow - Dock to the left side of your monitor
Ctrl+Super+Right Arrow - Dock to the right side of your monitor
Ctrl+Super+Up Arrow - Maximize the window
Ctrl+Super+Down Arrow (When docked or maximized) - Restore the window.
Ctrl+Super+Down Arrow (When restored) - Minimize the window.
This won't move windows between monitors like it does in Windows. I haven't figured out a way to do that.
Yes...there is a way in Linux to do so ( and to your surprise, it will also work in Windows too )
Alt+Spacebar then hit the key
m and then move wherever you want by usin the arrow keys. Once you done, hit the
And, oh yeah, It will work if and only if the window in question is not fully maximized
If you use
xbindkeys and have
xdotool utility installed, you can add the following lines to your
~/.xbindkeysrc to enable
win+right to move current active window to the left/right half of the screen:
"xdotool windowsize $(xdotool getwindowfocus) 50% 100% && xdotool windowmove $(xdotool getwindowfocus) 0 y" Mod2+Mod4 + Left "xdotool windowsize $(xdotool getwindowfocus) 50% 100% && xdotool windowmove $(xdotool getwindowfocus) 9999 y" Mod2+Mod4 + Right
I'm using ubuntu 12.04 gnome classic, but i think it's the same thing for all ubuntu.
Here is what I do:
First of all, you need to install "stiller".
1) Open terminal
Ctrl+Alt+T and type:
sudo add-apt-repository ppa:fossfreedom/xfwm4 sudo apt-get update sudo apt-get install stiler
Second, now you can edit keyboard shortcuts by:
2) Go to "System Settings" -> Keyboard -> Shortcuts ->
Press "Custom Shortcuts" (at the left pane)
Press "+" symbol (at down left of the window)
3) In the "Custom Shortcut" window that is just open, type:
"View split on left" as a name, and
"stiler.py left" as a command, and press "Apply".
4) Press "Disable" (it's on the same line with the "View split on left" you just created)
and press the keys combination "Ctrl+Supper+Left" on your keyboard.
"View split on Right" as a name,
"stiler.py right" as a command,
"Ctrl+Supper+Right" as a keys combination.
"Gnome Search Tool" as a name,
"gnome-search-tool" as a command,
"Super+F" as a keys combination.
"System Monitor" as a name,
"gnome-system-monitor" as a command,
"Ctrl+Shift+Esc" as a keys combination.
This is just an example, it's up to you which name, command, and keys combination you need to use.