Skip to content

Commit

Permalink
Scripts no longer a submodule, it was overkill
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Murphy committed Feb 25, 2018
1 parent 966b248 commit 10e023c
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/screen_layout_office.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output VGA-1 --primary --mode 1680x1050 --pos 0x0 --rotate normal --output DVI-D-1 --mode 1280x1024 --pos 1680x26 --rotate normal --output HDMI-1 --off
74 changes: 74 additions & 0 deletions scripts/stuckonamac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash

# ███████╗████████╗██╗ ██╗ ██████╗██╗ ██╗ ██████╗ ███╗ ██╗ █████╗ ███╗ ███╗ █████╗ ██████╗
# ██╔════╝╚══██╔══╝██║ ██║██╔════╝██║ ██╔╝ ██╔═══██╗████╗ ██║ ██╔══██╗ ████╗ ████║██╔══██╗██╔════╝
# ███████╗ ██║ ██║ ██║██║ █████╔╝ ██║ ██║██╔██╗ ██║ ███████║ ██╔████╔██║███████║██║
# ╚════██║ ██║ ██║ ██║██║ ██╔═██╗ ██║ ██║██║╚██╗██║ ██╔══██║ ██║╚██╔╝██║██╔══██║██║
# ███████║ ██║ ╚██████╔╝╚██████╗██║ ██╗ ╚██████╔╝██║ ╚████║ ██║ ██║ ██║ ╚═╝ ██║██║ ██║╚██████╗▄█╗
# ╚══════╝ ╚═╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝
#
# ██████╗ ██╗ ███████╗ █████╗ ███████╗███████╗ ███████╗███████╗███╗ ██╗██████╗ ██╗ ██╗███████╗██╗ ██████╗
# ██╔══██╗██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔════╝██╔════╝████╗ ██║██╔══██╗ ██║ ██║██╔════╝██║ ██╔══██╗
# ██████╔╝██║ █████╗ ███████║███████╗█████╗ ███████╗█████╗ ██╔██╗ ██║██║ ██║ ███████║█████╗ ██║ ██████╔╝
# ██╔═══╝ ██║ ██╔══╝ ██╔══██║╚════██║██╔══╝ ╚════██║██╔══╝ ██║╚██╗██║██║ ██║ ██╔══██║██╔══╝ ██║ ██╔═══╝
# ██║ ███████╗███████╗██║ ██║███████║███████╗ ███████║███████╗██║ ╚████║██████╔╝ ██║ ██║███████╗███████╗██║
# ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚══════╝╚══════╝╚═╝ ╚═══╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝
#
# Author: ranguli
# GitHub: https://www.github.com/ranguli/scripts
# 2017

# If you're like me and run Linux on a MacBook, on the odd occasion you'll find yourself back in OS X trying
# to do something just wishing you were back on the dark side. This script is designed to make your time on
# a different OS as easy as possible

# Install Homebrew, the missing package manager for OS X

vundle="~/.vim/bundle/Vundle.vim"

declare -a pkg=(
"stow"
"git"
"wget"
"zsh"
"zsh-completions"
"vim"
)

for i in "${arr[@]}"
do
echo "$i"
done



if ! type "brew" > /dev/null; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update && brew upgrade
fi

# Install some basics through brew (most of which are newer versions of their natively packaged macOS counterparts.
if ! brew ls --versions "${arr[@]}" > /dev/null; then
brew install "${arr[@]}"
fi


#Install Vundle
if [ -e $vundle ]
then
echo "Vundle already installed."
else
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi

# Install ohmyzsh, a community framework for managing zsh configurations
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# Clone the dotfiles repo, stow vim and zsh, then remove the repo.
git clone https://github.com/ranguli/dotfiles/vim
cd ./dotfiles && stow vim && stow zsh && rm -rf ../dotfiles/

# Housekeeping, such as updating python, etc.
pip install --upgrade pip setuptools

4 changes: 4 additions & 0 deletions scripts/urxvt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git clone https://github.com/cpjreynolds/urxvt
cd ./urxvt
./configure --enable-everything
make && sudo make install
38 changes: 38 additions & 0 deletions scripts/vim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
sudo apt-get remove vim vim-runtime vim-gtk vim-gtk3

sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git checkinstall



#Obtain the latest version of Vim's source and then compile it to our own specs
cd ~
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--enable-python3interp=yes \
--with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/ \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk3\
--enable-cscope \
--prefix=/usr/local
make -j4 VIMRUNTIMEDIR=/usr/local/share/vim/vim80
sudo checkinstall
sudo make install

sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1
sudo update-alternatives --set editor /usr/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1
sudo update-alternatives --set vi /usr/bin/vim

#Install Vundle before first run
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

#Launch Vundle plugin install on first run
vim +PluginInstall +qall
6 changes: 6 additions & 0 deletions scripts/xcape.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Thanks to this brilliant article, we can map Caps Lock to generate Escape when pressed on it's own, but if it's held in a combination with another key, it's Control.

# http://tiborsimko.org/capslock-escape-control.html

setxkbmap -option ctrl:nocaps
xcape -e 'Control_L=Escape'
3 changes: 3 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ rm install-tl-unx.tar.gz
sudo ./install-tl-20180224/install-tl
rm -r ./install-tl-20180224/

# Install tmux plugin manager - not that we really use it anymore
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

# Danger zone:
sudo su root
echo "blacklist pcspkr" > /etc/modeprobe.d/nobeep.conf # Disable PC speaker
Expand Down

0 comments on commit 10e023c

Please sign in to comment.