tmus

TUI Music Player
git clone https://git.sinitax.com/sinitax/tmus
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

commit e96836532a103d8596d1768e2d71bffd6e858b60
parent 777bd77b64b4ca9c5e38c9cb5971a62684215f2a
Author: Louis Burda <quent.burda@gmail.com>
Date:   Sun, 29 Jan 2023 18:02:26 +0100

Add keybind to refresh screen contents

Diffstat:
Msrc/data.c | 4++++
Msrc/tui.c | 4++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/data.c b/src/data.c @@ -5,6 +5,7 @@ #include "list.h" #include "log.h" +#include <asm-generic/errno-base.h> #include <fts.h> #include <errno.h> #include <dirent.h> @@ -568,11 +569,13 @@ track_move(struct track *track, struct tag *tag) newpath = aprintf("%s/%s", tag->fpath, track->name); if (path_exists(newpath)) { free(newpath); + errno = EEXIST; return false; } if (!dup_file(track->fpath, newpath)) { free(newpath); + errno = EACCES; return false; } @@ -586,6 +589,7 @@ track_move(struct track *track, struct tag *tag) if (!track_rm(track, true)) { track_rm(new, true); + errno = EACCES; return false; } diff --git a/src/tui.c b/src/tui.c @@ -1111,6 +1111,10 @@ main_input(wint_t c) case L'-': player_set_volume(MAX(0, player.volume - 5)); break; + case KEY_CTRL('l'): + clear(); + refresh(); + break; case L'q': quit = 1; break;