mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-07 03:55:23 +00:00
fix(config): better handling of default values (#123)
This commit is contained in:
parent
37b2dda729
commit
7b114b7cb6
@ -44,16 +44,15 @@ input_bar_position = "bottom"
|
|||||||
# A list of builtin themes can be found in the `themes` directory of the television
|
# A list of builtin themes can be found in the `themes` directory of the television
|
||||||
# repository. You may also create your own theme by creating a new file in a `themes`
|
# repository. You may also create your own theme by creating a new file in a `themes`
|
||||||
# directory in your configuration directory (see the `config.toml` location above).
|
# directory in your configuration directory (see the `config.toml` location above).
|
||||||
theme = "gruvbox-dark"
|
theme = "catppuccin-mocha"
|
||||||
|
|
||||||
# Previewers settings
|
# Previewers settings
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
[previewers.file]
|
[previewers.file]
|
||||||
# The theme to use for syntax highlighting
|
# The theme to use for syntax highlighting.
|
||||||
# A list of available themes can be found in the https://github.com/sharkdp/bat
|
# Bulitin syntax highlighting uses the same syntax highlighting engine as bat.
|
||||||
# repository which uses the same syntax highlighting engine as television
|
# To get a list of your currently available themes, run `bat --list-themes`
|
||||||
# You may add your own themes by following the instructions in the bat repository
|
theme = "Coldark-Dark"
|
||||||
theme = "gruvbox-dark"
|
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
@ -79,8 +79,8 @@ impl Config {
|
|||||||
let mut builder = config::Config::builder()
|
let mut builder = config::Config::builder()
|
||||||
.set_default("data_dir", data_dir.to_str().unwrap())?
|
.set_default("data_dir", data_dir.to_str().unwrap())?
|
||||||
.set_default("config_dir", config_dir.to_str().unwrap())?
|
.set_default("config_dir", config_dir.to_str().unwrap())?
|
||||||
.set_default("ui", UiConfig::default())?
|
.set_default("ui", default_config.ui.clone())?
|
||||||
.set_default("previewers", PreviewersConfig::default())?
|
.set_default("previewers", default_config.previewers.clone())?
|
||||||
.set_default("theme", default_config.ui.theme.clone())?;
|
.set_default("theme", default_config.ui.theme.clone())?;
|
||||||
|
|
||||||
// Load the user's config file
|
// Load the user's config file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user