diff options
| author | jason | 2017-04-20 16:36:34 -0600 |
|---|---|---|
| committer | jason | 2017-04-21 11:39:13 -0600 |
| commit | cfce7547cd36c8ab7f53fb620e0297e722761d8d (patch) | |
| tree | efedc1d027779445575e55af2805386702e50513 | |
| parent | f176cf30293cf2793f83026a3587752b69b128a9 (diff) | |
| download | dotfiles-cfce7547cd36c8ab7f53fb620e0297e722761d8d.tar.gz dotfiles-cfce7547cd36c8ab7f53fb620e0297e722761d8d.zip | |
Update move in scripts, add bin scripts
| -rwxr-xr-x | common_move_in.sh | 42 | ||||
| -rwxr-xr-x | move_in.sh | 18 | ||||
| -rwxr-xr-x | scripts/bin/fix_screens_at_work.sh | 11 | ||||
| -rwxr-xr-x | scripts/bin/notifyvolume | 3 | ||||
| -rwxr-xr-x | scripts/bin/run-once | 7 | ||||
| -rw-r--r-- | ubuntu_move_in.sh | 50 | ||||
| -rwxr-xr-x | vim/.vim/colors/synic.vim (renamed from vim/colors/synic.vim) | 0 | ||||
| -rwxr-xr-x | vim/.vimrc (renamed from vim/vimrc) | 0 |
8 files changed, 101 insertions, 30 deletions
diff --git a/common_move_in.sh b/common_move_in.sh index 1a441b6..ee431ee 100755 --- a/common_move_in.sh +++ b/common_move_in.sh | |||
| @@ -1,25 +1,24 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | cd $HOME/dotfiles/ | ||
| 3 | |||
| 4 | if ! [ -d "$HOME/.git" ]; then | ||
| 5 | echo "Linking git settings..." | ||
| 6 | stow git | ||
| 7 | fi | ||
| 2 | 8 | ||
| 3 | if ! [ -d "$HOME/.oh-my-zsh" ]; then | 9 | if ! [ -d "$HOME/.oh-my-zsh" ]; then |
| 4 | echo "Installing Oh My ZSH" | 10 | echo "Installing Oh My ZSH" |
| 5 | curl -L http://install.ohmyz.sh | sh | 11 | curl --location http://install.ohmyz.sh | sh |
| 6 | 12 | ||
| 7 | # Remove the default config in favor of our own later on in this script | 13 | # Remove the default config in favor of our own later on in this script |
| 8 | rm $HOME/.zshrc | 14 | rm $HOME/.zshrc |
| 15 | chsh -s `which zsh` | ||
| 9 | fi | 16 | fi |
| 10 | 17 | ||
| 11 | if ! [ -d "$HOME/Code" ]; then | 18 | if ! [ -d "$HOME/Code" ]; then |
| 12 | mkdir $HOME/Code | 19 | mkdir $HOME/Code |
| 13 | fi | 20 | fi |
| 14 | 21 | ||
| 15 | if ! [ -d "$HOME/dotfiles" ]; then | ||
| 16 | git clone git@beehive.io:jason/dotfiles.git | ||
| 17 | cd dotfiles | ||
| 18 | else | ||
| 19 | cd dotfiles | ||
| 20 | git pull | ||
| 21 | fi | ||
| 22 | |||
| 23 | if ! [ -e "$HOME/.vimrc" ]; then | 22 | if ! [ -e "$HOME/.vimrc" ]; then |
| 24 | echo "Linking vim settings..." | 23 | echo "Linking vim settings..." |
| 25 | stow vim | 24 | stow vim |
| @@ -30,26 +29,15 @@ if ! [ -e "$HOME/.zshrc" ]; then | |||
| 30 | stow zsh | 29 | stow zsh |
| 31 | fi | 30 | fi |
| 32 | 31 | ||
| 33 | # OS X Only setup | 32 | if ! [ -e "$HOME/bin" ]; then |
| 34 | if [[ $OSTYPE == darwin* ]]; then | ||
| 35 | if ! [ -e "$HOME/.amethyst" ]; then | ||
| 36 | echo "Linking amethyst config..." | ||
| 37 | stow amethyst | ||
| 38 | fi | ||
| 39 | |||
| 40 | if [ -e "/usr/bin/vagrant" ] && [ -e "$CWD/../vagrant-vmware-license.lic" ]; then | ||
| 41 | echo "Installing Vagrant support for VMWare Fusion..." | ||
| 42 | vagrant plugin install vagrant-vmware-fusion | ||
| 43 | vagrant plugin license vagrant-vmware-fusion "$CWD/../vagrant-vmware-license.lic" | ||
| 44 | fi | ||
| 45 | fi | ||
| 46 | |||
| 47 | CWD=`pwd` | ||
| 48 | |||
| 49 | if ! [ -e "$HOME/bin"]; then | ||
| 50 | mkdir $HOME/bin/ | 33 | mkdir $HOME/bin/ |
| 51 | cd $HOME/bin/ | 34 | cd $HOME/bin/ |
| 52 | curl -O http://orgmode.org/worg/code/awk/ical2org.awk | 35 | curl -O http://orgmode.org/worg/code/awk/ical2org.awk |
| 53 | fi | 36 | fi |
| 54 | 37 | ||
| 55 | echo "Done." | 38 | if ! [ -e "$HOME/.ssh" ]; then |
| 39 | mkdir $HOME/.ssh/ | ||
| 40 | fi | ||
| 41 | if ! [ -e "$HOME/.ssh/id_rsa" ]; then | ||
| 42 | ssh-keygen -t rsa -b 4096 | ||
| 43 | fi | ||
| @@ -1,15 +1,33 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | CWD=`pwd` | ||
| 2 | 3 | ||
| 4 | # letsencrypt CA certs aren't installed yet so we pass --insecure | ||
| 3 | CURL='curl --silent --insecure --location' | 5 | CURL='curl --silent --insecure --location' |
| 4 | 6 | ||
| 5 | if [[ $OSTYPE == darwin* ]]; then | 7 | if [[ $OSTYPE == darwin* ]]; then |
| 6 | echo "OS X detected. Executing os-x_move_in.sh" | 8 | echo "OS X detected. Executing os-x_move_in.sh" |
| 7 | $CURL https://beehive.io/jason/dotfiles/raw/master/os-x_move_in.sh | 9 | $CURL https://beehive.io/jason/dotfiles/raw/master/os-x_move_in.sh |
| 10 | |||
| 11 | if ! [ -e "$HOME/.amethyst" ]; then | ||
| 12 | echo "Linking amethyst config..." | ||
| 13 | stow amethyst | ||
| 14 | fi | ||
| 15 | |||
| 16 | if [ -e "/usr/bin/vagrant" ] && [ -e "$CWD/../vagrant-vmware-license.lic" ]; then | ||
| 17 | echo "Installing Vagrant support for VMWare Fusion..." | ||
| 18 | vagrant plugin install vagrant-vmware-fusion | ||
| 19 | vagrant plugin license vagrant-vmware-fusion "$CWD/../vagrant-vmware-license.lic" | ||
| 20 | fi | ||
| 21 | |||
| 8 | fi | 22 | fi |
| 9 | 23 | ||
| 10 | if [[ $OSTYPE == linux-gnu ]]; then | 24 | if [[ $OSTYPE == linux-gnu ]]; then |
| 11 | if [[ `lsb_release -i -s` == Ubuntu ]]; then | 25 | if [[ `lsb_release -i -s` == Ubuntu ]]; then |
| 12 | echo "Ubuntu detected. Executing ubuntu_move_in.sh" | 26 | echo "Ubuntu detected. Executing ubuntu_move_in.sh" |
| 27 | sudo apt-get install -y curl | ||
| 13 | $CURL https://beehive.io/jason/dotfiles/raw/master/ubuntu_move_in.sh | sh | 28 | $CURL https://beehive.io/jason/dotfiles/raw/master/ubuntu_move_in.sh | sh |
| 14 | fi | 29 | fi |
| 15 | fi | 30 | fi |
| 31 | |||
| 32 | cd $CWD | ||
| 33 | echo "Done." | ||
diff --git a/scripts/bin/fix_screens_at_work.sh b/scripts/bin/fix_screens_at_work.sh new file mode 100755 index 0000000..5fa27a7 --- /dev/null +++ b/scripts/bin/fix_screens_at_work.sh | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | #xrandr --setprovideroutputsource 1 0 | ||
| 4 | #xrandr --output DP-2 --mode 1920x1200 | ||
| 5 | xrandr --output DP-4 --right-of DP-2 --auto --primary --mode 2560x1440 | ||
| 6 | xrandr --output DVI-I-1-1 --below DP-4 --auto | ||
| 7 | |||
| 8 | # For some reason, occasionally this needs to be executed twice | ||
| 9 | xmodmap ~/.Xmodmap-pckeyboard_fix | ||
| 10 | sleep 1 | ||
| 11 | xmodmap ~/.Xmodmap-pckeyboard_fix | ||
diff --git a/scripts/bin/notifyvolume b/scripts/bin/notifyvolume new file mode 100755 index 0000000..0da7337 --- /dev/null +++ b/scripts/bin/notifyvolume | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | exec /usr/bin/notify-send -t 1000 -i volume-knob "Volume $(amixer -q | grep -A5 Master | grep '%' | cut -d'[' -f2 | cut -d']' -f1)" | ||
diff --git a/scripts/bin/run-once b/scripts/bin/run-once new file mode 100755 index 0000000..56f3709 --- /dev/null +++ b/scripts/bin/run-once | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #! /bin/bash | ||
| 2 | |||
| 3 | # Run program unless it's already running. | ||
| 4 | |||
| 5 | if [ -z "`ps -Af | grep -o -w ".*$1" | grep -v grep | grep -v run-once`" ]; then | ||
| 6 | $@ | ||
| 7 | fi \ No newline at end of file | ||
diff --git a/ubuntu_move_in.sh b/ubuntu_move_in.sh index 3c18ed9..7dbfb0a 100644 --- a/ubuntu_move_in.sh +++ b/ubuntu_move_in.sh | |||
| @@ -2,16 +2,60 @@ echo "Updaing and dist-upgrading" | |||
| 2 | sudo apt-get update && sudo apt-get -y dist-upgrade | 2 | sudo apt-get update && sudo apt-get -y dist-upgrade |
| 3 | 3 | ||
| 4 | echo "Installing some utilities" | 4 | echo "Installing some utilities" |
| 5 | sudo apt-get install -y git stow | 5 | sudo apt-get install -y build-essential git stow zsh \ |
| 6 | rxvt-unicode-256color | ||
| 6 | 7 | ||
| 7 | cd $HOME | 8 | cd $HOME |
| 8 | 9 | ||
| 9 | if ! [ -d "$HOME/dotfiles" ]; then | 10 | if ! [ -d "$HOME/dotfiles" ]; then |
| 10 | echo "Dotfiles not found... cloning" | 11 | echo "Dotfiles not found... cloning" |
| 11 | git clone git@beehive.io:jason/dotfiles.git | 12 | git -c http.sslVerify=false clone https://beehive.io/jason/dotfiles.git |
| 12 | cd dotfiles | 13 | cd dotfiles |
| 13 | else | 14 | else |
| 14 | echo "Dotfiles found... updating" | 15 | echo "Dotfiles found... updating" |
| 15 | cd dotfiles | 16 | cd dotfiles |
| 16 | git pull | 17 | git -c http.sslVerify=false pull |
| 17 | fi | 18 | fi |
| 19 | |||
| 20 | ./common_move_in.sh | ||
| 21 | |||
| 22 | cd $HOME/dotfiles/ | ||
| 23 | echo "Linking xorg configs..." | ||
| 24 | stow xorg | ||
| 25 | |||
| 26 | # emacs | ||
| 27 | if ! [ -x /usr/local/bin/emacs ]; then | ||
| 28 | echo "Installing Emacs from source..." | ||
| 29 | if ! [ -d "$HOME/Code/emacs" ]; then | ||
| 30 | cd $HOME/Code | ||
| 31 | git clone git://git.sv.gnu.org/emacs.git | ||
| 32 | fi | ||
| 33 | |||
| 34 | sudo apt-get -y install autoconf automake texinfo \ | ||
| 35 | xserver-xorg-dev libgtk-3-dev libwebkitgtk-3.0-dev \ | ||
| 36 | libjpeg-dev libgif-dev libxpm-dev libtiff5-dev \ | ||
| 37 | libncurses5-dev libgnutls28-dev libmagick++-dev libotf-dev \ | ||
| 38 | libselinux1-dev libgconf2-dev libacl1-dev libgpm-dev \ | ||
| 39 | libm17n-dev | ||
| 40 | |||
| 41 | cd $HOME/Code/emacs/ && \ | ||
| 42 | git checkout emacs-25.1 &&\ | ||
| 43 | ./autogen.sh && \ | ||
| 44 | make clean &&\ | ||
| 45 | ./configure CFLAGS=-no-pie --with-xwidgets --with-sound --with-x-toolkit=gtk3 --with-gnutls && \ | ||
| 46 | make && \ | ||
| 47 | sudo make install | ||
| 48 | |||
| 49 | |||
| 50 | fi | ||
| 51 | |||
| 52 | # i3 | ||
| 53 | if ! [ `which i3` ]; then | ||
| 54 | echo "Installing i3..." | ||
| 55 | sudo apt-get install -y i3 | ||
| 56 | cd $HOME/dotfiles/ | ||
| 57 | stow i3 | ||
| 58 | fi | ||
| 59 | |||
| 60 | # other utils | ||
| 61 | sudo apt-get install -y clipit feh xbindkeys fetchmail qasmixer | ||
diff --git a/vim/colors/synic.vim b/vim/.vim/colors/synic.vim index 719a529..719a529 100755 --- a/vim/colors/synic.vim +++ b/vim/.vim/colors/synic.vim | |||