DEV Community

loading...

Adjust the display brightness from command-line for Linux

ptuladhar3 profile image Puru ・Updated on ・1 min read

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 πŸ‘

Discussion (1)

pic
Editor guide
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...