Copyright © 2018 Nicholas Gilbert
shTab is a replacement for the new tab page in Firefox that has shell-like functionality.
Installable from the listing on addons.mozilla.org.
A new tab replacement extension for Firefox 60+ that implements functionality that follows a shell environment like Bash. Implemented to mimic the shell functionality for use in a web browser environment. Contains a suite of a commands that facilitates customization, navigation, and shorthand alias creation.
Developed for anyone that prefers keyboard navigation to frequently accessed sites over mouse-based navigation. Using aliases you can quickly create a packages of links that all open with a single command. Using your already existing bookmarks, you can import into the destination structure and rename them to be shorter and faster to type.
Main Features:
- Alias System
- Tab-Completion
- Persitent Options
- Importing to and Exporting from .json
- ! History Completion and Peristent History
- Bash-like syntax and usage
Tested building on Mint and Ubuntu, but should work on any regular linux distro. The packages may differ and / or may not be in your distro's repositories.
If you don't intend on modifying the extension, it's easiest to install from the Installing from Release section.
nodejs
- Is needed to use npm's web-ext
for running and building. In most standard distro repos.
npm
- Node.js package manager, needed to install the next requirement. In most standard distro repos.
web-ext
- Command line tool for building and running the extension. Install with npm install --global web-ext
. Depending on permission setup, may need to be run as root or through sudo
. See more here
-
Clone the repository and submodule
git clone [email protected]:gilben/shTab.git; cd shTab; git submodule init; git submodule update
-
Testing
You can run the extension in a test version of Firefox usingweb-ext run
in thesrc
directory of the repo (the same directory asmanifest.json
, which whatweb-ext
looks at for extension information). You won't be able to load it in to your actual Firefox setup until: -
Building
Modify thegecko: id
field ofmanifest.json
if you want to eventually sign it. The extension is already signed under the current id, and if a separate verision is to be created, needs to be modified.
You can then package up the current extension usingweb-ext build
in thesrc
directory of the repo. A.zip
is generated in the directoryweb-ext-artifacts
, with the file being named off the verision inmanifest.json
. This file is used in the next step. -
Signing You can temporarily load the
.zip
as is, but it will be removed after the session ends.
For a persistent and actually installed extension, it needs to be signed by Mozilla.
With this, you need to make a profile at addons.mozilla.org.
There are then two ways to create the signed file:a) Upload the
.zip
to addons.mozilla.org underSubmit A New Add-on
. Follow the prompts, and given no validation errors, download a.xpi
file that can be opened with Firefox to install.b) Generate an api key on Mozilla's site. Run
web-ext sign --api-key=$JWTISSUER --api-secret=$JWTSECRET
.
Both $JWTISSUER and $JWTSECRET are fields shown in the API key after generation.
The file gets generated in theweb-ext-artifacts
directory.
These instructions only apply to versions prior to 0.6.4a. 0.6.4a is the first version released on the Mozilla Addons Store
-
Download the install file The install files are located with their associated release tag, found in the Tags section. There you will find the
.xpi
install files. Download the.xpi
to your machine. -
Navigate to where you downloaded the install file
-
Install the extension by opening the
.xpi
file withfirefox
You can install a particular version of the extension using
firefox shtab-$VER-an+fx.xpi
from a command prompt (tested on Linux, potentially also works on MacOS), replacing$VER
with the version you downloaded.The same can be achieved through a file browser (Window, Linux, maybe MacOS) by right-clicking on the
.xpi
file and selecting "Open with..." and choosing firefox.
Install the extension (see above, or the Mozilla Addons Store).
When installed, this extension replaces the new tab page with the shTab prompt, which allows you to enter commands to perform actions.
All commands have an associated help
or man
page that can be ran by entering help $command
or man $command
in the shTab prompt.
You can list all commands with help
or man
with no arguments.
Current Keybinds (may be changeable in the future):
Enter
Process command based on prompt contentUp arrow
Cycle up command historyDown arrow
Cycle down command historyCtrl-L
Jump to address bar (may be dependant on OS, operation known in Ubuntu and Windows 10)
Some work-in-progress documentation is found on the wiki here.
Follow the instructions and forms shown in CONTRIBUTING.md.
The extension requires the following browser permissions to function properly:
- bookmarks
Needed for the importing of bookmarks into destinations - downloads
Needed for the downloading of the exported settings json - history Needed to remove the new tab page itself from history
- storage
Needed to save persistent settings into local storage
This software is licensed under the Mozilla Public License Version 2.0 (MPL-2.0).
Release notes for each version are available in the Tags section.
GetOptions by Alhadis, see repository for licensing information.
[email protected] / [email protected]
Join me on freenode at #shTab.
Find a bug? Add it to the Issue tracker.