mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-22 19:33:03 +00:00
set CONFIG_DIR env variable and chdir to config dir
This commit is contained in:
parent
d8dcf4ef76
commit
81ce6363fa
1 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "power.h"
|
||||
#include "wifi.h"
|
||||
#include "misc/help.h"
|
||||
#include <libgen.h>
|
||||
|
||||
#define LCFILE_PATH_FMT "/tmp/sketchybar_%s.lock"
|
||||
|
||||
|
@ -138,6 +139,9 @@ static void exec_config_file(void) {
|
|||
return;
|
||||
}
|
||||
|
||||
setenv("CONFIG_DIR", dirname(g_config_file), 1);
|
||||
chdir(dirname(g_config_file));
|
||||
|
||||
if (!ensure_executable_permission(g_config_file)) {
|
||||
printf("could not set the executable permission bit for '%s'", g_config_file);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue