Fix size of brightness and add build to gitignore

This commit is contained in:
Ethanell 2019-12-22 14:48:15 +01:00
parent b745b71207
commit 9d64eae7e1
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@ compile_commands.json
#C trash
**/*.o
xbrightness

View file

@ -22,7 +22,7 @@ float current() {
}
void set(float brightness) {
char screenName[64], b[3], command[BUFFER] = "xrandr --output ";
char screenName[64], b[4], command[BUFFER] = "xrandr --output ";
cmd("xrandr | grep \" connected\" | cut -f1 -d\" \"", screenName);
strcat(strcat(strcat(command, screenName), " --brightness "), gcvt(brightness, 3, b));
cmd(command, NULL); //TODO: Catch output error