summarylogtreecommitdiffstats
path: root/emacs-top-mode.install
diff options
context:
space:
mode:
authorAlex Whitt2017-05-06 17:01:29 -0400
committerAlex Whitt2017-05-06 17:01:29 -0400
commit266e9b02f1ed8ff6af2b64907968807335b7a69e (patch)
treebd577cad29ba6d70f165ceffcbbae1a6f2a202f9 /emacs-top-mode.install
downloadaur-emacs-top-mode.tar.gz
Initial commit
Diffstat (limited to 'emacs-top-mode.install')
-rw-r--r--emacs-top-mode.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/emacs-top-mode.install b/emacs-top-mode.install
new file mode 100644
index 00000000000..a9f6223d11a
--- /dev/null
+++ b/emacs-top-mode.install
@@ -0,0 +1,28 @@
+post_install () {
+
+cat << EOF
+
+==> Add this code to your .emacs file to use the mode:
+
+(require 'top-mode)
+
+==> Or, with use-package:
+
+(use-package top-mode)
+
+==> A function to auto-refresh:
+
+(defun top-auto-refresh (rate)
+ (interactive "nTop refresh rate (seconds): ")
+ (progn
+ (cancel-function-timers 'top)
+ (if (not (zerop rate))
+ (setq *top-refresh-timer*
+ (run-with-timer 2 rate 'top)))))
+
+EOF
+}
+
+post_upgrade () {
+ post_install $1
+}