DEV Community

Puru
Puru

Posted on • Edited on

Adjust the display brightness from command-line for Linux

Introduction

If you are looking for an easy way to adjust display brightness from the command-line in Linux, then I have good news for you.

Meet ๐Ÿ”† set-brightness

A very simple command-line utility which allows you to adjust display brightness from the command-line.

Alt Text


Installation

Alt Text


NOTE

  • Currently, it works well for Intel display laptops. However, if you encounter hardware not supported then please raise an issue and share the output of the following command.
$ ls -lh /sys/class/backlight
Enter fullscreen mode Exit fullscreen mode

๐Ÿš€ It's open-source and Hackoberfest 2020 has begun, so go ahead and submit your pull-request

GitHub logo tuladhar / set-brightness

๐Ÿ”† Adjust the display brightness from command-line for Linux (open-source)

๐Ÿ”† set-brightness - Adjust the display brightness from command-line for Linux

USAGE

set-brightness - Adjust the display brightness from command-line for Linux (v1.0)

USAGE: set-brightness [LEVEL]

OPTIONS:
  LEVEL              Brightness level, specify a value between 0 - 100
  -h or --help       Print help (this message) and exit
  --version          Print version information and exit

EXAMPLES:
        set-brightness 50 - Set brightness level to 50%

INSTALLATION

EXAMPLE

READ BLOG POST

Contributors







... and if you like it then don't forget to star โญ๏ธ Github repository and hit clap ๐Ÿ‘

Top comments (1)

Collapse
 
fultonbrowne profile image
Fulton Browne

I had a couple of issue with my machine with no bash or sudo (KISS linux). so I removed bashisms (Bash only expressions) and made fully posix compliant. I also had it check for sudo before running so users could run the command as root instead.

github.com/tuladhar/set-brightness...