feat: preferences.yml for window size

This commit is contained in:
qm210
2024-11-23 00:55:45 +01:00
parent 4169356845
commit 6259f73d09
5 changed files with 94 additions and 21 deletions

View File

@ -3,8 +3,6 @@ package gioui
import (
_ "embed"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
@ -28,16 +26,7 @@ var keyActionMap = map[KeyAction]string{} // holds an informative string of the
func loadCustomKeyBindings() []KeyBinding {
var keyBindings []KeyBinding
configDir, err := os.UserConfigDir()
if err != nil {
return nil
}
path := filepath.Join(configDir, "sointu", "keybindings.yml")
bytes, err := os.ReadFile(path)
if err != nil {
return nil
}
err = yaml.Unmarshal(bytes, &keyBindings)
_, err := ReadCustomConfigYml("keybindings.yml", &keyBindings)
if err != nil {
return nil
}