diff --git a/files/firefoxChrome/chrome/LICENSE b/files/firefoxChrome/chrome/LICENSE new file mode 100644 index 0000000..c191c23 --- /dev/null +++ b/files/firefoxChrome/chrome/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-2020 mut-ex + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/files/firefoxChrome/chrome/README.md b/files/firefoxChrome/chrome/README.md new file mode 100644 index 0000000..68eddca --- /dev/null +++ b/files/firefoxChrome/chrome/README.md @@ -0,0 +1,102 @@ +# minimal-functional-fox + +> ###### *A minimal, yet functional configuration for Firefox!* + +![Demo](https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/demo.gif) + +[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org) +------ +## Features + +- Minimal bloat (non-crucial icons and decorations hidden) + +- Easy way to tweak fonts, colors, and spacings to your liking through CSS variables + +- Tab list below toolbar + +- Tab(s) with sound playing highlighted with a different color + +- Centered URL bar with narrow-er results list + +- And more! + +------ + +## Prerequisites + +* Verify that the user **stylesheets (userChrome)** option is enabled: + 1. Go to the address `about:config` in Firefox + + 2. Search for `toolkit.legacyUserProfileCustomizations.stylesheets` + + 3. Confirm the option is set to **true** + + + +* Make sure that you have the **Default** theme enabled + 1. Go to the address `about:addons` + 2. **Enable** the **Default** theme if not already enabled + + +------ + +## Installation + +### Quick Install + +You can quickly install minimal functional fox via the command-line by using `curl`: + +```bash +sh -c "$(curl -fsSL https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/install.sh)" +``` + +It is a good idea to inspect the install script for projects you aren't familiar with. To do that, you can download the install script separately, go through it to make sure everything looks OK, then go ahead and run it once you are satisfied: + +```bash +curl -Lo install.sh https://raw.githubusercontent.com/mut-ex/minimal-functional-fox/master/install.sh +sh install.sh +``` + +**Note:** The install script will create a backup of your existing `userChrome.css`, and `userContent.css` files by renaming them to `userChrome.css~`, and `userContent.css~` respectively in the chrome directory. + +### Manual Install + +If quick install does not work, or if you simply prefer to; you can manually install minimal functional fox through the following steps: + +1. Locate your Firefox user directory. You should be able to find it by navigating to `/home/.mozilla/firefox/` and looking for a directory ending with the world `.default-release`. +2. Within your Firefox user directory, locate the `chrome` directory, if one does not already exist you can simply go ahead and create it yourself. +3. Download the contents of this repository, and copy *all* the files to the chrome directory within your Firefox user directory. + +After installation, restart Firefox to see the effects. + +------ + + +## Recommended Tweaks + +* Select the **Customize** option from the **hamburger menu** **(≡)**, and remove all items except for: + * Forward button + * Back button + * Downloads button +* The new tab page extension is called **nightTab**. [You can can find it here](https://addons.mozilla.org/en-US/firefox/addon/nighttab/) + +------ + +## Customizing + +You can easily tweak the theme by changing the relevant CSS variables, starting with `--mff-` located within the :root section at the top of the `userChrome.css` file. + +```css + :root { + /* Minimal Functional Fox variables*/ + --mff-bg: #293241; + --mff-icon-color: #e0fbfc; + --mff-nav-toolbar-padding: 8px; + /* + ... + ... + ... + */ +} +``` + diff --git a/files/firefoxChrome/chrome/add.svg b/files/firefoxChrome/chrome/add.svg new file mode 100644 index 0000000..cb34a19 --- /dev/null +++ b/files/firefoxChrome/chrome/add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/files/firefoxChrome/chrome/demo.gif b/files/firefoxChrome/chrome/demo.gif new file mode 100644 index 0000000..0cf20d3 Binary files /dev/null and b/files/firefoxChrome/chrome/demo.gif differ diff --git a/files/firefoxChrome/chrome/install.sh b/files/firefoxChrome/chrome/install.sh new file mode 100755 index 0000000..54e94e8 --- /dev/null +++ b/files/firefoxChrome/chrome/install.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +echoerr() { printf "%s\n" "$*" >&2; } + +download_mff() { + echoerr " [>>] Downloading..." + + curl -LJ0 https://github.com/mut-ex/minimal-functional-fox/archive/master.tar.gz | tar -xz -C /tmp/ + + if [[ $? -eq 0 ]]; then + echoerr " [>>] Copying..." + + USERCHROME="/tmp/minimal-functional-fox-master/userChrome.css" + USERCONTENT="/tmp/minimal-functional-fox-master/userContent.css" + cp -r --backup=simple -t $CHROME_DIRECTORY $USERCHROME $USERCONTENT + rm -f USERCHROME USERCONTENT + cp -r /tmp/minimal-functional-fox-master/* $CHROME_DIRECTORY + + if [[ $? -eq 0 ]]; then + rm -rf /tmp/minimal-functional-fox-master + else + echoerr " [!!] There was a problem copying the files. Terminating..." + return 1 + fi + else + echoerr " [!!] There was a problem downloading the files. Terminating..." + return 1 + fi + cat <<-'EOF' + _ _ _ + _ __ ___ (_)_ __ (_)_ __ ___ __ _| | + | '_ ` _ \| | '_ \| | '_ ` _ \ / _` | | + | | | | | | | | | | | | | | | | (_| | | + |_|_|_| |_|_|_| |_|_|_| |_| |_|\__,_|_| _ + / _|_ _ _ __ ___| |_(_) ___ _ __ __ _| | + | |_| | | | '_ \ / __| __| |/ _ \| '_ \ / _` | | + | _| |_| | | | | (__| |_| | (_) | | | | (_| | | + |_|_ \__,_|_| |_|\___|\__|_|\___/|_| |_|\__,_|_| + / _| _____ __ + | |_ / _ \ \/ / + | _| (_) > < + |_| \___/_/\_\ + +EOF + echoerr " Installation successful! Enjoy :)" +} + +MOZILLA_USER_DIRECTORY="$(find ~/.mozilla/firefox -maxdepth 1 -type d -regextype egrep -regex '.*[a-zA-Z0-9]+.default-release')" + +if [[ -n $MOZILLA_USER_DIRECTORY ]]; then + # echoerr "mozilla user directory found: $MOZILLA_USER_DIRECTORY" + + CHROME_DIRECTORY="$(find $MOZILLA_USER_DIRECTORY -maxdepth 1 -type d -name 'chrome')" + + if [[ -n $CHROME_DIRECTORY ]]; then + # echoerr "chrome directory found: ""$CHROME_DIRECTORY" + download_mff + else + echoerr " [>>] No chrome directory found! Creating one..." + mkdir $MOZILLA_USER_DIRECTORY"/chrome" + if [[ $? -eq 0 ]]; then + CHROME_DIRECTORY="$MOZILLA_USER_DIRECTORY/chrome" + # echoerr "Directory succesfully created" + download_mff + else + echoerr " [!!] There was a problem creating the directory. Terminating..." + exit 1 + fi + fi + +else + echoerr " [!!] No mozilla user directory found. Terminating..." + exit 1 +fi diff --git a/files/firefoxChrome/chrome/left-arrow.svg b/files/firefoxChrome/chrome/left-arrow.svg new file mode 100644 index 0000000..09199f0 --- /dev/null +++ b/files/firefoxChrome/chrome/left-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/files/firefoxChrome/chrome/right-arrow.svg b/files/firefoxChrome/chrome/right-arrow.svg new file mode 100644 index 0000000..b068928 --- /dev/null +++ b/files/firefoxChrome/chrome/right-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/files/userChrome.css b/files/firefoxChrome/chrome/userChrome.css similarity index 100% rename from files/userChrome.css rename to files/firefoxChrome/chrome/userChrome.css diff --git a/files/firefoxChrome/chrome/userChrome.css~ b/files/firefoxChrome/chrome/userChrome.css~ new file mode 100644 index 0000000..729296d --- /dev/null +++ b/files/firefoxChrome/chrome/userChrome.css~ @@ -0,0 +1,93 @@ +/* material firefox imports */ +@import "global/variables.css"; +@import "global/global.css"; +@import "icons/icons.css"; +@import "tabbar/tabbar.css"; +@import "navbar/navbar.css"; +@import "personalbar/personalbar.css"; +@import "popup/popup.css"; +@import "urlbar/urlbar.css"; +@import "findbar/findbar.css"; + +:root { + --initial-width : 70px; /* initial width of the sidebar */ + --sidebar-width : 250px; /* expanded width of the sidebar */ + --toolbar-height : 0; + --menubar-height : 0; + --toolmenubar-height: -40px; /* sum of previous two */ + --shadow-color : #28282F; /* shadow color. set to #00000000 for no shadow. same as folder color from hntp and tab-hover color from tst*/ +} + +/* show bookmarks toolbar on new tab only */ +#main-window #PersonalToolbar { + visibility : collapse !important; + z-index : 1!important; + position : relative!important; + margin-left: var(--initial-width); /* shift toolbar to the right based on initial width */ + margin-top : var(--toolbar-height) !important; +} + +#main-window[title^="Firefox Developer Edition"] #PersonalToolbar { + visibility: visible !important; + margin-top: -1px !important; +} + +/* +There's two main sidebar components. +1. #sidebar-box (outer) +2. #sidebar (inner) +*/ +/* lock outer to height by doing the inverse margin of the toolbar element */ +/* set outer width = initial width */ +#sidebar-box { + z-index : 1000 !important; + position : relative!important; + margin-top : var(--menubar-height) !important; + padding-top : calc(-1*var(--menubar-height)); + border-radius: 0 5px 0px 0; + min-width : var(--initial-width) !important; + max-width : var(--initial-width) !important; +} + +/* inner width = expanded width & move inner to only show initial-width long section */ +#sidebar-box #sidebar { + min-width : var(--sidebar-width) !important; + max-width : var(--sidebar-width) !important; + transform : translateX(calc(var(--initial-width) - var(--sidebar-width))) !important; + border-radius: 0 3px 0px 0; + transition : all 0.2s ease-in-out; +} + +/* move inner to show entire sidebar */ +#sidebar-box #sidebar:hover { + transform : translateX(0) !important; + box-shadow: 2px 0 33px var(--shadow-color); +} + +#main-window[title^="Firefox Developer Edition"] #sidebar-box { + margin-top: var(--toolmenubar-height) !important; +} + +/* hide sidebar header for tree style tabs sidebar */ +#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + display: none; +} + +/* Hide the title bar */ +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* to hide the native tabs */ +#TabsToolbar { + visibility: collapse; +} + +/* to hide the sidebar header */ +#sidebar-header { + visibility: collapse; +} +/* Hide splitter, when using Tree Style Tab. */ +#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter { + display: none !important; +} + + diff --git a/files/firefoxChrome/chrome/userContent.css b/files/firefoxChrome/chrome/userContent.css new file mode 100644 index 0000000..826998d --- /dev/null +++ b/files/firefoxChrome/chrome/userContent.css @@ -0,0 +1,23 @@ +@import url("userChrome.css"); + +/* Removes white loading page */ +@-moz-document url(about:blank), url(about:newtab), url(about:home) { + html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { + background: var(--mff-bg) !important; + } + } + + + /* Hide scrollbar */ + + :root{ + scrollbar-width: none !important; + } + + + @-moz-document url(about:privatebrowsing) { + + :root{ + scrollbar-width: none !important; + } + } \ No newline at end of file