My proposal is to use this extension other places as well in order to support any env vars in paths. Could it perhaps be used here?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/1245
**Author:** [@CtByte](https://github.com/CtByte)
**Created:** 1/24/2025
**Status:** ✅ Merged
**Merged:** 1/24/2025
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `env_var`
---
### 📝 Commits (1)
- [`eb2fbab`](https://github.com/LGUG2Z/komorebi/commit/eb2fbabb8b253d97ece14e4694215eec4cde823a) fix(bar): resolve env vars in the configuration switcher
### 📊 Changes
**4 files changed** (+53 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi-bar/src/komorebi.rs` (+2 -1)
📝 `komorebi-client/src/lib.rs` (+1 -0)
📝 `komorebi/src/core/mod.rs` (+2 -0)
➕ `komorebi/src/core/pathext.rs` (+48 -0)
</details>
### 📄 Description
Environment variables were not supported in the location of the configuration switcher section as described in #1131.
I've decided to make an extension called `PathExt` (name debatable) that replaces _any_ environment variable in a PathBuf.
It supports the following:
```json
"configuration_switcher": {
"enable": true,
"configurations": {
"home": "$HOME/komorebi.json",
"work": "$Env:USERPROFILE/komorebi.work.json"
}
}
```
My proposal is to use this extension other places as well in order to support any env vars in paths. Could it perhaps be used [here](https://github.com/LGUG2Z/komorebi/blob/a575b28422b45ca4dc3cabef55009fed59fcf3be/komorebi/src/core/mod.rs#L496)?
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1245
Author: @CtByte
Created: 1/24/2025
Status: ✅ Merged
Merged: 1/24/2025
Merged by: @LGUG2Z
Base:
master← Head:env_var📝 Commits (1)
eb2fbabfix(bar): resolve env vars in the configuration switcher📊 Changes
4 files changed (+53 additions, -1 deletions)
View changed files
📝
komorebi-bar/src/komorebi.rs(+2 -1)📝
komorebi-client/src/lib.rs(+1 -0)📝
komorebi/src/core/mod.rs(+2 -0)➕
komorebi/src/core/pathext.rs(+48 -0)📄 Description
Environment variables were not supported in the location of the configuration switcher section as described in #1131.
I've decided to make an extension called
PathExt(name debatable) that replaces any environment variable in a PathBuf.It supports the following:
My proposal is to use this extension other places as well in order to support any env vars in paths. Could it perhaps be used here?
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.