Skip to content

Instantly share code, notes, and snippets.

@tanaka51
Last active December 22, 2015 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanaka51/6458494 to your computer and use it in GitHub Desktop.
Save tanaka51/6458494 to your computer and use it in GitHub Desktop.
Emacs meets tmux!
;;; mugicha.el --- Emacs meets tmux!
;; Author: Koichi TANAKA <tanaka51.jp@gmail.com>
;; This file is *NOT* part of GNU Emacs.
;;; Code:
(eval-when-compile (require 'cl))
(defgroup mugicha nil
"emacs meets tmux"
:group 'convenience
:prefix "mugicha:")
(defcustom mugicha:popup-window-size 30
"passing to split-window's -p option"
:type 'number
:group 'mugicha)
;;;###autoload
(defun* mugicha:popup-pane-bottom (&key (percent mugicha:popup-window-size)
command)
(interactive)
(let ((cmd "tmux split-window -v"))
(setq cmd (concat cmd (format " -p %d" percent)))
(when command
(setq cmd (concat cmd (format " '%s'" command))))
(shell-command-to-string cmd)))
;;;###autoload
(defun mugicha:popup-pane-bottom-with-command (command)
(interactive "sEnter command: ")
(mugicha:popup-pane-bottom :command command))
(provide 'mugicha)
;;; mugicha.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment