Skip to content

feat: Added recursion for binds config#3533

Open
spiros132 wants to merge 1 commit intoniri-wm:mainfrom
spiros132:main
Open

feat: Added recursion for binds config#3533
spiros132 wants to merge 1 commit intoniri-wm:mainfrom
spiros132:main

Conversation

@spiros132
Copy link

This PR adds a feature regarding the binds config. It adds the ability for binds to have a more "organized" view as shown below. This PR still allows the normal way to create bindings, but also adds the recursive way.

Mod {
  D { spawn-sh "fuzzel"; }
}

Mod {
  1 { focus-workspace 1; }
  ...
  9 { focus-workspace 9; }  

  Shift {
    1 { move-column-to-workspace 1; }
    ...
    9 { move-column-to-workspace 9; }
  }
}

Mod+Print { screenshot; }

When it comes to bind properties it follows the standard "OOP idea", for example if the parent has an allow-when-locked property, the child also follows the parent's allow-when-locked unless overridden.

Ctrl allow-when-locked=true {
  // Allow when locked will be true for the Alt+Delete below as well.
  Alt+Delete { quit; }

  // Override the allow-when-locked to be false
  Q allow-when-locked=false { close-window; }
}

If something looks weird, there is any bugs or anything could be changed to look better in the code, please do tell me!

@Sempyos Sempyos added area:config Config parsing, default config, new settings pr kind:feature New features and functionality labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Config parsing, default config, new settings pr kind:feature New features and functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants