18

enter image description here

By default, instead of doing something useful, the Ctrl-Alt-Numpad key combination in Gnome 3 shoves a window in the specified direction across the entire workspace. These shortcuts do not show in the Gnome 3 keyboard settings panel; they're just there, and they're in the way.

How can I get this behavior back in Ubuntu 17.10?

13
  • Do you tried this? Aug 21, 2017 at 14:56
  • 1
    @AFSHIN that's for Ctrl-Alt-Fn, something which is also broken in aardvark, but is not relevant to this question :)
    – badp
    Aug 21, 2017 at 15:06
  • maybe you mean Fn function key? Aug 21, 2017 at 15:07
  • 1
    @AFSHIN This question is about Ctrl-Alt-numpad (so Ctrl-Alt-Numpad 7 puts a window in that monitor's upper left quarter)
    – badp
    Aug 21, 2017 at 15:09
  • 1
    That image appears that you have your main screen broken into 6 regions. Can I ask how you did that? That's exactly what I'm after! I only have the default 4.
    – Madivad
    Aug 24, 2017 at 2:28

3 Answers 3

12

I first followed the these instructions on how to disable the "move-to-corner" shortcuts with dconf-editor. I'm not sure if this is a necessary step or not.

gsettings set org.gnome.desktop.wm.keybindings move-to-corner-se "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-sw "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-nw "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-corner-ne "['disabled']"

Then I have tried installing the Put Windows gnome extension on Ubuntu 17.10, and it seems to work fine.

  1. Install the browser plugin for https://extensions.gnome.org

    sudo apt-get install chrome-gnome-shell
    

    GNOME Shell extensions integration for web browsers. Provides integration with GNOME Shell extensions repository for Chromium (and derivatives) and Firefox.

  2. Visit the Put Windows page and install the extension

  3. Refresh the page

  4. Click the blue spanner/screwdriver settings symbol on the page:

    screenshot

  5. Go to "Keyboard Shortcuts" (also through Gnome Tweaks) and modify the actions to be Ctrl+Alt+Num, etc. By default, uses Super+Num.

You mentioned in one version of your question that you tried this extension and after restarting the machine you needed to manually reconfigure the shortcuts. I tested restarting my machine and had no such problems.

3
  • .This solution works however doesn't work well with Ubuntu 18.04 Apr 29, 2018 at 18:50
  • @LukaszDynowski I haven't upgraded to 18.04 yet, but I plan to soon. If you have some experience or find a solution I'd be very interested!
    – tttppp
    May 1, 2018 at 15:24
  • 2
    Just tried with 18.04 - worked for me. Didn't need to do anything other than install the extension.
    – seanlano
    Jun 9, 2018 at 5:52
6

I figured it out, you need to change the settings using dconf:

This will move windows to corners without resizing it.

enter image description here

In dconf, look for org>desktop>wm>keybindings and click on the field next to move-to-corner-se and change it to ['disabled']:

enter image description here

and repeat for all the ones that you want to disable, i.e., move-to-corner-sw, etc.

Alternatively you can do it from the command-line like this:

gsettings set org.gnome.desktop.wm.keybindings move-to-corner-se "['disabled']"

and restore it like this:

gsettings set org.gnome.desktop.wm.keybindings move-to-corner-se "['<Primary><Alt>KP_Next']"

List all with gsettings list-recursively | grep move-to-corner.

See also org.gnome.desktop.wm.keybindings in https://wiki.ubuntu.com/Keybindings

org.gnome.desktop.wm.keybindings

Keybindings that are handled by the window manager are persisted in the org.gnome.desktop.wm.keybindings section of dconf. The "Navigation", and "Windows" categories of shortcuts are stored here. In the past, each window manager was responsible for storing its own shortcuts under its own schema. Now both the metacity and compiz window managers use this central, unified set of bindings. There are mapping files in /usr/share/gnome-control-center/keybindings/ that show how these key bindings are used by each window manager.

If using Compiz

If you are still using Compiz in some way with gnome3, see below:

From here, I was able to disable the keys in my Ubuntu 16.04 Laptop (unity 7.4.0). The steps below is what you are looking for.

Warning

CompizConfig Settings Manager (ccsm) is an advanced tool, and not all of its options are completely compatible with Unity. As such, CCSM has been known to sometimes break users' desktops. Please use caution and know that you are taking a risk by following this answer or any other answer that recommends the use of CCSM. In the event that following this advice does break Unity, please see this question for instructions on how to reset it.

You need to install compizconfig-settings-manager, under Ubuntu software: enter image description here

run it and under the "Window Management" section select "Grid":

enter image description here

On the grid menu click on the edit pencil and uncheck the "Enable" box: enter image description here

13
  • This is for Compiz, not Gnome 3
    – badp
    Aug 23, 2017 at 16:53
  • Sorry about that: What Ubuntu are you running? How did you install gnome? I assume UbuntuGnome? which version? Aug 23, 2017 at 17:03
  • Are you using gdm or lightdm? Just setup a system and installed sudo apt install ubuntu-gnome-desktop (chose lightdm but I can reconfigure) Aug 23, 2017 at 20:53
  • for the record, it seems like it is still using compiz/unity from the output of wmctrl -m and printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION", which would mean that my response above might be the answer. Aug 23, 2017 at 20:55
  • 1
    too bad, I guess no one else thought your solution was good enough. You did not answer the fundamental problem — arranging windows in the upper/lower halves of my screen. You helped me with my XY problem: "I found this shitty thing that sorta does it, and I don't like it, but with this disabling of the original key combination I expect it would be slightly more tolerable." Half of your answer is about Compiz and that makes it completely irrelevant. Better luck next time in your quest for virtual internet points
    – badp
    Sep 14, 2017 at 6:56
3

On Ubuntu 18.04.1 LTS, simply install the Put Windows Gnome extension through Ubuntu Software Center to restore the window positioning via numpad. No further settings changes are needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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