Skip to content

Instantly share code, notes, and snippets.

@deverebor
Last active April 25, 2025 13:30
Show Gist options
  • Save deverebor/0a79fe5a3bfbd95c2af8044e03692839 to your computer and use it in GitHub Desktop.
Save deverebor/0a79fe5a3bfbd95c2af8044e03692839 to your computer and use it in GitHub Desktop.
zsh + starship + ohmyposh + fastfetch

Preview

My custom config to terminal

Day theme

image

Night theme

image

Dependencies

  • zsh
  • oh my posh
  • oh my zsh
  • zinit
  • ruby
  • fastfetch
  • starship
// code ~/.config/fastfetch/config.jsonc
// @note: that you must replace the image path to an existing image to display it.
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "kitty",
"source": "$HOME/Pictures/evildead.png",
"width": 28,
"height": 20
},
"display": {
"separator": " "
},
"modules": [
{
"type": "host",
"key": "╭─󰌢",
"keyColor": "green"
},
{
"type": "cpu",
"key": "├─󰻠",
"keyColor": "green"
},
{
"type": "gpu",
"key": "├─󰍛",
"keyColor": "green"
},
{
"type": "disk",
"key": "├─",
"keyColor": "green"
},
{
"type": "memory",
"key": "╰─󰑭",
"keyColor": "green"
},
"break",
{
"type": "shell",
"key": "╭─",
"keyColor": "yellow"
},
{
"type": "terminal",
"key": "├─",
"keyColor": "yellow"
},
{
"type": "terminalfont",
"key": "├─",
"keyColor": "yellow"
},
{
"type": "de",
"key": "├─",
"keyColor": "yellow"
},
{
"type": "wm",
"key": "├─",
"keyColor": "yellow"
},
{
"type": "theme",
"key": "├─󰉼",
"keyColor": "yellow"
},
{
"type": "icons",
"key": "╰─󰀻",
"keyColor": "yellow"
},
"break",
{
"type": "os",
"key": "╭─󰣇", // Just get your distro's logo off nerdfonts.com
"keyColor": "blue"
},
{
"type": "kernel",
"key": "├─",
"format": "{1} {2}",
"keyColor": "blue"
},
{
"type": "packages",
"key": "├─󰏖",
"keyColor": "blue"
},
{
"type": "uptime",
"key": "├─󰅐",
"keyColor": "blue"
},
{
"type": "media",
"key": "├─󰝚",
"keyColor": "blue"
},
{
"type": "wifi",
"key": "╰─",
"format": "{4}", // ssid
"keyColor": "blue"
},
"break",
{
"type": "colors",
"symbol": "circle"
}
]
}
# @author: deverebor
# @version: 3
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# powerlevel10k theme: powerlevel10k/powerlevel10k
ZSH_THEME=""
# Which plugins would you like to load?
plugins=(git z zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust \
zdharma-continuum/fast-syntax-highlighting
### End of Zinit's installer chunk
zinit load agkozak/zsh-z
### Aliases
alias ll="colorls -1"
alias zshrc="code ~/.zshrc"
alias ohmyzshrc="code ~/.oh-my-zsh"
alias gitconfig="code ~/.gitconfig"
alias sstoml="code ~/.config/starship.toml"
### Custom scripts
# This loads nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# This loads colorls
source $(dirname $(gem which colorls))/tab_complete.sh
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Add bin to the path
export PATH="$HOME/bin:$PATH"
# This loads starship
eval "$(starship init zsh)"
export PATH=$HOME/.local/bin:$PATH
#This loads console-ninja
PATH=~/.console-ninja/.bin:$PATH
# This loads oh my posh
# OhMyPosh local theme: /home/{user}/.cache/oh-my-posh/themes/atomic.omp.json
eval "$(oh-my-posh init zsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/atomic.omp.json')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment