Skip to content

Commit 22aa982

Browse files
committed
feat: update advanced config
1 parent fa951ac commit 22aa982

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

config/config.toml.advanced

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ mimes = ["text/html"]
105105
mimes = ["image"]
106106
extensions = ["svg"]
107107

108+
[filetype.jpeg]
109+
mimes = ["image/jpeg"]
110+
108111
[filetype.markdown]
109112
extensions = ["md"]
110113

@@ -249,6 +252,10 @@ shell = true
249252
command = "atril %i"
250253
no_pipe = true
251254

255+
[handler_open.guitar_tab]
256+
command = "tuxguitar %i"
257+
no_pipe = true
258+
252259
[handler_preview.html]
253260
command = "w3m -dump %i"
254261
no_pipe = true
@@ -264,9 +271,14 @@ command = "chafa -s %cx%l %i"
264271
command = "imv %i"
265272
wait = false
266273

267-
[handler_open.guitar_tab]
268-
command = "tuxguitar %i"
269-
no_pipe = true
274+
[handler_preview.jpeg]
275+
command = "exiftran -a -o /dev/stdout %i | chafa -s %cx%l"
276+
shell = true
277+
stdin_arg = "/dev/stdin"
278+
279+
[handler_open.jpeg]
280+
command = "imv %i"
281+
wait = false
270282

271283
[handler_preview.markdown]
272284
command = "mdcat %i"

src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ mod tests {
198198
assert!(res.is_ok());
199199
let config = res.unwrap();
200200

201-
assert_eq!(config.filetype.len(), 29);
202-
assert_eq!(config.handler_preview.len(), 21);
201+
assert_eq!(config.filetype.len(), 30);
202+
assert_eq!(config.handler_preview.len(), 22);
203203
assert_eq!(
204204
config.default_handler_preview,
205205
FileHandler {
@@ -211,7 +211,7 @@ mod tests {
211211
stdin_arg: Some("".to_string())
212212
}
213213
);
214-
assert_eq!(config.handler_open.len(), 20);
214+
assert_eq!(config.handler_open.len(), 21);
215215
assert_eq!(
216216
config.default_handler_open,
217217
FileHandler {

0 commit comments

Comments
 (0)