From 9ed3cdc5189bd0ec0257d3d70f84f407ae56cbda Mon Sep 17 00:00:00 2001 From: Luke Marsden Date: Fri, 13 Oct 2023 15:52:55 +0100 Subject: [PATCH 1/2] update fan script --- fan.py | 5 ++++- fan.service | 15 +++++++++++++++ thinkpad_acpi.conf | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 fan.service create mode 100644 thinkpad_acpi.conf diff --git a/fan.py b/fan.py index e1a56d6..b8fcb52 100644 --- a/fan.py +++ b/fan.py @@ -10,7 +10,10 @@ elif temp > 60: f.write("level 2") print("😎 2") - else: + elif temp > 55: f.write("level 0") print("🧊 0") + else: + f.write("disabled") + print("🧊🧊 disabled") f.close() diff --git a/fan.service b/fan.service new file mode 100644 index 0000000..ccf7b5e --- /dev/null +++ b/fan.service @@ -0,0 +1,15 @@ +[Unit] +Description=Fan +After=network.target + +[Service] +Type=simple +User=root +Environment=PYTHONUNBUFFERED=1 +ExecStart=/usr/bin/python3 /home/luke/luke-vimrc/fan.py +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target + diff --git a/thinkpad_acpi.conf b/thinkpad_acpi.conf new file mode 100644 index 0000000..3832ca3 --- /dev/null +++ b/thinkpad_acpi.conf @@ -0,0 +1,2 @@ +options thinkpad_acpi fan_control=1 + From 8dd7fc19d5b912a3c3e8da91cb589f5dd5f2619d Mon Sep 17 00:00:00 2001 From: Luke Marsden Date: Wed, 13 Dec 2023 10:53:34 +0000 Subject: [PATCH 2/2] -y for sagi --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index d24fb1d..c0f630c 100644 --- a/.bashrc +++ b/.bashrc @@ -98,7 +98,7 @@ export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " shopt -s histappend export PROMPT_COMMAND="history -a" -alias sagi='sudo apt-get install' +alias sagi='sudo apt-get install -y' alias t='~/todo/todo.sh' # Make a new line at the start of the file alias todo="echo '0a