Skip to content

Zirafnik/firetabs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

firetabs - Easily Open Firefox Tabs Saved in a Text File

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.

Features

  • 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.

Installation

  1. Download the script and save it as firetabs.
  2. Give it execute permissions:
    chmod +x firetabs
  3. Move it to a directory in your $PATH (optional, for global access):
    sudo cp firetabs /usr/local/bin/

Usage

firetabs <file1.txt> [file2.txt ...]

Example

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.

Saving Open Tabs to a Text File

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.

Error Handling

  • 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'.
    

Dependencies

  • Firefox must be installed and available in the system's $PATH.
  • Bash (typically available on Unix-based systems).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages