diff --git a/config/config.toml.advanced b/config/config.toml.advanced index d99e32d..b6642d3 100644 --- a/config/config.toml.advanced +++ b/config/config.toml.advanced @@ -105,6 +105,9 @@ mimes = ["text/html"] mimes = ["image"] extensions = ["svg"] +[filetype.jpeg] +mimes = ["image/jpeg"] + [filetype.markdown] extensions = ["md"] @@ -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 @@ -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" diff --git a/src/config.rs b/src/config.rs index b2a4c62..11bfae2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -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 { @@ -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 {