[toc]
- Open Firefox.
- In the URL (address) bar, type
about:config
and press theEnter
key. - A warning message would turn up, Proceed with Caution. Press the
Accept the Risk and Continue
button. - In the search bar that turns up in the new page, type
ui.textSelectBackgroundAttention
. - Change the default value type by clicking on the radio box labelled
String
. - Then click on the
+
button on the right hand side to input a HEX colour code (include the#
symbol prefix). - That's it! Close the
about:config
page, and try outCtrl+F
. Your chosen colour should be displayed now :D
Since there is no real help or documentation how to style the new Firefox Beta 57 I found a way how to live-debug the userChrome.css file.
Create the userChrome.css
- Enable userChrome.css support in Fx v69+
- Open about:support
- Click on "Profile Folder" -> "Open Folder"
- Create a sub-folder named "chrome"
- Change into the new folder
- Create a file named "userChrome.css"
- Add some rules
- Restart Firefox
Live-Testing styles
Pre-setup
Before being able to try styles, you need to enable two developer options (only do this once). To do that:
- Press Ctrl + Shift + I on Win/Linux or Cmd + Opt + I on Mac
- Click on the cog that appears in a right or left top corner, next to other buttons.
- Scroll down to Advanced Settings and check the settings "Enable browser chrome and add-on debugging toolboxes" and "Enable remote debugging".
- Close the developer tools panel and proceed with next tutorial
Testing a style
- Press Ctrl + Alt + Shift + I on Win/Linux or Cmd + Opt + Shift + I on Mac
- A permission dialog will prompt you to allow remote debug, accept
- Click on the tab Style Editor, choose file userChrome.css on the sidebar
- Choose the style you want to preview from this repository, copy the code
- Scroll down on the development tools window textbox, paste the code
- You should see the style being applied. If you like what you see, you can click Save, otherwise it will disappear after restarting the browser.
Styling Context Menus / Popups
from /u/DanTheMan74 The Firefox dev tools, when they're opened for remote debugging of the browser content, have an extra option that's hidden behind the dropdown at the top right, a thing which many people have no clue about.
The toggle is called Disable Popup Auto-Hide and it does exactly what it says. By default Firefox (popup) menus disappear when you use the element picker, but you can make them stay around by activating this setting. This makes finding elements and their ids or classes much simpler.
Reference: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox https://developer.mozilla.org/en-US/docs/Tools/Style_Editor
Minimal Functional Fox or Minimal Functional Fox (Fork)
-
Create a
.bat
or.cmd
file with yourDOSKEY
commands. -
Run (Win+R)
regedit
and go toHKEY_CURRENT_USER\Software\Microsoft\Command Processor
. For Windows 10, go toHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
instead. -
Add String Value entry with the name
AutoRun
and the full path of your.bat
or.cmd
file.For example,
%USERPROFILE%\alias.cmd
, replacing the initial segment of the path with%USERPROFILE%
is useful for syncing among multiple machines. -
An example of how to do this:
- Create a
.bat
file and paste this in:doskey np=notepad++.exe $*
- Now copy the full path of this file from File Explorer's URL bar, e.g.
C:\Users\YourUsername\Documents\MyBatchFile.bat
and follow steps 2 and 3.
- Create a
-
And you're done! Now if you're in
cmd
, type incmd
to restart your terminal. Else, if inPowerShell
type in. $profile
to source your user profile (similar to. .bashrc
in Ubuntu) again. This should add your newly created alias(es) to the current and future sessions.Credits go to everyone providing detailed answers in Aliases in Windows command prompt.
- Add the following to
.profile
(store this file in your user folder%USERNAME%
or somewhere safe, and add it toPATH
for convenience):
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }
agent_load_env
# agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
ssh-add
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
ssh-add
fi
unset env
- Running
. .profile
in Git Bash will request your SSH passphrase, so enter that and you're set for the entire session. This is not a persistent on boot solution.
Credits go to velval on Superuser SE and GitHub article for reference.