diff options
-rw-r--r-- | emacs.d/lib/funcs.el | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/emacs.d/lib/funcs.el b/emacs.d/lib/funcs.el index 0714888..bb7d211 100644 --- a/emacs.d/lib/funcs.el +++ b/emacs.d/lib/funcs.el @@ -90,6 +90,29 @@ Visit the file after creation." (defun fc/start-nest-tmp-file (file-name) "Create a file in ~/tmp on nest for the give file name." (interactive "sName of the temporary file: ") - (fc/start--file (expand-file-name (format "/nest:~/tmp/%s" file-name)))) + (fc/start--file (expand-file-name (format "/nest.smfc.twitter.com:~/tmp/%s" file-name)))) + +;; open dired buffer with tramp on remote host +(defun fc/remote--dired (host) + "Open dired on a remote host." + (dired (concat "/" host ":"))) + +(defun fc/remote-nest-dired () + "Open dired on nest." + (interactive) + (fc/remote--dired "nest.smfc.twitter.com")) + +;; un/monitor hosts by running mth remotely +(defun fc/silence-host (host) + (interactive "sHostname: ") + (let ((default-directory "/ssh:nest.smfc.twitter.com:")) + (start-file-process "mth" (get-buffer-create "*mth*") + "/usr/local/bin/mth" "silence" host "99 years"))) + +(defun fc/unsilence-host (host) + (interactive "sHostname: ") + (let ((default-directory "/ssh:nest.smfc.twitter.com:")) + (start-file-process "mth" (get-buffer-create "*mth*") + "/usr/local/bin/mth" "unsilence" host))) (provide 'funcs) |