bright

command module
v0.0.0-...-af2da59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 8 Imported by: 0

README

REQUIREMENTS

This program will only work on UNIX systems where the the screen brightness info can be found at '/sys/class/backlight/<vendor>/' It updates the file 'brightness' to adjust the brightness

SET UP

Install using 'go install'.

The user must be in a group which can make changes to the file at '/sys/class/backlight/<vendor>/brightness' Add the user to group 'video'.

sudo usermod -aG video <user>

Then make sure to update the file located at:

/etc/udev/rules.d/backlight.rules

With the following, replacing '<vendor>' with your vendor name, the directory found at '/sys/class/backlight/' such as 'intel_backlight':

ACTION=="add", SUBSYSTEM=="backlight", KERNEL==<vendor>, RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL==<vendor>, RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

USAGE

Use -t flag to set a target brightness percentage.

bright -t 50

Sets the brightness to 50%

-d flag will set a duration for fading. The default is 500ms.

bright -t 50 -d 3s

You can also use subcommands low, mid, and max.

bright low
bright mid
bright max

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL