This script was inspired by PWAsForFirefox.
Firebox(working title) is shell script to make Firefox emulate app browsers like Ferdi or Rambox. But, instead of a heavy chromium-based application, it is a 17Kb shell script, an existing installation of Mozilla Firefox(if you use firefox, that is) and some basic GNU utilities like grep
, sed
and xargs
.
The primary motivation for this project is that programs like Ferdi and Rambox don't have a proper CLI, lacking essential features(for me, at least) like launching individual services from the command line.
Also, there is the chromium of it all. I use Firefox as my primary browser and I don't particularly notice any differences using modern apps like Discord and Whatsapp in Firefox compared to Chromium.
Firebox creates a profile, separate from your existing firefox profiles, in your $HOME/.local/share/
directory. You create new services by creating bookmarks in this newly created profile and workspaces using these existing services. These services and workspaces can then be launched and managed using the CLI.
- Create and manage services by reading in Firefox bookmarks.
- Individually launch one or more services straight from the command line.
- Create groupings of services or
workspaces
, that can be launched and managed from the command line.
firefox
grep
sed
xargs
sqlite3
Clone this repo(git clone https://github.com/vishalbalaji/firebox
) or manually download the necessary files and place the firebox
script in a directory present in your PATH
. Then, make the script executable using:
chmod +x /path/to/firebox
You can run firebox --help
to print out a list of available commands. Same goes for all available commands(for example, firebox service --help
).
You need to initialize firebox
before being able to add services. You can do so by running firebox init
.
To add new services, you can run firebox explorer
. This will open up a browser window where you can browse websites and create or delete bookmarks. Once you close the explorer
window, you will then be shown a list of changes and prompted as to whether you want to write these changes.
The bookmarks that you added will be saved as services. You can then list all available services by running firebox service list
and launch those services using firebox service launch <service-1> <service-2>...
.
create.mp4
service.mp4
You can create and manage Workspaces like in Ferdi using the firebox workspace
command.
- To create a workspace, run
firebox workspace create <workspace-name>
. - To add services to a particular workspace, run
firebox workspace add <workspace-name> <service-1> <service-2>...
. - To list a workspace and its services, run
firebox workspace list <workspace-name>
. You can also runfirebox workspace list --all
to list all workspaces. - To launch a workspace, run
firebox workspace launch <workspace-name>
. - To remove services to a particular workspace, run
firebox workspace remove <workspace-name> <service-1> <service-2>...
. - To delete a workspace, run
firebox workspace delete <workspace-name>
.
workspace.mp4
If you want to delete the created profile and all related files, you can do so by using Firefox's Profile Manager
. Simply run firefox -ProfileManager
, select the profile named firebox
, click on Delete Profile
and then Delete Files
.
clean.mp4
firebox
also exposes an option called config
, which is used to access data used internally which can be used to write custom scripts using firebox. More information about this option is available by running: firebox config -h
. Some examples of custom scripts written around firebox
are demonstrated below.
A wrapper script around firebox
using fzf
. This allows for a few more handy features, such as fuzzy searching, multi-selection, etc. This script acts as a wrapper around fzf
, so any flags passed to this command will be passed down to fzf
, such as --reverse
or --height
.
- Same requirements as for
firebox
fzf
Make sure that firebox
is in your path and executable and follow the same steps for the firebox_fzf
script.
Running firebox_fzf
will open an fzf
prompt with all the available options from firebox
, except for config
, such as explorer
, service
, workspace
.
A wrapper script around firebox
using dmenu
. This is for if you wish to launch services and workspaces directly without opening a terminal. Like firebox_fzf
, any flags passed to this command will be passed down to dmenu
.
- Same requirements as for
firebox
dmenu
NOTE: This script relies on the TERMINAL
environment variable. By default, it is set to xterm
, but make sure to set it to the terminal emulator of your choice. For example, if you use kitty
, you would set the variable as so:
export TERMINAL=kitty
You can do this in your .xprofile
, .bashrc
or equivalent files so that they are accessible globally. Or, you could export it inline, in case you want to override your current setting like so:
TERMINAL=kitty firebox_dmenu
Make sure that firebox
is in your path and executable and follow the same steps for the firebox_dmenu
script.
Running firebox_dmenu
will open dmenu with all the available options from firebox
, except for config
, such as explorer
, service
, workspace
.
- Completion...?
- Fix bug where text case of names in workspaces and logs don't correspond to the actual service name.
- Better error and log handling.
- Update requirements in
README
.