Skip to content

Instantly share code, notes, and snippets.

@LorincJuraj
Created November 14, 2017 18:12
Show Gist options
  • Save LorincJuraj/6cc32386d3f8c1fdec67e4f117e30545 to your computer and use it in GitHub Desktop.
Save LorincJuraj/6cc32386d3f8c1fdec67e4f117e30545 to your computer and use it in GitHub Desktop.
Script I am running when switching to new project in Sublime Text 3
#!/bin/bash
# Requirements: Ubuntu, gitk, wmctrl, Google Chrome
# My usual project structure is:
#
# project-parent-folder/
# |-- designs/
# |-- wp/
# |-- .project/
#
# designs/ - that's where I keep all the PSDs provided by designer
# wp/ - this is where my WordPress lives :-)
# .project/ - this is hidden folder with some project specific files lik e ToDo.dm and this file (start_of_day.sh)
# opening terminal in WordPress folder
gnome-terminal --working-directory='/home/lampp/htdocs/project-parent-folder/wp/' &
# opening new Nautilus (Ubuntu's default file manager) in project folder
cd '../'
nautilus . &
# opening gitk
cd 'wp/'
gitk &
# focusing on Sublime Text window
sleep 1
wmctrl -a "Sublime Text"
# opening new window in Chrome with 2 most important project URLs
google-chrome --new-window "http://lh/project-parent-folder/wp/" "http://lh/project-parent-folder/wp/wp-admin/edit.php?post_type=page"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment