summaryrefslogtreecommitdiff
path: root/view-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-08-12 15:24:45 +0800
committerJSDurand <mmemmew@gmail.com>2021-08-12 15:24:45 +0800
commitef5cba2079842695d24a4626dc831b6124065ac9 (patch)
tree9b26df17f8219aa7bf67606d02574c8300065989 /view-conf.el
parent79ab6c878923f22153c2888fcf01b0fbcfc0fef6 (diff)
new: add outline configurations
Configuring outline-minor-mode, which provides an easy interface to navigate around codes. I mainly use this in Emacs Lisp buffers now. * outline-conf.el (durand-outline-regexp-alist): Each major mode could have a unique outline heading. (durand-outline-blocklist, durand-maybe-enable-outline): Don't enable outline minor mode for derived modes of the major modes in the block list. (outline-minor-mode-highlight): I want to highlight the headings. (outline-minor-mode-cycle): I like the cycling behaviour. (outline-minor-mode-map): Bind my custom key-bindings. * view-conf.el (durand-view-map): Bind to my custom map.
Diffstat (limited to 'view-conf.el')
-rw-r--r--view-conf.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/view-conf.el b/view-conf.el
index ae53f1a..d17bd6c 100644
--- a/view-conf.el
+++ b/view-conf.el
@@ -1,5 +1,6 @@
;;; view-conf.el --- My configurations to view things -*- lexical-binding: t; -*-
+;;; View tmeperatures or timers
;;;###autoload
(defun durand-view-timers-or-temps (&optional arg)
"View the list of timers or view the CPU temperature info.
@@ -21,7 +22,7 @@ If ARG is '(16), view the battery information."
connected
battery-temp)
(with-temp-buffer
-;;; NOTE: First fans information
+;; NOTE: First fans information
(insert (funcall
(plist-get (car (auth-source-search :host "local-computer"))
:secret)))
@@ -37,7 +38,7 @@ If ARG is '(16), view the battery information."
cpu-die-temperature
(progn (re-search-forward "temperature: \\([[:digit:]]+\\.[[:digit:]]+\\)" nil t)
(string-to-number (match-string 1))))
-;;; NOTE: Now battery charge information
+;; NOTE: Now battery charge information
(erase-buffer)
(call-process "system_profiler" nil t nil
"SPPowerDataType")
@@ -56,7 +57,7 @@ If ARG is '(16), view the battery information."
(setf condition (match-string-no-properties 1))
(re-search-forward "Connected: \\(.+\\)$" nil t)
(setf connected (match-string-no-properties 1))
-;;; NOTE: Now battery temperature
+;; NOTE: Now battery temperature
(erase-buffer)
(call-process "ioreg" nil t nil "-n" "AppleSmartBattery" "-r")
(goto-char (point-min))
@@ -106,6 +107,7 @@ If ARG is '(16), view the battery information."
(define-key map (vector ?c) #'calendar)
(define-key map (vector ?r) #'choose-recent-file)
(define-key map (vector ?n) #'novel)
+ (define-key map (vector ?O) #'durand-maybe-enable-outline)
(define-key map (vector ?w) #'durand-eww-map)
map)
"The keymap that is related to my custom functions about viewing.")