├── tmp-data ├── input ├── fans ├── icon.gif ├── icon.png ├── logo.png ├── fans.sh ├── fans55.sh ├── fans_ultimate.c ├── fans_ultimate_GUI.c.bak ├── fans_ultimate_GUI.c ├── fans.glade ├── tp_gtk_gui.glade └── ikona.svg ├── tpfc_start.sh ├── data ├── icon.png ├── logo.png ├── tp_fan_control └── gtk_gui.xml ├── tpfc0.5.tar.gz ├── tpfc_start-up.sh ├── Makefile ├── README.md ├── src ├── tp_fan_control.c └── gtk_gui.glade └── LICENCE /tmp-data/input: -------------------------------------------------------------------------------- 1 | 120 57 60 2 | -------------------------------------------------------------------------------- /tpfc_start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | gksu data/tp_fan_control 3 | -------------------------------------------------------------------------------- /data/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/data/icon.png -------------------------------------------------------------------------------- /data/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/data/logo.png -------------------------------------------------------------------------------- /tmp-data/fans: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/tmp-data/fans -------------------------------------------------------------------------------- /tpfc0.5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/tpfc0.5.tar.gz -------------------------------------------------------------------------------- /tmp-data/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/tmp-data/icon.gif -------------------------------------------------------------------------------- /tmp-data/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/tmp-data/icon.png -------------------------------------------------------------------------------- /tmp-data/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/tmp-data/logo.png -------------------------------------------------------------------------------- /data/tp_fan_control: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stanko/ThinkPad-Fan-Control/HEAD/data/tp_fan_control -------------------------------------------------------------------------------- /tpfc_start-up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sleep 15 && 3 | TP_PATH=`pwd` 4 | TP_PATH='/home/stanko/Projects/fans/' 5 | cd $TP_PATH 6 | gksu data/tp_fan_control & 7 | exit 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PROGRAM = tp_fan_control 2 | CC = gcc 3 | CFLAGS = -g -Wall 4 | GTKLIBS = `pkg-config gtk+-2.0 libglade-2.0 --cflags --libs` 5 | SRCPATH = src/ 6 | BINPATH = data/ 7 | 8 | $(PROGRAM): $(SRCPATH)$(PROGRAM).c 9 | $(CC) $(CFLAGS) -o $(BINPATH)$(PROGRAM) $(SRCPATH)$(PROGRAM).c $(GTKLIBS) 10 | 11 | .PHONY: beauty clean dist 12 | 13 | beauty: 14 | -indent $(PROGRAM).c 15 | -rm *~ *BAK 16 | 17 | clean: 18 | -rm *.o $(PROGRAM) *core 19 | 20 | dist: beauty clean 21 | -tar -chvz -C .. -f ../$(PROGRAM).tar.gz $(PROGRAM) 22 | 23 | -------------------------------------------------------------------------------- /tmp-data/fans.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #podesi vremena i temperature kako ti odgovaraju 3 | 4 | #mrtva petlja u kojoj se sve desava 5 | while true; do 6 | 7 | #cupam trenutnu temperaturu procesora 8 | TEMP=`cat /proc/acpi/ibm/thermal | awk '{print $2}'` 9 | 10 | if [ "$TEMP" -ge "60" ]; then 11 | #ako je veca od 60 startujemo full 12 | echo level full-speed > /proc/acpi/ibm/fan 13 | else 14 | #u suprotnom stavljamo auto 15 | echo level auto > /proc/acpi/ibm/fan 16 | fi 17 | 18 | #skripta sada spava 2 minuta pa okida ponovo 19 | sleep 120 20 | done 21 | -------------------------------------------------------------------------------- /tmp-data/fans55.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #podesi vremena i temperature kako ti odgovaraju 4 | START="0" 5 | #mrtva petlja u kojoj se sve desava 6 | while true; do 7 | 8 | #cupam trenutnu temperaturu procesora 9 | TEMP=`cat /proc/acpi/ibm/thermal | awk '{print $2}'` 10 | #TEMP=`cat ~/thermal | awk '{print $2}'` 11 | 12 | #ako je temperatura preko 60, a fanovi nisu na fullu startujem ih 13 | if [ "$TEMP" -ge "60" ] && [ "$START" -eq "0" ]; then 14 | echo "Temperatura je presla 60 stepeni. Startujem fanove." 15 | date '+.:: %H:%M:%S ::.' 16 | echo "-------------------------------------------------------------" 17 | START="1" 18 | echo level disengaged > /proc/acpi/ibm/fan 19 | fi 20 | 21 | #ako je temperatura ispod 55 a fanovi su na fullu vracam ih na auto 22 | if [ "$TEMP" -lt "55" ] && [ "$START" -eq "1" ]; then 23 | echo "Temperatura je pala ispod 55 stepeni. Vracam fanove na auto. " 24 | date '+.:: %H:%M:%S ::.' 25 | echo "-------------------------------------------------------------" 26 | START="0" 27 | echo level auto > /proc/acpi/ibm/fan 28 | fi 29 | 30 | #skripta sada spava 2 minuta pa okida ponovo 31 | sleep 120 32 | done 33 | 34 | -------------------------------------------------------------------------------- /tmp-data/fans_ultimate.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define AUTO 10 7 | #define FULL 100 8 | 9 | int main(){ 10 | int fansLevel = AUTO; 11 | int temp, safeTemp=57, criticalTemp=60,sleepTime=120; 12 | FILE* tempInput; 13 | /* 14 | printf("Enter sleep time: "); 15 | scanf("%d",&sleepTime); 16 | 17 | printf("Enter safe temperature: "); 18 | scanf("%d",&safeTemp); 19 | 20 | printf("Enter critical temperature: "); 21 | scanf("%d",&criticalTemp); 22 | */ 23 | printf("----------------------------------------\n"); 24 | printf(" Safe: %d, Critical: %d, Sleep: %d\n",safeTemp, criticalTemp,sleepTime); 25 | printf("----------------------------------------\n"); 26 | while(1){ 27 | tempInput = fopen("/proc/acpi/ibm/thermal","r"); 28 | fscanf(tempInput,"temperatures: %d",&temp); 29 | fclose(tempInput); 30 | // printf("%d\n",temp); 31 | if(temp>=criticalTemp && fansLevel==AUTO){ 32 | system("date '+.:: %H:%M:%S ::.'"); 33 | printf("Temperature is %d, critical is %d\n",temp,criticalTemp); 34 | printf("Turning fans to full-speed!\n"); 35 | printf("----------------------------------------\n"); 36 | system("echo level full-speed > /proc/acpi/ibm/fan"); 37 | fansLevel = FULL; 38 | } 39 | else if(temp<=safeTemp && fansLevel==FULL){ 40 | system("date '+.:: %H:%M:%S ::.'"); 41 | printf("Temperature is %d, safe is %d\n",temp,safeTemp); 42 | printf("Turning fans to auto!\n"); 43 | printf("----------------------------------------\n"); 44 | system("echo level auto > /proc/acpi/ibm/fan"); 45 | fansLevel = AUTO; 46 | } 47 | sleep(sleepTime); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ThinkPad Fan Control 2 | ============================ 3 | Version 0.5 4 | 5 | Unfortunately this project is NOT in the active development 6 | --------------------- 7 | 8 | I don't own a ThinkPad laptop for years now, and I don't plan to continue development on this. 9 | Feel free to check forks fine people made or issue a pull request. Thank you for your understanding. 10 | 11 | However there are couple of forks in the wild. 12 | 13 | [ForgedTurbo's fork](https://github.com/ForgedTurbo/ThinkPad-Fan-Control) handles changes that happened since I initially wrote this script. I recommend you to check it out and give it a try. 14 | 15 | 16 | INTRODUCTION 17 | --------------------- 18 | This is program for controlling fans speed on IBM/Lenovo ThinkPads. It is written 19 | for Linux only. This program is written in C, using GTK GUI. 20 | 21 | You are required to have the Linux kernel with 'thinkpad-acpi' patch. 22 | You must also enable manual control for your fans. For Linux 2.6.22 and above, 23 | you must add 'fan_control=1' as a module parameter to 'thinkpad-acpi'. 24 | For example, in Debian Lenny (and Ubuntu 8.04), you must add the following 25 | to "/etc/modprobe.d/options": 26 | options thinkpad_acpi fan_control=1 27 | In Ubuntu 9.10 you need to add this line to file "/etc/modprobe.d/alsa-base.conf" 28 | 29 | Having done so, reboot. Now you'll be able to use this program easily. 30 | 31 | I wrote this for my own personal use, and thought that it would be a good idea 32 | to release it to the world, and hope that it will be useful to someone! 33 | Feel free to send comments, bug reports or a thanks to the e-mail above. 34 | 35 | 36 | COMPILATION 37 | --------------------- 38 | You will need GTK development libraries. The Makefile that is available can 39 | be used like: 40 | 41 | make 42 | 43 | There is also a pre-compiled binary available for i386, 32-bit machines. 44 | 45 | START-UP 46 | --------------------------------- 47 | You must run this program as root, because only root can change the speed of fans. 48 | I personally recommend using "tpfc_start.sh", which will run ThinkPad Fan Control 49 | with gksu under administrator privileges. 50 | 51 | I also made "tpfc_start-up.sh", which I added to my GNOME start-up list. 52 | Using it will let you run the program when you log on. All you need to do is to 53 | change two lines in it, path in which ThinkPad Fan Control is located, and sleep 54 | time - the amount of time the script will wait until launching TPFC. 55 | 56 | 57 | USAGE 58 | -------------------- 59 | The program has two modes - automatic and manual. The manual mode can't be easier 60 | to use - just choose the speed and click the "Change speed" button. 61 | 62 | The automatic mode is a bit more complicated. There are four options you can change: 63 | 64 | * Sleep time - how often the program will check for the CPUtemperature (default - 120s). 65 | * Critical temperature - the program will speed up the fans when this temperature is reached (default - 55C). 66 | * Safe temperature - the program will switch the fans to normal when the temperature is lower than this (default - 50C) 67 | * Fan level speed - the speed of fans when the CPU reaches the critical temperature (default - 7). 68 | 69 | If you would like to customise these options, just click the 70 | "Change options button" 71 | 72 | 73 | I hope you enjoy using this :) :D 74 | 75 | -------------------------------------------------------------------------------- /tmp-data/fans_ultimate_GUI.c.bak: -------------------------------------------------------------------------------- 1 | /* 2 | ThinkPad fan controll 3 | Copyright 2008, Stanko Tadić 4 | 5 | ThinkPad fan controll is free software; you can redistribute it 6 | and/or modify it under the terms of the GNU General Public License 7 | version 2 as published by the Free Software Foundation. 8 | Note that I am not granting permission to redistribute or 9 | modify glock under the terms of any later version of the 10 | General Public License. 11 | 12 | Glock is distributed in the hope that it will be useful, but WITHOUT 13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program (in the file "COPYING"); if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 20 | MA 02111, USA. 21 | 22 | Compile using: 23 | gcc -Wall -g -o gui fans_ultimate_GUI.c -export-dynamic `pkg-config gtk+-2.0 libglade-2.0 --cflags --libs` 24 | */ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define AUTO 10 33 | #define FULL 100 34 | 35 | /* location of UI XML file relative to path in which program is running */ 36 | #define BUILDER_XML_FILE "fans.xml" 37 | #include 38 | 39 | int visible = 1, running = 0; 40 | int fansLevel = AUTO; 41 | int sleepTime, oldSleepTime=0; 42 | gint timeout; 43 | 44 | GtkSpinButton *sleepField, *criticalField, *safeField; 45 | GtkStatusbar *statusbar; 46 | GtkLabel *level; 47 | GtkWidget *window; 48 | GtkButton *run, *exitButton; 49 | 50 | 51 | void on_window_destroy (GtkButton *button); 52 | int fans(); 53 | void run_clicked(); 54 | void exit_clicked(); 55 | 56 | void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data); 57 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); 58 | static GtkStatusIcon *create_tray_icon(); 59 | 60 | int main (int argc, char *argv[]){ 61 | 62 | // pokazivaci na widgete 63 | GtkBuilder *builder; 64 | GtkStatusIcon *tray_icon; 65 | 66 | 67 | //inicijalizacija 68 | gtk_init (&argc, &argv); 69 | 70 | system("echo level auto > /proc/acpi/ibm/fan"); 71 | 72 | builder = gtk_builder_new (); 73 | gtk_builder_add_from_file (builder, BUILDER_XML_FILE, NULL); 74 | 75 | // tray ikona 76 | tray_icon = create_tray_icon(); 77 | 78 | window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); 79 | run = GTK_BUTTON (gtk_builder_get_object (builder, "run")); 80 | exitButton = GTK_BUTTON (gtk_builder_get_object (builder, "exit")); 81 | 82 | sleepField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "sleep")); 83 | criticalField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "critical")); 84 | safeField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "safe")); 85 | 86 | 87 | statusbar = GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")); 88 | level = GTK_LABEL (gtk_builder_get_object (builder, "level")); 89 | 90 | g_signal_connect(G_OBJECT(run), "clicked", G_CALLBACK(run_clicked), NULL); 91 | g_signal_connect(G_OBJECT(exitButton), "clicked", G_CALLBACK(exit_clicked), NULL); 92 | 93 | gtk_builder_connect_signals (builder, NULL); 94 | g_object_unref (G_OBJECT (builder)); 95 | 96 | gtk_widget_show (window); 97 | 98 | gtk_main (); 99 | 100 | return 0; 101 | } 102 | 103 | int fans(){ 104 | int temp; 105 | FILE* tempInput; 106 | char message[30]="Temperature: "; 107 | char tmp[5]; 108 | int criticalTemp = gtk_spin_button_get_value_as_int (criticalField); 109 | int safeTemp = gtk_spin_button_get_value_as_int (safeField); 110 | 111 | tempInput = fopen("/proc/acpi/ibm/thermal","r"); 112 | fscanf(tempInput,"temperatures: %d",&temp); 113 | fclose(tempInput); 114 | printf("-= Checking temperature - %d =-\n",temp); 115 | sprintf(tmp,"%d",temp); 116 | strcat(message,tmp); 117 | 118 | if(temp>=criticalTemp && fansLevel==AUTO){ 119 | system("date '+.:: %H:%M:%S ::.'"); 120 | printf("Temperature is %d, critical is %d\n",temp,criticalTemp); 121 | printf("Turning fans to full-speed!\n"); 122 | system("echo level full-speed > /proc/acpi/ibm/fan"); 123 | fansLevel = FULL; 124 | gtk_label_set_text(level,"Fans level - full speed"); 125 | } 126 | else if(temp<=safeTemp && fansLevel==FULL){ 127 | system("date '+.:: %H:%M:%S ::.'"); 128 | printf("Temperature is %d, safe is %d\n",temp,safeTemp); 129 | printf("Turning fans to auto!\n"); 130 | system("echo level auto > /proc/acpi/ibm/fan"); 131 | fansLevel = AUTO; 132 | gtk_label_set_text(level,"Fans level - auto"); 133 | } 134 | 135 | printf("----------------------------------------\n"); 136 | gtk_statusbar_push(statusbar,0,message); 137 | return TRUE; 138 | } 139 | 140 | void run_clicked(){ 141 | // get sleep time 142 | sleepTime = gtk_spin_button_get_value_as_int (sleepField); 143 | 144 | if(running == 1){ 145 | gtk_timeout_remove(timeout); 146 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 147 | gtk_button_set_label(run,"Change sleep time"); 148 | } 149 | else{ 150 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 151 | running = 1; 152 | } 153 | 154 | } 155 | 156 | 157 | void on_window_destroy (GtkButton *button){ 158 | system("date '+.:: %H:%M:%S ::.'"); 159 | printf("EXITING - turning fans to auto!\n"); 160 | printf("----------------------------------------\n"); 161 | system("echo level auto > /proc/acpi/ibm/fan"); 162 | gtk_main_quit(); 163 | } 164 | 165 | void exit_clicked(){ 166 | system("date '+.:: %H:%M:%S ::.'"); 167 | printf("EXITING - turning fans to auto!\n"); 168 | printf("----------------------------------------\n"); 169 | system("echo level auto > /proc/acpi/ibm/fan"); 170 | gtk_main_quit(); 171 | } 172 | 173 | void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data){ 174 | if(visible){ 175 | gtk_widget_hide(window); 176 | visible=0; 177 | } 178 | else{ 179 | gtk_widget_show(window); 180 | visible=1; 181 | } 182 | } 183 | 184 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){ 185 | printf("Popup menu\n"); 186 | } 187 | 188 | static GtkStatusIcon *create_tray_icon() { 189 | GtkStatusIcon *tray_icon; 190 | 191 | tray_icon = gtk_status_icon_new(); 192 | g_signal_connect(G_OBJECT(tray_icon), "activate", G_CALLBACK(tray_icon_on_click), NULL); 193 | g_signal_connect(G_OBJECT(tray_icon), "popup-menu",G_CALLBACK(tray_icon_on_menu), NULL); 194 | gtk_status_icon_set_from_icon_name(tray_icon, GTK_STOCK_REFRESH); 195 | gtk_status_icon_set_tooltip(tray_icon, "Fan control"); 196 | gtk_status_icon_set_visible(tray_icon, TRUE); 197 | 198 | return tray_icon; 199 | } 200 | 201 | -------------------------------------------------------------------------------- /tmp-data/fans_ultimate_GUI.c: -------------------------------------------------------------------------------- 1 | /* 2 | ThinkPad fan controll 3 | Copyright 2008, Stanko Tadić 4 | 5 | ThinkPad fan controll is free software; you can redistribute it 6 | and/or modify it under the terms of the GNU General Public License 7 | version 2 as published by the Free Software Foundation. 8 | Note that I am not granting permission to redistribute or 9 | modify glock under the terms of any later version of the 10 | General Public License. 11 | 12 | Glock is distributed in the hope that it will be useful, but WITHOUT 13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program (in the file "COPYING"); if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 20 | MA 02111, USA. 21 | 22 | Compile using: 23 | gcc -Wall -g -o tp_fan_control tp_fan_control.c -export-dynamic `pkg-config gtk+-2.0 libglade-2.0 --cflags --libs` 24 | */ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #define AUTO 10 33 | #define FULL 100 34 | 35 | /* location of UI XML file relative to path in which program is running */ 36 | #define BUILDER_XML_FILE "fans.xml" 37 | #include 38 | 39 | int visible = 1, running = 0; 40 | int fansLevel = AUTO; 41 | int sleepTime, oldSleepTime=0; 42 | gint timeout; 43 | 44 | GtkSpinButton *sleepField, *criticalField, *safeField; 45 | GtkStatusbar *statusbar; 46 | GtkLabel *level, *txtLog; 47 | GtkWidget *window; 48 | GtkButton *run, *exitButton, *hide; 49 | 50 | 51 | void on_window_destroy (GtkButton *button); 52 | int fans(); 53 | void run_clicked(); 54 | void exit_clicked(); 55 | 56 | void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data); 57 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); 58 | static GtkStatusIcon *create_tray_icon(); 59 | 60 | int main (int argc, char *argv[]){ 61 | 62 | // pokazivaci na widgete 63 | GtkBuilder *builder; 64 | GtkStatusIcon *tray_icon; 65 | 66 | 67 | //inicijalizacija 68 | gtk_init (&argc, &argv); 69 | 70 | system("echo level auto > /proc/acpi/ibm/fan"); 71 | 72 | builder = gtk_builder_new (); 73 | gtk_builder_add_from_file (builder, BUILDER_XML_FILE, NULL); 74 | 75 | // tray ikona 76 | tray_icon = create_tray_icon(); 77 | 78 | window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); 79 | run = GTK_BUTTON (gtk_builder_get_object (builder, "run")); 80 | exitButton = GTK_BUTTON (gtk_builder_get_object (builder, "exit")); 81 | hide = GTK_BUTTON (gtk_builder_get_object (builder, "hide")); 82 | 83 | sleepField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "sleep")); 84 | criticalField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "critical")); 85 | safeField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "safe")); 86 | 87 | txtLog = GTK_LABEL (gtk_builder_get_object (builder, "log")); 88 | statusbar = GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")); 89 | level = GTK_LABEL (gtk_builder_get_object (builder, "level")); 90 | 91 | g_signal_connect(G_OBJECT(run), "clicked", G_CALLBACK(run_clicked), NULL); 92 | g_signal_connect(G_OBJECT(exitButton), "clicked", G_CALLBACK(on_window_destroy), NULL); 93 | g_signal_connect(G_OBJECT(hide), "clicked", G_CALLBACK(tray_icon_on_click), NULL); 94 | 95 | gtk_builder_connect_signals (builder, NULL); 96 | g_object_unref (G_OBJECT (builder)); 97 | 98 | gtk_widget_show (window); 99 | 100 | gtk_main (); 101 | 102 | return 0; 103 | } 104 | 105 | int fans(){ 106 | int temp; 107 | FILE* tempInput, *sysIn; 108 | char message[80]; 109 | char tempMessage[120]; 110 | char tmp[30]; 111 | int criticalTemp = gtk_spin_button_get_value_as_int (criticalField); 112 | int safeTemp = gtk_spin_button_get_value_as_int (safeField); 113 | 114 | tempInput = fopen("/proc/acpi/ibm/thermal","r"); 115 | if(tempInput ==NULL) 116 | gtk_label_set_text(txtLog,"YOU ARE NOT RUNNING KERNEL WITH THINKPAD PATCH!"); 117 | fscanf(tempInput,"temperatures: %d",&temp); 118 | fclose(tempInput); 119 | 120 | 121 | sysIn = popen("date '+%H:%M:%S'","r"); 122 | fgets(tmp,9,sysIn); 123 | pclose(sysIn); 124 | sprintf(message,"Temperature: %dC, Checked at %s",temp,tmp); 125 | gtk_statusbar_push(statusbar,0,message); 126 | 127 | if(temp>=criticalTemp && fansLevel==AUTO){ 128 | system("echo level full-speed > /proc/acpi/ibm/fan"); 129 | fansLevel = FULL; 130 | sprintf(tempMessage,"======================\n%s\n======================\nTemperature is %d, critical is %d\nTurning fans to full-speed!",tmp,temp,criticalTemp); 131 | gtk_label_set_text(txtLog,tempMessage); 132 | gtk_label_set_text(level,"Fans level - full speed"); 133 | } 134 | else if(temp<=safeTemp && fansLevel==FULL){ 135 | system("echo level auto > /proc/acpi/ibm/fan"); 136 | fansLevel = AUTO; 137 | 138 | sprintf(tempMessage,"======================\n%s\n======================\nTemperature is %d, safe is %d\nTurning fans to auto!",tmp,temp,safeTemp); 139 | gtk_label_set_text(txtLog,tempMessage); 140 | gtk_label_set_text(level,"Fans level - auto"); 141 | } 142 | return TRUE; 143 | } 144 | 145 | void run_clicked(){ 146 | // get sleep time 147 | sleepTime = gtk_spin_button_get_value_as_int (sleepField); 148 | 149 | if(running == 1){ 150 | gtk_timeout_remove(timeout); 151 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 152 | } 153 | else{ 154 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 155 | running = 1; 156 | } 157 | gtk_button_set_label(run,"Change sleep time"); 158 | } 159 | 160 | 161 | void on_window_destroy (GtkButton *button){ 162 | system("date '+.:: %H:%M:%S ::.'"); 163 | printf("EXITING - turning fans to auto!\n"); 164 | printf("----------------------------------------\n"); 165 | system("echo level auto > /proc/acpi/ibm/fan"); 166 | gtk_main_quit(); 167 | } 168 | 169 | 170 | void tray_icon_on_click(GtkStatusIcon *status_icon, gpointer user_data){ 171 | if(visible){ 172 | gtk_widget_hide(window); 173 | visible=0; 174 | } 175 | else{ 176 | gtk_widget_show(window); 177 | visible=1; 178 | } 179 | } 180 | 181 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){ 182 | printf("Popup menu\n"); 183 | } 184 | 185 | static GtkStatusIcon *create_tray_icon() { 186 | GtkStatusIcon *tray_icon; 187 | 188 | tray_icon = gtk_status_icon_new(); 189 | g_signal_connect(G_OBJECT(tray_icon), "activate", G_CALLBACK(tray_icon_on_click), NULL); 190 | g_signal_connect(G_OBJECT(tray_icon), "popup-menu",G_CALLBACK(tray_icon_on_menu), NULL); 191 | gtk_status_icon_set_from_icon_name(tray_icon, GTK_STOCK_REFRESH); 192 | gtk_status_icon_set_tooltip(tray_icon, "Fan control"); 193 | gtk_status_icon_set_visible(tray_icon, TRUE); 194 | 195 | return tray_icon; 196 | } 197 | 198 | -------------------------------------------------------------------------------- /tmp-data/fans.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ThinkPad ultimate fan control 7 | False 8 | GDK_GRAVITY_CENTER 9 | 10 | 11 | 12 | True 13 | 5 14 | 15 | 16 | True 17 | 4 18 | 2 19 | 10 20 | 5 21 | 22 | 23 | True 24 | True 25 | True 26 | Exit 27 | 0 28 | 29 | 30 | 1 31 | 2 32 | 3 33 | 4 34 | 35 | 14 36 | 37 | 38 | 39 | 40 | True 41 | True 42 | True 43 | Check 44 | 0 45 | 46 | 47 | 3 48 | 4 49 | 50 | 30 51 | 52 | 53 | 54 | 55 | True 56 | True 57 | 55 30 100 1 10 10 58 | 59 | 60 | 1 61 | 2 62 | 2 63 | 3 64 | 65 | 66 | 67 | 68 | 69 | 70 | True 71 | True 72 | 60 40 100 1 10 10 73 | 74 | 75 | 1 76 | 2 77 | 1 78 | 2 79 | 80 | 81 | 82 | 83 | 84 | 85 | True 86 | True 87 | 120 0 1000 5 10 10 88 | 89 | 90 | 1 91 | 2 92 | 93 | 94 | 95 | 96 | 97 | 98 | True 99 | Safe temperature: 100 | 101 | 102 | 2 103 | 3 104 | GTK_FILL 105 | 106 | 107 | 108 | 109 | 110 | True 111 | Critical temperature: 112 | 113 | 114 | 1 115 | 2 116 | GTK_FILL 117 | 118 | 119 | 120 | 121 | 122 | True 123 | Sleep time: 124 | 125 | 126 | GTK_FILL 127 | 128 | 129 | 130 | 131 | 132 | False 133 | 134 | 135 | 136 | 137 | True 138 | Fans level - auto 139 | 140 | 141 | False 142 | 1 143 | 144 | 145 | 146 | 147 | True 148 | 2 149 | 150 | 151 | False 152 | 2 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /src/tp_fan_control.c: -------------------------------------------------------------------------------- 1 | /* 2 | ThinkPad fan control 3 | Copyright 2008, Stanko Tadić 4 | 5 | ThinkPad fan control is free software; you can redistribute it 6 | and/or modify it under the terms of the GNU General Public License 7 | version 2 as published by the Free Software Foundation. 8 | Note that I am not granting permission to redistribute or 9 | modify ThinkPad fan control under the terms of any later version of the 10 | General Public License. 11 | 12 | ThinkPad fan control is distributed in the hope that it will be useful, but WITHOUT 13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15 | for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program (in the file "LICENCE"); if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 20 | MA 02111, USA. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #define AUTO 10 30 | #define FORCED 100 31 | #define FULL_SPEED 8 32 | 33 | 34 | /* location of UI XML file relative to path in which program is running */ 35 | #define BUILDER_XML_FILE "data/gtk_gui.xml" 36 | 37 | // global GTK widgets 38 | GtkSpinButton *sleepField, *criticalField, *safeField; 39 | GtkComboBox *autoSpeed, *speedValue; 40 | GtkStatusbar *statusbar; 41 | GtkLabel *level, *txtLog, *optionsLabel; 42 | GtkWidget *window; 43 | GtkButton *run, *exitButton, *hide, *speedButton; 44 | GtkStatusIcon *tray_icon; 45 | 46 | // global variables 47 | int visible = 1, running = 1, errorTemp=0, manual=0; 48 | int fansLevel = AUTO; 49 | int sleepTime = 120, criticalTemp = 55, safeTemp = 50, autoSpeedValue = 7; 50 | gint timeout; 51 | 52 | /****** FUNCTIONS *******/ 53 | // when program is closed, turns fans to auto and write that in terminal 54 | void on_window_destroy (); 55 | // main function for controlling fans 56 | int fans(); 57 | //changes speed to value 'speed' 58 | void change_speed(int speed); 59 | // when run button is clicked 60 | void run_clicked(); 61 | // changes fans speed when user want that 62 | void manual_change (); 63 | // hides window when tray icon is clicked 64 | void hide_window(GtkStatusIcon *status_icon, gpointer user_data); 65 | // popup menu, right button on tray icon 66 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); 67 | // creates tray icon 68 | static GtkStatusIcon *create_tray_icon(); 69 | 70 | //------------------------------------ MAIN ---------------------------------------------// 71 | int main (int argc, char *argv[]){ 72 | 73 | GtkBuilder *builder; 74 | 75 | gtk_init (&argc, &argv); 76 | 77 | builder = gtk_builder_new (); 78 | gtk_builder_add_from_file (builder, BUILDER_XML_FILE, NULL); 79 | 80 | // making tray icon 81 | tray_icon = create_tray_icon(); 82 | 83 | // getting all the widgets 84 | window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); 85 | run = GTK_BUTTON (gtk_builder_get_object (builder, "run")); 86 | exitButton = GTK_BUTTON (gtk_builder_get_object (builder, "exit")); 87 | speedButton = GTK_BUTTON (gtk_builder_get_object (builder, "speedButton")); 88 | hide = GTK_BUTTON (gtk_builder_get_object (builder, "hide")); 89 | sleepField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "sleep")); 90 | criticalField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "critical")); 91 | safeField = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "safe")); 92 | txtLog = GTK_LABEL (gtk_builder_get_object (builder, "log")); 93 | optionsLabel = GTK_LABEL (gtk_builder_get_object (builder, "optionsLabel")); 94 | statusbar = GTK_STATUSBAR (gtk_builder_get_object (builder, "statusbar")); 95 | level = GTK_LABEL (gtk_builder_get_object (builder, "level")); 96 | speedValue = GTK_COMBO_BOX (gtk_builder_get_object (builder, "speed")); 97 | autoSpeed = GTK_COMBO_BOX (gtk_builder_get_object (builder, "autoSpeed")); 98 | 99 | // combo boxes default values 100 | gtk_combo_box_set_active(autoSpeed,7); 101 | gtk_combo_box_set_active(speedValue,0); 102 | 103 | // callbacks 104 | // when clicked on run button 105 | g_signal_connect(G_OBJECT(run), "clicked", G_CALLBACK(run_clicked), NULL); 106 | // when clicked on exit button 107 | g_signal_connect(G_OBJECT(exitButton), "clicked", G_CALLBACK(on_window_destroy), NULL); 108 | // when clicked on to tray button 109 | g_signal_connect(G_OBJECT(hide), "clicked", G_CALLBACK(hide_window), NULL); 110 | // when clicked on manual change button 111 | g_signal_connect(G_OBJECT(speedButton), "clicked", G_CALLBACK(manual_change), NULL); 112 | // on window destroy 113 | g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(on_window_destroy), NULL); 114 | 115 | gtk_builder_connect_signals (builder, NULL); 116 | g_object_unref (G_OBJECT (builder)); 117 | 118 | gtk_widget_show (window); 119 | 120 | // welcome terminal message, and changing fans control to auto at startup 121 | system("echo level auto > /proc/acpi/ibm/fan"); 122 | printf("** Welcome! **\n"); 123 | printf("** ThinkPad fan control by Stanko! **\n"); 124 | printf("** Fan control changed to auto **\n"); 125 | 126 | 127 | // starting fans function with default values (global variables) 128 | fans(); 129 | // setting sleep time (timeout) for fans function, also default value (global) 130 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 131 | 132 | gtk_main (); 133 | 134 | return 0; 135 | } 136 | 137 | //-------------------------------------- FANS ---------------------------------------------// 138 | int fans(){ 139 | // tepmerature of CPU 140 | int temp; 141 | // file pointer on file in which is CPU temperature, and second for popen for getting time from terminal 142 | FILE *tempInput, *sysIn; 143 | // status and other messages 144 | char message[80]; 145 | char tempMessage[120]; 146 | char tmpString[45]; 147 | char speedString[15]; 148 | 149 | // wrong options 150 | if(safeTemp >= criticalTemp){ 151 | gtk_label_set_text(txtLog,"CRITICAL TEMPERATURE MUST BE GREATER THAN SAFE TEMPERATURE!"); 152 | errorTemp=1; 153 | gtk_button_set_label(run,"Run auto control"); 154 | running = 0; 155 | return FALSE; 156 | } 157 | 158 | // if manual control was active, change fan control back to auto 159 | if(manual){ 160 | change_speed(0); 161 | fansLevel = AUTO; 162 | manual=0; 163 | } 164 | 165 | // reading the CPU temperature 166 | tempInput = fopen("/proc/acpi/ibm/thermal","r"); 167 | if(tempInput ==NULL){ 168 | gtk_label_set_text(txtLog,"YOU ARE NOT RUNNING KERNEL WITH THINKPAD PATCH!"); 169 | return FALSE; 170 | } 171 | fscanf(tempInput,"temperatures: %d",&temp); 172 | fclose(tempInput); 173 | 174 | // getting time 175 | sysIn = popen("date '+%H:%M:%S'","r"); 176 | fgets(tmpString,9,sysIn); 177 | pclose(sysIn); 178 | // writing CPU temperature, and time when it's checked 179 | sprintf(message,"Temperature: %dC, Checked at %s",temp,tmpString); 180 | gtk_statusbar_push(statusbar,0,message); 181 | 182 | // if critical temperature is reached. and fans level is auto 183 | if(temp>=criticalTemp && fansLevel==AUTO){ 184 | switch(autoSpeedValue){ 185 | case 0: strcpy(speedString,"auto"); break; 186 | case 8: strcpy(speedString,"full-speed"); break; 187 | default: sprintf(speedString,"%d",autoSpeedValue); 188 | } 189 | // changing fans level to one user choosed 190 | change_speed(autoSpeedValue); 191 | fansLevel = FORCED; 192 | // putting log message 193 | sprintf(tempMessage,"\n%s\nTemperature is %d, critical is %d\nTurning fans to %s!",tmpString, temp, criticalTemp, speedString); 194 | gtk_label_set_text(txtLog,tempMessage); 195 | } 196 | // if safe temperature is reached and fans level are forced by user 197 | else if(temp<=safeTemp){ 198 | // else if(temp<=safeTemp && fansLevel==FORCED){ 199 | // changing fans level to auto 200 | change_speed(0); 201 | fansLevel = AUTO; 202 | // putting log message 203 | sprintf(tempMessage,"\n%s\nTemperature is %d, safe is %d\nTurning fans to auto!",tmpString,temp,safeTemp); 204 | gtk_label_set_text(txtLog,tempMessage); 205 | } 206 | else if(errorTemp){ 207 | gtk_label_set_text(txtLog,""); 208 | errorTemp=0; 209 | } 210 | return TRUE; 211 | } 212 | 213 | //------------------------------------ RUN ---------------------------------------------// 214 | void run_clicked(){ 215 | char tmpString[100]; 216 | char speedString[15]; 217 | // getparameters 218 | criticalTemp = gtk_spin_button_get_value_as_int (criticalField); 219 | safeTemp = gtk_spin_button_get_value_as_int (safeField); 220 | autoSpeedValue = gtk_combo_box_get_active (autoSpeed); 221 | sleepTime = gtk_spin_button_get_value_as_int (sleepField); 222 | fans(); 223 | if(running == 1){ 224 | gtk_timeout_remove(timeout); 225 | if(fansLevel==FORCED) 226 | change_speed(autoSpeedValue); 227 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 228 | } 229 | else{ 230 | timeout = g_timeout_add_seconds(sleepTime,fans,NULL); 231 | running = 1; 232 | } 233 | 234 | if(!errorTemp){ 235 | switch(autoSpeedValue){ 236 | case 0: strcpy(speedString,"auto"); break; 237 | case 8: strcpy(speedString,"full-speed"); break; 238 | default: sprintf(speedString,"%d",autoSpeedValue); 239 | } 240 | gtk_button_set_label(run,"Change options"); 241 | sprintf(tmpString,"Current options: %d, %d, %d, %s",sleepTime,criticalTemp,safeTemp,speedString); 242 | gtk_label_set_text(optionsLabel,tmpString); 243 | } 244 | } 245 | 246 | //------------------------------------ EXIT ---------------------------------------------// 247 | void on_window_destroy (){ 248 | system("echo level auto > /proc/acpi/ibm/fan"); 249 | printf("** Fan control changed to auto **\n"); 250 | printf("** Goodbye! **\n"); 251 | gtk_main_quit(); 252 | } 253 | 254 | //------------------------------------ TRAY ---------------------------------------------// 255 | void hide_window(GtkStatusIcon *status_icon, gpointer user_data){ 256 | if(visible){ 257 | gtk_widget_hide(window); 258 | visible=0; 259 | } 260 | else{ 261 | gtk_widget_show(window); 262 | visible=1; 263 | } 264 | } 265 | 266 | void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){ 267 | printf("Popup menu\n"); 268 | } 269 | 270 | //------------------------------------ STATUS ICON ---------------------------------------------// 271 | static GtkStatusIcon *create_tray_icon() { 272 | GtkStatusIcon *tray_icon; 273 | 274 | tray_icon = gtk_status_icon_new(); 275 | g_signal_connect(G_OBJECT(tray_icon), "activate", G_CALLBACK(hide_window), NULL); 276 | g_signal_connect(G_OBJECT(tray_icon), "popup-menu",G_CALLBACK(tray_icon_on_menu), NULL); 277 | gtk_status_icon_set_from_file(tray_icon, "data/icon.png"); 278 | gtk_status_icon_set_tooltip(tray_icon, "ThinkPad Fan Control .:: level - auto ::."); 279 | gtk_status_icon_set_visible(tray_icon, TRUE); 280 | 281 | return tray_icon; 282 | } 283 | //------------------------------------ MANUAL CHANGE ---------------------------------------------// 284 | void manual_change (){ 285 | int speed = gtk_combo_box_get_active (speedValue); 286 | 287 | if(running){ 288 | gtk_button_set_label(run,"Run auto control"); 289 | gtk_timeout_remove(timeout); 290 | running = 0; 291 | } 292 | 293 | change_speed(speed); 294 | manual = 1; 295 | gtk_label_set_text(txtLog,""); 296 | gtk_statusbar_push(statusbar,0,"Manual control is active!"); 297 | } 298 | 299 | //------------------------------------ CHANGE SPEED ---------------------------------------------// 300 | void change_speed(int speed){ 301 | char tmpString[60]; 302 | char speedString[15]; 303 | 304 | switch(speed){ 305 | case 0: strcpy(speedString,"auto"); break; 306 | case 8: strcpy(speedString,"full-speed"); break; 307 | default: sprintf(speedString,"%d",speed); 308 | } 309 | sprintf(tmpString,"echo level %s > /proc/acpi/ibm/fan",speedString); 310 | system(tmpString); 311 | sprintf(tmpString,"Fans level - %s",speedString); 312 | gtk_label_set_text(level,tmpString); 313 | 314 | sprintf(tmpString,"ThinkPad Fan Control .:: level - %s ::.",speedString); 315 | gtk_status_icon_set_tooltip(tray_icon, tmpString); 316 | 317 | printf("** Speed level changed to %s **\n",speedString); 318 | } 319 | -------------------------------------------------------------------------------- /tmp-data/tp_gtk_gui.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 5 7 | About ThinkPad fan control 8 | False 9 | GTK_WIN_POS_CENTER_ON_PARENT 10 | GDK_WINDOW_TYPE_HINT_DIALOG 11 | True 12 | True 13 | False 14 | ThinkPad fan control 15 | 0.5 16 | Copyright © 2008 Stanko Tadić 17 | http://stanko.mfhinc.net/projects.php 18 | http://stanko.mfhinc.net/projects.php 19 | ThinkPad fan control is free software; you can redistribute it 20 | and/or modify it under the terms of the GNU General Public License 21 | version 2 as published by the Free Software Foundation. 22 | Note that I am not granting permission to redistribute or 23 | modify ThinkPad fan control under the terms of any later version of the 24 | General Public License. 25 | 26 | ThinkPad fan control is distributed in the hope that it will be useful, but WITHOUT 27 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 28 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 29 | for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program (in the file "LICENCE"); if not, write to the 33 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 34 | MA 02111, USA. 35 | Stanko Tadić 36 | logo.png 37 | 38 | 39 | True 40 | 2 41 | 42 | 43 | 44 | 45 | 46 | True 47 | GTK_BUTTONBOX_END 48 | 49 | 50 | True 51 | True 52 | True 53 | Close 54 | 0 55 | 56 | 57 | 58 | 3 59 | 60 | 61 | 62 | 63 | False 64 | GTK_PACK_END 65 | 2 66 | 67 | 68 | 69 | 70 | 71 | 72 | ThinkPad fan control 73 | False 74 | GTK_WIN_POS_CENTER 75 | 500 76 | icon.png 77 | GDK_GRAVITY_CENTER 78 | 0.5 79 | 80 | 81 | True 82 | 83 | 84 | True 85 | 86 | 87 | True 88 | _File 89 | True 90 | 91 | 92 | True 93 | 94 | 95 | True 96 | gtk-quit 97 | True 98 | True 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | True 109 | _Help 110 | True 111 | 112 | 113 | True 114 | 115 | 116 | True 117 | gtk-about 118 | True 119 | True 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | False 130 | 131 | 132 | 133 | 134 | True 135 | Current options: 120, 60, 55, full-speed 136 | 137 | 138 | 1 139 | 140 | 141 | 142 | 143 | True 144 | 5 145 | 3 146 | 10 147 | 5 148 | True 149 | 150 | 151 | True 152 | 153 | 154 | True 155 | True 156 | True 157 | True 158 | Change options 159 | 0 160 | 161 | 162 | 163 | 164 | True 165 | True 166 | True 167 | To tray 168 | 0 169 | 170 | 171 | 1 172 | 173 | 174 | 175 | 176 | True 177 | True 178 | True 179 | Exit 180 | 0 181 | 182 | 183 | 2 184 | 185 | 186 | 187 | 188 | 3 189 | 4 190 | 5 191 | 192 | 193 | 194 | 195 | True 196 | Safe temperature: 197 | 198 | 199 | 2 200 | 2 201 | 3 202 | GTK_FILL 203 | 204 | 205 | 206 | 207 | 208 | True 209 | Critical temperature: 210 | 211 | 212 | 2 213 | 1 214 | 2 215 | GTK_FILL 216 | 217 | 218 | 219 | 220 | 221 | True 222 | Sleep time: 223 | 224 | 225 | 2 226 | GTK_FILL 227 | 228 | 229 | 230 | 231 | 232 | True 233 | True 234 | 120 1 1000 5 10 10 235 | 236 | 237 | 2 238 | 3 239 | 240 | 241 | 242 | 243 | 244 | 245 | True 246 | True 247 | 60 40 100 1 10 10 248 | 249 | 250 | 2 251 | 3 252 | 1 253 | 2 254 | 255 | 256 | 257 | 258 | 259 | 260 | True 261 | True 262 | 55 30 100 1 10 10 263 | 264 | 265 | 2 266 | 3 267 | 2 268 | 3 269 | 270 | 271 | 272 | 273 | 274 | 275 | True 276 | Use this speed when temperature is critical: 277 | 278 | 279 | 2 280 | 3 281 | 4 282 | 283 | 284 | 285 | 286 | True 287 | auto 288 | 1 289 | 2 290 | 3 291 | 4 292 | 5 293 | 6 294 | 7 295 | full speed 296 | 297 | 298 | 2 299 | 3 300 | 3 301 | 4 302 | 303 | 304 | 305 | 306 | False 307 | 2 308 | 309 | 310 | 311 | 312 | True 313 | Fans level - auto 314 | GTK_JUSTIFY_CENTER 315 | 316 | 317 | 10 318 | 3 319 | 320 | 321 | 322 | 323 | True 324 | 1 325 | 3 326 | 327 | 328 | True 329 | True 330 | True 331 | Change speed 332 | 0 333 | 334 | 335 | 2 336 | 3 337 | 338 | 15 339 | 340 | 341 | 342 | 343 | True 344 | Manual control 345 | 346 | 347 | 348 | 349 | True 350 | auto 351 | 1 352 | 2 353 | 3 354 | 4 355 | 5 356 | 6 357 | 7 358 | full speed 359 | 360 | 361 | 1 362 | 2 363 | 364 | 365 | 366 | 367 | False 368 | 4 369 | 370 | 371 | 372 | 373 | True 374 | WELCOME! 375 | This is fan control program for IBM/Lenovo ThinkPads 376 | GTK_JUSTIFY_CENTER 377 | 378 | 379 | 10 380 | 5 381 | 382 | 383 | 384 | 385 | True 386 | 2 387 | 388 | 389 | False 390 | 6 391 | 392 | 393 | 394 | 395 | 396 | 397 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /src/gtk_gui.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ThinkPad Fan Control 7 | False 8 | GTK_WIN_POS_CENTER 9 | icon.png 10 | 11 | 12 | True 13 | 14 | 15 | True 16 | True 17 | False 18 | 19 | 20 | True 21 | 3 22 | 3 23 | 10 24 | 10 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | True 52 | 53 | 54 | True 55 | Current options: 120, 55, 50, full-speed 56 | 57 | 58 | 59 | 60 | True 61 | 5 62 | 3 63 | 10 64 | True 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | True 74 | auto 75 | 1 76 | 2 77 | 3 78 | 4 79 | 5 80 | 6 81 | 7 82 | full speed 83 | 84 | 85 | 2 86 | 3 87 | 3 88 | 4 89 | 90 | 91 | 92 | 93 | 94 | True 95 | Use this speed when temperature is critical: 96 | 97 | 98 | 2 99 | 3 100 | 4 101 | 102 | 103 | 104 | 105 | True 106 | True 107 | 50 30 100 1 10 10 108 | 109 | 110 | 2 111 | 3 112 | 2 113 | 3 114 | 115 | 116 | 117 | 118 | 119 | 120 | True 121 | True 122 | 55 40 100 1 10 10 123 | 124 | 125 | 2 126 | 3 127 | 1 128 | 2 129 | 130 | 131 | 132 | 133 | 134 | 135 | True 136 | True 137 | 120 1 1000 5 10 10 138 | 139 | 140 | 2 141 | 3 142 | 143 | 144 | 145 | 146 | 147 | 148 | True 149 | Sleep time: 150 | 151 | 152 | 2 153 | GTK_FILL 154 | 155 | 156 | 157 | 158 | 159 | True 160 | Critical temperature: 161 | 162 | 163 | 2 164 | 1 165 | 2 166 | GTK_FILL 167 | 168 | 169 | 170 | 171 | 172 | True 173 | Safe temperature: 174 | 175 | 176 | 2 177 | 2 178 | 3 179 | GTK_FILL 180 | 181 | 182 | 183 | 184 | 185 | True 186 | True 187 | True 188 | True 189 | Change options 190 | 0 191 | 192 | 193 | 1 194 | 2 195 | 4 196 | 5 197 | 198 | 199 | 200 | 201 | 202 | 1 203 | 204 | 205 | 206 | 207 | 1 208 | 2 209 | 1 210 | 2 211 | 212 | 213 | 214 | 215 | 216 | 217 | True 218 | Automatic control 219 | 220 | 221 | tab 222 | False 223 | 224 | 225 | 226 | 227 | True 228 | 1 229 | 3 230 | 231 | 232 | True 233 | True 234 | True 235 | Change speed 236 | 0 237 | 238 | 239 | 2 240 | 3 241 | GTK_EXPAND 242 | 243 | 244 | 245 | 246 | 247 | True 248 | Choose speed: 249 | 250 | 251 | GTK_EXPAND 252 | 253 | 254 | 255 | 256 | True 257 | auto 258 | 1 259 | 2 260 | 3 261 | 4 262 | 5 263 | 6 264 | 7 265 | full speed 266 | 267 | 268 | 1 269 | 2 270 | 271 | 272 | 273 | 274 | 275 | 1 276 | False 277 | 278 | 279 | 280 | 281 | True 282 | Manual control 283 | 284 | 285 | tab 286 | 1 287 | False 288 | 289 | 290 | 291 | 292 | True 293 | 3 294 | 3 295 | 10 296 | 10 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | True 324 | 325 | 326 | True 327 | logo.png 328 | 329 | 330 | 331 | 332 | True 333 | V0.5 334 | Written by Stanko Tadić 335 | Copyright © 2008 Stanko Tadić 336 | GTK_JUSTIFY_CENTER 337 | 338 | 339 | 10 340 | 1 341 | 342 | 343 | 344 | 345 | True 346 | http://stanko.mfhinc.net/projects.php 347 | 348 | 349 | 2 350 | 351 | 352 | 353 | 354 | 1 355 | 2 356 | 1 357 | 2 358 | 359 | 360 | 361 | 362 | 2 363 | 364 | 365 | 366 | 367 | True 368 | About 369 | 370 | 371 | tab 372 | 2 373 | False 374 | 375 | 376 | 377 | 378 | False 379 | False 380 | 381 | 382 | 383 | 384 | True 385 | 386 | 387 | True 388 | Fans level - auto 389 | GTK_JUSTIFY_CENTER 390 | 391 | 392 | 3 393 | 394 | 395 | 396 | 397 | True 398 | WELCOME! 399 | This is fan control program for IBM/Lenovo ThinkPads 400 | GTK_JUSTIFY_CENTER 401 | 402 | 403 | 5 404 | 1 405 | 406 | 407 | 408 | 409 | True 410 | GTK_BUTTONBOX_SPREAD 411 | 412 | 413 | True 414 | True 415 | True 416 | To tray 417 | 0 418 | 419 | 420 | 421 | 422 | True 423 | True 424 | True 425 | Exit 426 | 0 427 | 428 | 429 | 1 430 | 431 | 432 | 433 | 434 | 3 435 | 2 436 | 437 | 438 | 439 | 440 | True 441 | 2 442 | 443 | 444 | False 445 | 3 446 | 447 | 448 | 449 | 450 | False 451 | False 452 | 1 453 | 454 | 455 | 456 | 457 | 458 | 459 | -------------------------------------------------------------------------------- /data/gtk_gui.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 100 6 | 30 7 | 10 8 | 1 9 | 10 10 | 50 11 | 12 | 13 | 100 14 | 40 15 | 10 16 | 1 17 | 10 18 | 55 19 | 20 | 21 | 1000 22 | 1 23 | 10 24 | 5 25 | 10 26 | 120 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | auto 35 | 36 | 37 | 1 38 | 39 | 40 | 2 41 | 42 | 43 | 3 44 | 45 | 46 | 4 47 | 48 | 49 | 5 50 | 51 | 52 | 6 53 | 54 | 55 | 7 56 | 57 | 58 | full speed 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | auto 69 | 70 | 71 | 1 72 | 73 | 74 | 2 75 | 76 | 77 | 3 78 | 79 | 80 | 4 81 | 82 | 83 | 5 84 | 85 | 86 | 6 87 | 88 | 89 | 7 90 | 91 | 92 | full speed 93 | 94 | 95 | 96 | 97 | ThinkPad Fan Control 98 | False 99 | GTK_WIN_POS_CENTER 100 | icon.png 101 | 102 | 103 | True 104 | 105 | 106 | True 107 | True 108 | False 109 | 110 | 111 | True 112 | 3 113 | 3 114 | 10 115 | 10 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | True 143 | 144 | 145 | True 146 | Current options: 120, 55, 50, full-speed 147 | 148 | 149 | 150 | 151 | True 152 | 5 153 | 3 154 | 10 155 | True 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | True 165 | model1 166 | 167 | 168 | 169 | 0 170 | 171 | 172 | 173 | 174 | 2 175 | 3 176 | 3 177 | 4 178 | 179 | 180 | 181 | 182 | 183 | True 184 | Use this speed when temperature is critical: 185 | 186 | 187 | 2 188 | 3 189 | 4 190 | 191 | 192 | 193 | 194 | True 195 | True 196 | adjustment1 197 | 198 | 199 | 2 200 | 3 201 | 2 202 | 3 203 | 204 | 205 | 206 | 207 | 208 | 209 | True 210 | True 211 | adjustment2 212 | 213 | 214 | 2 215 | 3 216 | 1 217 | 2 218 | 219 | 220 | 221 | 222 | 223 | 224 | True 225 | True 226 | adjustment3 227 | 228 | 229 | 2 230 | 3 231 | 232 | 233 | 234 | 235 | 236 | 237 | True 238 | Sleep time: 239 | 240 | 241 | 2 242 | GTK_FILL 243 | 244 | 245 | 246 | 247 | 248 | True 249 | Critical temperature: 250 | 251 | 252 | 2 253 | 1 254 | 2 255 | GTK_FILL 256 | 257 | 258 | 259 | 260 | 261 | True 262 | Safe temperature: 263 | 264 | 265 | 2 266 | 2 267 | 3 268 | GTK_FILL 269 | 270 | 271 | 272 | 273 | 274 | True 275 | True 276 | True 277 | True 278 | Change options 279 | 280 | 281 | 1 282 | 2 283 | 4 284 | 5 285 | 286 | 287 | 288 | 289 | 290 | 1 291 | 292 | 293 | 294 | 295 | 1 296 | 2 297 | 1 298 | 2 299 | 300 | 301 | 302 | 303 | 304 | 305 | True 306 | Automatic control 307 | 308 | 309 | False 310 | 311 | 312 | 313 | 314 | True 315 | 1 316 | 3 317 | 318 | 319 | True 320 | True 321 | True 322 | Change speed 323 | 324 | 325 | 2 326 | 3 327 | GTK_EXPAND 328 | 329 | 330 | 331 | 332 | 333 | True 334 | Choose speed: 335 | 336 | 337 | GTK_EXPAND 338 | 339 | 340 | 341 | 342 | True 343 | model2 344 | 345 | 346 | 347 | 0 348 | 349 | 350 | 351 | 352 | 1 353 | 2 354 | 355 | 356 | 357 | 358 | 359 | 1 360 | False 361 | 362 | 363 | 364 | 365 | True 366 | Manual control 367 | 368 | 369 | 1 370 | False 371 | 372 | 373 | 374 | 375 | True 376 | 3 377 | 3 378 | 10 379 | 10 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | True 407 | 408 | 409 | True 410 | logo.png 411 | 412 | 413 | 414 | 415 | True 416 | V0.5 417 | Written by Stanko Tadić 418 | Copyright © 2008 Stanko Tadić 419 | GTK_JUSTIFY_CENTER 420 | 421 | 422 | 10 423 | 1 424 | 425 | 426 | 427 | 428 | True 429 | http://stanko.mfhinc.net/projects.php 430 | 431 | 432 | 2 433 | 434 | 435 | 436 | 437 | 1 438 | 2 439 | 1 440 | 2 441 | 442 | 443 | 444 | 445 | 446 | 447 | True 448 | About 449 | 450 | 451 | 2 452 | False 453 | 454 | 455 | 456 | 457 | False 458 | False 459 | 460 | 461 | 462 | 463 | True 464 | 465 | 466 | True 467 | Fans level - auto 468 | GTK_JUSTIFY_CENTER 469 | 470 | 471 | 3 472 | 473 | 474 | 475 | 476 | True 477 | WELCOME! 478 | This is fan control program for IBM/Lenovo ThinkPads 479 | GTK_JUSTIFY_CENTER 480 | 481 | 482 | 5 483 | 1 484 | 485 | 486 | 487 | 488 | True 489 | GTK_BUTTONBOX_SPREAD 490 | 491 | 492 | True 493 | True 494 | True 495 | To tray 496 | 497 | 498 | 499 | 500 | True 501 | True 502 | True 503 | Exit 504 | 505 | 506 | 1 507 | 508 | 509 | 510 | 511 | 3 512 | 2 513 | 514 | 515 | 516 | 517 | True 518 | 2 519 | 520 | 521 | False 522 | 3 523 | 524 | 525 | 526 | 527 | False 528 | False 529 | 1 530 | 531 | 532 | 533 | 534 | 535 | 536 | -------------------------------------------------------------------------------- /tmp-data/ikona.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 28 | 32 | 33 | 40 | 47 | 58 | 59 | 79 | 81 | 82 | 84 | image/svg+xml 85 | 87 | 88 | 89 | 90 | 94 | 102 | 109 | 116 | 119 | 124 | 129 | 133 | 134 | 136 | 141 | 146 | 150 | 151 | 161 | 173 | 185 | 197 | 209 | 221 | 233 | 235 | FAN C NTROL 246 | 249 | 254 | 259 | 263 | 264 | 265 | 268 | 271 | 275 | 279 | 280 | FAN C NTROL 291 | 294 | 299 | 304 | 308 | 309 | 313 | 314 | 324 | 327 | 331 | 335 | 336 | 340 | FAN C NTROL 351 | 355 | 360 | 365 | 369 | 370 | 371 | 377 | 381 | 385 | 386 | 387 | 388 | --------------------------------------------------------------------------------