Skip to content

How do you use keybinds? #206

@ghost

Description

Title says it all. I understand that this is an inappropriate space for something like this, but there is no discussions page so I had to make do with this.

I have a function func_binds which is supposed to check e.binding.symbol for the matching key, and if it find the key it will make the window effectively fullscreen. This is how I have it implemented

# Define binds
def func_binds(i3, e):
    # Fullscreen
    if e.binding.symbol	== f"{MOD}+Shift+Up":
        # Run i3 commands
        i3.command(f"resize set {WIDTH} {HEIGHT}")
        i3.command("move absolute 0 0")

# Connect key press
i3.on('binding', func_binds)

When I run it I get no errors but nothing happens, so what am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions