Class: Fusuma::Plugin::Executors::WmctrlExecutor::Window
- Inherits:
-
Object
- Object
- Fusuma::Plugin::Executors::WmctrlExecutor::Window
- Defined in:
- lib/fusuma/plugin/executors/wmctrl_executor.rb
Overview
Manage Window
Class Method Summary collapse
- .close ⇒ Object
- .fullscreen(method:) ⇒ Object
- .maximized(method:) ⇒ Object
- .move_command(direction:) ⇒ Object
Class Method Details
.close ⇒ Object
109 110 111 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 109 def close 'wmctrl -c :ACTIVE:' end |
.fullscreen(method:) ⇒ Object
114 115 116 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 114 def fullscreen(method:) "wmctrl -r :ACTIVE: -b #{method},fullscreen" end |
.maximized(method:) ⇒ Object
105 106 107 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 105 def maximized(method:) "wmctrl -r :ACTIVE: -b #{method},maximized_vert,maximized_horz" end |
.move_command(direction:) ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 118 def move_command(direction:) workspace_num = case direction when 'next' Workspace.current_workspace_num + 1 when 'prev' Workspace.current_workspace_num - 1 else raise "#{direction} is invalid key" end "wmctrl -r :ACTIVE: -t #{workspace_num} ; wmctrl -s #{workspace_num}" end |