Skip to content

Conversation

Adriein
Copy link

@Adriein Adriein commented Aug 10, 2025

Enhance Omakub with Omarchy theme system

  • Create installation theme.sh script
  • Create retrocomp migration
  • Alter Omakub bin change theme behaviour

Changes:

This change provides a single point of truth for theme configuration, making it easier to maintain and update the system's appearance.

Introduces a new script, install/desktop/theme.sh, to centralize and manage the active theme in the installation process.

The script performs the following actions:

  • Creates symbolic links for all available themes to a central location (~/.config/omakub/themes).
  • Sets the initial theme to tokyo-night by linking theme files and a background image to ~/.config/omakub/current.
  • Automates the application of the current theme to the following tools:
    • Alacritty
    • Zellij
    • Neovim
    • Btop (with a check for theme availability)
  • Sources separate scripts to handle theme application for Gnome, Tophat, and VS Code.

Alter the existing script bin/omakub-sub/theme.sh, to change the theme with symlinks instead of copying files arround

  • Creates symbolic link from an existing theme (~/.config/omakub/themes) to the current user theme (~/.config/omakub/current/theme).
  • Automates the application of the current theme to the following tools:
    • Alacritty
    • Zellij
    • Neovim
    • Btop (with a check for theme availability)
  • Sources separate scripts to handle theme application for Gnome, Tophat, and VS Code.

Alter existing script themes/set-gnome-theme to change the background with symlink

Manual testing performed

  • Simulate fresh installation on ubuntu 24
  • Simulate fresh instalation on ubuntu 25
  • Migration on ubuntu 24
  • Migration on ubuntu 25

- Prompts user for theme name and git repository URL
- Clones the theme repo if not already present
- Creates or updates gnome.sh and tophat.sh scripts with correct content and executable permissions
- Adds the new theme to the Omakub themes list only if missing
- Provides user feedback and reloads the main menu after completion
- Ensures idempotency to avoid redundant changes on repeated runs
- Includes 'Import' as a selectable item in the gum choose prompt
- Allows sourcing the corresponding import.sh script when selected
Introduces a new script, `theme.sh`, to centralize and manage the active theme in the installation process.

The script performs the following actions:
* Creates symbolic links for all available themes to a central location (`~/.config/omakub/themes`).
* Sets the initial theme to `tokyo-night` by linking theme files and a background image to `~/.config/omakub/current`.
* Automates the application of the current theme to the following tools:
    * Alacritty
    * Zellij
    * Neovim
    * Btop (with a check for theme availability)
* Sources separate scripts to handle theme application for Gnome, Tophat, and VS Code.

This change provides a single point of truth for theme configuration, making it easier to maintain and update the system's appearance.
@Adriein Adriein changed the title Import themes from omakub bin [WIP] Port omarchy theme management to Omakub Aug 10, 2025
@Adriein Adriein changed the title [WIP] Port omarchy theme management to Omakub [WIP] Port Omarchy theme management to Omakub Aug 10, 2025
ln -snf ~/.config/omakub/current/theme/alacritty.toml ~/.config/alacritty/theme.toml

ln -snf ~/.config/omakub/current/theme/zellij.kdl ~/.config/zellij/themes/$INITIAL_THEME.kdl
sed -i "s/theme \".*\"/theme \"$INITIAL_THEME\"/g" ~/.config/zellij/config.kdl
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about that, is there a smarter/simple way to achieve the same?

#!/bin/bash

# The the new theme management feature directories are created
source $OMAKUB_PATH/install/desktop/theme.sh
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When ppl run migrations this would change the current theme to tokio-night, not a big issue but maybe could be improved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can let the user choose his current theme (with gum) and use that value

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed with gum that the user can choose between the omakub themes 😄

@Adriein Adriein changed the title [WIP] Port Omarchy theme management to Omakub Port Omarchy theme management to Omakub Aug 11, 2025
@Kasui92
Copy link
Contributor

Kasui92 commented Aug 15, 2025

I have an idea on how to improve, I'll take some time to get back to the PC and see if I can help you! 🦾

@Adriein
Copy link
Author

Adriein commented Aug 16, 2025

I have an idea on how to improve, I'll take some time to get back to the PC and see if I can help you! 🦾

love to see it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants