feat(tracker/gioui): preferences.yml for window size or maximized (#185)

This commit is contained in:
qm210
2024-12-07 12:54:08 +01:00
committed by GitHub
parent 4169356845
commit 7ff3c942cb
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
}