-
Notifications
You must be signed in to change notification settings - Fork 143
feat: linux installer #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…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.
Ayo! That's a lot. Big thank you for this! <3 ReadmeAs 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: Oh, and highly personal: I abso-fucking-lutely hate emojis. :D GruvboxThe Gruvbox theme is lovely actually! I'll for sure add that one into the mix for the colour schemes. c: InstallerI 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. 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. ^—^ |
d2ac836
to
beb2385
Compare
…getting default firefox profile and moving themes to be more accesible from the installer script
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 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. |
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 |
Could possibly use https://github.com/ryanccn/nyoom for this, it's cross platform too! |
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 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. |
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." |
Proposed Changes