/reaper

Primary LanguageClojure

A shell command to quickly kill off all the unnecessary browser tabs one accumulates.

Works on Macs with Chrome, Brave, and maybe other Chrome-derived browsers.

Uses the Lumo ClojureScript environment: first project I’ve done with that, it’s pretty sweet! No more long startup times! The previous version of this was in JVM-based Clojure and was basically unusable.

Copyright © Hyperphor 2021

Setup

Install Lumo

npm install -g lumo-cljs

Copy =proto-config.cljs= into config.cljs, editing as desired.

npm install -g lumo-cljs
npm install applescript

reaper() {
   pushd /opt/mt/repos/reaper
   lumo -c src -f reaper/core.cljs $1 $2
   popd
}

Use

reaper Kill trash tabs according to the config list reaper <string> List tabs that match <string> reaper <string> true List and kill tabs that match <string>

Development

lumo -c "src"
(require 'reaper.core)
  • TODO This will execute the reaper, which is ugh.

Ideas

  • Use the tools here to build a good self-moniting system (like a bespoke, hackable, open source RescueTime).
  • Customizability, let users config different named sets of trash tabs. I really want to close all my work panes.
  • See https://github.com/babashka/obb for a more developed Clojure/Applescript interop.