diff options
Diffstat (limited to 'tv/5pkgs')
-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 016da4405..7e2a30c3e 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}) & |