aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Common/bashrc (renamed from bashrc)0
-rw-r--r--Common/vim/vimrc (renamed from linux/vim/vimrc)0
-rwxr-xr-xbin/install_mac.sh24
-rwxr-xr-xinstall.sh18
-rw-r--r--install/install_arch.sh (renamed from bin/install_arch.sh)0
-rwxr-xr-xinstall/install_mac.sh82
-rw-r--r--install/install_win.bat (renamed from bin/install_win.bat)0
-rw-r--r--mac/Hyperterm/hyper.js10
-rw-r--r--mac/zshrc10
9 files changed, 117 insertions, 27 deletions
diff --git a/bashrc b/Common/bashrc
index 36357ee..36357ee 100644
--- a/bashrc
+++ b/Common/bashrc
diff --git a/linux/vim/vimrc b/Common/vim/vimrc
index 84216c1..84216c1 100644
--- a/linux/vim/vimrc
+++ b/Common/vim/vimrc
diff --git a/bin/install_mac.sh b/bin/install_mac.sh
deleted file mode 100755
index 69e84d0..0000000
--- a/bin/install_mac.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-echo "> Install Homebrew"
-/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
-echo "> Install \"Highlight, atool, w3m, mediainfo\""
-bew install highlight atool w3m mediainfo
-
-echo "> Install Oh-My-Zsh"
-sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
-echo "> Install zsh-autosuggestions"
-git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
-echo "> Install powerlevel9k"
-brew tap sambadevi/powerlevel9k
-
-echo "> Install our dotfiles"
-ln -i mac/zshrc ~/.zshrc
-ln -i mac/tmux.conf ~/.tmux.conf
-ln -i mac/Hyperterm/hyper.js ~/.hyper.js
-ln -i mac/Hyperterm/local/ ~/.hyper_plugins/local/
-
-echo "\nPlease install the font Roboto mono nerd, and enable it in your terminal."
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..90df61b
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+echo "Install the dependencies and symlink the dotfiles"
+tput setaf 4
+echo "Install on wich system? Enter either \"mac\", \"arch\":"
+tput setaf 3
+printf "> "
+read platform
+printf "\n"
+tput sgr0
+
+if [ $platform == "mac" ]; then
+ ./install/install_mac.sh
+fi
+
+if [ $platform == "arch" ]; then
+ ./install/install_arch.sh
+fi
diff --git a/bin/install_arch.sh b/install/install_arch.sh
index 5306ba2..5306ba2 100644
--- a/bin/install_arch.sh
+++ b/install/install_arch.sh
diff --git a/install/install_mac.sh b/install/install_mac.sh
new file mode 100755
index 0000000..04666cc
--- /dev/null
+++ b/install/install_mac.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+function dlgYN() {
+ tput sc
+ tput setaf 4
+ printf "$1 (y/n)? "
+ while :
+ do
+ read -n 1 -p "" YNQuestionAnswer
+ if [[ $YNQuestionAnswer == "y" ]]; then
+ tput rc; tput el
+ printf "$1?: \e[0;32mYes\e[0m\n"
+ tput sc
+ eval $2=1 # Set parameter 2 of input to the return value
+ break
+ elif [[ $YNQuestionAnswer == "n" ]]; then
+ tput rc; tput el
+ printf "$1?: \e[0;31mNo\e[0m\n"
+ eval $2=0 # Set parameter 2 of input to the return value
+ break
+ fi
+ done
+}
+
+dlgYN "> Install Homebrew" res
+if [ $res -eq 1 ]; then
+ tput sc
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ tput rc; tput ed
+fi
+
+dlgYN "> Install \"Highlight, atool, w3m, mediainfo\"" res
+if [ $res -eq 1 ]; then
+ tput sc
+ bew install highlight atool w3m mediainfo
+ tput rc; tput ed
+fi
+
+dlgYN "> Install Oh-My-Zsh" res
+if [ $res -eq 1 ]; then
+ tput sc
+ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
+ tput rc; tput ed
+fi
+
+dlgYN "> Install zsh-autosuggestions" res
+if [ $res -eq 1 ]; then
+ tput sc
+ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
+ tput rc; tput ed
+fi
+
+dlgYN "> Install Powerline" res
+if [ $res -eq 1 ]; then
+ tput sc
+ pip3 install powerline-status
+ tput rc; tput ed
+fi
+
+dlgYN "> Install powerlevel9k" res
+if [ $res -eq 1 ]; then
+ tput sc
+ brew tap sambadevi/powerlevel9k
+ brew install powerlevel9k
+ tput rc; tput ed
+fi
+
+dlgYN "> Create symlinks" res
+if [ $res -eq 1 ]; then
+ CWD=$(PWD)
+ tput sc
+ ln -isf "$CWD/mac/zshrc" ~/.zshrc
+ ln -isf "$CWD/mac/tmux.conf" ~/.tmux.conf
+ ln -isf "$CWD/mac/Hyperterm/hyper.js" ~/.hyper.js
+ ln -isf "$CWD/mac/Hyperterm/local" ~/.hyper_plugins/local
+ ln -isf "$CWD/Common/vim/vimrc" ~/.vimrc
+ tput rc; tput ed
+fi
+
+tput setaf 3
+echo "\nPlease install the font Roboto mono nerd, and enable it in your terminal."
+tput sgr0
diff --git a/bin/install_win.bat b/install/install_win.bat
index 44b529b..44b529b 100644
--- a/bin/install_win.bat
+++ b/install/install_win.bat
diff --git a/mac/Hyperterm/hyper.js b/mac/Hyperterm/hyper.js
index c802677..664287d 100644
--- a/mac/Hyperterm/hyper.js
+++ b/mac/Hyperterm/hyper.js
@@ -149,7 +149,15 @@ module.exports = {
// `hyperpower`
// `@company/project`
// `project#1.0.1`
- plugins: ["hyper-startup", "hyper-dark-scrollbar", "hyperlinks", "gitrocket", "space-pull", "hyper-blink" ],
+ plugins: [
+ "hyper-startup",
+ "hyperminimal",
+ "hyper-dark-scrollbar",
+ "hyperlinks",
+ "gitrocket",
+ "space-pull",
+ "hyper-blink"
+ ],
// in development, you can create a directory under
// `~/.hyper_plugins/local/` and include it here
diff --git a/mac/zshrc b/mac/zshrc
index d6bde23..2d932d9 100644
--- a/mac/zshrc
+++ b/mac/zshrc
@@ -1,7 +1,12 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
-export ZSH=/Users/jakobstendahl/.oh-my-zsh
+if [ ! -f /usr/local/etc/zsh_env_setup ]; then
+ echo "export ZSH=$HOME/.oh-my-zsh" > /usr/local/etc/zsh_env_setup
+ echo "DEFAULT_USER=$USER" >> /usr/local/etc/zsh_env_setup
+fi
+
+source /usr/local/etc/zsh_env_setup
source /usr/local/opt/powerlevel9k/powerlevel9k.zsh-theme
@@ -19,7 +24,6 @@ source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
-DEFAULT_USER="jakobstendahl"
# POWERLINE9K
POWERLEVEL9K_MODE="nerdfont-complete"
@@ -60,5 +64,7 @@ export LANG=en_US.UTF-8
path+=("/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands")
export PATH
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/local/bin:/opt/local/sbin
+
+
alias lamp='/Users/jakobstendahl/.lamp.sh'
alias uio-linux='ssh -YC jakobste@login.ifi.uio.no'