Deepin: Shortcut for docking window to side/corner of screen

5,333

Solution 1

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.

Solution 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!

Solution 3

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
Share:
5,333

Related videos on Youtube

ls.
Author by

ls.

Updated on September 18, 2022

Comments

  • ls.
    ls. over 1 year

    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?

  • Swizz
    Swizz almost 6 years
    @ls. I have read the full source code of the Deepin dbus manager
  • Bit-Man
    Bit-Man almost 6 years
    Sweeping sideways upwards with three fingers the focused window maximizes, doing it again restores it
  • Sergiy Kolodyazhnyy
    Sergiy Kolodyazhnyy about 5 years
    As a fellow Deepin and qdbus user, I greatly appreciate this answer :)
  • cipricus
    cipricus about 5 years
    Logging out/in is needed to see changes.