Skip to content

TheElevatedOne/distrous.omp.json

Repository files navigation

distrous.omp.json

distrous-logo

OhMyPosh Theme with Distro-based Color schemes

Uses bash_progress_bar by pollev because why not xd


Navigation


Preview

Previews for All Themes Here: PREVIEWS.md

EndeavourOS - Example

endeavouros-preview

Link to file: distrous-endeavouros.omp.json

Extra
  • General

    endeavouros-general

  • Root

    endeavouros-root

  • Unwritable Directory

    endeavouros-unwrite

  • Python

    • Script

      > ![endeavouros-script](previews/distrous-endeavouros.omp.json-script.png)
      
    • Venv

      > ![endeavouros-venv](previews/distrous-endeavouros.omp.json-venv.png)
      

CachyOS - Custom Icons Example

oh-my-posh previews utility does not show the icons, dunno why.

Font Patching

cachyos-preview


Distros

If you want a distro added, create an enhancement issue. You may just say the name, or create a whole config part. You can find the Example config in the Documentation section.


Documentation

How to Configure

  1. Install git, python3, oh-my-posh and a text editor line neovim
git clone --recurse-submodules https://github.com/TheElevatedOne/distrous.omp.json.git && cd distrous.omp.json
  1. Configure

Bash Scripts

generate-all.sh

  • Generate themes from config, generate previews and generate markdown
  • Runs distrous.sh, gen-previews.sh, gen-readme.sh in that order

distrous.sh

  • Runs python/distrous.py

gen-previews.sh

  • Generates all previews
    • Basic - in GitHub Repo Directory
    • General - cd .. from the Repo
    • Root - sudo -s <command> in cd ..
    • Unwritable - cd ./env/unwritable_dir/, which is a root owned directory
    • Python Script - cd ./python/,in the scripts directory
    • Python Venv - source ./env/python_venv/bin/activate, to show a general venv

gen-readme.sh

  • Runs python/gen-readme.py

git-push.sh "$@"

  • Adds all, Commits with a message in an argument, Pushes to Repo in one command
  • To make it faster

Python Scripts

python/distrous.py

  • Loads config into a dictionary
  • Generates themes from a template

python/gen-readme.py

  • Loads a config for the names
  • Has a template string for the previews
  • Uses templates/template-PREVIEWS.md to generate PREVIEWS.md

Config

"EndeavourOS": {                # Theme Name
  "icon": "\uF322 EOS",         # NerdFont UTF and/or Initials
  "prompt_arr": "#D6BEEB",      # Arrow leading from time to prompt
  "distro_bg": "#7735B9",       # Main Distro color
  "distro_fg": "#FFFFFF",       # Text Color to complement distro_bg
  "shell_bg": "#6C6CF5",        # Secondary distro color
  "shell_fg": "#FFFFFF",        # Text Color to complement shell_bg
  "root_bg": "#F46C6B",         # Tertiary distro color 
  "root_fg": "#000000",         # Text Color to complement root_bg
  "pipe": "#79DFE1",            # Pipe/Divider Color
  "time": "#D6BEEB",            # Time Color 
  "date": "#F2D3B6",            # Date Color 
  "user": "#C771FF",            # Username Color
  "host": "#FAFFA7",            # Hostname Color 
  "writable_dir": "#2DFF9B",    # User-owned Dir tree color
  "unwritable_dir": "#FF4444",  # Non-User-owned Dir tree color
  "generate": true              # If true, theme generates when running scripts; if false, theme is skipped
}

Secondary and Tertiary colors do not need to be from distro. They can be created by you based on the distro color/s

Font Patching

Some Distros do not have their icon in the NerdFonts project,

And since their addition rate is slow, I made it so you can patch your own.

You can find more information at FONT_PATCHING.md.


Additional Information

  • Looking at Issues and Updating the theme will be a "once a week/once per two weeks" thing as this is not my main project.
  • The Font used in previews and the Logo is Liberation Mono Nerd Font NerdFonts.com Download
  • To show custom unicode icons you need a patched font from nerdfonts.com.
  • I use Neovim and Gpick for editing the config and picking the color scheme

image-preview

About

OhMyPosh Theme with Distro-based Color schemes.

Resources

License

Stars

Watchers

Forks