Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Conversation

@medgar123
Copy link

@medgar123 medgar123 commented May 30, 2020

This patch introduces custom button (pointer / mouse) mapping functionality. config.def.h has the default mappings for MOD+Button1 (new function: win_move) and MOD+Button3 (new function: win_resize) and four new mappings:

MOD+Button2 lowers the window (new function: win_lower)
MOD+Shift+Button1 centers the window (win_center)
MOD+Shift+Button2 kills the window (win_kill)
MOD+Shift+Button3 makes the window full-screen (win_fs)

Note that raising the window is a separate function (new function: win_raise) which doesn't necessarily need to be attached to an operation. For example, you could have a mapping to move a window without raising it.

Mappings for other mouse buttons (Button4, etc) are also possible and can use any existing function, e.g. run to run a command.

Patch: https://patch-diff.githubusercontent.com/raw/dylanaraps/sowm/pull/84.patch

@medgar123 medgar123 marked this pull request as ready for review May 30, 2020 12:58
@Unixsys
Copy link

Unixsys commented May 31, 2020

Is this a patch, or a real PR? If it is a patch, please format it like other patches. Thanks.

@medgar123 medgar123 changed the title Allow custom button mapping sowm: Allow custom button mapping Jun 1, 2020
@medgar123
Copy link
Author

Is this a patch, or a real PR? If it is a patch, please format it like other patches. Thanks.

Thanks, it's intended to be a patch.

@biopsin
Copy link

biopsin commented Aug 9, 2020

Having issues with this patch @@ -246,9 +273,9 @@ when
#83 (fix key binding issue with NumLock) is applied..

This patch introduces custom button (pointer / mouse) mapping functionality.
`config.def.h` has the default mappings for MOD+Button1 (new function:
`win_move`) and MOD+Button3 (new function: `win_resize`) and four new mappings:

*   MOD+Button2 lowers the window (new function: `win_lower`)
*   MOD+Shift+Button1 centers the window (`win_center`)
*   MOD+Shift+Button2 kills the window (`win_kill`)
*   MOD+Shift+Button3 makes the window full-screen (`win_fs`)

Note that raising the window is a separate function (new function: `win_raise`)
which doesn't necessarily need to be attached to an operation. For example, you
could have a mapping to move a window without raising it.

Mappings for other mouse buttons (Button4, etc) are also possible and can use
any existing function, e.g. `run` to run a command.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants