Added theme customization via config.toml #17 ``` [theme] border = "#665C54" accent = "#FABD2F" muted = "#928374" text = "#EBDBB2" text_sel = "#FBF1C7" match = "#FE8019" desc = "#A89984" desc_sel = "#EBDBB2" sel_bg = "#504945" scroll_info = "#83A598" ghost_text = "#7C6F64" hist= "#fe8019" hist_sel = "#d65d0e" sys = "#fb4934" sys_sel = "#cc241d" alias = "#b8bb26" alias_sel = "#98971a" ``` --------- Co-authored-by: verse91 <versedev.store@proton.me> Co-authored-by: VERSE <sunnyone0901@gmail.com>
67 lines
1.3 KiB
Go
67 lines
1.3 KiB
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func DefaultConfig() *Config {
|
|
return &Config{
|
|
Core: CoreConfig{
|
|
Version: 1,
|
|
Shell: "",
|
|
ShellLogin: false,
|
|
Mode: "last",
|
|
Debug: false,
|
|
ExpandAlias: true,
|
|
AutoExecute: false,
|
|
},
|
|
UI: UIConfig{
|
|
Style: "modern",
|
|
GhostText: true,
|
|
ShowHiddenFiles: false,
|
|
MaxSuggestions: 100,
|
|
MaxHeight: 15,
|
|
MaxWidth: 0, // 0 means no limit, fallback to terminal width
|
|
NerdFonts: true,
|
|
},
|
|
Git: GitConfig{
|
|
FilterActiveBranch: true,
|
|
DeduplicateBranches: true,
|
|
},
|
|
Updater: UpdaterConfig{
|
|
CheckOnStartup: true,
|
|
Channel: "stable",
|
|
CheckInterval: Duration(24 * time.Hour),
|
|
},
|
|
AI: AIConfig{
|
|
Enabled: false,
|
|
Provider: "",
|
|
DebounceMS: 500,
|
|
MinIntervalMS: 1000,
|
|
Providers: nil,
|
|
SuggestOnEmpty: SuggestOnEmptyConfig{
|
|
Enabled: false,
|
|
DebounceMS: 800,
|
|
MinIntervalMS: 5000,
|
|
},
|
|
},
|
|
Keybindings: KeybindingsConfig{
|
|
ToggleMode: "ctrl+r",
|
|
ToggleMenu: "shift+tab",
|
|
SelectSuggestion: "tab",
|
|
NavigateUp: "up",
|
|
NavigateDown: "down",
|
|
},
|
|
}
|
|
}
|
|
|
|
func DefaultState() *State {
|
|
return &State{
|
|
LastMode: "spec",
|
|
Updater: UpdaterState{
|
|
LastCheckTime: time.Time{},
|
|
SeenVersion: "",
|
|
},
|
|
}
|
|
}
|