Advertisement
Guest User

autoswap

a guest
Dec 15th, 2013
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. 97,99c97,98
  2. < let active_window = system('osascript -e ''tell application "Terminal" to every window whose (name begins with "'.shortname.' " and name ends with "VIM")''')
  3. < let active_window = substitute(active_window, '^window id \d\+\zs\_.*', '', '')
  4. < return (active_window =~ 'window' ? active_window : "")
  5. ---
  6. > let active_window = system('xdotool search -name "' . shortname . '.* - VIM"')
  7. > return active_window
  8. 106c105
  9. < call system('osascript -e ''tell application "Terminal" to set frontmost of '.a:active_window.' to true''')
  10. ---
  11. > call system('xdotool windowfocus ' . a:active_window)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement