Example #1
0
File: tasknc.c Project: skn/tasknc
void key_task_interactive_command(const char *arg) /* {{{ */
{
	/* run an interactive command */
	if (arg == NULL)
		return;
	task_interactive_command(arg);
	reload = 1;
} /* }}} */
Example #2
0
File: tasknc.c Project: irl/tasknc
void key_task_interactive_command(const char *arg) /* {{{ */
{
	/* run an interactive command
	 * arg - the command to run interactively (task window will be closed)
	 */
	if (arg == NULL)
		return;
	task_interactive_command(arg);
	reload = 1;
} /* }}} */
Example #3
0
void key_tasklist_sync(void) { /* {{{ */
    /* handle a keyboard direction to sync */
    int ret;

    statusbar_message(cfg.statusbar_timeout, "synchronizing tasks...");

    ret = task_interactive_command("yes n | task sync");

    if (ret == 0) {
        statusbar_message(cfg.statusbar_timeout, "tasks synchronized");
        reload = true;
    } else {
        statusbar_message(cfg.statusbar_timeout, "task syncronization failed");
    }
} /* }}} */
Example #4
0
void key_tasklist_edit() /* {{{ */
{
	/* edit selected task */
	task *cur = get_task_by_position(selline);
	int ret;
	char *uuid;

	statusbar_message(cfg.statusbar_timeout, "editing task");

	ret = task_interactive_command("task %s edit");
	uuid = strdup(cur->uuid);
	reload_task(cur);
	if (cfg.follow_task)
	{
		set_position_by_uuid(uuid);
		tasklist_check_curs_pos();
	}
	check_free(uuid);

	tasklist_command_message(ret, "edit failed (%d)", "edit succesful");
} /* }}} */