Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoCCOS committed Nov 14, 2024
1 parent ab59104 commit 9230e5a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/internal/config_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ func initialConfig(dir string) (toggleDotFileBool bool, firstFilePanelDir string
return toggleDotFileBool, firstFilePanelDir
}

// Load and fix config toml file
// Load configurations from the configuration file. Compares the content
// with the default values and modify the config file to include default configs
// if the FixConfigFile flag is on
func loadConfigFile() {

//Initialize default configs
Expand Down Expand Up @@ -116,7 +118,9 @@ func loadConfigFile() {
}
}

// Load and handle keybinds settings in hotkeys toml file
// Load keybinds from the hotkeys file. Compares the content
// with the default values and modify the hotkeys if the FixHotkeys flag is on.
// If is off check if all hotkeys are properly setted
func loadHotkeysFile() {

// load default Hotkeys configs
Expand Down Expand Up @@ -194,7 +198,8 @@ func writeHotkeysFile(hotkeys HotkeysType) {
}
}

// Load coonfigurations from theme file
// Load configurations from theme file into &theme and return default values
// if file theme folder is empty
func loadThemeFile() {
data, err := os.ReadFile(variable.ThemeFolder + "/" + Config.Theme + ".toml")
if err != nil {
Expand All @@ -207,7 +212,8 @@ func loadThemeFile() {
}
}

// Load all default configurations from superfile_config folder
// Load all default configurations from superfile_config folder into global
// configurations variables
func LoadAllDefaultConfig(content embed.FS) {

temp, err := content.ReadFile("src/superfile_config/hotkeys.toml")
Expand Down
2 changes: 1 addition & 1 deletion src/internal/default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var (
DefaultThemeString string
)

// Generate model containing default configurations
// Generate and return model containing default configurations
func defaultModelConfig(toggleDotFileBool bool, firstFilePanelDir string) model {
return model{
filePanelFocusIndex: 0,
Expand Down

0 comments on commit 9230e5a

Please sign in to comment.