From 091cf55630f2363addbacf303fe0962f12edb81d Mon Sep 17 00:00:00 2001 From: Denis Butorin <168341894+dekabu@users.noreply.github.com> Date: Wed, 28 Aug 2024 08:17:28 +0400 Subject: [PATCH] Create README.md --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f3719df --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# Light 🔆 +Lightweight unix console app for brightness control. + +## Examples +Get +``` +$ light +> 128/255 (50%) +``` +Set +``` +$ light 100 +> 100/255 (39%) + +$ light 70% +> 179/255 (70%) +``` +Increment +``` +$ light -29 +> 150/255 (58%) + +$ light +5% +> 161/255 (61%) +``` + +## Install +1. Clone the repository + ```sh + git clone https://github.com/dekabu/light + cd light + ``` +2. Determine where the `brightness` and `max_brightness` files are located on your system + (*/sys/class/backlight/amdgpu_bl0/\** by default) +> [!WARNING] +> Make sure your user has write access to the `brightness` file. + +3. Correct define in `light.c` + ```c + 6. #define PREFIX + ``` + +4. Build + ``` + make + ``` + +5. Install + ``` + make install + ```