Coder Social home page Coder Social logo

my-ohmyzsh-setup's Introduction

My OhMyZsh Setup

Install Oh My Zsh with curl

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

Note: You need to have ZSH installed before installing Oh My Zsh. Have a look at Installing ZSH

Using a customized theme

PowerLevel10k - my current favorite theme to use.

https://github.com/romkatv/powerlevel10k

note: that you need to install fonts for it to work correctly. You can find more instructions on the powerlevel10k GitHub

Microsoft Terminal: Open Settings [Ctrl]+[,] search for fontFace and set value to MesloLGS NF for your Linux profile (example Ubuntu).

You can find the fonts here: Powerlevel 10k MesloLGS Nerd Font

Clone and set the powerlevel10k theme

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Set ZSH_THEME="powerlevel10k/powerlevel10k" in your ~/.zshrc.

Plugins I use the most (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

  • Download zsh-syntax-highlighting by

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

  • Modify you .zshrc file to add the plugins Example: nano ~/.zshrc

  • Add zsh-autosuggestions & zsh-syntax-highlighting to plugins()

Prefered format:

plugins=(
 git
 zsh-autosuggestions
 zsh-syntax-highlighting
)

Shell Parameter Highlighting (requires zsh-syntax-highlighting plugin)

Special Thanks to user titus#6602 from the Oh-My-Zsh discord for sharing this awesome customization.

export ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets regexp)
typeset -A ZSH_HIGHLIGHT_REGEXP
ZSH_HIGHLIGHT_REGEXP+=(' -{1,2}[a-zA-Z0-9_-]*' fg=008)

Example: It will highlight the parameters like -- or - in grey lke you see below.

Reload your .zshrc to apply changes with exec zsh.

Note you shouldn't not be using source ~/.zshrc when using ohmyzsh, just takes longer and forces to reload everything when its not needed.

If you want other users to have ohmyzsh then just do the below.

Make sure that zsh is already installed. Then login as another user of the system:

  • export ZSH=/home/username_here/.oh-my-zsh
  • sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Ref

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.