Skip to content

[FR] Add a conf.yaml based configuration system #12

@phoeagon

Description

@phoeagon

Create a conf.yaml based configuration system, so that the hotkey bindings are configurable.

I have a tentative implementation at https://github.com/phoeagon/RectangleWin/blob/main/conf.go

Basically, the conf.yaml has the following form:

keybindings:
    - modifier:
        - Ctrl
        - Alt
      key: UP_ARROW
      bindfeature: moveToTop
      
    - modifier:
        - Ctrl
        - Alt
      key: DOWN_ARROW
      bindfeature: moveToBottom

This could be easily parsed using "github.com/golobby/config/v3"

where modifier is some repeated properties of Ctrl, Alt, Win, Shift, Win. key takes in common keys, such as a-z, 0-9, *_ARROW, etc. As a fallback, it could take in current keymap.go's display name for matching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions