aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Documented new changesGravatar Mykyta Holubakha2019-08-02
| | | | Rewritten some contributed code
* Added a mapping function (exponent)Gravatar Schnilz2019-08-02
| | | | | | | | added -e / --exponent. As the perceived brightness change from 10% to 20% is not the same as 90% to 100%, there is now a float parameter--exponent / -e to set the mapping of the percentage form linear (as it was) to polynominal. (%=x^k*max*100^-k) k is the value that you can change now.
* Fixes return code when set in quiet modeGravatar Antoni Villalonga2019-08-02
|
* Add openSUSE package infoGravatar Michael Vetter2019-04-30
|
* Version bump to 0.4Gravatar Mykyta Holubakha2018-09-04
|
* Fix read_device returnGravatar Hummer120072018-07-22
| | | closes #24
* Considered bitfields harmfulGravatar Mykyta Holubakha2018-07-13
|
* Refactor to use stdbool.h for consistent booleansGravatar Mykyta Holubakha2018-07-13
|
* Create temporary directory under XDG_RUNTIME_DIRGravatar Mykyta Holubakha2018-07-13
| | | | | | fallback to /tmp closes #22
* Install udev rules by defaultGravatar Mykyta Holubakha2018-07-13
|
* Added flag to dissallow setting brightness to zero when using delta values (#21)Gravatar Thomas Ingram2018-06-25
| | | | | | | | * Added flag never-zero that stops brightness being set to 0. * Updated README to show never-zero flag. * Replaced never-zero with min-value flag
* Add Void Linux packageGravatar Daniel Santana2018-04-24
|
* Revert manpage changesGravatar Mykyta Holubakha2018-01-24
|
* Improved manpageGravatar Mykyta Holubakha2018-01-24
| | | | thanks @SirCmpwn
* Credit myself for the manpageGravatar Nicolas Braud-Santoni2018-01-24
|
* Add brightnessctl(1) manpageGravatar Nicolas Braud-Santoni2018-01-24
|
* Release 0.3.1Gravatar Mykyta Holubakha2018-01-19
|
* README: mention Debian/Ubuntu packagesGravatar Mykyta Holubakha2018-01-19
|
* Allow to specify device name as a wildcardGravatar Mykyta Holubakha2018-01-19
|
* Added swap files to gitignoreGravatar Mykyta Holubakha2018-01-19
|
* Specify -lm after the main executable symbolGravatar Hummer120072017-10-23
| | | | | Specifying it before may cause issues with some compilers Minor ws cleanup in makefile
* Use BINDIR in Makefile install ruleGravatar Miciah Masters2017-09-23
|
* Fix file mode for installing non-suid binaryGravatar Miciah Masters2017-09-23
| | | | | Use the file mode 0755 (executable but not suid) when installing the binary with INSTALL_UDEV_RULES=1.
* Version bump to 0.3Gravatar Mykyta Holubakha2017-09-22
| | | | | | | | | | fixes #10 added an option to install udev rules (fixes #11) updated makefile to adhere to DESTDIR/PREFIX conventions updated README
* Fix rounding errors when using percentagesGravatar Markus Schneider2017-08-26
|
* Add --version flagGravatar Christoph Gysin2017-07-28
|
* Add "info" operation and make it defaultGravatar hcpl2017-07-28
| | | | There should be an option to get a sole "current brightness" value.
* Update READMEGravatar hcpl2017-07-28
|
* Add gitignoreGravatar Christoph Gysin2017-07-28
|
* Add comment to silence -Wimplicit-fallthroughGravatar Christoph Gysin2017-07-28
|
* Remove trailing whitespaceGravatar Christoph Gysin2017-07-28
|
* Make it more portableGravatar Mykyta Holubakha2017-06-11
|
* Update README.mdGravatar benjiprod2017-05-05
| | | Dead link on AUR.
* Add AUR to READMEGravatar Hummer120072017-02-18
|
* Fix logical errorsGravatar Mykyta Holubakha2017-01-18
| | | | | | | | | | Restore device data only after successful read Do not set curr_brightness to max after an unsuccessful restore Fix ensure_dir Do not ignore ignore value of fread (fixes #6)
* Version bumpGravatar Mykyta Holubakha2017-01-17
|
* Readme hotfixGravatar Hummer120072017-01-17
|
* Readme hotfixGravatar Hummer120072017-01-17
|
* Updated readmeGravatar Mykyta Holubakha2017-01-17
|
* No longer require root privilegesGravatar Mykyta Holubakha2017-01-17
|
* Ensure state files are world-writableGravatar Mykyta Holubakha2017-01-15
|
* Refactor directory accessGravatar Mykyta Holubakha2017-01-15
| | | | Add static specifier to functions
* Updated makefileGravatar Mykyta Holubakha2017-01-15
|
* Fix a null-pointer dereference in read_deviceGravatar Mykyta Holubakha2017-01-15
|
* Merge pull request #5 from Miciah/various-fixesGravatar Hummer120072017-01-15
|\ | | | | Various fixes
| * Print error if run dir is not a directoryGravatar Miciah Masters2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print an error message if the run directory or the device-class subdirectory exists but is not a directory. Before: % rm -rf /tmp/brightnessctl % touch /tmp/brightnessctl % brightnessctl -s Device 'intel_backlight' of class 'backlight': Current brightness: 1000 (20%) Max brightness: 4794 % file /tmp/brightnessctl /tmp/brightnessctl: empty % After: % brightnessctl -s Error saving device data: Not a directory Could not save data for device 'intel_backlight'. Device 'intel_backlight' of class 'backlight': Current brightness: 1000 (20%) Max brightness: 4794 %
| * Clean up error handlingGravatar Miciah Masters2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make several changes to error handling: • Check for negative values from sprintf, and treat them as errors. • Check for errors from fscanf both by comparing its return value against EOF and by checking ferror. • Avoiding calling perror with errno set to -1. Either set a meaningful value, such as EINVAL, or use fprintf if errno cannot be expected to have a meaningful value. • Instead of re-using errno for internal error handling, use a new variable to indicate errors where it makes sense to do so. • In read_device, print more specific error messages if we fail to read a device's current or max brightness, and print an error message immediately if a read fails, instead of only maybe at the end of read_device.
| * Do not write NUL to state fileGravatar Miciah Masters2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not write a trailing NUL byte to the state file. Before: % brightnessctl -ms intel_backlight,backlight,1000,20%,4794 % od -t x1z /tmp/brightnessctl/backlight/intel_backlight 0000000 31 30 30 30 00 >1000.< 0000005 % After: % brightnessctl -ms intel_backlight,backlight,1000,20%,4794 % od -t x1z /tmp/brightnessctl/backlight/intel_backlight 0000000 31 30 30 30 >1000< 0000004 % Note that restore still works: % brightnessctl -mr intel_backlight,backlight,1000,20%,4794 %
| * Fix logic for directory creation when saving stateGravatar Miciah Masters2017-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating the /tmp/brightnessctl directory or its subdirectories, clear errno before calling mkdir, and call stat a second time after mkdir. Previously, errno was not cleared, so even if the error was handled (by creating the missing directory with mkdir), subsequent error handling code read the old errno value from the failed stat call and printed an error message. Additionally, because we did not call stat again after calling mkdir, the stat buffer had outdated information, and so S_ISDIR returned a false negative. As a result of these defects, invoking brightnessctl -s when /tmp/brightnessctl did not exist would create /tmp/brightnessctl and fail. Invoking brightnessctl -s a second time would create /tmp/brightnessctl/backlight and fail. Invoking the command a third time would succeed and write the state file under /tmp/brightnessctl/backlight/. After this commit, brightnessctl -s succeeds the first time.
| * -r/--restore requires root, same as setGravatar Miciah Masters2017-01-15
| | | | | | | | | | | | The -r/--restore flag requires root, the same as the set verb does, so print an error message if either the flag or the verb is used without running as root.