Communicate between Firefox and Emacs. Because Nyxt is just not there yet.
Caution: Spookfox is in early development and I am making breaking changes all
over the place.
Windows is not supported right now. At this stage I have only tested spookfox
on Linux, but it should theoretically work with Mac as well.
Features
Chained tabs: use Emacs for tab management
Every time you open a new tab in browser, an org entry is created in
spookfox-saved-tabs-target (details below). The tab and this entry stay in
sync (i.e URL changes are synced, closing the tab removes the org entry),
unless you “unchain” the tab using a button provided in browser.
On “unchain”, the browser tab is free and changes to it (including closing)
aren’t written back to Emacs.
Archived tabs: Maintain tabs as org-mode subtrees
I have a habit of opening too many browser tabs open, many of which I don’t
even visit as often. Although the browser would discard the tab to save
resources, it is still clutter. And too easy to accidentally click on it and
waste precious CPU/RAM.
Using M-x spookfox-save-all-tabs I can quickly capture save all open tabs
into my spookfox.org, and keep only necessary tabs open in browser.
Note: spookfox-save-all-tabs will not close open tabs in browser. You can
have that pleasure yourself.
Organize tabs: as groups
It is possible to create “tab groups” using org-mode tags. Applying a tag on
a tab node will make it a member of that tab-group. Org subtree of tabs can
be organized in any hierarchy as long as the you maintain the integrity of
properties spookfox added to :PROPERTIES: drawer.
M-x spookfox-open-tab and M-x spookfox-open-tab-group can be used to open
a single tab, or all tabs belonging to a group.
Behavior:
If an existing tab is selected
If it is already present in browser, it is focused. Else a new tab is
opened
If you enter a string which don’t match any existing saved tabs
If entered string is a valid http(s) URL, a new tab with this URL is
opened. Else a search with your configured search engine is performed in
the new tab.
Get active tab
(sf--request-active-tab)
I use this to quickly capture notes for what I am reading in Firefox. This is
not an interactive command (i.e you can’t call it with M-x), because what
would you want to do that for?
Installation
There are 3 parts to install spookfox.
Install the browser addon
Download the addon (.xpi file) from releases page, since it is not approved
on Firefox addons yet. Firefox will prompt you to install as soon as you
download it.
Install Emacs package
You can use straight.el to install it directly from where you’ve clone this
repo.
Use Emacs package to install spookfox-native, which is the glue code for
communication b/w Emacs and browser
Once spookfox.el is installed, you can call
src_elisp{spookfox-install-native} interactively (by pressing M-x) in Emacs
to install the final piece. Note this will only work on Linux.
Configuration
Following variables are available to configure some aspects of spookfox.
Spookfox maintains a socket connection with the browser using browser
native-messaging. This connection can sometimes break (e.g because browser
isn’t open, extension isn’t installed etc), to remedy which spookfox tries to
reconnect after an incrementing interval until a connection is established.
spookfox-max-reconnect-retry-interval is the maximum number of seconds
spookfox will wait between two retry attempts.
(setq spookfox-max-reconnect-retry-interval 30)
spookfox-native-installation-dir
This is the directory in which spookfox will download and save
spookfox-native binary (from the releases page).
请发表评论