Giter VIP home page Giter VIP logo

ncursesfm's Introduction

builds.sr.ht status Codacy Badge

NcursesFM

Ncurses File Manager for linux

Written in C, with ncurses library, it aims to be as user friendly and lightweight as possible, while being good looking and simple.
Being simple doesn't imply being useless; indeed it is a full featured fm.
For a full list of features, deps and how to build, please refer to wiki pages.

Main features:

Remember that every shortcut in ncursesFM is case insensitive!

Press 'L' while in program to view a detailed helper message

  • Every feature you would expect by a basic FM.
  • Terminal window resize support.
  • i18n support: for now en, it, de, es_AR, fr (list of translators: https://github.com/FedeDP/ncursesFM/wiki/I18n#translators).
  • 2 tabs support. Their content is kept in sync. Jump between tabs with arrow keys (left/right).
  • config support through libconfig.
  • Basic mouse support.
  • Simple sysinfo monitor that will refresh every 30s: clock, battery and some system info.
  • Fast browse mode: enable it with ','. It lets you jump between files by just typing their names.
  • 4 sorting modes.
  • Stats support (permissions and sizes).
  • Inotify monitor to check for fs events in current opened directories.
  • Bookmarks support.
  • Search support: it will search your string in current directory tree. It can search your string inside archives too.
  • Basic print support through libcups.
  • Extract/compress files/folders through libarchive.
  • Powermanagement inhibition while processing a job (eg: while pasting a file) to avoid data loss.
  • Internal udisks2 monitor, to poll for new devices. It can automount new connected devices too. Device monitor will list only mountable devices, eg: dvd reader will not be listed until a cd/dvd is inserted.
  • Drives/usb sticks/ISO files (un)mount through udisks2.
  • Distro package files installation through packagekit.
  • libnotify support.

ncursesfm's People

Contributors

fededp avatar matthiasbeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ncursesfm's Issues

Can't see which tab has focus

When you open a second tab, you lose track very fast about which one has the focus.
It actually takes a keypress to see the arrow moving on the focused one, but it's a bit confusing.

Maybe a different color for the arrow on the focused one would help.

Segfault at startup

Hi continuing from reddit thread. Here the gdb trace i got dont know if it will be useful seems that missing debug symbol.

Temporary breakpoint 1 at 0x406876
Starting program: /usr/bin/ncursesFM 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Temporary breakpoint 1, 0x0000000000406876 in main ()
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000003420037006 in ____strtoll_l_internal () from /usr/lib/libc.so.6

Enabling fast mode prevents the other mode switching keys.

This maybe should only be a helper refinement:
When you enable fast browse mode, the keys other than arrows and comma are used as file selection shortcuts, this means that "t" does not open a new tab anymore, "h" does not toggle hidden files, and so on.

The issue isn't very relevant instantly when you enable fast browse, but becomes so after you select a file, since the "I:" row does not say "Fast browse mode enabled" anymore, but the keys you pressed to select a file.

I don't know whether it should be better:

  • having "Fast browse mode enabled" (or perhaps only "Fast") permanently written somewhere (for example, on the right of the "I:" row)
  • disabling fast browse mode as soon as a key [^0-9a-z] is pressed.
  • having the helper text reflect the change, as soon as you press "," the other keys may change color, or disappear, to turn back light grey (or visible) once fast browse mode is disabled.

How to activate locale translation .

Hi, I have now build v3.1 with success, and I have created fr.po which has been compiled as fr.mo, but I don't find haw to activate my locale.

I have tried to modify something in /etc/default/ncursesFM.conf, but it doesn't seem to do something.

Thanks
A+

impossible to open a file in a ssh session

Hi,
I frequently use ssh -X sessions to work on distant computers (on LAN or WAN).

For example, I can open a pdf file with xdg-open.
With ncursesFM, no error, but it doesn't open.

As I hoped to use ncursesFM as a file browser which uses smaller resources than a graphic file browser, I'm a little desappointed ... Too bad

A+

Doesn't compile

adam@acer ~/O/ncursesFM> ls
Arch/ COPYING makefile ncursesFM.conf README.md TODO
Changelog inc/ ncursesfm ncursesFM.png src/
adam@acer ~/O/ncursesFM> make
libX11 support enabled.
cd src/; cc -c .c -I/usr/include/ncursesw -DLIBX11_PRESENT -std=c99
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from archiver.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
archiver.c:4:92: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_archive(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
archiver.c: In function ‘archiver_func’:
archiver.c:42:9: warning: implicit declaration of function ‘nftw’ [-Wimplicit-function-declaration]
nftw(tmp->name, recursive_archive, 64, FTW_MOUNT | FTW_PHYS);
^
archiver.c:42:48: error: ‘FTW_MOUNT’ undeclared (first use in this function)
nftw(tmp->name, recursive_archive, 64, FTW_MOUNT | FTW_PHYS);
^
archiver.c:42:48: note: each undeclared identifier is reported only once for each function it appears in
archiver.c:42:60: error: ‘FTW_PHYS’ undeclared (first use in this function)
nftw(tmp->name, recursive_archive, 64, FTW_MOUNT | FTW_PHYS);
^
archiver.c: At top level:
archiver.c:49:92: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_archive(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
archiver.c:49:12: error: conflicting types for ‘recursive_archive’
static int recursive_archive(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
archiver.c:4:12: note: previous declaration of ‘recursive_archive’ was here
static int recursive_archive(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
archiver.c:4:12: warning: ‘recursive_archive’ used but never defined [enabled by default]
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from ../inc/fm_functions.h:9,
from ../inc/bookmarks.h:1,
from bookmarks.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
bookmarks.c: In function ‘update_bookmarks_tabs’:
bookmarks.c:122:13: error: type of formal parameter 3 is incomplete
update_special_mode(num_bookmarks, i, bookmarks);
^
bookmarks.c: In function ‘show_bookmarks’:
bookmarks.c:129:9: error: type of formal parameter 2 is incomplete
show_special_tab(num_bookmarks, bookmarks, bookmarks_mode_str, bookmarks
);
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from ../inc/fm_functions.h:9,
from fm_functions.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
fm_functions.c:11:89: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_copy(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
fm_functions.c:16:91: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_remove(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
fm_functions.c: In function ‘xdg_open’:
fm_functions.c:131:9: warning: implicit declaration of function ‘vfork’ [-Wimplicit-function-declaration]
pid = vfork();
^
fm_functions.c: In function ‘move_file’:
fm_functions.c:280:5: warning: implicit declaration of function ‘lstat’ [-Wimplicit-function-declaration]
lstat(thread_h->full_path, &file_stat_pasted);
^
fm_functions.c: In function ‘cpr’:
fm_functions.c:315:5: warning: implicit declaration of function ‘nftw’ [-Wimplicit-function-declaration]
nftw(tmp->name, recursive_copy, 64, FTW_MOUNT | FTW_PHYS);
^
fm_functions.c:315:41: error: ‘FTW_MOUNT’ undeclared (first use in this function)
nftw(tmp->name, recursive_copy, 64, FTW_MOUNT | FTW_PHYS);
^
fm_functions.c:315:41: note: each undeclared identifier is reported only once for each function it appears in
fm_functions.c:315:53: error: ‘FTW_PHYS’ undeclared (first use in this function)
nftw(tmp->name, recursive_copy, 64, FTW_MOUNT | FTW_PHYS);
^
fm_functions.c: At top level:
fm_functions.c:318:89: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_copy(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
fm_functions.c:318:12: error: conflicting types for ‘recursive_copy’
static int recursive_copy(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
fm_functions.c:11:12: note: previous declaration of ‘recursive_copy’ was here
static int recursive_copy(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
fm_functions.c:369:91: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_remove(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
fm_functions.c:369:12: error: conflicting types for ‘recursive_remove’
static int recursive_remove(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
fm_functions.c:16:12: note: previous declaration of ‘recursive_remove’ was here
static int recursive_remove(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
fm_functions.c: In function ‘rmrf’:
fm_functions.c:379:38: error: ‘FTW_DEPTH’ undeclared (first use in this function)
nftw(path, recursive_remove, 64, FTW_DEPTH | FTW_PHYS | FTW_MOUNT);
^
fm_functions.c:379:50: error: ‘FTW_PHYS’ undeclared (first use in this function)
nftw(path, recursive_remove, 64, FTW_DEPTH | FTW_PHYS | FTW_MOUNT);
^
fm_functions.c:379:61: error: ‘FTW_MOUNT’ undeclared (first use in this function)
nftw(path, recursive_remove, 64, FTW_DEPTH | FTW_PHYS | FTW_MOUNT);
^
fm_functions.c: At top level:
fm_functions.c:11:12: warning: ‘recursive_copy’ used but never defined [enabled by default]
static int recursive_copy(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
In file included from ../inc/log.h:6:0,
from log.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
log.c: In function ‘log_message’:
log.c:56:9: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration]
pid = syscall(SYS_gettid);
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from ../inc/fm_functions.h:9,
from ../inc/bookmarks.h:1,
from main.c:24:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
main.c: In function ‘set_signals’:
main.c:83:12: error: variable ‘main_act’ has initializer but incomplete type
struct sigaction main_act = {{0}};
^
main.c:83:12: error: extra brace group at end of initializer
main.c:83:12: error: (near initialization for ‘main_act’)
main.c:83:12: warning: excess elements in struct initializer [enabled by default]
main.c:83:12: warning: (near initialization for ‘main_act’) [enabled by default]
main.c:83:22: error: storage size of ‘main_act’ isn’t known
struct sigaction main_act = {{0}};
^
main.c:87:5: warning: implicit declaration of function ‘sigaction’ [-Wimplicit-function-declaration]
sigaction(SIGINT, &main_act, 0);
^
main.c:89:5: warning: implicit declaration of function ‘sigemptyset’ [-Wimplicit-function-declaration]
sigemptyset(&mask);
^
main.c:90:5: warning: implicit declaration of function ‘sigaddset’ [-Wimplicit-function-declaration]
sigaddset(&mask, SIGINT);
^
main.c:92:5: warning: implicit declaration of function ‘sigprocmask’ [-Wimplicit-function-declaration]
sigprocmask(SIG_BLOCK, &mask, &main_mask);
^
main.c:92:17: error: ‘SIG_BLOCK’ undeclared (first use in this function)
sigprocmask(SIG_BLOCK, &mask, &main_mask);
^
main.c:92:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function ‘sigsegv_handler’:
main.c:156:5: warning: implicit declaration of function ‘kill’ [-Wimplicit-function-declaration]
kill(getpid(), signum);
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from ../inc/fm_functions.h:9,
from ../inc/mount.h:1,
from mount.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/quit_functions.h:3,
from quit_functions.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
In file included from ../inc/timer.h:2:0,
from ../inc/ui_functions.h:4,
from ../inc/quit_functions.h:3,
from quit_functions.c:1:
/usr/include/i386-linux-gnu/sys/timerfd.h:38:28: error: unknown type name ‘clockid_t’
extern int timerfd_create (clockid_t __clock_id, int __flags) _THROW;
^
quit_functions.c: In function ‘quit_worker_th’:
quit_functions.c:48:5: warning: implicit declaration of function ‘pthread_kill’ [-Wimplicit-function-declaration]
if ((worker_th) && (pthread_kill(worker_th, 0) != ESRCH)) {
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/archiver.h:3,
from ../inc/fm_functions.h:9,
from ../inc/search.h:1,
from search.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
search.c:3:91: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_search(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
search.c:44:91: warning: ‘struct FTW’ declared inside parameter list [enabled by default]
static int recursive_search(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
search.c:44:12: error: conflicting types for ‘recursive_search’
static int recursive_search(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf) {
^
search.c:3:12: note: previous declaration of ‘recursive_search’ was here
static int recursive_search(const char *path, const struct stat *sb, int typeflag, struct FTW *ftwbuf);
^
search.c: In function ‘recursive_search’:
search.c:46:27: error: ‘FTW_CONTINUE’ undeclared (first use in this function)
int len, r = 0, ret = FTW_CONTINUE;
^
search.c:46:27: note: each undeclared identifier is reported only once for each function it appears in
search.c:51:15: error: dereferencing pointer to incomplete type
if (ftwbuf->level == 0) {
^
search.c:60:16: error: ‘FTW_SKIP_SUBTREE’ undeclared (first use in this function)
return FTW_SKIP_SUBTREE;
^
search.c:68:5: warning: implicit declaration of function ‘strcasestr’ [-Wimplicit-function-declaration]
} else if (strcasestr(fixed_str, sv.searched_string)) {
^
search.c:75:19: error: ‘FTW_STOP’ undeclared (first use in this function)
ret = FTW_STOP;
^
search.c: In function ‘search_inside_archive’:
search.c:88:24: error: ‘FTW_CONTINUE’ undeclared (first use in this function)
int len = 0, ret = FTW_CONTINUE, r = 0, string_length;
^
search.c:106:27: error: ‘FTW_STOP’ undeclared (first use in this function)
ret = FTW_STOP;
^
search.c: In function ‘search_thread’:
search.c:121:5: warning: implicit declaration of function ‘nftw’ [-Wimplicit-function-declaration]
nftw(ps[active].my_cwd, recursive_search, 64, FTW_MOUNT | FTW_PHYS | FTW_ACTIONRETVAL);
^
search.c:121:51: error: ‘FTW_MOUNT’ undeclared (first use in this function)
nftw(ps[active].my_cwd, recursive_search, 64, FTW_MOUNT | FTW_PHYS | FTW_ACTIONRETVAL);
^
search.c:121:63: error: ‘FTW_PHYS’ undeclared (first use in this function)
nftw(ps[active].my_cwd, recursive_search, 64, FTW_MOUNT | FTW_PHYS | FTW_ACTIONRETVAL);
^
search.c:121:74: error: ‘FTW_ACTIONRETVAL’ undeclared (first use in this function)
nftw(ps[active].my_cwd, recursive_search, 64, FTW_MOUNT | FTW_PHYS | FTW_ACTIONRETVAL);
^
search.c: In function ‘list_found’:
search.c:144:5: error: type of formal parameter 2 is incomplete
show_special_tab(sv.found_cont, sv.found_searched, str, search
);
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/timer.h:1,
from timer.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
In file included from ../inc/timer.h:2:0,
from ../inc/ui_functions.h:4,
from ../inc/timer.h:1,
from timer.c:1:
/usr/include/i386-linux-gnu/sys/timerfd.h:38:28: error: unknown type name ‘clockid_t’
extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
^
timer.c: In function ‘start_timer’:
timer.c:15:12: error: variable ‘timerValue’ has initializer but incomplete type
struct itimerspec timerValue = {{0}};
^
timer.c:15:12: error: extra brace group at end of initializer
timer.c:15:12: error: (near initialization for ‘timerValue’)
timer.c:15:12: warning: excess elements in struct initializer [enabled by default]
timer.c:15:12: warning: (near initialization for ‘timerValue’) [enabled by default]
timer.c:15:23: error: storage size of ‘timerValue’ isn’t known
struct itimerspec timerValue = {{0}};
^
timer.c:17:5: warning: implicit declaration of function ‘timerfd_create’ [-Wimplicit-function-declaration]
timerfd = timerfd_create(CLOCK_MONOTONIC, 0);
^
timer.c:17:30: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
timerfd = timerfd_create(CLOCK_MONOTONIC, 0);
^
timer.c:17:30: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
In file included from ../inc/timer.h:2:0,
from ../inc/ui_functions.h:4,
from ui_functions.c:1:
/usr/include/i386-linux-gnu/sys/timerfd.h:38:28: error: unknown type name ‘clockid_t’
extern int timerfd_create (clockid_t __clock_id, int __flags) THROW;
^
ui_functions.c:41:5: error: ‘alphasort’ undeclared here (not in a function)
alphasort, sizesort, last_mod_sort, typesort
^
ui_functions.c: In function ‘generate_list’:
ui_functions.c:118:5: warning: implicit declaration of function ‘scandir’ [-Wimplicit-function-declaration]
ps[win].number_of_files = scandir(ps[win].my_cwd, &files, is_hidden, sorting_func[sorting_index]);
^
ui_functions.c:119:5: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [enabled by default]
free(ps[win].nl);
^
In file included from ../inc/ui_functions.h:9:0,
from ui_functions.c:1:
/usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern void free (void *__ptr) THROW;
^
ui_functions.c:120:5: warning: passing argument 2 of ‘calloc’ makes integer from pointer without a cast [enabled by default]
if (!(ps[win].nl = calloc(ps[win].number_of_files, PATH_MAX))) {
^
In file included from ../inc/ui_functions.h:9:0,
from ui_functions.c:1:
/usr/include/stdlib.h:468:14: note: expected ‘size_t’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern void *calloc (size_t __nmemb, size_t _size)
^
ui_functions.c:124:5: error: assignment of read-only location ‘[win]’
str_ptr[win] = ps[win].nl;
^
ui_functions.c:127:13: warning: passing argument 1 of ‘sprintf’ from incompatible pointer type [enabled by default]
sprintf(ps[win].nl[i], "%s/%s", ps[win].my_cwd, files[i]->d_name);
^
In file included from ../inc/log.h:1:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/stdio.h:364:12: note: expected ‘char * restrict’ but argument is of type ‘int (
const)(const struct dirent *, const struct dirent *)’
extern int sprintf (char restrict s,
^
ui_functions.c:127:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int (
const
)(const struct dirent *
, const struct dirent *
)’ [-Wformat=]
sprintf(ps[win].nl[i], "%s/%s", ps[win].my_cwd, files[i]->d_name);
^
ui_functions.c: In function ‘typesort’:
ui_functions.c:168:9: warning: implicit declaration of function ‘alphasort’ [-Wimplicit-function-declaration]
return alphasort(d1, d2);
^
ui_functions.c:170:26: error: ‘DT_DIR’ undeclared (first use in this function)
if ((d1)->d_type == DT_DIR) {
^
ui_functions.c:170:26: note: each undeclared identifier is reported only once for each function it appears in
ui_functions.c:170:23: warning: comparison between pointer and integer [enabled by default]
if ((d1)->d_type == DT_DIR) {
^
ui_functions.c:172:34: error: ‘DT_REG’ undeclared (first use in this function)
} else if (((d1)->d_type == DT_REG) && ((d2)->d_type == DT_LNK)) {
^
ui_functions.c:172:31: warning: comparison between pointer and integer [enabled by default]
} else if (((d1)->d_type == DT_REG) && ((d2)->d_type == DT_LNK)) {
^
ui_functions.c:172:63: error: ‘DT_LNK’ undeclared (first use in this function)
} else if (((d1)->d_type == DT_REG) && ((d2)->d_type == DT_LNK)) {
^
ui_functions.c:172:60: warning: comparison between pointer and integer [enabled by default]
} else if (((d1)->d_type == DT_REG) && ((d2)->d_type == DT_LNK)) {
^
ui_functions.c: In function ‘list_everything’:
ui_functions.c:211:17: warning: assignment from incompatible pointer type [enabled by default]
str = *(str_ptr[win] + i);
^
ui_functions.c:213:13: warning: passing argument 1 of ‘check_selected’ from incompatible pointer type [enabled by default]
check_selected(
(str_ptr[win] + i), win, i);
^
ui_functions.c:25:13: note: expected ‘const char ’ but argument is of type ‘int ( const)(const struct dirent *
, const struct dirent *
)’
static void check_selected(const char str, int win, int line);
^
ui_functions.c:214:13: warning: passing argument 1 of ‘strrchr’ from incompatible pointer type [enabled by default]
str = strrchr(
(str_ptr[win] + i), '/') + 1;
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:263:14: note: expected ‘const char ’ but argument is of type ‘int ( const)(const struct dirent *
, const struct dirent *
)’
extern char strrchr (const char *__s, int _c)
^
ui_functions.c:216:9: warning: passing argument 2 of ‘colored_folders’ from incompatible pointer type [enabled by default]
colored_folders(ps[win].mywin.fm, *(str_ptr[win] + i));
^
ui_functions.c:14:13: note: expected ‘const char *’ but argument is of type ‘int (
const)(const struct dirent *
, const struct dirent *
)’
static void colored_folders(WINDOW win, const char *name);
^
ui_functions.c: In function ‘initialize_tab_cwd’:
ui_functions.c:316:5: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
if (strlen(config.starting_dir)) {
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *
, const struct dirent *
)’
extern size_t strlen (const char *s)
^
ui_functions.c:318:13: warning: passing argument 1 of ‘strcpy’ from incompatible pointer type [enabled by default]
strcpy(ps[win].my_cwd, config.starting_dir);
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘int (
const
)(const struct dirent *
, const struct dirent *
)’
extern char *strcpy (char *__restrict __dest, const char *__restrict src)
^
ui_functions.c:318:13: warning: passing argument 2 of ‘strcpy’ from incompatible pointer type [enabled by default]
strcpy(ps[win].my_cwd, config.starting_dir);
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:129:14: note: expected ‘const char * restrict’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern char *strcpy (char *__restrict __dest, const char *__restrict src)
^
ui_functions.c:321:5: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
if (!strlen(ps[win].my_cwd)) {
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern size_t strlen (const char *s)
^
ui_functions.c:322:9: warning: passing argument 1 of ‘getcwd’ from incompatible pointer type [enabled by default]
getcwd(ps[win].my_cwd, PATH_MAX);
^
In file included from ../inc/log.h:2:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/unistd.h:511:14: note: expected ‘char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern char *getcwd (char *__buf, size_t __size) __THROW wur;
^
ui_functions.c:322:9: warning: passing argument 2 of ‘getcwd’ makes integer from pointer without a cast [enabled by default]
getcwd(ps[win].my_cwd, PATH_MAX);
^
In file included from ../inc/log.h:2:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/unistd.h:511:14: note: expected ‘size_t’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern char *getcwd (char *__buf, size_t __size) __THROW wur;
^
ui_functions.c:324:5: error: assignment of read-only location ‘[0]’
ps[win].old_file[0] = 0;
^
ui_functions.c:326:5: warning: passing argument 1 of ‘change_dir’ from incompatible pointer type [enabled by default]
if (change_dir(ps[win].my_cwd, win) == -1) {
^
In file included from ../inc/mount.h:1:0,
from ../inc/ui_functions.h:5,
from ui_functions.c:1:
../inc/fm_functions.h:28:5: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
int change_dir(const char *str, int win);
^
ui_functions.c: In function ‘delete_tab’:
ui_functions.c:339:5: warning: passing argument 1 of ‘memset’ discards ‘const’ qualifier from pointer target type [enabled by default]
memset(ps[win].my_cwd, 0, sizeof(ps[win].my_cwd));
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:66:14: note: expected ‘void *’ but argument is of type ‘int (_ const_)(const struct dirent *, const struct dirent *)’
extern void *memset (void *__s, int __c, size_t __n) __THROW nonnull ((1));
^
ui_functions.c:339:5: warning: passing argument 3 of ‘memset’ makes integer from pointer without a cast [enabled by default]
memset(ps[win].my_cwd, 0, sizeof(ps[win].my_cwd));
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:66:14: note: expected ‘size_t’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern void *memset (void *__s, int __c, size_t __n) __THROW nonnull ((1));
^
ui_functions.c:342:5: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [enabled by default]
free(ps[win].nl);
^
In file included from ../inc/ui_functions.h:9:0,
from ui_functions.c:1:
/usr/include/stdlib.h:483:13: note: expected ‘void *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern void free (void *__ptr) THROW;
^
ui_functions.c: In function ‘colored_folders’:
ui_functions.c:396:5: warning: implicit declaration of function ‘lstat’ [-Wimplicit-function-declaration]
if (lstat(name, &file_stat) == 0) {
^
ui_functions.c: In function ‘show_stat’:
ui_functions.c:525:30: error: subscripted value is pointer to function
if (stat(str_ptr[win][i], &file_stat) == -1) {
^
ui_functions.c:525:9: warning: passing argument 1 of ‘stat’ from incompatible pointer type [enabled by default]
if (stat(str_ptr[win][i], &file_stat) == -1) {
^
In file included from /usr/include/libudev.h:25:0,
from ../inc/timer.h:3,
from ../inc/ui_functions.h:4,
from ui_functions.c:1:
/usr/include/i386-linux-gnu/sys/stat.h:209:12: note: expected ‘const char * restrict’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern int stat (const char *__restrict file,
^
ui_functions.c: In function ‘main_poll’:
ui_functions.c:730:9: warning: implicit declaration of function ‘ppoll’ [-Wimplicit-function-declaration]
int r = ppoll(main_p, nfds, NULL, &main_mask);
^
ui_functions.c: In function ‘tab_refresh’:
ui_functions.c:832:9: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
if (strlen(ps[win].old_file)) {
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern size_t strlen (const char *s)
^
ui_functions.c:833:13: warning: passing argument 2 of ‘move_cursor_to_file’ from incompatible pointer type [enabled by default]
move_cursor_to_file(0, ps[win].old_file, win);
^
In file included from ../inc/mount.h:1:0,
from ../inc/ui_functions.h:5,
from ui_functions.c:1:
../inc/fm_functions.h:39:5: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
int move_cursor_to_file(int i, const char *filename, int win);
^
ui_functions.c:834:13: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
memset(ps[win].old_file, 0, strlen(ps[win].old_file));
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘int (_ const_)(const struct dirent *, const struct dirent *)’
extern size_t strlen (const char *s)
^
ui_functions.c:834:13: warning: passing argument 1 of ‘memset’ discards ‘const’ qualifier from pointer target type [enabled by default]
memset(ps[win].old_file, 0, strlen(ps[win].old_file));
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:66:14: note: expected ‘void *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
^
ui_functions.c: At top level:
ui_functions.c:842:52: error: size of array ‘str’ has non-integer type
void update_special_mode(int num, int win, char (str)[PATH_MAX + 1]) {
^
ui_functions.c: In function ‘update_special_mode’:
ui_functions.c:847:9: error: assignment of read-only location ‘[win]’
str_ptr[win] = str;
^
ui_functions.c: At top level:
ui_functions.c:862:39: error: size of array ‘str’ has non-integer type
void show_special_tab(int num, char (str)[PATH_MAX + 1], const char *title, int mode) {
^
ui_functions.c: In function ‘show_special_tab’:
ui_functions.c:865:5: error: assignment of read-only location ‘[active]’
str_ptr[active] = str;
^
ui_functions.c:866:5: warning: passing argument 1 of ‘strcpy’ from incompatible pointer type [enabled by default]
strcpy(ps[active].title, title);
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern char *strcpy (char *__restrict __dest, const char *__restrict src)
^
ui_functions.c: In function ‘highlight_selected’:
ui_functions.c:938:13: warning: passing argument 1 of ‘strcmp’ from incompatible pointer type [enabled by default]
if ((i == active) || ((!strcmp(ps[i].my_cwd, ps[active].my_cwd))
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:144:12: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern int strcmp (const char *__s1, const char *s2)
^
ui_functions.c:938:13: warning: passing argument 2 of ‘strcmp’ from incompatible pointer type [enabled by default]
if ((i == active) || ((!strcmp(ps[i].my_cwd, ps[active].my_cwd))
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:144:12: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern int strcmp (const char *__s1, const char *s2)
^
ui_functions.c: In function ‘check_selected’:
ui_functions.c:953:9: warning: passing argument 1 of ‘strcmp’ from incompatible pointer type [enabled by default]
if (!strcmp(tmp->name, str)) {
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:144:12: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern int strcmp (const char *__s1, const char *s2)
^
ui_functions.c: In function ‘trigger_fullname_win’:
ui_functions.c:1062:37: error: subscripted value is pointer to function
int len = strlen(str_ptr[active][ps[active].curr_pos]);
^
ui_functions.c:1062:5: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
int len = strlen(str_ptr[active][ps[active].curr_pos]);
^
In file included from ../inc/log.h:4:0,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
extern size_t strlen (const char *s)
^
ui_functions.c: In function ‘fullname_print’:
ui_functions.c:1069:50: error: subscripted value is pointer to function
colored_folders(fullname_win, str_ptr[active][ps[active].curr_pos]);
^
ui_functions.c:1069:5: warning: passing argument 2 of ‘colored_folders’ from incompatible pointer type [enabled by default]
colored_folders(fullname_win, str_ptr[active][ps[active].curr_pos]);
^
ui_functions.c:393:13: note: expected ‘const char *’ but argument is of type ‘int (
const
)(const struct dirent *, const struct dirent *)’
static void colored_folders(WINDOW *win, const char *name) {
^
ui_functions.c:1070:50: error: subscripted value is pointer to function
mvwprintw(fullname_win, 0, 0, str_ptr[active][ps[active].curr_pos]);
^
ui_functions.c:1070:5: warning: passing argument 4 of ‘mvwprintw’ from incompatible pointer type [enabled by default]
mvwprintw(fullname_win, 0, 0, str_ptr[active][ps[active].curr_pos]);
^
In file included from ../inc/declarations.h:8:0,
from ../inc/log.h:6,
from ../inc/ui_functions.h:3,
from ui_functions.c:1:
/usr/include/ncursesw/ncurses.h:699:28: note: expected ‘const char *’ but argument is of type ‘int (_ const_)(const struct dirent *, const struct dirent *)’
extern NCURSES_EXPORT(int) mvwprintw (WINDOW_,int,int, const char ,...) / implemented /
^
In file included from ../inc/log.h:6:0,
from ../inc/ui_functions.h:3,
from ../inc/worker_thread.h:6,
from worker_thread.c:1:
../inc/declarations.h:79:17: error: ‘PATH_MAX’ undeclared here (not in a function)
char editor[PATH_MAX + 1];
^
../inc/declarations.h:135:19: error: ‘NAME_MAX’ undeclared here (not in a function)
char old_file[NAME_MAX + 1];
^
../inc/declarations.h:174:1: error: unknown type name ‘sigset_t’
sigset_t main_mask;
^
In file included from ../inc/timer.h:2:0,
from ../inc/ui_functions.h:4,
from ../inc/worker_thread.h:6,
from worker_thread.c:1:
/usr/include/i386-linux-gnu/sys/timerfd.h:38:28: error: unknown type name ‘clockid_t’
extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
^
make: *
* [objects] Błąd 1

allow for easy custom line drawing art

As you requested here on reddit, this is a wish to make it easily configurable what characters should be used to draw lines and seperators.

While the current (+,-,|) works, some people would surely prefer something more fancy like ASCCI blocks or similar.

[Feature Request] SFTP

I am looking a ncurses SFTP client and it would be awesome if this software could access to remote servers.

Error compiling under Xubuntu 16.04

Hi,

after having installed the required packets, I have this error:

annie@xubuntu-IMEDIA:/opt/TuxPrograms/trunks/ncurseFM$ make
fm.c: In function \u2018recursive_copy\u2019:
fm.c:408:13: error: \u2018len\u2019 undeclared (first use in this function)
len = read(fd_from, buff, sizeof(buff));
^
fm.c:408:13: note: each undeclared identifier is reported only once for each function it appears in
makefile:93 : la recette pour la cible « objects » a échouée
make: *** [objects] Erreur 1

Where do I failed ?

Thanks
A+

Some improvements concerning functions

  1. The possibility to copy the complete path when using function 'i' (not automatically, but using another key , c for exemple)
  2. Have the possility to choose between open or extract for an archive, by using a different key:
    Enter opens using xgd-open, and another key (as 'x' is already used) to extract it. Because when extracting like it's now implemented, we have no possible choice for the target folder where to extract.

A+

Use of unicode encoding in ncursesFM

Hi,

just as asked in another thread, use unicode in ncursesFM to avoid trash display of accentued letters, and perhaps allos to display help in locale language.

Thanks
A+

Port to non-Linux UNIX

The project's title states this is a Linux utility. And so it is. I wanted to try it out on non-Linux UNIX, in particular macOS, but dependency on timerfd makes this a painful port... any ideas?

Impossible to hide battery monitor

Hi, I have modified syinfo_layout line (uncommented and remobe B => "CP", and the battery monitor is always displayed.

What do I made wrong ?

Another thing, I confirm that fr.mo works too ...

A+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.