Skip to content

Instantly share code, notes, and snippets.

@yovko
Last active April 17, 2024 22:07
Show Gist options
  • Save yovko/becf16eecd3a1f69a4e320a95689249e to your computer and use it in GitHub Desktop.
Save yovko/becf16eecd3a1f69a4e320a95689249e to your computer and use it in GitHub Desktop.
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

1. Install Oh My ZSH

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

or

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

2. Installation of two important plugins I can't live without

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

and

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

3. Configuring zsh

Modify the ~/.zshrc config file editting plugins section like this:

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

Change the theme to agnoster:

ZSH_THEME="agnoster"

4. Logout/logon or apply the changes with:

source ~/.zshrc

5. Make zsh default if you haven't already:

chsh -s $(which zsh)

6. Enjoy!

P.S. Pls, note that this can be outdated and not relevant. I'm not currently using Manjaro as my daily driver.

@Ali-Aref
Copy link

Nice One!

@H2k-Dev
Copy link

H2k-Dev commented Mar 11, 2022

Ty :)

@gauraputu
Copy link

gauraputu commented Mar 20, 2022

chsh -s $(which zsh)
Changing shell for an.
Password:
chsh: Shell not changed.

that message means your default shell is already zsh, log out first then login again to apply the effect.

@swaroopRajwal
Copy link

if you guys are using manjaro xfce or any other distro where the default shell isn't zsh, go to the shell settings and check the check box where it shows the text Run a custom command instead of my shell and add custom command zsh

@newtonjose
Copy link

newtonjose commented Mar 31, 2022

Ty, keep sharing 🚀

@Exoutia
Copy link

Exoutia commented Sep 20, 2022

I am using manjaro xfce and I have used chsh but it didn't change the default shell it's showing that my root shell is zsh but i am still seeing bash when I open the terminal.
For me this worked
sudo usermod --shell $(which zsh) <username>
just write your username which you are login with. Hope it fix someone's issue.

@jkruse14
Copy link

Thank you for this!

@rabbilyasar
Copy link

I am setting my plugins on the manjaro-zsh-config. I set plugins on the ~/.zshrc but it doesn't seem to be doing anything.
.zshrc file:

USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

# Enable BuildKit
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
export BUILDKIT_PROGRESS=plain
export QT_QPA_PLATFORM='offscreen'``` 

@DeFiNiek
Copy link

I am setting my plugins on the manjaro-zsh-config. I set plugins on the ~/.zshrc but it doesn't seem to be doing anything. .zshrc file:

USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

# Enable BuildKit
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
export BUILDKIT_PROGRESS=plain
export QT_QPA_PLATFORM='offscreen'``` 

For anyone with this problem, you should not edit any of this before installing oh my zsh trough the provided links. The config file .zshrc will change on installation.

@rafapcarvalho
Copy link

Is there a way to replicate a zsh configuration to another distro linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment