よせなべ

プログラミングを入れた鍋にガジェットやゲームなど様々な材料を入れて煮込みます。

Automatorでneovimのアプリケーションを作る

f:id:cpthgli:20170929123927p:plain

概要

neovim単体のアプリケーション(nvim.app)が欲しかったのAutomatorで簡易的に作成しました。
iTermでプロファイル指定でウィンドウを作成し、nvimにファイルの引数を渡して実行しています。
他のコマンドでも行けそうですね。

Automator

  • FileName: nvim.app

シェルスクリプトを実行

  • シェル: /bin/bash
  • 入力の引渡し方法: 引数として
echo 

bashは普段使っていないため、設定がなく起動が爆速で快適。

AppleScriptを実行

on run argv
    tell application "iTerm"
        create window with profile "One Dark(bash)" command "/usr/local/bin/nvim " & item 1 of argv
    end tell
end run

プレビュー

f:id:cpthgli:20170929115618p:plain

アイコンの変更

アイコンもそれっぽくしました。
f:id:cpthgli:20170929115622p:plain

変更の方法は以下のサイトで。 tukaikta.blog135.fc2.com

icnsファイルはpngから作成できます。 https://iconverticons.com/online/iconverticons.com