Skip to content

Instantly share code, notes, and snippets.

@xhcnb
xhcnb / install-kbd-backlight.sh
Created August 13, 2016 17:19 — forked from stefansundin/install-kbd-backlight.sh
Script to control keyboard backlight brightness on a Chromebook Pixel running Ubuntu. Includes extra bits like restore old session value on boot, dim keyboard on screen lock, restoring value when resuming from suspend, and so on. Relies on kernel module acpi_call (instructions below).
#!/bin/sh
# This script will install the files below.
# Please look through them first so you know what will happen.
# Install by running this command:
# curl -fL https://gist.githubusercontent.com/stefansundin/7003429/raw/install-kbd-backlight.sh | sh
# Uninstall with:
# sudo rm /opt/kbd-{backlight,lock}.sh /etc/pm/sleep.d/70-kbd-backlight
# rm ~/.config/autostart/kbd-{backlight,lock}.sh.desktop
// ************** oggsteamer.h
#define NUM_BUFFERS 4
#define BUFFER_SIZE 65536
#define BUFFER_MSECS 10
typedef struct {
char *data;
int data_length;
int seek_offset;