As a start you can add focus_follows_mouse no
to your config file. However, this will not restrict the mouse to the current workspace, but only make the focus stay right where it is regardless the mouse pointer position.
Update:
The closest to the behaviour you want that I know of is the following: Adjust the vertical position of your favorite monitor relative to the second one using xrandr
. Let us assume your primal monitor is on output HDMI1 and the secondary has a vertical resolution of e.g. 1080px. Then you can try the following command:
xrandr --output HDMI1 --pos 0x1080
This moves the HDMI1 monitor below the secondary one, so that the mouse cursor is practically banned to the primal monitor except for the upper right edge.
Can you be more specific on _extending the current one_ part? i3 detects displays properly and assigns workspace per-monitor. If you are experiencing different behavior, please explain in detail what's happening.
it works fine but i just like to control monitor only with changing workspace not by moving mouse to the edge of the screen in another words I just want to stick mouse in the current workspace