Skip to content

Commit

Permalink
change config name from "config.toml" to "kanata-tray.toml"
Browse files Browse the repository at this point in the history
changing so it's more specific
  • Loading branch information
rszyma committed Mar 22, 2024
1 parent 9a57630 commit d8aaa1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Works on Windows and Linux.
Default config file will be autogenerated for you on the first run.
You can access it from from: `Click Tray Icon > Configure`.

Config file name is `config.toml`.
Config file name is `kanata-tray.toml`.

On Linux, the config folder location is `~/.config/kanata-tray`.
On Windows, it's `C:\Users\<YourUsername>\AppData\Roaming\kanata-tray`
Expand Down Expand Up @@ -61,7 +61,7 @@ kanata_config = '~/.config/kanata/test.kbd'

`preset.autorun` - when set to true, preset will run at kanata-tray startup.

`preset.layer_icons` - maps kanata layer names to custom icons. Custom icons should be placed in `icons` folder in config directory, next to `config.toml`. Accepted icon types on Linux are `.ico`, `.png`, `.jpg`; on Windows only `.ico` is supported. You can assign an icon to special identifier `'*'` to change icon for other layers not specified in `[layer_icons]`.
`preset.layer_icons` - maps kanata layer names to custom icons. Custom icons should be placed in `icons` folder in config directory, next to `kanata-tray.toml`. Accepted icon types on Linux are `.ico`, `.png`, `.jpg`; on Windows only `.ico` is supported. You can assign an icon to special identifier `'*'` to change icon for other layers not specified in `[layer_icons]`.

`defaults` - a config item, that allows to overwrite default values for all presets.
It accepts same configuration options that `presets` do.
Expand All @@ -76,7 +76,7 @@ Other notes:

### Config completion in editors

In VSCode to get editor support for your kanata-tray config, install [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml#completion-and-validation-with-json-schema) extension and the following line at the top of your `config.toml` file.
In VSCode to get editor support for your kanata-tray config, install [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml#completion-and-validation-with-json-schema) extension and the following line at the top of your `kanata-tray.toml` file.
```toml
"$schema" = "https://raw.githubusercontent.com/rszyma/kanata-tray/main/doc/config_schema.json"
```
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ func main() {
}

func mainImpl() error {
configFileName := "config.toml"
configFileName := "kanata-tray.toml"
var configFile string
var configFolder string

// First try reading config.toml from the folder where kanata-tray is located.
// First try reading kanata-tray.toml from the folder where kanata-tray is located.
exePath, err := os.Executable()
if err != nil {
fmt.Println("Failed attempt to read config.toml from kanata-tray folder", err)
fmt.Println("Failed attempt to read kanata-tray.toml from kanata-tray folder", err)
}
localConfigFolder := filepath.Dir(exePath)
localConfigFile := filepath.Join(localConfigFolder, configFileName)
Expand Down

0 comments on commit d8aaa1c

Please sign in to comment.