Skip to content

Instantly share code, notes, and snippets.

Full-screen magit and restore windows on quit

This allows you to be working with split windows on a project, start magit in full-screen with magit-status, and return to your previous configuration after quitting magit with q.

(defadvice magit-status (around magit-fullscreen activate)
  (window-configuration-to-register :magit-fullscreen)
  ad-do-it
  (delete-other-windows))
(defadvice magit-mode-quit-window (around magit-restore-screen activate)
@sjrmanning
sjrmanning / gist:02c6536923c13871ce53
Created July 2, 2015 08:51
Start magit or monky depending on repository found in buffer-local working directory.
(defun process-exit-code-and-output (program &rest args)
"Run PROGRAM with ARGS and return the exit code and output in a list."
(with-temp-buffer
(list (apply 'call-process program nil (current-buffer) nil args)
(buffer-string))))
(defun magit-or-monky-status ()
"Call `magit-status' or `monky-status' depending on whether a
git or hg repository is found in the buffer-local working dir."
(interactive)
from PIL import Image
import sys
def main(argv):
input_file = ''
try:
input_file = argv[0]
except:
print 'usage: iconify.py <inputfile>'
@sjrmanning
sjrmanning / SassMeister-input-HTML.html
Created June 11, 2014 03:09
Generated by SassMeister.com.
<div class="icon"></div>