-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add --config option to Zebar (or something similar) #78
Comments
@quadratech188, you can use the mklink command in Windows to create a symbolic link that points to a different location for your configuration directory. Step 1: Move Your Original Config DirectoryFirst, move your original configuration directory move %userprofile%\.glzr C:\<YOUR DESTINATION> Replace Step 2: Create the Symbolic LinkThen create a symbolic link at the original location that points to the new location of the configuration directory. Run the following command: mklink /D "%userprofile%\.glzr" "C:\<YOUR DESTINATION>" Replace This will ensure that your configuration directory is relocated while maintaining the same path for applications that depend on it. P.S. Other OS also support symbolic links. |
I didn't think of that, thanks! |
I started implementing --config anyway, and found this problem: |
Yeah good question. Would you mind holding off on this for a lil bit? Started doing some experiments today that would affect this feature - currently looking into if it's possible to get rid of the start script and launch with a set of defaults on startup |
Btw, I'm using another workaround. I use a PowerShell scripts to override Zebar's default configuration with my own. function Update-Zebar-Config
{
$zebarConfigPath = "$env:Moaid_Config_Path/config/glazewm/zebar_config.yaml"
$zebarDefaultConfigPath = "$env:USERPROFILE/.glzr/zebar/config.yaml"
Copy-Item -Path $zebarConfigPath -Destination $zebarDefaultConfigPath -Force
}
function Restart-Zebar($overrideConfigs = $true)
{
if ($overrideConfigs)
{
Update-Zebar-Config
}
Stop-Zebar
Start-Zebar
}
function Start-Zebar
{
$monitors = zebar monitors
foreach ($monitor in $monitors) {
Start-Process -WindowStyle Hidden -FilePath "zebar" -ArgumentList "open bar --args $monitor"
};
}
function Stop-Zebar
{
Get-Process | Where-Object { $_.ProcessName -eq "zebar" } | Foreach-Object { Stop-Process -id $_.id -Force }
} |
A Usage: |
Request
Curently, zebar only reads configs from %userprofile%/.glzr/zebar/config.yaml (for Windows), which can sometimes be a pain for people who store their configs somewhere else. A CLI option to specify a different config file would be a nice QOL feature.
Notes
It seems that read_config_file() in the Rust backend already has a override argument, but it isn't used anywhere in the Client API.
The text was updated successfully, but these errors were encountered: