diff --git a/README.md b/README.md index 2995f43..32a6322 100644 --- a/README.md +++ b/README.md @@ -27,32 +27,16 @@ This theme was known previously as »*ag.proton*« — but let's be honest: That - Default ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/default.sh) + sh -c "$(curl -sSL https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer.sh)" ``` - - gruvbox - ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/gruvbox.sh) - ``` - - rosepine-default - ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/rosepine-default.sh) - ``` - - rosepine-moon - ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/rosepine-moon.sh) - ``` - - catppuccin-frappe - ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/catppuccin-frappe.sh) - ``` - - catppuccin-macchiato - ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/catppuccin-macchiato.sh) - ``` - - catppuccin-mocha + + - Selecting a theme ```sh - sh <(curl https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer/catppuccin-mocha.sh) + sh -c "$(curl -sSL https://raw.githubusercontent.com/andreasgrafen/cascade/main/installer.sh) gruvbox" ``` + + > **Note** You can select from multiple themes like catppuccin, rose pine, or gruvbox. Themes are available in "integrations/". Replace in the previous example "gruvbox" with your desired theme. + > **Note** On NixOS, you can modify `toolkit.legacyUserProfileCustomizations.stylesheets` by setting `"DisableProfileCustomizations": true` on your `policies` config, or execute one of the installer scripts using `post-build-hook = installer.sh` > **Note** You can configure it manually following the MacOS and Windows steps with the next path for Linux `$HOME/.mozilla/firefox/######.default-release/` @@ -87,7 +71,7 @@ It seems like `flexbox` (within the Firefox UI) is inheritly broken on Windows.
Theming - Set your theme: You can change between multiple themes by replacing the content in `chrome/includes/cascade-colours.css` with one of the themes in `integrations/theme/theme.css` + Set your theme: You can change between multiple themes by replacing the content in `chrome/includes/cascade-colours.css` with one of the themes in `integrations/theme.css` This are the themes available: diff --git a/installer/catppuccin-frappe.sh b/installer.sh similarity index 76% rename from installer/catppuccin-frappe.sh rename to installer.sh index f8471cd..3b9c9c4 100644 --- a/installer/catppuccin-frappe.sh +++ b/installer.sh @@ -1,10 +1,14 @@ #!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') +DEFAULT_FIREFOX_PROFILE=$(grep 'Path=' "$firefox_profiles_dir/profiles.ini" | cut -d= -f2) rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/catppuccin/cascade-frappe.css chrome/includes/cascade-colours.css -rm cascade -rf + +# configure desired theme +if [ "$#" -gt 0 ]; then + mv cascade/integrations/cascade-$1.css chrome/includes/cascade-colours.css + rm cascade -rf +fi # change toolkit.legacyUserProfileCustomizations.stylesheets if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then diff --git a/installer/catppuccin-macchiato.sh b/installer/catppuccin-macchiato.sh deleted file mode 100644 index 5028042..0000000 --- a/installer/catppuccin-macchiato.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/catppuccin/cascade-macchiato.css chrome/includes/cascade-colours.css -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/installer/catppuccin-mocha.sh b/installer/catppuccin-mocha.sh deleted file mode 100644 index 0042207..0000000 --- a/installer/catppuccin-mocha.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/catppuccin/cascade-mocha.css chrome/includes/cascade-colours.css -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/installer/default.sh b/installer/default.sh deleted file mode 100644 index e5d1036..0000000 --- a/installer/default.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/installer/gruvbox.sh b/installer/gruvbox.sh deleted file mode 100644 index de0aac3..0000000 --- a/installer/gruvbox.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/gruvbox/cascade-gruvbox.css chrome/includes/cascade-colours.css -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/installer/rosepine-default.sh b/installer/rosepine-default.sh deleted file mode 100644 index d76fece..0000000 --- a/installer/rosepine-default.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/rose-pine/cascade-rose-pine.css chrome/includes/cascade-colours.css -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/installer/rosepine-moon.sh b/installer/rosepine-moon.sh deleted file mode 100644 index 1b455f3..0000000 --- a/installer/rosepine-moon.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -DEFAULT_FIREFOX_PROFILE=$(ls $HOME/.mozilla/firefox/ | grep default | awk -F' ' '{print $NF}') -rm $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/chrome -rf -cd $HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE -git clone https://github.com/iruzo/cascade && mv cascade/chrome . -mv cascade/integrations/rose-pine/cascade-moon.css chrome/includes/cascade-colours.css -rm cascade -rf - -# change toolkit.legacyUserProfileCustomizations.stylesheets -if [ ! -e "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" ]; then - echo "File 'foo' does not exist." - exit 1 -fi - -if grep -q "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js"; then - echo "legacyUserProfileCustomizations is already true on users settings" -else - echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "$HOME/.mozilla/firefox/$DEFAULT_FIREFOX_PROFILE/prefs.js" -fi diff --git a/integrations/catppuccin/cascade-frappe.css b/integrations/cascade-frappe.css similarity index 100% rename from integrations/catppuccin/cascade-frappe.css rename to integrations/cascade-frappe.css diff --git a/integrations/gruvbox/cascade-gruvbox.css b/integrations/cascade-gruvbox.css similarity index 100% rename from integrations/gruvbox/cascade-gruvbox.css rename to integrations/cascade-gruvbox.css diff --git a/integrations/catppuccin/cascade-macchiato.css b/integrations/cascade-macchiato.css similarity index 100% rename from integrations/catppuccin/cascade-macchiato.css rename to integrations/cascade-macchiato.css diff --git a/integrations/catppuccin/cascade-mocha.css b/integrations/cascade-mocha.css similarity index 100% rename from integrations/catppuccin/cascade-mocha.css rename to integrations/cascade-mocha.css diff --git a/integrations/rose-pine/cascade-moon.css b/integrations/cascade-moon.css similarity index 100% rename from integrations/rose-pine/cascade-moon.css rename to integrations/cascade-moon.css diff --git a/integrations/rose-pine/cascade-rose-pine.css b/integrations/cascade-rosepine.css similarity index 100% rename from integrations/rose-pine/cascade-rose-pine.css rename to integrations/cascade-rosepine.css