Configuration - Hipuranyhou/macfand GitHub Wiki

Configuration file

Default configuration file can be seen here.

Empty lines and lines whose first non-whitespace character is # are ignored (considered as comments).

All settings from configuration file are higher priority than command line options.


Location

Macfand expects configuration file by default. If you want do disable check for configuration file, use one of no, false and 0 as a value for config option.

Default location of configuration file when using this guide is /etc/macfand.conf. Macfand looks for configuration file at this location. If you want to use custom location for the configuration file, you can use the config option when launching macfand.


Reload

Configuration file can be reloaded at runtime by sending SIGHUP to macfand.

This is especially useful when running macfand in daemon mode. But, changes of daemon setting are ignored when reloading configuration file.


Settings

All settings are optional.

There are 3 types of settings: toggle, integer and string. For all toggle settings you can use values 1/true/yes and 0/false/no.

Settings are set using key: "value" pairs, where "" are optional, but recommended for string settings.

temp_lowtemp_hightime_polldaemonwidgetwidget_file_pathverboselog_typelog_file_path


temp_low

type: integer | default: 63 | condition: >= 1

Used to calculate the size of one unit of fan speed change. This together with temp_high determines how aggressive will fan adjust be.


temp_high

type: integer | default: 66 | condition: > temp_low

Used to calculate the size of one unit of fan speed change. This together with temp_low determines how aggressive will fan adjust be.


time_poll

type: integer | default: 1 | condition: >= 1

Used to set time in seconds of how often should temperature be checked and fans adjusted.


daemon

type: toggle | default: 0 | condition: one of 1/true/yes/0/false/no

Used to run macfand as a daemon. PID of the daemon can be found at /run/macfand.pid.


widget

type: toggle | default: 0 | condition: one of 1/true/yes/0/false/no

Used to enable widget mode. Widget mode writes current fan speeds to a file whose location is determined by widget_file_path. This is useful with i3 setup, because this file can be read by i3status as a current fan speed widget.


widget_file_path

type: string | default: /tmp/macfand.widget | condition: not empty

Used to set location of widget mode fan speed file.


verbose

type: toggle | default: 0 | condition: one of 1/true/yes/0/false/no

Used to enable verbose mode. Verbose mode produces a lot of output useful for debugging. It is not recommended to use verbose mode when using syslog, because some messages are disabled even in verbose mode.


log_type

type: string | default: std | condition: one of std/sys/file

Used to set log destination. std prints to stdout and stderr, sys uses syslog and file writes to log file whose location is determined by log_file_path.


log_file_path

type: string | default: /var/log/macfand.log | condition: not empty when log_type is file

Used to set location of log file.


Please, continue to Usage.