8

I would like to know if there is a shortcut in deepin os for docking a window to a side or corner of the screen. Just like it does when the window is dragged to one edge of the screen.

It doesn't seem to be listed in the shortcut section of the control panel.

Or if there is none, is it somewhere explained how to create on?

ls.
  • 712
  • 1
  • 7
  • 11

3 Answers3

15

Following your last answer, and looking at the source code ; I found this using DBUS.

You can create a custom shortcut using the following line as command qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 1

1 is for left, and 2 for right.

Swizz
  • 166
  • 1
  • 3
2

I haven't found a keyboard shortcut yet.
However, if you have a touchpad you swipe sideways with three fingers. This way the focused window docks to a side of the screen.

If somebody finds a hotkey i would still be happy to know about it!

ls.
  • 712
  • 1
  • 7
  • 11
  • Sweeping sideways upwards with three fingers the focused window maximizes, doing it again restores it – Bit-Man Jul 07 '18 at 01:53
2

According to Swizz's answer, I tried to change the number passed to qdbus and I found the solution for this problem:-

  1. From Launcher (start menu), go to Control Center > Keyboard and Language > Shortcuts and you will get this window:-

    Keyboard and Language - Shortcuts dialog

  2. Click Add button that is located at the bottom to add a new custom shortcut:-

    Add custom shortcut dialog

  3. Add your custom shortcut name, its command and its shortcut key:-

    • To make the window fill the left side, you should pass 1:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 1
    • To make the window fill the right side, you should pass 2:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 2
    • To move the window to the top left side, you should pass 5:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 5
    • To make the window fill the upper side, you should pass 4:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 4
    • To move the window to the top right side, you should pass 6:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 6
    • To move the window to the bottom left side, you should pass 9:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 9
    • To make the window fill the bottom side, you should pass 8:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 8
    • To move the window to the bottom right side, you should pass 10:-

      • qdbus com.deepin.wm /com/deepin/wm com.deepin.wm.TileActiveWindow 10
Greenonline
  • 1,759
  • 7
  • 16
  • 21