sfm

simple file manager
git clone git://git.afify.dev/sfm
Log | Files | Refs | README | LICENSE

commit 201b78e5fd3c7461559e92fde216da921d93c813
parent c93bd0f1cbca2de1c22c0885f9531aeda83dee04
Author: afify <hassan@afify.dev>
Date:   Sat,  5 Dec 2020 13:37:16 +0300

[ref] change default theme

Diffstat:
MREADME.md | 2+-
Mconfig.def.h | 28+++++++++++++---------------
Msfm.c | 4+++-
3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md @@ -39,7 +39,7 @@ $ man sfm | `N` | create new dir | | `d` | delete file \| dir | | `y` | yank | -| `p` | past | +| `p` | paste | | `P` | move | | `c` | rename | | `/` | start filter | diff --git a/config.def.h b/config.def.h @@ -3,20 +3,18 @@ #ifndef CONFIG_H #define CONFIG_H -#include "termbox.h" - -/* colors fg, bg */ -static const Cpair cdir = { 33, TB_DEFAULT }; -static const Cpair cerr = { 124, TB_DEFAULT }; -static const Cpair cexec = { 2, TB_DEFAULT }; -static const Cpair cfile = { TB_DEFAULT, TB_DEFAULT }; -static const Cpair cframe = { TB_DEFAULT, TB_DEFAULT }; -static const Cpair cother = { 3, TB_DEFAULT }; -static const Cpair cpanell = { 166, TB_DEFAULT }; -static const Cpair cpanelr = { 5, TB_DEFAULT }; -static const Cpair cprompt = { 33, TB_DEFAULT }; -static const Cpair csearch = { 255, TB_DEFAULT }; -static const Cpair cstatus = { TB_DEFAULT, TB_DEFAULT }; +/* colors fg, bg */ +static const Cpair cdir = { 33, 0 }; +static const Cpair cerr = { 124, 0 }; +static const Cpair cexec = { 2, 0 }; +static const Cpair cfile = { 243, 0 }; +static const Cpair cframe = { 233, 233 }; +static const Cpair cother = { 3, 0 }; +static const Cpair cpanell = { 166, 233 }; +static const Cpair cpanelr = { 5, 233 }; +static const Cpair cprompt = { 33, 0 }; +static const Cpair csearch = { 255, 0 }; +static const Cpair cstatus = { 243, 0 }; /* bookmarks */ static Bookmark bmarks[] = { @@ -31,7 +29,6 @@ static const char *mupdf[] = { "mupdf", "-I", NULL }; static const char *libreoffice[] = { "libreoffice", NULL }; static const char *gimp[] = { "gimp", NULL }; static const char *r2[] = { "r2", "-c", "vv", NULL }; -static const char *binary[] = { "r2", "-d", "-c", "vv", NULL }; /* extension */ static const char *images[] = { "bmp", "jpg", "jpeg", "png", "gif", "xpm" }; @@ -85,6 +82,7 @@ static Key skeys[] = { { {.ch = 'a'}, selall }, { {.ch = 'y'}, selynk }, { {.ch = 'd'}, seldel }, + { {.ch = 'v'}, selcan }, { {.key = TB_KEY_ESC}, selcan }, }; diff --git a/sfm.c b/sfm.c @@ -1954,11 +1954,13 @@ draw_frame(void) tb_change_cell(i, theight - 2, u_hl, cframe.fg, cframe.bg); } - /* 3 vertical lines */ + /* 4 vertical lines */ for (i = 1; i < theight - 1; ++i) { tb_change_cell(0, i, u_vl, cframe.fg, cframe.bg); tb_change_cell((twidth - 1) / 2, i - 1, u_vl, cframe.fg, cframe.bg); + tb_change_cell(((twidth - 1) / 2) + 1, i - 1, u_vl, cframe.fg, + cframe.bg); tb_change_cell(twidth - 1, i, u_vl, cframe.fg, cframe.bg); }