1. Summary
I can't find, how I can close all tabs in Firefox Quantum without any manual mouse clicks.
2. Details
(Details for preventing XY Problem)
I am working on several projects. I need always opened tabs for different projects (different tabs for different projects).
When I start working on one of my projects, I want automatically and quickly switch between projects: I press hotkey → all current browser tabs close → project-specific tabs open.
3. Requirements
3.1. Types of tabs
These types of tabs also must be closed:
3.2. Methods
Any methods, where user don't need to click manually to specific button are welcome. For example, it would be nice get expected behavior via any free:
Extension or script (for example, written in AutoHotkey), so that I can close all tabs via:
- Shortcut
- And/or underline access key shortcuts of Firefox menu or context menu
CLI commands
But click to specific buttons in Firefox toolbars is not expected. Reason — I don't find, how I can write the script, that can automatically clicks to specific button (but if you know, how do it, please, make an answer).
3.3. No clicking to specific coordinates
Yes, for example, I can install Close All Tabs Button
extension → get x
and y
coordinates of this extension button → set via AutoHotkey automatically clicking to these coordinates.
But this is not better solution. I can:
- Add, remove and move buttons in Firefox toolbar.
- Resize Firefox windows.
Coordinates will be shifted in these cases.
3.4. No auto-adding to groups
I tried some Firefox tabs organizers/tabs managers. They have a common non-expected behavior.
I created tab groups of my projects → I added required URLs for each group → I opened any new tabs in browser → this tabs automatically added to one of groups.
I don't need to automatically add random tabs to groups. Groups must contain a specific set of tabs; adding, editing and removing tabs of groups must be solely manually in my case.
3.5. Stay in current Firefox profile
I can programmatically close Firefox → then open new Firefox instance with specific tabs as this:
firefox -P "SashaChernykh" --new-tab -url https://KiraGoddess.com --new-tab -url https://KiraGreatest.com
But in this case pinned tabs from previous session will be preserve in new instance.
I can't find, how I can solve this problem. Yes, I can open new tabs use new Firefox profile, but, possibly, it a not good idea. I'll have to configure and update settings, extensions, bookmarks and so on for each profile. Its additional work, whereas one profile is enough for me.
It would be nice close all tabs, stay in current Firefox profile.
4. Not helped
4.1. Close all tabs extensions
4.1.1. Doesn't close pinned and current tabsSee 3.1 item, why it not expected.
4.1.2. No hotkeys and/or menu itemsSee 3.2 item, why it not expected.
4.1.3. BothBoth problems: Doesn't close pinned and current tabs
and No hotkeys and/or menu items
.
4.2. Tabs organizers
4.2.1. Non-free 4.2.2. Auto-adding to groupsI described this problem in 3.4 item.
- Simple Tab Groups
- Tab Workspaces
- Tab Manager
- Power Tabs
- Panorama Tab Groups
- Tab Manager Plus for Firefox
- Conex
- Tab Group Switch
Use these extensions, I can close all previous tabs and open new; but manual mouse clicks required. See 3.2 item for details.