Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
tails
Commits
1e9e5236
Commit
1e9e5236
authored
Sep 18, 2015
by
kytv
Browse files
Add helper function to switch to a different virtual desktop
parent
bb560d66
Changes
1
Hide whitespace changes
Inline
Side-by-side
features/support/helpers/vm_helper.rb
View file @
1e9e5236
...
...
@@ -408,6 +408,14 @@ EOF
return
execute
(
"pidof -x -o '%PPID' "
+
process
).
stdout
.
chomp
.
split
end
def
select_virtual_desktop
(
desktop_number
,
user
=
LIVE_USER
)
assert
(
desktop_number
>=
0
&&
desktop_number
<=
3
,
"Only values between 0 and 3 are valid virtual desktop numbers"
)
execute_successfully
(
"xdotool set_desktop '
#{
desktop_number
}
'"
,
user
)
end
def
focus_window
(
window_title
,
user
=
LIVE_USER
)
execute_successfully
(
"xdotool search --name '
#{
window_title
}
' windowactivate --sync"
,
user
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment