Terminal-based theme manager for Oh My Posh with preview, search, custom repositories, and theme customization
Project description
Oh My Theme
Theme manager for Oh My Posh that lets you browse, preview, install, activate, add custom and tweak themes directly inside your terminal.
Features
- 💻 Fast and simple: runs from terminal. Simple interface.
- 🔍 Real-time Search: Filter local and remote theme repo
- ⚡ Fast Installation: Single or multiple theme download
- 🔄 Easy Theme Switching: Theme activation (Bash/Zsh/Fish)
- 🗂️ Dual Panel Interface: Local and remote theme management
- 🎯 Custom Repositories: Add themes from Git repository (json has to be in root)
- 🎨 Theme Customization: Built-in color editor
- 🎨 Basic Previews: Sample prompt structure with basic metadata (Name, Version, Source, Color variation)
- 🚀 Performance Optimized: Smart caching and modular architecture
Prerequisites
Before using this tool, you need:
- Oh My Posh installed - Visit ohmyposh.dev for installation instructions
- Compatible shell: Bash, Zsh, or Fish
- Python 3.6+ with standard libraries
Installation
Method 1: PyPI (Recommended)
pip install oh-my-theme
Method 2: AUR (Arch Linux)
yay -S oh-my-theme
# or
paru -S oh-my-theme
Method 3: Git Clone
git clone https://github.com/mikeisfree/oh-my-theme.git
pip install -e .
Usage After Installation
Once installed run with:
omt
Shell Config
The tool automatically updates your shell configuration:
- Bash:
~/.bashrc - Zsh:
~/.zshrc - Fish:
~/.config/fish/config.fish
Clean Theme Management:
- Removes all existing Oh My Posh theme lines when activating a new theme - If You want to keep existing oh-my-posh configuration commenting it out will not be enough - back it up to a separate file!
- Adds only the new active theme command
- Preserves all other shell configuration! (aliases, exports, functions)
After activating a theme, reload your shell:
source ~/.bashrc # For Bash
source ~/.zshrc # For Zsh
Usage Details
Interface Overview
The tool displays two panels:
- Left Panel: installed themes (local)
- Right Panel: Available themes from Oh My Posh main repository + custom repos added by user (remote)
Keyboard Shortcuts
| Key | Action |
|---|---|
TAB |
Switch between panels |
↑/↓ |
Navigate theme list |
ENTER |
Activate/Remove/Customize local theme or Select remote theme |
SPACE |
Toggle selection for remote themes |
p |
Preview selected theme |
i |
Install selected remote themes |
/ |
NEW: Enter search mode for real-time theme filtering |
+ |
NEW: Add custom Git repository |
ESC |
Exit search mode & cancel dialogs |
q |
Quit application |
Local Theme Actions (ENTER)
When you press ENTER on a local theme, you'll see these options:
A- Activate theme in shellR- Remove themeC- Customize theme colors
Getting Started
- Browse Remote Themes: Use
TABto switch to the right panel and browse available themes - Search Themes: Press
/to search and filter themes in real-time - Preview Themes: Press
pto see previews with sample prompts and metadata - Select Themes: Use
SPACEto select multiple themes for installation - Install Themes: Press
ito download selected themes - Activate Theme: Switch to local panel (
TAB) and pressENTER→Aon your desired theme - Customize Theme: Press
ENTER→Con local themes to edit colors - Add Custom Repos: Press
+to add themes from custom Git repositories
Theme Previews
Preview feature shows:
- Sample prompt structure git status, paths, segments
- Essential metadata: Name, Version, Source (git repository), Color variation
Filter
- Press
/to enter search mode - Type to filter themes in real-time across both local and remote panels
- Search results highlight matching text
- Press
ESCto exit search and process filtered items
Custom Repository Support
- Press
+to add themes from custom Git repository - Enter the Git repository URL when prompted
- The tool will fetch all
.omp.jsonfiles from the repository root - Custom themes are downloaded to your local themes directory
- repository address will be added to filter array
Theme Customization
- Select any local theme and press
ENTER→C - Visual color editor shows current segment colors
- Simple color picker interface for modifications
- Save as new theme (new json file) or overwrite original
- Preserve customizations across updates
Theme Storage
Downloaded themes are stored in ~/.poshthemes/ directory. The tool manages this directory automatically.
Troubleshooting
"Unsupported shell" Error
Make sure your SHELL environment variable is set correctly:
echo $SHELL
Safety measures:
Backup-friendly: Uses a clean replacement strategy that preserves non-Oh My Posh configurations
Atomic updates: Reads entire file, modifies in memory, then writes back
Error handling: Returns success/failure status
uses regex pattern to identify Oh My Posh lines:
init_pattern = re.compile(r"^\s*(eval.*oh-my-posh init.*|oh-my-posh init.*fish.*)")
User confirmation: Always asks for confirmation before activating themes
Theme Not Activating
- Ensure Oh My Posh is properly installed and in your PATH
- Check that your shell configuration file exists and is writable
- Reload your shell after theme activation
Preview Not Working
- For remote themes: The tool will offer to download the theme for preview
- For local themes: Ensure the theme file exists in
~/.poshthemes/
Search Not Responding
- Make sure you're in search mode (press
/first) - Press
ESCto exit search mode if stuck - Search works across both local and remote theme panels
Custom Repository Issues
- Ensure the Git repository URL is valid and accessible
- Repository must contain
.omp.jsonfiles in the root directory - Check your internet connection for repository access
Theme Customization Problems
- Only local themes can be customized
- Ensure you have write permissions to the themes directory
- Invalid JSON themes cannot be edited safely
Performance Features
- Smart Caching: Theme metadata is cached to speed up repeated previews
- File Reuse: Existing downloaded themes are reused for previews
- Memory Management: Cache size is limited to prevent memory bloat
- Lazy Loading: Theme parsing only when needed
What's New in v2.0
- 🔍 Search: Filter themes instantly with
/keybind - 🎯 Custom Repositories: Add themes from Git repository with
+keybind - 🎨 Theme Customization: Built-in color editor for personalizing themes
- ✨ Enhanced Previews: sample prompts with essential metadata
- 🏗️ Modular Architecture: Improved code organization and maintainability
Contributing
⭐ Star on GitHub if you like it!
📦 Review the package on PyPI or AUR
🐛 Report issues on GitHub
🔧 Submit pull requests with updates/upgrades
License
This project is open source. Please check the license file for details.
Architecture
Oh My Theme v2.0 features a modular architecture:
oh_my_theme/main.py: Core UI and application logicoh_my_theme/preview.py: Enhanced theme previews and sample generationoh_my_theme/search.py: Real-time search and filtering functionalityoh_my_theme/repositories.py: Custom Git repository managementoh_my_theme/editor.py: Theme color customization interfaceoh_my_theme/config.py: Configuration and settings management
Dependencies
- Python 3.6+: Core runtime requirement
- Standard libraries only: curses, json, os, subprocess, urllib
- No external dependencies required: Pure Python implementation
Related Links
- Oh My Posh Official Website
- Oh My Posh Documentation
- Oh My Posh Themes Repository (main)
- Project Repository
- PyPI Package
Note: This tool modifies your shell configuration files. It's recommended to backup your configuration before first use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oh_my_theme-2.0.0.tar.gz.
File metadata
- Download URL: oh_my_theme-2.0.0.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74a7266d9f708d0c56afd796ace672ea54f542c5ad9f651f7716b997d4dc9bed
|
|
| MD5 |
6ba64e6d8cf36a7cd50ea064a32f1539
|
|
| BLAKE2b-256 |
4fe993e2229da50c52cc320494709058c9acf1abbba7b337aff1e9cc0155244d
|
File details
Details for the file oh_my_theme-2.0.0-py3-none-any.whl.
File metadata
- Download URL: oh_my_theme-2.0.0-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88af93819730f934ea9b5189922b6d60a51fd5206b426be8365f2532cbc76360
|
|
| MD5 |
3b7ec7ad324a4e2e2850ed1fe511024e
|
|
| BLAKE2b-256 |
ac49a2c543fdf8aee5b2dcc6501cff03f9aa839d2d0a29e9e9ea711d66f06c11
|