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
164 165 166 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 164 def close 'wmctrl -c :ACTIVE:' end |
.fullscreen(method:) ⇒ Object
169 170 171 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 169 def fullscreen(method:) "wmctrl -r :ACTIVE: -b #{method},fullscreen" end |
.maximized(method:) ⇒ Object
160 161 162 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 160 def maximized(method:) "wmctrl -r :ACTIVE: -b #{method},maximized_vert,maximized_horz" end |
.move_command(direction:) ⇒ Object
173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/fusuma/plugin/executors/wmctrl_executor.rb', line 173 def move_command(direction:) workspace_num = case direction when 'next' Workspace.next_workspace_num(step: 1) when 'prev' Workspace.next_workspace_num(step: -1) else raise "#{direction} is invalid key" end "wmctrl -r :ACTIVE: -t #{workspace_num} ; wmctrl -s #{workspace_num}" end |