Git Product home page Git Product logo

brightnessctl's Introduction

brightnessctl

This shell project is designed to allow change of the /sys/class/backlight/*/brightness without being root. This is usefull for keybinding.

installation

Installation is mostly done by the small makescript I wrote. However setting this up for i3 and edditing the sudoers file needs to be done manually.

$ sudo make install

Make sudo not ask for a password

The script needs to be able to be run as root without sudo asking for a password (otherwise you can't keybind it).

$ sudo visudo

and insert the following line

%wheel ALL=(root) NOPASSWD: /usr/local/bin/brightness

In my case the sudoers group is equal to wheel.

Testing

Now type in (be warned, a brightness of 0 made my screen completly black in the passed, use arrow up to get the 100 command again)

$brightness 100
$brightness 0

The birghtness should have chagned. Now you can setup keybindings to this script for your favorite window manager!

Key binding (i3)

If you use i3 you could use the following lines in your config to fix keybinding:

bindsym $mod+F8 exec brightness-
bindsym $mod+F9 exec brightness+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.