diff options
author | Frederic Culot <calcurse@culot.org> | 2007-12-30 16:27:58 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-12-30 16:27:58 +0000 |
commit | 478b2762e61cee2aa2b073e37cfcdaf220692acf (patch) | |
tree | da7092314c4ad526975642d2e82c22fcf50274c9 /src/vars.c | |
parent | 41e7eb0a83f9a6a921ddd54ed89740eaba595354 (diff) | |
download | calcurse-478b2762e61cee2aa2b073e37cfcdaf220692acf.zip |
Ability to attach notes to todo items added
Diffstat (limited to 'src/vars.c')
-rwxr-xr-x | src/vars.c | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: vars.c,v 1.5 2007/10/21 13:40:13 culot Exp $ */ +/* $calcurse: vars.c,v 1.6 2007/12/30 16:27:59 culot Exp $ */ /* * Calcurse - text-based organizer @@ -76,6 +76,7 @@ char path_dir[] = ""; char path_todo[] = ""; char path_apts[] = ""; char path_conf[] = ""; +char path_notes[] = ""; /* Variable to handle pads. */ struct pad_s *apad; @@ -90,12 +91,30 @@ struct nbar_s *nbar; void vars_init(conf_t *conf) { + char *PATH_VI = "/usr/bin/vi"; + char *PATH_LESS = "/usr/bin/less"; + char *ed, *pg; + /* Variables for user configuration */ conf->confirm_quit = true; conf->confirm_delete = true; conf->auto_save = true; conf->skip_system_dialogs = false; conf->skip_progress_bar = false; + + /* Default external editor and pager */ + ed = getenv("VISUAL"); + if (ed == NULL || ed[0] == '\0') + ed = getenv("EDITOR"); + if (ed == NULL || ed[0] == '\0') + ed = PATH_VI; + conf->editor = ed; + + pg = getenv("PAGER"); + if (pg == NULL || pg[0] == '\0') + pg = PATH_LESS; + conf->pager = pg; + wins_set_layout(1); calendar_set_first_day_of_week(MONDAY); |