summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-06-27 10:31:53 -0700
committerlouie <lshprung@yahoo.com>2020-06-27 10:31:53 -0700
commit7b9771701e55592d9aeffaa78fe827ff73ef65ac (patch)
tree8537b4e6cdcad60887337b54ee4ee46b8e640520 /draw.c
parent0eb46442f5541f365ebb327375b9e5992194fbd8 (diff)
Added ability to set flags in config
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c10
1 files changed, 7 insertions, 3 deletions
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);
}