Last active
April 15, 2016 19:16
-
-
Save arosini/3467b6f5394e106cef8f to your computer and use it in GitHub Desktop.
Linux startup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################## SETUP ########################################### | |
# Install xdotool | |
if [ $(dpkg-query -W -f='${Status}' xdotool 2>/dev/null | grep -c "ok installed") -eq 0 ]; | |
then | |
sudo apt-get install xdotool; | |
fi | |
# Make sure 'eval "$BASH_POST_RC"' is at the end of the .bashrc | |
if [ "$(tac ~/.bashrc |egrep -m 1 .)" != 'eval "$BASH_POST_RC"' ]; | |
then | |
sed --in-place '/eval "$BASH_POST_RC"/d' ~/.bashrc | |
echo 'eval "$BASH_POST_RC"' >> ~/.bashrc | |
fi | |
############################################################################################# | |
############################################# APPLICATIONS ###################################################### | |
# Google Chrome # | |
# google-chrome & # | |
# # | |
# Firefox # | |
# firefox & # | |
# # | |
# Sublime Text # | |
# subl & # | |
################################################################################################################# | |
############################################## TERMINALS ######################################################## | |
gnome-terminal --working-directory=$HOME --title "Title" --geometry=138x36+155+0 \ | |
--tab -e 'bash -c "export BASH_POST_RC=\"$HOME/script/update_git_repos.sh;\"; exec bash"' \ | |
--tab \ | |
--tab -e 'bash -c "export BASH_POST_RC=\"some command for tab 3;\"; exec bash"' \ | |
--tab -e 'bash -c "export BASH_POST_RC=\"some command for tab 4; xdotool search --name \\\"Title\\\" windowfocus; xdotool key alt+1;\"; exec bash"' & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment