Permalink
Browse files

Added ne2wm:toggle-sauron

  • Loading branch information...
1 parent d50b177 commit 70e208957664e59a3794afc60e4f75db8b510685 @tkf committed Apr 3, 2012
Showing with 44 additions and 0 deletions.
  1. +43 −0 ne2wm-toggle-sauron.el
  2. +1 −0 ne2wm-toggle.el
View
43 ne2wm-toggle-sauron.el
@@ -0,0 +1,43 @@
+;;; ne2wm-toggle-sauron.el --- sauron utilities for e2wm
+
+;; Copyright (C) 2012 Takafumi Arakaki
+
+;; Author: Takafumi Arakaki
+;; Keywords: tools, window manager
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ne2wm-toggle-core)
+(require 'sauron)
+
+
+;;;###autoload
+(defun ne2wm:toggle-sauron (&optional log-buffer)
+ "Toggle eshell in the current window.
+
+When the prefix argument is given, visit the *Sauron Log buffer*."
+ (interactive "P")
+ (let ((sauron-separate-frame nil)
+ (target-buffer (if log-buffer sr-log-buffer-name sr-buffer-name)))
+ (ne2wm:toggle-buffer-with-callbacks
+ target-buffer
+ #'sauron-start)))
+
+
+(provide 'ne2wm-toggle-sauron)
+;;; ne2wm-toggle-sauron.el ends here
View
1 ne2wm-toggle.el
@@ -25,6 +25,7 @@
(autoload 'ne2wm:toggle-ansi-term "ne2wm-toggle-shell" nil t)
(autoload 'ne2wm:toggle-shell "ne2wm-toggle-shell" nil t)
(autoload 'ne2wm:toggle-eshell "ne2wm-toggle-eshell" nil t)
+(autoload 'ne2wm:toggle-sauron "ne2wm-toggle-sauron" nil t)
(defalias 'ne2wm:toggle-shell-ansi-term 'ne2wm:toggle-ansi-term)

0 comments on commit 70e2089

Please sign in to comment.