ctemp

Set color temperature
git clone git://git.akobets.xyz/ctemp
Log | Files | Refs | README | LICENSE

commit 79ba780a588e183b93c984b9aedd0c40484be5a3
parent 948de7c2131be32528e32990f514671673cb70a1
Author: Artem Kobets <artem@akobets.xyz>
Date:   Wed,  4 Mar 2020 19:40:25 +0200

remove default temperature

Diffstat:
Mctemp.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/ctemp.c b/ctemp.c @@ -18,7 +18,6 @@ #define TEMP_MIN 1000 #define TEMP_MAX 25000 #define TEMP_INTERVAL 100 -#define TEMP_DEFAULT 6500 typedef struct { char *name; @@ -255,13 +254,13 @@ usage() } die( - "usage: %s -i interface [temperature]\n" + "usage: %s [-i interface] temperature\n" " interface - one of [%s]" " (default - %s)\n" " temperature - %i-%i, with interval %i, rounded down" - " (default - %i)\n", + " (initial value is usually 6500)\n", argv0, ifStr, DEFAULT_INTERFACE, - TEMP_MIN, TEMP_MAX, TEMP_INTERVAL, TEMP_DEFAULT + TEMP_MIN, TEMP_MAX, TEMP_INTERVAL ); } @@ -304,11 +303,11 @@ main(int argc, char **argv) { temp = 0; if (argc == 0) - temp = TEMP_DEFAULT; + usage(); else { temp = atoi(argv[0]); if (temp < TEMP_MIN || temp > TEMP_MAX) - usage(interfaces); + usage(); } handler(temp);