Skip to content

Instantly share code, notes, and snippets.

@rpapallas
rpapallas / instructions.md
Last active June 9, 2024 22:54
Open file into NeoVim on macOS from Finder

Create a script that will allow macOS to open a source code file in iTerm2/Terminal and Vim/NeoVim

  • Open Automator and create a new application. You can name it "TerminalVim"
  • Works with any command basically, just change the following line set q to "nvim " & quote & myPath & quote to match what you want in the code below. For example: set q to "vim " & quote & myPath & quote to use Vim instead of NeoVim.
  • Paste the following code:
on appIsRunning(appName)
    tell application "System Events" to (name of processes) contains appName
end appIsRunning
@bashbunni
bashbunni / .zshrc
Created October 27, 2022 21:41
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"