diff options
author | tv <tv@krebsco.de> | 2016-11-07 01:16:11 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-11-07 01:17:39 +0100 |
commit | 2345b7ab36a5ee4c4d5fb09becfc7956fce4e3bc (patch) | |
tree | 489e595a755f5e020d275bc1081de13b0468e7a9 /tv | |
parent | eb876c996c48b993250e2f806e9f4891b42cba3c (diff) |
tv q: add intel_backlight
Diffstat (limited to 'tv')
-rw-r--r-- | tv/5pkgs/q/default.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tv/5pkgs/q/default.nix b/tv/5pkgs/q/default.nix index 016da44..7e2a30c 100644 --- a/tv/5pkgs/q/default.nix +++ b/tv/5pkgs/q/default.nix @@ -62,6 +62,21 @@ let fi ''; + q-intel_backlight = '' + cd /sys/class/backlight/intel_backlight + </dev/null exec ${pkgs.gawk}/bin/awk ' + END { + getline actual_brightness < "actual_brightness" + getline max_brightness < "max_brightness" + getline brightness < "brightness" + printf "intel_backlight %d%% %d/%d\n" \ + , actual_brightness / max_brightness * 100 \ + , actual_brightness \ + , max_brightness + } + ' + ''; + q-power_supply = let power_supply = pkgs.writeBash "power_supply" '' set -efu @@ -218,6 +233,7 @@ pkgs.writeBashBin "q" '' ${q-isodate} ${q-sgtdate} (${q-gitdir}) & + (${q-intel_backlight}) & (${q-power_supply}) & (${q-virtualization}) & (${q-wireless}) & |