Skip to content

Instantly share code, notes, and snippets.

@emri99
Last active April 26, 2022 00:20
Show Gist options
  • Save emri99/fe06de91f23390c927e1850bf0d95d46 to your computer and use it in GitHub Desktop.
Save emri99/fe06de91f23390c927e1850bf0d95d46 to your computer and use it in GitHub Desktop.
Karabiner / Rectangle mapper
{
"title": "Windows Resizing (Fn + arrow)",
"rules": [
{
"description": "Window on top - Fn + Arrow up => CTRL+CMD+OPT+9",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn"
]
},
"key_code": "up_arrow"
},
"to": [
{
"repeat": false,
"key_code": "9",
"modifiers": [
"left_gui",
"left_alt",
"left_control"
]
}
]
}
]
},
{
"description": "Window on bottom - Fn + Arrow down => CTRL+CMD+OPT+L",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn"
]
},
"key_code": "down_arrow"
},
"to": [
{
"repeat": false,
"key_code": "l",
"modifiers": [
"left_gui",
"left_alt",
"left_control"
]
}
]
}
]
},
{
"description": "Window on left - Fn + Arrow left => CTRL+CMD+OPT+I",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn"
]
},
"key_code": "left_arrow"
},
"to": [
{
"repeat": false,
"key_code": "i",
"modifiers": [
"left_gui",
"left_alt",
"left_control"
]
}
]
}
]
},
{
"description": "Window on right - Fn + Arrow right => CTRL+CMD+OPT+P",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn"
]
},
"key_code": "right_arrow"
},
"to": [
{
"repeat": false,
"key_code": "p",
"modifiers": [
"left_gui",
"left_control",
"left_alt"
]
}
]
}
]
},
{
"description": "Fullscreen - Fn + shift + arrow up => CTRL+CMD+OPT+O ",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn",
"left_shift"
]
},
"key_code": "up_arrow"
},
"to": [
{
"repeat": false,
"key_code": "o",
"modifiers": [
"left_gui",
"left_control",
"left_alt"
]
}
]
}
]
},
{
"description": "Restore - Fn + shift + arrow down => CTRL+CMD+OPT+DELETE",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"fn",
"left_shift"
]
},
"key_code": "down_arrow"
},
"to": [
{
"repeat": false,
"key_code": "delete_or_backspace",
"modifiers": [
"left_gui",
"left_control",
"left_alt"
]
}
]
}
]
}
]
}
@emri99
Copy link
Author

emri99 commented Apr 26, 2022

Purpose

  • Avoid complicated shortcut to move/resize windows
  • Avoid shortcuts that may be conflict with system ones

Usage

  • Resize/move windows using FN + arrow key
  • maximize window using FN + SHIFT + UP
  • restore previous window size using FN + SHIFT + DOWN

Installation

  • Install Rectangle
  • Configure :
    • Half-left to CONTROL+OPTION+COMMAND+I (letter i)
    • Half-right to CONTROL+OPTION+COMMAND+P
    • Half-top to CONTROL+OPTION+COMMAND+9 (or ç in french keyboard layout)
    • Half-bottom to CONTROL+OPTION+COMMAND+L
    • Restore to CONTROL+OPTION+COMMAND+DELETE
    • Maximize to CONTROL+OPTION+COMMAND+O (letter o)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment