Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gmardom/firefox-mods


https://github.com/gmardom/firefox-mods

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

#+title: Making firefox usable…
#+auto_tangle: t

*Note*: After any change to these files you need to restart firefox for them to
take effect!

* Table of content
:PROPERTIES:
:TOC: :include all :ignore this
:END:

:CONTENTS:
- [[#userchromecss][userChrome.css]]
- [[#namespace][Namespace]]
- [[#remove-items-from-context-menus][Remove items from context menus]]
- [[#userjs][user.js]]
- [[#installation][Installation]]
:END:

* userChrome.css

This file controls how firefox itself looks.

You can preview firefoxe's html skeleton by going to
=view-source:chrome://browser/content/browser.xhtml=.

** Namespace

#+begin_src css :tangle chrome/userChrome.css
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
#+end_src

** Remove items from context menus

#+begin_src css :tangle chrome/userChrome.css
/* #context-undo, /\* undo *\/ */
/* #context-redo, /\* redo *\/ */
/* #context-cut, /\* cut *\/ */
/* #context-copy, /\* copy *\/ */
/* #context-paste, /\* paste *\/ */
/* #context-delete, /\* delete *\/ */
/* #context-selectall, /\* select all *\/ */

#context-sendimage, /* email */
#context-bookmarklink, /* bookmark link */
#context-savelink, /* save link */
#context-copyimage-contents, /* copy image */
#context-take-screenshot, /* take screenshot */
#context-openlinkincontainertab, /* open in container tab */
#context-openlinkintab, /* open link in tab */
#context-openlink, /* open link in new window */
#context-openlinkprivate, /* open link in private window */
#context-searchselect, /* search for */
#context-searchselect-private, /* search for private */
#context-inspect-a11y, /* accessability */
#context-savepage, /* save page */
#context-selectall, /* select all */
#context-viewsource, /* view source */
#context-back, /* back */
#context-forward, /* forward */
#context-reload, /* reload */
#context-bookmarkpage,/* edit this bookmark */
#context-media-playbackrate, /* speed in video menu */
#context-media-loop, /* loop video */
#context-sendvideo, /* email video */
#context-sendaudio, /* email audio */
#context-sendimage, /* email image */
#context-keywordfield /* add a keyword for this search */
{display: none !important;}
#+end_src

* user.js

=user.js= is used to set custom variables inside firefox. To set manually or
preview what can you change type =about:config= in url bar.

#+begin_src js :tangle user.js
// ** Theme Related Options ****************************************************
// userchrome.css usercontent.css activate
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);

// Proton Enabled #127
user_pref("browser.proton.enabled", true);

// Fill SVG Color
user_pref("svg.context-properties.content.enabled", true);

// CSS Blur Filter - 88 Above
user_pref("layout.css.backdrop-filter.enabled", true);

// Restore Compact Mode - 89 Above
user_pref("browser.compactmode.show", true);

// about:home Search Bar
user_pref("browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar", false);

// ** Useful Options ***********************************************************
// Integrated calculator at urlbar
user_pref("browser.urlbar.suggest.calculator", true);
#+end_src

* Installation

To install these you need to find out path to your profile you want to use on
your firefox browser.

To do that:
- type =about:support= in url bar
- search for =Profile Directory=
- copy the profile path
- run =chmod u+x ./install.sh && ./install.sh =

#+begin_src shell :tangle install.sh
#!/usr/bin/env bash

__script_path="$(realpath $0)"
__script_path="${__script_path%/*}"

__profile_path="$1"

if [[ -z ${__profile_path} ]]; then
printf "You need to specify your profile path!\n" 1>&2
exit 1
fi

# Link chrome folder

if [[ -d ${__profile_path}/chrome ]]; then
printf 'Moving "/chrome/" -> "/chrome.old/"\n' 1>&2
mv -f ${__profile_path}/chrome ${__profile_path}/chrome.old
fi

printf 'Linking "/chrome/" -> "/chrome/"\n' 1>&2
ln -s ${__script_path}/chrome ${__profile_path}/chrome

# Link user.js

if [[ -e ${__profile_path}/user.js ]]; then
printf 'Moving "/user.js" -> "/user.js.old/"\n' 1>&2
mv -f ${__profile_path}/user.js ${__profile_path}/user.js.old
fi

printf 'Linking "/user.js" -> "/user.js"\n' 1>&2
ln -s ${__script_path}/user.js ${__profile_path}/user.js
#+end_src