preset: unset var before set when force is enabled

parent 9934a3f1
......@@ -140,7 +140,11 @@ func processHyprVars(manager *hyprland.HyprlandManager, prof config.PresetProfil
if opts.DryRun {
res.Add(cat, fmt.Sprintf("%s = %s", v.Name, v.Value), config.OpStatus.DryRun)
continue
}
}
if v.Force {
manager.UnsetVar(v.Name)
}
if _, err := manager.SetVar(v.Name, v.Value); err != nil {
res.Add(cat, fmt.Sprintf(locale.T("Error setting %s: %v"), v.Name, err), config.OpStatus.Error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment