pkkid / x11pygrid

Quickly move windows around the an X11 desktop
GNU General Public License v2.0
324 stars 41 forks source link

Customizable keys #6

Closed avaly closed 6 years ago

avaly commented 6 years ago

Support customizing keys commands via config file.

Default config file looks like:

{
  "default": {
    "maxheight": 0.67,
    "maxwidth": 0.67,
    "minheight": 0.33,
    "minwidth": 0.25,
    "padding": [
      0,
      0,
      0,
      0
    ],
    "snaptocursor": false,
    "spacing": 4,
    "xdivs": 3,
    "ydivs": 2
  },
  "keys": {
    "accelerator": "<Ctrl><Mod1><Mod2>",
    "commands": {
      "KP_1": "bottomleft",
      "KP_2": "bottom",
      "KP_3": "bottomright",
      "KP_4": "left",
      "KP_5": "middle",
      "KP_6": "right",
      "KP_7": "topleft",
      "KP_8": "top",
      "KP_9": "topright"
    }
  }
}
pkkid commented 6 years ago

Is there a website or something we can link to in the readme to list the keycodes that are used in the config?

avaly commented 6 years ago

The links I could find with some info are:

https://developer.gnome.org/gtk3/stable/gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse https://developer.gnome.org/gdk3/stable/gdk3-Keyboard-Handling.html#gdk-keyval-from-name https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/gdkkeysyms.h