module Gibil::Notification

Uses system notification to notify of current temperature. Currently works/tested only on Linux

Public Class Methods

notify() click to toggle source
# File lib/gibil.rb, line 18
def self.notify
  temp = Sensor.temperature

  n = Libnotify.new(
    summary: 'Temperature',
    body: "Your computer's temperature is now #{temp} °C",
    timeout: 1.5,
    append: true
  )

  n.urgency = temp > 80 ? :critical : :normal

  n.show!
end