Преглед изворни кода

Add exponential mode in the README

Alexander Lutsai пре 3 година
родитељ
комит
cb69642b41
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 5
    0
      README.md
  2. 1
    1
      src/light.c

+ 5
- 0
README.md Прегледај датотеку

@@ -54,6 +54,10 @@ Increase backlight brightness by 5 percent
54 54
 
55 55
     light -A 5
56 56
 
57
+Decrease backlight brightness by 5 percent in exponential mode (natural way)
58
+
59
+    light -e -U 5
60
+
57 61
 Set the minimum cap to 2 in raw value on the sysfs/backlight/acpi_video0 device:
58 62
 
59 63
     light -Nrs "sysfs/backlight/acpi_video0" 2
@@ -100,6 +104,7 @@ Without any extra options, the command will operate on the device called `sysfs/
100 104
 These can be mixed, combined and matched after convenience. 
101 105
 
102 106
 * `-r` Raw mode, values (printed and interpreted from commandline) will be treated as integers in the controllers native range, instead of in percent.
107
+* `-e` Exponential mode, values (printed and interpreted from commandline) will be treated as double percentage between 0.0 - 100.0 in the logarithmic scale with base 4.
103 108
 * `-v <verbosity>` Specifies the verbosity level. 0 is default and prints nothing. 1 prints only errors, 2 prints only errors and warnings, and 3 prints both errors, warnings and notices.
104 109
 * `-s <devicepath>` Specifies which device to work on. List available devices with the -L command. Full path is needed.
105 110
 

+ 1
- 1
src/light.c Прегледај датотеку

@@ -403,7 +403,7 @@ static bool _light_parse_arguments(light_context_t *ctx, int argc, char** argv)
403 403
                 return false;
404 404
             }
405 405
             
406
-            percent_value = light_percent_clamp(percent_value);                        
406
+            percent_value = light_percent_clamp(percent_value);
407 407
             need_float_value = true;
408 408
         }
409 409
     }