Skip to content

christopheraue/ruby-xlib-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

154 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X11 bindings for ruby

Lightweight object wrappers around a subset of Xlib to handle displays, screens and windows. Uses Xrandr to deal with multi-monitor setups.

Installation

gem install xlib-objects

Basic usage

require 'xlib-objects'

display = XlibObj::Display.new(':0')

main_screen = display.screens.first

root_win = main_screen.root_window
root_win.width  # => e.g. 3600
root_win.height # => e.g. 1080

outputs = main_screen.crtcs.map(&:outputs).flatten
outputs.first.name # => e.g. 'DVI-I-1'
outputs.last.name  # => e.g. 'DVI-I-2'

About

X11 bindings for ruby

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages