Note the meaning of version numbers
[khatus.git] / x2 / src / bash / exe / khatus_sensor_screen_brightness.sh
1 #! /bin/sh
2
3 set -e
4
5 screen_brightness_device_path="$1"
6
7 awk '
8 BEGIN {
9 OFS = msg_fs ? msg_fs : "|"
10 Kfs = key_fs ? key_fs : ":"
11 }
12
13 FILENAME ~ "/max_brightness$" {max = $1; next}
14 FILENAME ~ "/brightness$" {cur = $1; next}
15 END {print("percentage", (cur / max) * 100)}
16 ' \
17 "$screen_brightness_device_path/max_brightness" \
18 "$screen_brightness_device_path/brightness"
This page took 0.059799 seconds and 4 git commands to generate.