Skip to content

Commit ca3e189

Browse files
committed
remove eizo client and check if python path exists
1 parent 29e9e3a commit ca3e189

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

stage.c

+6-16
Original file line numberDiff line numberDiff line change
@@ -1220,23 +1220,18 @@ handle_keybinding2(struct stage_server *server,
12201220
static void
12211221
switch_light(char *arg)
12221222
{
1223+
struct stat st;
1224+
char *p;
12231225
int pid;
12241226

1225-
pid = fork();
1226-
if (pid == 0)
1227-
execl("/usr/local/bin/python3.10",
1228-
"/usr/local/bin/python3.10",
1229-
"/home/br/lights/test_client.py", arg, NULL);
1230-
}
1227+
p = "/usr/local/bin/python3.10";
12311228

1232-
static void
1233-
switch_mode(char *arg)
1234-
{
1235-
int pid;
1229+
if (stat(p, &st) == -1)
1230+
return;
12361231

12371232
pid = fork();
12381233
if (pid == 0)
1239-
execl("/home/br/eizo/eizo", "/home/br/eizo/eizo", arg, NULL);
1234+
execl(p, p, "/home/br/lights/test_client.py", arg, NULL);
12401235
}
12411236

12421237
static bool
@@ -1317,11 +1312,6 @@ handle_keybinding(struct stage_server *server,
13171312
case XKB_KEY_r:
13181313
switch_light("3");
13191314
break;
1320-
case XKB_KEY_a:
1321-
#if 0
1322-
switch_mode("0");
1323-
#endif
1324-
break;
13251315
case XKB_KEY_Return:
13261316
if (fork() == 0)
13271317
execl("/bin/sh", "/bin/sh", "-c", terminal, NULL);

0 commit comments

Comments
 (0)