Last active
October 12, 2017 12:29
-
-
Save deg0nz/8b10d84061e89033c7edef88b9f13509 to your computer and use it in GitHub Desktop.
This script installs zsh, oh-my-zsh and the spaceship zsh-theme on a fedora machine
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 | |
# | |
# This script installs zsh, oh-my-zsh and the spaceship zsh-theme on a fedora machine | |
# | |
# Author: bgericke, 2017 | |
# Get sudo, assuming the system supports cached credentials | |
sudo -v | |
# Install zsh, zsh-syntax-highlighting | |
dnf install zsh zsh-syntax-highlighting | |
# Install git and curl if not installed | |
dnf install git curl | |
# Make zsh the default shell | |
chsh -s /usr/bin/zsh | |
# 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 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment