Skip to content

Conversation

iruzo
Copy link

@iruzo iruzo commented Apr 18, 2023

Proposed Changes

  • Trying to reduce size of README and improving readability.
  • Added one click installers for unix/linux as POSIX sh scripts.
  • Documented NixOS installation.
  • Added gruvbox theme (preview webp is still needed).

…ox theme.

1. Added one click installers for unix/linux as POSIX sh scripts.
2. Documented NixOS installation.
3. Fully refactor readme trying to imporve readability trying to reduce
   its size using markdown.
4. Added gruvbox theme.
@unseen-ninja
Copy link
Collaborator

unseen-ninja commented Apr 18, 2023

Ayo! That's a lot. Big thank you for this! <3


Readme

As you have mentioned on Discord; some of these changes are highly objective. Personally I find the readme changes more confusing to read through. Things are also a little bit out of order with the previews just kinda hanging there without being attached to a specific section. o:
And the whole customisation and integration stuff feels a little lost inside all these spoilers.

Oh, and highly personal: I abso-fucking-lutely hate emojis. :D


Gruvbox

The Gruvbox theme is lovely actually! I'll for sure add that one into the mix for the colour schemes. c:


Installer

I also quite like the addition of the installation script, tho if I read that right, there are some issues with it.

First up, the order of changing to the config dir, and removing a potentially pre-existing chrome folder could be swapped to make things a little less convoluted. The default directory may also not always be caught by the regex, I believe? But I'd say that can be omitted.
What I think should def. be there is some sort of warning and check to confirm that an existing chrome folder should be deleted as this might cause unwanted data loss!

Furthermore I'd personally like to have just one installer script that would take arguments for the desired colour scheme to declutter the whole thing a little more. (And maybe even support macOS as well)

I'm happy to look into the changes for the installer script and put them into a separate branch in order for us to make things nice. ^—^

@unseen-ninja unseen-ninja added the enhancement New feature or request label Apr 18, 2023
@iruzo iruzo force-pushed the main branch 2 times, most recently from d2ac836 to beb2385 Compare April 19, 2023 20:42
…getting default firefox profile and moving themes to be more accesible from the installer script
@iruzo
Copy link
Author

iruzo commented Apr 19, 2023

Hello @andreasgrafen !, take a look at the changes, there's no need to rush, thank you.

I changed the installer script, so you can pass the theme as parameter (in order to do that, I changed the themes directory from integrations/theme/theme.css to integrations/theme.css).

I also changed the README to move the theming preview to the customization section and removed the emojis, if this doesn't look good enough, I can restore the README to default and just add the doc for gruvbox and the installer.

@42willow
Copy link
Member

42willow commented Jan 26, 2025

Hi @iruzo 👋, sorry for the wait - I’m picking up maintenance of this theme (at least for now, we’ll see how I go 😅)

I've rebased the gruvbox and ayu themes onto the main branch - I'll use this to track the progress of the installer script

@42willow 42willow changed the title docs(readme): Linux installers, nixos docs, readme refactor and gruvb… feat: linux installer Mar 9, 2025
@42willow
Copy link
Member

Could possibly use https://github.com/ryanccn/nyoom for this, it's cross platform too!

@iruzo
Copy link
Author

iruzo commented Apr 16, 2025

Hey @42willow, sorry for the late response, I have been very busy.

I would prefer not to use an external app to just install the theme, I will modify the scripts as soon as I can (I saw you changed the repo, so It will take me a little bit more just to figure it out how I should change them now).

In case you are interested in a GUI for this, take a look at https://flathub.org/apps/dev.qwery.AddWater, it is a Flatpak interface that manage the installation of the GNOME theme for Firefox, which make it simpler for normal people to install the theme.

The reason I discard nyoom but recommend AddWater, is basically because a person that knows how to use a terminal will probably know how to execute a simple shell script like the ones I created, and, most probably, will not want to add another program/dependency to its system just to modify a userChrome.css. On the other hand, normal people who are not used to use a terminal not only will not use the shell script, but will also absolutely reject to install a shell program.

AddWater helps non-terminal users manage the theme and since it is a Flatpak, people using Silverblue or any other immutable system will have no problem to install it too.

@42willow
Copy link
Member

No problem! I've been a bit busy too and it's about to get busier.

Very good point, I agree with you on preferring an installation script over nyoom - especially since it isn't in pkg managers yet (as far as i know)...

Unfortunately I think modifying and maintaining a fork of AddWater for Cascade might be out of the scope of my knowledge (and it'd be Linux only...) - but if someone else would like to pick it up they could

I made some changes to the script a while back, not sure if they're any good but here they are for reference anyway:

#!/bin/sh

PROFILES=($(grep 'Path=' "$HOME/.mozilla/firefox/profiles.ini" | cut -d= -f2))

# ask the user to select a profile if there are multiple
if [ "${#PROFILES[@]}" -eq 1 ]; then
  SELECTED_PROFILE=${PROFILES[0]}
elif [ "${#PROFILES[@]}" -eq 0 ]; then
  echo "No profiles found. Operation cancelled."
  exit 1
else
  for i in "${!PROFILES[@]}"; do
    echo "$i) ${PROFILES[$i]}"
  done

  read -p "Select a profile: " profile_number

  if ! [[ "$profile_number" =~ ^[0-9]+$ ]] || [ "$profile_number" -ge "${#PROFILES[@]}" ]; then
    echo "Invalid selection. Operation cancelled."
    exit 1
  fi

  SELECTED_PROFILE=${PROFILES[$profile_number]}
fi

echo "Selected profile: $SELECTED_PROFILE"
echo "Path: $HOME/.mozilla/firefox/$SELECTED_PROFILE/chrome"

# Confirm the selected profile
read -p "Is this the correct profile? (Y/n): " confirm
if [ "$confirm" != "y" ] && [ "$confirm" != "" ]; then
  echo "Operation cancelled."
  exit 1
fi

rm "$HOME/.mozilla/firefox/$SELECTED_PROFILE/chrome" -rf

TEMP_DIR=$(mktemp -d)
echo "temporary dir created at $TEMP_DIR"

git clone https://github.com/cascadefox/cascade "$TEMP_DIR/cascade"
echo "repository cloned to $TEMP_DIR/cascade"

mv "$TEMP_DIR/cascade/chrome" "$HOME/.mozilla/firefox/$SELECTED_PROFILE/"
echo "chrome directory moved to Firefox profile"


# if [ "$#" -gt 0 ]; then
#   mv "$TEMP_DIR/cascade/integrations/cascade-$1.css" "$HOME/.mozilla/firefox/$SELECTED_PROFILE/chrome/includes/cascade-colours.css"
#   echo "Theme configured: cascade-$1.css"
# fi

# Clean up the temporary directory
rm -rf "$TEMP_DIR"
echo "Temporary directory cleaned up"

# Change toolkit.legacyUserProfileCustomizations.stylesheets
if [ ! -e "$HOME/.mozilla/firefox/$SELECTED_PROFILE/prefs.js" ]; then
  echo "File 'prefs.js' does not exist."
  exit 1
fi

if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$SELECTED_PROFILE/prefs.js"; then
  echo "legacyUserProfileCustomizations is already set to true"
else
  echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$SELECTED_PROFILE/prefs.js"
  echo "legacyUserProfileCustomizations set to true"
fi

echo "Installation complete."

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

Successfully merging this pull request may close these issues.

3 participants