sfm

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

commit 67fb3619cec20fe5bc2413e3a0352b97e5284984
parent 93c033c1b33a49565c762e7939a9412cd1781b97
Author: afify <hassan@afify.dev>
Date:   Thu, 16 Sep 2021 23:47:35 +0300

[feat] add refresh panes

Diffstat:
MREADME.md | 1+
Mconfig.def.h | 1+
Msfm.1 | 3+++
Msfm.c | 7+++++++
4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -82,6 +82,7 @@ $ man sfm | `ENTER` | find filter | | `ESC` | exit filter|change | | `SPACE` | switch pane | +| `ctrl+r` | refresh panes | **visual mode** | key | description | diff --git a/config.def.h b/config.def.h @@ -104,6 +104,7 @@ static Key nkeys[] = { { {.ch = 'P'}, selmv, {0} }, { {.ch = 'c'}, start_change, {0} }, { {.key = TB_KEY_SPACE}, switch_pane, {0} }, + { {.key = TB_KEY_CTRL_R}, refresh, {0} }, { {.ch = '\\'}, bkmrk, {.v = root} }, { {.ch = '.'}, toggle_df, {0} }, }; diff --git a/sfm.1 b/sfm.1 @@ -101,6 +101,9 @@ exit filter .TP .B SPACE switch pane +.TP +.B ctrl+r +refresh panes .SS Visual Mode .TP .B j diff --git a/sfm.c b/sfm.c @@ -184,6 +184,7 @@ static int listdir(Pane *); static void t_resize(void); static void set_panes(void); static void draw_frame(void); +static void refresh(const Arg *arg); static void start(void); /* global variables */ @@ -1944,6 +1945,12 @@ start_signal(void) } static void +refresh(const Arg *arg) +{ + kill(main_pid, SIGWINCH); +} + +static void start(void) { switch (tb_init()) {