diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-22 14:03:12 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-22 14:03:12 +0100 |
| commit | 91d4a3cffdf983cd0915f4610b4e0a9bd47f31ae (patch) | |
| tree | de37da072d58975cef1057e451cc064c6b7be9b8 | |
| parent | Update e-mail (diff) | |
| download | adjbacklight-91d4a3cffdf983cd0915f4610b4e0a9bd47f31ae.tar.gz adjbacklight-91d4a3cffdf983cd0915f4610b4e0a9bd47f31ae.tar.bz2 adjbacklight-91d4a3cffdf983cd0915f4610b4e0a9bd47f31ae.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
| -rw-r--r-- | README | 8 | ||||
| -rw-r--r-- | adjbacklight.1 | 6 | ||||
| -rw-r--r-- | adjbacklight.c | 26 | ||||
| -rw-r--r-- | config.mk | 4 |
4 files changed, 22 insertions, 22 deletions
@@ -6,8 +6,8 @@ SYNOPSIS DESCRIPTION adjbacklight can be used to fetch or set the backlight - non-interactively. If these feature is not used, it starts - a interactive user interface in the terminal. However, if + non-interactively. If this feature is not used, it starts + an interactive user interface in the terminal. However, if stdin is not a terminal, every line from stdin is parsed as a -s argument. @@ -19,8 +19,8 @@ DESCRIPTION computers and can be used inside X. In fact it seems to work for all machines with backlight, which is not true for xbacklight(1). adjbacklight uses /sys/class/backlight. - adjbacklight as been retrofitted to be convenient for use - inside X on desktop computers, with commands that lets it + adjbacklight has been retrofitted to be convenient for use + inside X on desktop computers, with commands that let it be used non-interactively with hotkeys set up in xbindkeys(1). OPTIONS diff --git a/adjbacklight.1 b/adjbacklight.1 index b505192..81d50ef 100644 --- a/adjbacklight.1 +++ b/adjbacklight.1 @@ -10,7 +10,7 @@ adjbacklight - Convenient method for adjusting the backlight on your portable co .SH DESCRIPTION .B adjbacklight can be used to fetch or set the backlight non-interactively. -If these feature is not used, it starts a interactive user +If this feature is not used, it starts an interactive user interface in the terminal. However, if stdin is not a terminal, every line from stdin is parsed as a .B -s @@ -33,9 +33,9 @@ is not true for uses .IR /sys/class/backlight . .B adjbacklight -as been retrofitted to be convenient for use inside +has been retrofitted to be convenient for use inside .B X -on desktop computers, with commands that lets it be used +on desktop computers, with commands that let it be used non-interactively with hotkeys set up in .BR xbindkeys (1). .SH OPTIONS diff --git a/adjbacklight.c b/adjbacklight.c index 57495d8..ba503d5 100644 --- a/adjbacklight.c +++ b/adjbacklight.c @@ -261,8 +261,8 @@ init_terminal(pid_t *pid, struct termios *saved_stty) int i; printf("\n\n"); - printf("If the program is abnormally aborted the may be some residual\n"); - printf("effects on the terminal. the following commands should reset it:\n"); + printf("If the program is abnormally aborted there may be some residual\n"); + printf("effects on the terminal. The following commands should reset it:\n"); printf("\n"); printf(" stty sane\n"); printf(" printf '\\ec'\n"); @@ -428,17 +428,17 @@ main(int argc, char *argv[]) } done: - if (isinteractive && pid) { - /* Show cursor */ - printf("%s", "\033[?25h"); - fflush(stdout); + if (isinteractive && pid) { + /* Show cursor */ + printf("%s", "\033[?25h"); + fflush(stdout); - /* `stty icanon echo` */ - if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &saved_stty)) { - fprintf(stderr, "%s: tcsetattr <stdin>: %s\n", argv0, strerror(errno)); - return 1; - } - } + /* `stty icanon echo` */ + if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &saved_stty)) { + fprintf(stderr, "%s: tcsetattr <stdin>: %s\n", argv0, strerror(errno)); + return 1; + } + } - return 0; + return 0; } @@ -3,8 +3,8 @@ MANPREFIX = $(PREFIX)/share/man VIDEO_GROUP = video -CC = cc +CC = c99 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -CFLAGS = -std=c99 -Wall -O2 +CFLAGS = LDFLAGS = -s |
