Skip to content

Instantly share code, notes, and snippets.

@anil826
Last active April 1, 2016 06:55
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anil826/cc3675d93e4c00e0a24ba30ca10b0e8e to your computer and use it in GitHub Desktop.
Save anil826/cc3675d93e4c00e0a24ba30ca10b0e8e to your computer and use it in GitHub Desktop.
Simple Script for switching terminal and tabs for UPWORK guys ;)
#!/usr/bin/env python
#To run this script in terminal first to install this dependancy: sudo apt-get install xdotool
#To make it excutable GoTo the file directory and run the command: chmod u+x upwork_tracker_free_time.rb
#Now you just need to run this file using form termial :~ ./upwork_tracker_free_time.rb
#Note: You need to specifiy every on which work space you want to swicth tab currently In code I am only swithching termial
#But you can also switch browser tab or sublim tabs subprocess.call("xdotool key ctrl+Tab" ,shell=True)
#Enjoy :)
import subprocess
import time
subprocess.call("xdotool key ctrl+alt+Up" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Left" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Right" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Left" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Right" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Left" ,shell=True)
time.sleep(60)
subprocess.call("xdotool key ctrl+alt+Right" ,shell=True)
subprocess.call("xdotool key ctrl+alt+Left" ,shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment