Coder Social home page Coder Social logo

dotfiles's Introduction

Dotfiles

Here are some files for setting the environment of a new computer.

If any error messaage comes like Not an editor command: ^M, use vim to open file and set the format correctly by :set fileformat=unix.

Vim

The .vimrc file helps to set the coding environment of VIM.

Zsh

The .zshrc file helps to set the zsh environment of ZSH. It is assumed that the oh-my-zsh is also installed.

Installing Zsh

Install

sudo apt update
sudo apt install zsh

Check now-available shells

cat /etc/shells

Change current shell to zsh

chsh -s $(/usr/bin/zsh)

Installing oh-my-zsh

wget

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Note: This runs the install.sh in oh-my-zsh. Check all the details in oh-my-zsh

Installing the Powerline fonts

Some themes needs the Powerline fonts to appear correctly.

sudo apt-get install fonts-powerline

Ubuntu

This uses theme agnoster. I made some changes from default version. See ./Zsh/Ubuntu/agnoster.zsh-theme

  • Add current time in RPROMPT
  • Remove the machine name in PROMPT

Copy the .zsh-theme file to ~/.oh-my-zsh/themes/

The terminal looks like this:

Windows

Some features in a theme may not be able to appear correctly in Windows. This uses theme awesomepanda, which can work correctly in Windows. I made some changes from default version. See .Zsh/Windows/awesomepanda.zsh-theme

  • Add current time in RPROMPT
  • Remove the machine name in PROMPT

Copy the .zsh-theme file to ~/.oh-my-zsh/themes/

The terminal looks like this:

GitBash

GitBash is a tool in Git for Windows. It provides a simple way to use git with Bash environment in Windows besides wsl.

Install Git for Windows and one can see GitBash in the Start Menu

The followig was referenced from this.

git-prompt.sh

It is used for me to define the prompt($PS1) in GitBash. Copy it into the /etc/profile.d directory.

cp git-prompt.sh /etc/profile.d/git-prompt.sh

Compared with default, I delete the host machine name and add the current time. The prompt looks like this:

.bash_profile

It is used for me to add user-defined aliases. Copy it into the home directory in GitBash.

cp .bash_profile ~/.bash_profile

dotfiles's People

Contributors

kengyuchen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.