From 7b9771701e55592d9aeffaa78fe827ff73ef65ac Mon Sep 17 00:00:00 2001 From: louie Date: Sat, 27 Jun 2020 10:31:53 -0700 Subject: Added ability to set flags in config --- draw.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'draw.c') diff --git a/draw.c b/draw.c index 044a862..d4aa51a 100644 --- a/draw.c +++ b/draw.c @@ -266,17 +266,21 @@ void trav_col(int dir){ //TODO add ability to use arguments with launcher programs (like -f for fullscreen and such) void launch_entry(){ char *program = get_gprog(g[g_hover]); + char *flags = get_gflags(g[g_hover]); char *path = get_epath(e[e_hover]); //if the entry is an executable file (doesn't have a launcher) if(!(strcmp(program, "./"))) system(path); else{ - strcat(program, " "); - strcat(program, "\""); + strcat(program, " \""); + if(flags[0] !='\0'){ + strcat(program, flags); + strcat(program, "\""); + strcat(program, " \""); + } strcat(program, path); strcat(program, "\""); - printf("DEBUG: program = %s\n", program); system(program); } -- cgit