Skip to content

Commit

Permalink
feat: update advanced config
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Jul 18, 2022
1 parent fa951ac commit 22aa982
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
18 changes: 15 additions & 3 deletions config/config.toml.advanced
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ mimes = ["text/html"]
mimes = ["image"]
extensions = ["svg"]

[filetype.jpeg]
mimes = ["image/jpeg"]

[filetype.markdown]
extensions = ["md"]

Expand Down Expand Up @@ -249,6 +252,10 @@ shell = true
command = "atril %i"
no_pipe = true

[handler_open.guitar_tab]
command = "tuxguitar %i"
no_pipe = true

[handler_preview.html]
command = "w3m -dump %i"
no_pipe = true
Expand All @@ -264,9 +271,14 @@ command = "chafa -s %cx%l %i"
command = "imv %i"
wait = false

[handler_open.guitar_tab]
command = "tuxguitar %i"
no_pipe = true
[handler_preview.jpeg]
command = "exiftran -a -o /dev/stdout %i | chafa -s %cx%l"
shell = true
stdin_arg = "/dev/stdin"

[handler_open.jpeg]
command = "imv %i"
wait = false

[handler_preview.markdown]
command = "mdcat %i"
Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ mod tests {
assert!(res.is_ok());
let config = res.unwrap();

assert_eq!(config.filetype.len(), 29);
assert_eq!(config.handler_preview.len(), 21);
assert_eq!(config.filetype.len(), 30);
assert_eq!(config.handler_preview.len(), 22);
assert_eq!(
config.default_handler_preview,
FileHandler {
Expand All @@ -211,7 +211,7 @@ mod tests {
stdin_arg: Some("".to_string())
}
);
assert_eq!(config.handler_open.len(), 20);
assert_eq!(config.handler_open.len(), 21);
assert_eq!(
config.default_handler_open,
FileHandler {
Expand Down

0 comments on commit 22aa982

Please sign in to comment.