class Dumon::XrandrManager
This class manages output devices via xrandr system tool.
Public Class Methods
new()
click to toggle source
Constructor. Checks whether the ‘xrandr’ system tool is there.
# File lib/dumon/omanager.rb, line 166 def initialize paths = ['/usr/bin/xrandr', 'xrandr'] paths.each do |path| begin `#{path}` @stool = path Dumon.logger.info "System tool found: #{path}" break rescue => e Dumon.logger.warn "unknown tool: #{path}, message: #{e.message}" end end raise "no system tool found, checked for #{paths}" if self.stool.nil? # just to check if it works self.read end