Module: Robobot::Workspaces
- Defined in:
- lib/robobot/workspaces.rb
Class Method Summary collapse
-
.count(num = nil) ⇒ Object
Get or Set current workspace count.
-
.current(workspace = nil) ⇒ Object
Get or Set current workspace.
-
.get_workspace(window) ⇒ Object
Get workspace of window.
-
.move(window, workspace) ⇒ Object
Move window to workspace.
Class Method Details
.count(num = nil) ⇒ Object
Get or Set current workspace count
10 11 12 13 14 15 16 |
# File 'lib/robobot/workspaces.rb', line 10 def self.count num = nil if num.nil? return `xdotool get_num_desktops` else `xdotool set_num_desktops #{num}` end end |
.current(workspace = nil) ⇒ Object
Get or Set current workspace
19 20 21 22 23 24 25 |
# File 'lib/robobot/workspaces.rb', line 19 def self.current workspace = nil if workspace.nil? return `xdotool get_desktop` else `xdotool set_desktop #{workspace}` end end |
.get_workspace(window) ⇒ Object
Get workspace of window
33 34 35 |
# File 'lib/robobot/workspaces.rb', line 33 def self.get_workspace window `xdotool get_desktop_for_window #{window.id}` end |
.move(window, workspace) ⇒ Object
Move window to workspace
28 29 30 |
# File 'lib/robobot/workspaces.rb', line 28 def self.move window, workspace `xdotool set_desktop_for_window #{window.id} #{workspace}` end |