diff --git a/Makefile b/Makefile index 6804dff..08055c3 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ PREFIX:=/usr PROGRAMS = \ programs/sxmo_setpineled \ - programs/sxmo_setpinebacklight \ programs/sxmo_screenlock \ programs/sxmo_megiaudioroute \ programs/sxmo_vibratepine @@ -19,9 +18,6 @@ shellcheck: programs/sxmo_setpineled: programs/sxmo_setpineled.c gcc -o programs/sxmo_setpineled programs/sxmo_setpineled.c -programs/sxmo_setpinebacklight: programs/sxmo_setpinebacklight.c - gcc -o programs/sxmo_setpinebacklight programs/sxmo_setpinebacklight.c - programs/sxmo_screenlock: programs/sxmo_screenlock.c gcc -o programs/sxmo_screenlock programs/sxmo_screenlock.c -lX11 @@ -32,7 +28,7 @@ programs/sxmo_vibratepine: programs/sxmo_vibratepine.c gcc -o programs/sxmo_vibratepine programs/sxmo_vibratepine.c clean: - rm -f programs/sxmo_setpineled programs/sxmo_screenlock programs/sxmo_setpinebacklight programs/sxmo_megiaudioroute programs/sxmo_vibratepine + rm -f programs/sxmo_setpineled programs/sxmo_screenlock programs/sxmo_megiaudioroute programs/sxmo_vibratepine install: $(PROGRAMS) cd configs && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd .. @@ -61,8 +57,6 @@ install: $(PROGRAMS) install -D -m 0755 programs/sxmo_setpineled $(DESTDIR)$(PREFIX)/bin/ - install -D -m 0755 programs/sxmo_setpinebacklight $(DESTDIR)$(PREFIX)/bin/ - install -D -m 0755 programs/sxmo_screenlock $(DESTDIR)$(PREFIX)/bin/ install -D programs/sxmo_megiaudioroute $(DESTDIR)$(PREFIX)/bin/ diff --git a/programs/sxmo_setpinebacklight.c b/programs/sxmo_setpinebacklight.c deleted file mode 100644 index ea5a7a9..0000000 --- a/programs/sxmo_setpinebacklight.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include - -char * pbpScreen = "/sys/class/backlight/edp-backlight/brightness"; -char * ppScreen = "/sys/devices/platform/backlight/backlight/backlight/brightness"; - -void usage() { - fprintf(stderr, "Usage: sxmo_setpinebacklight [number]\n"); -} - -void writeFile(char *filepath, int brightness) { - FILE *f; - f = fopen(filepath, "w+"); - fprintf(f, "%d\n", brightness); - fclose(f); -} - -int main(int argc, char *argv[]) { - char * command; - int brightness; - - if (argc < 2) { - usage(); - return 1; - } - argc--; - brightness = atoi(argv[argc--]); - - if (access(pbpScreen, F_OK) != -1) { - writeFile(pbpScreen, brightness); - fprintf(stderr, "Set PBP brightness to %d\n", brightness); - } else if (access(ppScreen, F_OK) != -1) { - writeFile(ppScreen, brightness); - fprintf(stderr, "Set PP brightness to %d\n", brightness); - } else { - fprintf(stderr, "Neither PP or PBP Screen found!\n"); - } -}