Skip to content

Instantly share code, notes, and snippets.

@flowerornament
Last active March 20, 2017 21:40
Show Gist options
  • Save flowerornament/b2ab6d5ae7454ea1a987ee85385d8c3d to your computer and use it in GitHub Desktop.
Save flowerornament/b2ab6d5ae7454ea1a987ee85385d8c3d to your computer and use it in GitHub Desktop.
Run sharkdp/insect calculator as a Mac OS X application

Set up scripts

Create two scripts and drop them in a directory – I use ~/bin.

insect-open.bash > ~/bin

#!/usr/bin/env bash

open -a Terminal.app ~/bin/insect.command

insect.bash > ~/bin

#!/usr/bin/env bash

printf '\e[8;35;60t' #resize window
clear
insect

Set Permissions

Run:

  • chmod +x ~/bin/insect.bash
  • chmod +x ~/bin/insect-open.bash

Automator action

  • Open Automator.app and create a new "app"
  • Add a "Run Shell Script" action
  • Set to run "~/bin/insect-open.command"
  • Save as Insect.app in /Applications

Run

Open Insect.app, which will open a new Terminal.app window, resize it, clear the screen, and run insect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment