Skip to content

Instantly share code, notes, and snippets.

@timuruski
Created October 30, 2013 15:06
Show Gist options
  • Save timuruski/7234209 to your computer and use it in GitHub Desktop.
Save timuruski/7234209 to your computer and use it in GitHub Desktop.
#! /bin/bash
# Summons a Quicklook window and then returns focus to the terminal.
#
# TODO: Support other terminal emulators
#
# Usage:
# $ ql ~/example.jpg
set -e
function focus() {
osascript -e 'tell app "iTerm" to activate'
}
function quicklook() {
qlmanage -p $1 > /dev/null 2>&1
}
quicklook $1; focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment