Module: OnlyofficeFileHelper::XdotoolHelper
- Included in:
- LinuxHelper
- Defined in:
- lib/onlyoffice_file_helper/linux_helper/xdotool_helper.rb
Overview
Class for working with Xdotool Performs actions with x-system
Instance Method Summary collapse
-
#find_window_id(window_title) ⇒ Fixnum
Get window id by it’s title.
-
#send_button_to_window(window_title, button) ⇒ Nothing
Send button to specific window.
Instance Method Details
#find_window_id(window_title) ⇒ Fixnum
Get window id by it’s title
9 10 11 |
# File 'lib/onlyoffice_file_helper/linux_helper/xdotool_helper.rb', line 9 def find_window_id(window_title) `xdotool search '#{window_title}'`.to_i end |
#send_button_to_window(window_title, button) ⇒ Nothing
Send button to specific window
17 18 19 20 |
# File 'lib/onlyoffice_file_helper/linux_helper/xdotool_helper.rb', line 17 def (window_title, ) window_id = find_window_id(window_title) `xdotool key --window #{window_id} #{}` end |