preset: unset var before set when force is enabled

parent 9934a3f1
......@@ -142,6 +142,10 @@ func processHyprVars(manager *hyprland.HyprlandManager, prof config.PresetProfil
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)
} else {
......
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