Skip to content

Instantly share code, notes, and snippets.

@deg0nz
Last active January 20, 2018 23:53
Show Gist options
  • Save deg0nz/df81527fa230e0ad4990e104cbaa6911 to your computer and use it in GitHub Desktop.
Save deg0nz/df81527fa230e0ad4990e104cbaa6911 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# This script installs zsh, oh-my-zsh and the spaceship zsh-theme on a fedora machine
#
# Author: bgericke, 2017
# Install ssh-server,tmux, mc, htop, tree
sudo apt-get install openssh-server tmux mc htop tree
# Install zsh, zsh-syntax-highlighting
sudo apt-get install zsh zsh-syntax-highlighting
# Install git and curl if not installed
sudo apt-get install git curl
# Get oh-my-zsh and install it
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Get spaceship theme and install it
curl -o - https://raw.githubusercontent.com/denysdovhan/spaceship-zsh-theme/master/install.zsh | zsh
# Add basic spaceship config to the end of .zshrc
cat >> $HOME/.zshrc <<EOL
SPACESHIP_PROMPT_ORDER=(
time # Time stampts section
user # Username section
host # Hostname section
dir # Current directory section
git # Git section (git_branch + git_status)
hg # Mercurial section (hg_branch + hg_status)
package # Package version
node # Node.js section
ruby # Ruby section
elixir # Elixir section
golang # Go section
php # PHP section
rust # Rust section
haskell # Haskell Stack section
julia # Julia section
docker # Docker section
venv # virtualenv section
conda # conda virtualenv section
pyenv # Pyenv section
exec_time # Execution time
line_sep # Line break
vi_mode # Vi-mode indicator
jobs # Backgound jobs indicator
exit_code # Exit code section
char # Prompt character
)
# TIME
SPACESHIP_TIME_SHOW=true
# EXIT CODE
SPACESHIP_EXIT_CODE_SHOW=true
EOL
# Make zsh the default shell
chsh -s /usr/bin/zsh
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment