typedef struct yy_buffer_state *YY_BUFFER_STATE;
extern int yylex(struct context *context);
extern int yyparse(void);
+extern int yylex_destroy(void);
extern FILE *yyin;
YY_BUFFER_STATE yy_scan_string(const char *);
if (configerror_pid == 0) {
char *editaction,
*pageraction;
- if (asprintf(&editaction, TERM_EMU " -e $EDITOR \"%s\"", config_path) == -1)
+ if (asprintf(&editaction, TERM_EMU " -e sh -c \"${EDITOR:-vi} \"%s\" && i3-msg reload\"", config_path) == -1)
exit(1);
- if (asprintf(&pageraction, TERM_EMU " -e $PAGER \"%s\"", errorfilename) == -1)
+ if (asprintf(&pageraction, TERM_EMU " -e sh -c \"${PAGER:-less} \"%s\"\"", errorfilename) == -1)
exit(1);
char *argv[] = {
NULL, /* will be replaced by the executable path */
start_configerror_nagbar(f);
}
+ yylex_destroy();
FREE(context->line_copy);
free(context);
free(new);
%token TOKIPCSOCKET "ipc_socket"
%token TOKRESTARTSTATE "restart_state"
%token TOKEXEC "exec"
+%token TOKEXEC_ALWAYS "exec_always"
%token <single_color> TOKSINGLECOLOR
%token <color> TOKCOLOR
%token TOKARROW "→"
| ipcsocket
| restart_state
| exec
+ | exec_always
| single_color
| color
| terminal
}
;
+exec_always:
+ TOKEXEC_ALWAYS STR
+ {
+ struct Autostart *new = smalloc(sizeof(struct Autostart));
+ new->command = $2;
+ TAILQ_INSERT_TAIL(&autostarts_always, new, autostarts_always);
+ }
+ ;
+
terminal:
TOKTERMINAL STR
{
{
config.font = load_font($2, true);
printf("font %s\n", $2);
+ free($2);
}
;