Commit 1e9e5236 authored by kytv's avatar kytv
Browse files

Add helper function to switch to a different virtual desktop

parent bb560d66
......@@ -408,6 +408,14 @@ EOF
return execute("pidof -x -o '%PPID' " + process).stdout.chomp.split
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")
"xdotool set_desktop '#{desktop_number}'", user
def focus_window(window_title, user = LIVE_USER)
"xdotool search --name '#{window_title}' windowactivate --sync", user
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment