diff --git a/install.sh b/install.sh index 594d78d..d6bbdbe 100755 --- a/install.sh +++ b/install.sh @@ -45,15 +45,18 @@ for directory in ~/.mozilla/firefox ~/.var/app/org.mozilla.firefox/.mozilla/fire for profile in *; do if [ -f "$profile/prefs.js" ]; then echo "Detected profile: $directory/$profile, installing Firefox GTKless to this profile..." if [ -d "$profile/chrome" ]; then - if ! grep -q '/* FIREFOX GTKLESS STYLE CHECK HEADER -' "$profile/chrome/ferenChrome.css"; then + if ! grep -q '/* FIREFOX GTKLESS STYLE CHECK HEADER -' "$profile/chrome/GTKless.css" && ! grep -q '/* FIREFOX GTKLESS STYLE CHECK HEADER -' "$profile/chrome/ferenChrome.css"; then bkupcounts=0 while [ -d "$profile/chrome.bak""$bkupcounts" ]; do bkupcounts=$(($bkupcounts+1)) done mv -f "$profile/chrome" "$profile/chrome.bak""$bkupcounts" echo "Backed up your old userChrome folder to chrome.bak""$bkupcounts." - else #Delete old ferenChrome, but leave userChrome.css intact, if it's just an installation of GTKless - rm -f "$profile/chrome/ferenChrome.css" + else #Delete old GTKless, but leave userChrome.css intact, if it's just an installation of GTKless + if [ -f "$profile/chrome/ferenChrome.css" ]; then + rm -f "$profile/chrome/ferenChrome.css" + fi + rm -f "$profile/chrome/GTKless.css" fi fi if [ ! -d "$profile/chrome" ]; then #On new installs, remake the chrome folder... @@ -62,7 +65,10 @@ for directory in ~/.mozilla/firefox ~/.var/app/org.mozilla.firefox/.mozilla/fire if [ ! -f "$profile/chrome/userChrome.css" ]; then #...and copy everything over. cp -Rf "$DIR/mod-files/chrome/"* "$profile/chrome/" else #If GTKless is already installed, only replace GTKless's CSS - cp -f "$DIR/mod-files/chrome/ferenChrome.css" "$profile/chrome/" + if grep -q 'ferenChrome.css' "$profile/chrome/userChrome.css"; then + sed -i 's/ferenChrome.css/GTKless.css/g' "$profile/chrome/userChrome.css" + fi + cp -f "$DIR/mod-files/chrome/GTKless.css" "$profile/chrome/" fi #Now it's user.js's turn if [ -f "$profile/user.js" ]; then diff --git a/mod-files/chrome/ferenChrome.css b/mod-files/chrome/GTKless.css similarity index 97% rename from mod-files/chrome/ferenChrome.css rename to mod-files/chrome/GTKless.css index 510007e..38fd674 100755 --- a/mod-files/chrome/ferenChrome.css +++ b/mod-files/chrome/GTKless.css @@ -31,21 +31,6 @@ } } - /* Temporary fix for border radius not matching properly with Adwaita */ - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) #navigator-toolbox, - :root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) ::backdrop { /*browser.css:50, Firefox 120*/ - border-top-left-radius: calc(env(-moz-gtk-csd-titlebar-radius) - 2px) !important; - border-top-right-radius: calc(env(-moz-gtk-csd-titlebar-radius) - 2px) !important; - } - - /* Consistent rounding for rounded window option */ - @media (-moz-bool-pref: "widget.gtk.rounded-bottom-corners.enabled") { /*browser.css:64, Firefox 120*/ - body, - dialog::backdrop { - border-radius: calc(env(-moz-gtk-csd-titlebar-radius) - 2px) !important; - } - } - /* Cursed buttons from Firefox - browser.css:364, mostly, Firefox 114 */ .titlebar-button { appearance: none !important; @@ -238,7 +223,7 @@ color: var(--lwt-text-color) !important; /*TITLEBAR AREA*/ } - :not(:-moz-lwtheme) #navigator-toolbox { /*browser-shared.css:174, Firefox 120*/ /*TITLEBAR AREA, toolbar is managed by *browser.css:75, Firefox 120**/ + :not(:-moz-lwtheme) #navigator-toolbox { /*browser-shared.css:174, Firefox 120*/ /* TITLEBAR AREA, toolbar is managed by *browser.css:75, Firefox 120* */ background: var(--lwt-accent-color) !important; color: inherit !important; diff --git a/mod-files/chrome/userChrome.css b/mod-files/chrome/userChrome.css index a0b2a4f..7675b1d 100755 --- a/mod-files/chrome/userChrome.css +++ b/mod-files/chrome/userChrome.css @@ -1,2 +1,2 @@ -/* insert other mods, above ferenChrome.css, here */ -@import url("ferenChrome.css"); +/* insert other mods, above GTKless.css, here */ +@import url("GTKless.css");