firetabs is a Bash script that opens URLs from one or more text files in separate Firefox windows. Each file is treated as a distinct session, ensuring its links open in a new window.
- Accepts multiple text files as arguments.
- Opens each file’s URLs in a separate Firefox window.
- Uses
--new-window
for a single URL and--url
for multiple URLs in a file. - Removes empty lines from the input files before processing.
- Displays a list of URLs before opening them.
- Download the script and save it as
firetabs
. - Give it execute permissions:
chmod +x firetabs
- Move it to a directory in your
$PATH
(optional, for global access):sudo cp firetabs /usr/local/bin/
firetabs <file1.txt> [file2.txt ...]
Given two files:
window1.txt
https://example.com
https://another-example.com
window2.txt
https://site1.com
https://site2.com
Running:
firetabs window1.txt window2.txt
Output:
Opening URLs from 'window1.txt':
https://example.com
https://another-example.com
Opening URLs from 'window2.txt':
https://site1.com
https://site2.com
Firefox Behavior:
window1.txt
opens in one new Firefox window with two tabs.window2.txt
opens in another new Firefox window with two tabs.
You can save your currently open Firefox tabs to a text file using browser extensions like Copy All Tab URLs. This allows you to easily reopen them later using firetabs
.
- If a file does not exist, the script prints:
Error: File 'filename.txt' not found.
- If a file is empty or contains no valid URLs:
Error: No URLs found in 'filename.txt'.
- Firefox must be installed and available in the system's
$PATH
. - Bash (typically available on Unix-based systems).