void init_config(void) { cfg.num_bookmarks = 0; cfg.vim_filter = 0; cfg.show_one_window = 0; cfg.history_len = 15; (void)hist_init(&cfg.cmd_hist, cfg.history_len); (void)hist_init(&cfg.search_hist, cfg.history_len); (void)hist_init(&cfg.prompt_hist, cfg.history_len); (void)hist_init(&cfg.filter_hist, cfg.history_len); cfg.auto_execute = 0; cfg.time_format = strdup(" %m/%d %H:%M"); cfg.wrap_quick_view = 1; cfg.use_iec_prefixes = 0; cfg.undo_levels = 100; cfg.sort_numbers = 0; cfg.follow_links = 1; cfg.fast_run = 0; cfg.confirm = 1; cfg.vi_command = strdup("vim"); cfg.vi_cmd_bg = 0; cfg.vi_x_command = strdup(""); cfg.vi_x_cmd_bg = 0; cfg.use_trash = 1; { char fuse_home[PATH_MAX]; int update_stat; snprintf(fuse_home, sizeof(fuse_home), "%s/vifm_FUSE", get_tmpdir()); update_stat = set_fuse_home(fuse_home); assert(update_stat == 0); } cfg.use_term_multiplexer = 0; cfg.use_vim_help = 0; cfg.wild_menu = 0; cfg.ignore_case = 0; cfg.smart_case = 0; cfg.hl_search = 1; cfg.vifm_info = VIFMINFO_BOOKMARKS; cfg.auto_ch_pos = 1; cfg.timeout_len = 1000; cfg.scroll_off = 0; cfg.gdefault = 0; #ifndef _WIN32 cfg.slow_fs_list = strdup(""); #endif cfg.scroll_bind = 0; cfg.wrap_scan = 1; cfg.inc_search = 0; cfg.selection_is_primary = 1; cfg.tab_switches_pane = 1; cfg.last_status = 1; cfg.tab_stop = 8; cfg.ruler_format = strdup("%=%l/%S "); cfg.status_line = strdup(""); cfg.lines = INT_MIN; cfg.columns = INT_MIN; cfg.dot_dirs = DD_NONROOT_PARENT; cfg.trunc_normal_sb_msgs = 0; cfg.filter_inverted_by_default = 1; cfg.apropos_prg = strdup("apropos %a"); cfg.find_prg = strdup("find %s %a -print , " "-type d \\( ! -readable -o ! -executable \\) -prune"); cfg.grep_prg = strdup("grep -n -H -I -r %i %a %s"); cfg.locate_prg = strdup("locate %a"); #ifndef _WIN32 snprintf(cfg.log_file, sizeof(cfg.log_file), "/var/log/vifm-startup-log"); #else GetModuleFileNameA(NULL, cfg.log_file, sizeof(cfg.log_file)); to_forward_slash(cfg.log_file); *strrchr(cfg.log_file, '/') = '\0'; strcat(cfg.log_file, "/startup-log"); #endif #ifndef _WIN32 cfg.shell = strdup(env_get_def("SHELL", "sh")); #else cfg.shell = strdup(env_get_def("SHELL", "cmd")); #endif #ifndef _WIN32 /* Maximum argument length to pass to the shell */ if((cfg.max_args = sysconf(_SC_ARG_MAX)) == 0) #endif cfg.max_args = 4096; /* POSIX MINIMUM */ memset(&cfg.decorations, '\0', sizeof(cfg.decorations)); cfg.decorations[DIRECTORY][DECORATION_SUFFIX] = '/'; }
void init_config(void) { cfg.show_one_window = 0; cfg.history_len = 15; (void)hist_init(&cfg.cmd_hist, cfg.history_len); (void)hist_init(&cfg.search_hist, cfg.history_len); (void)hist_init(&cfg.prompt_hist, cfg.history_len); (void)hist_init(&cfg.filter_hist, cfg.history_len); cfg.auto_execute = 0; cfg.time_format = strdup(" %m/%d %H:%M"); cfg.wrap_quick_view = 1; cfg.use_iec_prefixes = 0; cfg.undo_levels = 100; cfg.sort_numbers = 0; cfg.follow_links = 1; cfg.fast_run = 0; cfg.confirm = 1; cfg.vi_command = strdup("vim"); cfg.vi_cmd_bg = 0; cfg.vi_x_command = strdup(""); cfg.vi_x_cmd_bg = 0; cfg.use_trash = 1; { char fuse_home[PATH_MAX]; int update_stat; snprintf(fuse_home, sizeof(fuse_home), "%s/vifm_FUSE", get_tmpdir()); update_stat = set_fuse_home(fuse_home); assert(update_stat == 0); } cfg.use_term_multiplexer = 0; cfg.use_vim_help = 0; cfg.wild_menu = 0; cfg.ignore_case = 0; cfg.smart_case = 0; cfg.hl_search = 1; cfg.vifm_info = VIFMINFO_BOOKMARKS; cfg.auto_ch_pos = 1; cfg.timeout_len = 1000; cfg.scroll_off = 0; cfg.gdefault = 0; #ifndef _WIN32 cfg.slow_fs_list = strdup(""); #endif cfg.scroll_bind = 0; cfg.wrap_scan = 1; cfg.inc_search = 0; cfg.selection_is_primary = 1; cfg.tab_switches_pane = 1; cfg.use_system_calls = 0; cfg.last_status = 1; cfg.tab_stop = 8; cfg.ruler_format = strdup("%=%l/%S "); cfg.status_line = strdup(""); cfg.lines = INT_MIN; cfg.columns = INT_MIN; cfg.dot_dirs = DD_NONROOT_PARENT; cfg.trunc_normal_sb_msgs = 0; cfg.filter_inverted_by_default = 1; cfg.apropos_prg = strdup("apropos %a"); cfg.find_prg = strdup("find %s %a -print , " "-type d \\( ! -readable -o ! -executable \\) -prune"); cfg.grep_prg = strdup("grep -n -H -I -r %i %a %s"); cfg.locate_prg = strdup("locate %a"); cfg.cd_path = strdup(env_get_def("CDPATH", DEFAULT_CD_PATH)); replace_char(cfg.cd_path, ':', ','); cfg.filelist_col_padding = 1; cfg.side_borders_visible = 1; cfg.border_filler = strdup(" "); #ifndef _WIN32 copy_str(cfg.log_file, sizeof(cfg.log_file), "/var/log/vifm-startup-log"); #else { char exe_dir[PATH_MAX]; (void)get_exe_dir(exe_dir, sizeof(exe_dir)); snprintf(cfg.log_file, sizeof(cfg.log_file), "%s/startup-log", exe_dir); } #endif cfg_set_shell(env_get_def("SHELL", DEFAULT_SHELL_CMD)); memset(&cfg.decorations, '\0', sizeof(cfg.decorations)); cfg.decorations[DIRECTORY][DECORATION_SUFFIX] = '/'; }