Skip to content

Configuration variables support - #1243

Open
dsafxP wants to merge 2 commits into
mangowm:mainfrom
dsafxP:cfg-variables
Open

Configuration variables support#1243
dsafxP wants to merge 2 commits into
mangowm:mainfrom
dsafxP:cfg-variables

Conversation

@dsafxP

@dsafxP dsafxP commented Aug 3, 2026

Copy link
Copy Markdown

This adds support for configuration variables in the configuration parser along with documenting it.

It doesn't use i3's format as to prevent conflicts and edge cases.

Example usage:

var=run,foot --alpha 90%
bind=SUPER,Return,spawn,{run}

dsafxP added 2 commits August 3, 2026 00:10
- Introduce ConfigVar struct and Config fields var/var_count
- Parse "var" option and store name/value pairs
- Implement expand_config_vars to substitute {name} references
- Update parse_config_line to expand values before parsing
- Free allocated var resources in free_config

Assisted-by: DeepSeek:deepseek-v4-flash
- assets/config.conf: added variable definitions (var=term, var=menu) and bound them using {menu} and {term}
- docs/configuration/basics.md: introduced a “Configuration Variables” section with usage examples and notes

Assisted-by: DeepSeek:deepseek-v4-flash
@DreamMaoMao
DreamMaoMao force-pushed the main branch 3 times, most recently from 0efe75b to 20ad711 Compare August 10, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant