diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2018-12-24 12:21:14 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2018-12-24 12:21:14 -0500 |
commit | 3e9412b19d0c869d84c47bdd6d97ab9b9acb1f93 (patch) | |
tree | f53f12b01c7344d52d1167c12dc187d7c34fc57b | |
parent | 1b28e151e6798d301dc42ebc2e31c4aba4c9a116 (diff) |
print out current path with ranger like colors
-rw-r--r-- | config/mimetype.toml | 1 | ||||
-rw-r--r-- | src/joshuto/ui.rs | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/config/mimetype.toml b/config/mimetype.toml index d204b65..55c5400 100644 --- a/config/mimetype.toml +++ b/config/mimetype.toml @@ -12,6 +12,7 @@ ["feh"] ] "image/png" = [ + ["qimgv"], ["feh", "-F"] ] "text/plain" = [ diff --git a/src/joshuto/ui.rs b/src/joshuto/ui.rs index c209882..b0fed96 100644 --- a/src/joshuto/ui.rs +++ b/src/joshuto/ui.rs @@ -82,10 +82,12 @@ pub fn wprint_path(win: &structs::JoshutoWindow, username: &str, format!("{}@{} ", username, hostname).as_str()); ncurses::wattroff(win.win, ncurses::COLOR_PAIR(EXEC_COLOR)); + ncurses::wattron(win.win, ncurses::COLOR_PAIR(DIR_COLOR)); ncurses::waddstr(win.win, path_str); - ncurses::wattroff(win.win, ncurses::A_BOLD()); ncurses::waddstr(win.win, "/"); + ncurses::wattroff(win.win, ncurses::COLOR_PAIR(DIR_COLOR)); ncurses::waddstr(win.win, file_name); + ncurses::wattroff(win.win, ncurses::A_BOLD()); ncurses::wnoutrefresh(win.win); } |