diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2018-12-23 21:57:29 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2018-12-23 21:57:29 -0500 |
commit | 819891b51f5172640aacfa7c6ee5bc438b35bba3 (patch) | |
tree | e5b210395b81b797f42d1e55b4c890a4675d09b3 | |
parent | 2fd5508cf2e4fd2addcc13f2d77eafb571004271 (diff) |
move mimetype config out of joshuto.toml into mimetype.toml
-rw-r--r-- | config/joshuto.toml | 10 | ||||
-rw-r--r-- | config/mimetype.toml | 22 | ||||
-rw-r--r-- | src/joshuto/structs.rs | 2 |
3 files changed, 23 insertions, 11 deletions
diff --git a/config/joshuto.toml b/config/joshuto.toml index 6b43579..c9cc2bb 100644 --- a/config/joshuto.toml +++ b/config/joshuto.toml @@ -12,13 +12,3 @@ column_ratio = [1, 3, 4] # does nothing so far scroll_offset = 8 - -# specify which applications to use to open certain file types -[mimetypes] -"application/x-matroska" = [ ["mpv"] ] -"application/x-shellscript" = [ ["nano"], ["gedit"] ] -"image/jpeg" = [ ["qimgv"], ["feh"]] -"image/png" = [ ["feh", "-F"] ] -"text/plain" = [ ["nano"] ] -"text/x-csrc" = [ ["nano"] ] - diff --git a/config/mimetype.toml b/config/mimetype.toml new file mode 100644 index 0000000..ecac788 --- /dev/null +++ b/config/mimetype.toml @@ -0,0 +1,22 @@ +# specify which applications to use to open certain file types +[mimetypes] +"application/x-matroska" = [ + ["mpv"] +] +"application/x-shellscript" = [ + ["nano"], + ["gedit"] +] +"image/jpeg" = [ + ["qimgv"], + ["feh"] +] +"image/png" = [ + ["feh", "-F"] +] +"text/plain" = [ + ["nano"] +] +"text/x-csrc" = [ + ["nano"] +] diff --git a/src/joshuto/structs.rs b/src/joshuto/structs.rs index 1065cda..98c44e5 100644 --- a/src/joshuto/structs.rs +++ b/src/joshuto/structs.rs @@ -111,7 +111,7 @@ impl JoshutoWindow { let win = ncurses::newwin(rows, cols, coords.0 as i32, coords.1 as i32); ncurses::leaveok(win, true); - ncurses::refresh(); + ncurses::wnoutrefresh(win); JoshutoWindow { win: win, rows: rows, |