Skip to content

Commit bbba409

Browse files
committed
uncommon: add versioning tip
1 parent 404d81e commit bbba409

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

content/Configuring/Uncommon-tips-&-tricks.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,33 @@ hyprctl -q --batch "keyword unbind ALT, TAB ; keyword unbind ALT SHIFT, TAB ; ke
367367
#!/usr/bin/env bash
368368
hyprctl -q --batch "keyword animations:enabled false ; dispatch exec footclient -a alttab ~/.config/hypr/scripts/alttab/alttab.sh $1 ; keyword unbind ALT, TAB ; keyword unbind ALT SHIFT, TAB ; dispatch submap alttab"
369369
```
370+
371+
## Config versioning
372+
373+
Some updates add breaking changes, which can be anticipated by looking at the git
374+
development branch.
375+
376+
Since Hyprland 0.53, we export a variable for each major version, that looks like this:
377+
```
378+
$HYPRLAND_V_0_XX
379+
```
380+
381+
You can make your configs conditional, e.g.:
382+
383+
```
384+
# hyprlang if HYPRLAND_V_0_53
385+
386+
someValue = 0.53
387+
388+
# hyprlang endif
389+
390+
# hyprlang if !HYPRLAND_V_0_53
391+
392+
someValue = 0.52
393+
394+
# hyprlang endif
395+
```
396+
397+
The -git branch exports the variable for the next major release.
398+
399+
All future releases will export all _past_ variables as well, e.g. 0.54 will also export 0.53.

0 commit comments

Comments
 (0)