Class: Tiling::Workspace
- Inherits:
-
Object
- Object
- Tiling::Workspace
- Defined in:
- lib/tiling/workspace.rb
Overview
Public: Current workspace (virtual desktop) state.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize ⇒ Workspace
constructor
A new instance of Workspace.
- #width ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Constructor Details
#initialize ⇒ Workspace
Returns a new instance of Workspace.
9 10 11 12 13 14 15 16 17 |
# File 'lib/tiling/workspace.rb', line 9 def initialize @desktops = WMCtrl.instance.desktops @desktops.each do |desktop| if desktop[:current] @id = desktop[:id] break end end end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/tiling/workspace.rb', line 7 def id @id end |
Instance Method Details
#height ⇒ Object
31 32 33 |
# File 'lib/tiling/workspace.rb', line 31 def height @desktops[@id][:workarea][3] end |
#width ⇒ Object
27 28 29 |
# File 'lib/tiling/workspace.rb', line 27 def width @desktops[@id][:workarea][2] end |
#x ⇒ Object
19 20 21 |
# File 'lib/tiling/workspace.rb', line 19 def x @desktops[@id][:workarea][0] end |
#y ⇒ Object
23 24 25 |
# File 'lib/tiling/workspace.rb', line 23 def y @desktops[@id][:workarea][1] end |