Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ If you are running an older version of OS X and the install fails you might want
--no-scale Display just the stat value
--value-only No graph, label, or scale
-f, --fahrenheit Display temperatures in fahrenheit
-c, --celcius Display temperatures in celcius (default)

for more help see: https://github.com/Chris911/iStats
```
Expand All @@ -65,6 +66,15 @@ iStats now supports extra sensors for advanced users. Here's how to enable that
2. Enable extra sensors by running `istats enable key` or `istats enable all`
3. Run `istats` or `istats extra` to see the extra sensors information.

The temperature scale can be configured persistently by adding a section to `~/.iStats/sensors.conf` like this:

```
[app_config]
temperature_scale = fahrenheit
```

The valid values are 'fahrenheit' and 'celcius' (which is the default) and can be overridden using the corresponding command line options.

## Contributing

1. Fork it
Expand Down
7 changes: 6 additions & 1 deletion lib/iStats/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def parse_options
:display_graphs => true,
:display_labels => true,
:display_scale => true,
:temperature_scale => 'celcius',
:temperature_scale => ($config.params.dig('app_config', 'temperature_scale') || 'celcius').downcase
}

opt_parser = OptionParser.new do |opts|
Expand Down Expand Up @@ -123,6 +123,10 @@ def parse_options
opts.on('-f', '--fahrenheit', 'Display temperatures in fahrenheit') do
options[:temperature_scale] = 'fahrenheit'
end

opts.on('-c', '--celcius', 'Display temperatures in celcius (default)') do
options[:temperature_scale] = 'celcius'
end
end

begin
Expand Down Expand Up @@ -175,6 +179,7 @@ def help(error = nil)
--no-scale Display just the stat value
--value-only No graph, label, or scale
-f, --fahrenheit Display temperatures in fahrenheit
-c, --celcius Display temperatures in celcius (default)

for more help see: https://github.com/Chris911/iStats
".gsub(/^ {8}/, '') # strip the first eight spaces of every line
Expand Down
2 changes: 1 addition & 1 deletion lib/iStats/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module IStats
VERSION = '1.6.1'
VERSION = '1.6.2'
end