Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Last active May 16, 2022 08:22
Show Gist options
  • Save thewh1teagle/1901e0f29261f62945714223d3b8a9dc to your computer and use it in GitHub Desktop.
Save thewh1teagle/1901e0f29261f62945714223d3b8a9dc to your computer and use it in GitHub Desktop.
dwm brightness conrol keys
sudo apt-get install xbacklight
: /etc/X11/xorg.conf
Section "Device"
Identifier "Card0"
Driver "intel"
Option "Backlight" "/sys/class/backlight/intel_backlight"
EndSection
: config.h
#include <X11/XF86keysym.h>
...
static const char *brightup[] = { "/usr/bin/xbacklight", "-inc", "10", NULL };
static const char *brightdown[] = { "/usr/bin/xbacklight", "-dec", "10", NULL };
...
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brightup } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = brightdown } },
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment