Last active
December 22, 2015 10:28
-
-
Save tanaka51/6458494 to your computer and use it in GitHub Desktop.
Emacs meets tmux!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; mugicha.el --- Emacs meets tmux! | |
;; Author: Koichi TANAKA <[email protected]> | |
;; 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