Skip to content

Commit

Permalink
Feat: add new modifications #52 and fixed install script
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamXweb committed Jan 25, 2023
1 parent d715a22 commit 9c94448
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 14 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ The script supports the following flags
- `-l` Default location of most Linux installations
- `-u` Remove the animation on URL bar to be clickable throughout
- `-n` Removes the identity colour from tabs
- `-v` Re-enables the tabview button
- `-e` Hides the extension button
- `-s` Single tab view (Tabs hidden when only one tab)
- `-r` Remove the theme

e.g. To install with script, with close button left hand side: `bash install.sh -c`
e.g. To install with script, with the tab close button left hand side: `bash install.sh -c`

#### Optimal experience:
Make sure to right click and Customize Toolbar. From here, drag the new tab button up to the toolbar out of the tab section.

Install with the following modifications for Safari-like experience
` bash ./install.sh -c -n -s -e`

This will give you a look like this:
![Preview](https://user-images.githubusercontent.com/6800453/214499429-36413e29-0167-400c-969f-46d2d7082559.png)

### Manual installation (MacOS & Windows)

Expand Down
4 changes: 4 additions & 0 deletions chrome/WhiteSur/parts/tabsbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -447,3 +447,7 @@ transition: all 150ms ease-in !important;
}


/* hide tab view section*/
#alltabs-button.toolbarbutton-1 {
visibility: collapse !important;
}
5 changes: 4 additions & 1 deletion chrome/WhiteSur/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
@import "colors/dark.css";
@import "parts/windows.css";
/* Add Custom themes so user only needs to copy items*/
@import "custom/lhsclose.css";
@import "custom/tabs-swapclose.css";
@import "custom/singletabhidden.css";
@import "custom/hideextension.css";
@import "custom/enabletabview.css";
@import "custom/noidentity.css";
@import "custom/standard-urlbar.css";
@import "custom/windows-swapclose.css";
Expand Down
3 changes: 3 additions & 0 deletions custom/enabletabview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#alltabs-button.toolbarbutton-1 {
visibility: visible !important;
}
3 changes: 3 additions & 0 deletions custom/hideextension.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#unified-extensions-button{
display:none !important;
}
15 changes: 15 additions & 0 deletions custom/singletabhidden.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* From user @luan https://github.com/AdamXweb/WhiteSurFirefoxThemeMacOS/issues/52#issuecomment-1120470140 */

#tabbrowser-tabs, #tabbrowser-tabs arrowscrollbox {
height: auto !important;
padding: 0 !important;
}

#TabsToolbar {
min-height: 0 !important;
}

#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]),
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"]:not([pinned]) ~ #titlebar {
display: none;
}
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ readonly REPO_DIR="$(pwd)"
source "${REPO_DIR}/lib-install.sh"

# Get options.
while getopts 'c,w:f:l:u:n,r' flag; do
while getopts 'c,w,u,n,v,e,s,r:f:l' flag; do
case "${flag}" in
c ) TABSWAP=true;;
w ) WINDOWSWAP=true;;
f ) FIREFOX_DIR_HOME="${OPTARG}";;
l ) FIREFOX_DIR_HOME=~/.mozilla/firefox/;;
u ) URLBAR=true;;
n) NOLINE=true;;
v) TABVIEW=true;;
e) HIDEEXTENSION=true;;
s) NOTABSINGLE=true;;
r ) REMOVE=true;;
esac
done
Expand Down
31 changes: 20 additions & 11 deletions lib-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,40 @@ if [ "$WINDOWSWAP" = true ] ; then
cp -rf "${REPO_DIR}/custom/windows-swapclose.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Window CSD swapped"
fi
# If custom tab icons are wanted
if [ "$TABICONS" = true ] ; then
cd "${REPO_DIR}"
echo "Enabling custom tab icons"
cp -rf "${REPO_DIR}/custom/tabicons.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Custom tab icons enabled"
fi
# if no animation on URL bar is desired
if [ "$URLBAR" = true ] ; then
echo "Removing URL bar animation"
cd "${REPO_DIR}"
echo `pwd`
echo "${REPO_DIR}"
cp -rf "${REPO_DIR}/custom/standard-urlbar.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Standard URL bar configured"
fi
# if no identity line icon is wanted
if [ "$NOLINE" = true ] ; then
echo "Removing Facebook / Multi account Identity line"
cd "${REPO_DIR}"
echo `pwd`
echo "${REPO_DIR}"
cp -rf "${REPO_DIR}/custom/noidentity.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "No identity lines configured"
fi
if [ "$TABVIEW" = true ] ; then
cd "${REPO_DIR}"
echo "Re-enabling tab view button"
cp -rf "${REPO_DIR}/custom/enabletabview.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Tab view button enabled"
fi
# If the extension panen is to be hidden
if [ "$HIDEEXTENSION" = true ] ; then
cd "${REPO_DIR}"
echo "Enabling hidden extension button"
cp -rf "${REPO_DIR}/custom/hideextension.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Extension button hidden"
fi
if [ "$NOTABSINGLE" = true ] ; then
cd "${REPO_DIR}"
echo "Enabling single tab minimal view"
cp -rf "${REPO_DIR}/custom/singletabhidden.css" "${FIREFOX_DIR_HOME}/"*"default-release/chrome/WhiteSur/custom"
echo "Single tab minimal view enabled"
fi

# Copy settings to enable stylesheets in firefox automatically.
for d in "${FIREFOX_DIR_HOME}/"*"default-release"; do
echo "user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);" >> "${d}/prefs.js"
Expand Down

0 comments on commit 9c94448

Please sign in to comment.