From fc2da6130a3ddf0a645233f165eba93b5702132f Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 16 Oct 2018 10:23:35 -0400 Subject: [PATCH] Add a thinkfan.conf generating thingy --- thinkfan-confgen | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 thinkfan-confgen diff --git a/thinkfan-confgen b/thinkfan-confgen new file mode 100755 index 0000000..66ebdcb --- /dev/null +++ b/thinkfan-confgen @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -o errexit + +main() { + find /sys -type f -name 'temp*_input' | while read -r line; do + echo "hwmon ${line}" + done + cat <<'EOF' + +tp_fan /proc/acpi/ibm/fan + +(0, 0, 43) +(1, 41, 46) +(2, 44, 49) +(3, 47, 52) +(4, 50, 55) +(5, 53, 58) +(7, 56, 32767) +EOF +} + +main "${@}"