summaryrefslogtreecommitdiff
path: root/view-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-02-08 23:36:26 +0800
committerJSDurand <mmemmew@gmail.com>2021-02-08 23:36:26 +0800
commit393604e5bf4ce15df7342fdc094900fd1be2b39f (patch)
treed7b1e77cfe27b3ffa347fa2e9db632d97dfe7dc1 /view-conf.el
parentc8d4224e42a710b262e8ba67d720f6eff4e89fcb (diff)
Constantly growing
A lot of improvements.
Diffstat (limited to 'view-conf.el')
-rw-r--r--view-conf.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/view-conf.el b/view-conf.el
index 0f0ef29..47ee35d 100644
--- a/view-conf.el
+++ b/view-conf.el
@@ -98,6 +98,8 @@ If ARG is '(16), view the battery information."
(define-key map (vector ?t) #'durand-view-timers-or-temps)
(define-key map (vector ?e) #'eshell)
(define-key map (vector ?p) #'durand-chercher-pdf)
+ (define-key map (vector ?o) #'olivetti-mode)
+ (define-key map (vector ?r) #'choose-recent-file)
map)
"The keymap that is related to my custom functions about viewing.")
@@ -106,6 +108,7 @@ If ARG is '(16), view the battery information."
(require 'view)
(define-key view-mode-map (vector 108) #'recenter-top-bottom)
+(define-key view-mode-map (vector 76) #'reposition-window)
(define-key view-mode-map (vector ?j) #'View-scroll-line-forward)
(define-key view-mode-map (vector ?k) #'View-scroll-line-backward)
@@ -119,7 +122,11 @@ If ARG is '(16), view the battery information."
"https://www.gmail.com"
"https://www.facebook.com"
"https://protesilaos.com"))
- (list "Terminal" "open" "-a" "Terminal" -1))
+ (list "Terminal" "open" "-a" "Terminal" (list
+ "/Users/durand/Desktop/Centre/Vidéos/"
+ "/Users/durand/Desktop/Centre/Musique/"
+ "/Users/durand/Downloads/"))
+ (list "Messenger" "open" "-a" "Messenger"))
"Targets to open by `durand-open-object'.
This is an association list whose elements have `car' equal to
@@ -132,7 +139,6 @@ targets.")
;;;###autoload
(defun durand-target-extra-arg (target)
"Determine if TARGET has room for extra arguments.
-
This returns the list of extra argument slots, or nil if there is
none."
(let (temp result)
@@ -140,7 +146,8 @@ none."
(setq temp (car target))
(setq target (cdr target))
(cond
- ((eq temp -1)
+ ;; We shall not test numbers by `eq'.
+ ((equal temp -1)
(setq result (cons -1 result)))
((consp temp)
(setq result (cons temp result)))))
@@ -149,7 +156,6 @@ none."
;;;###autoload
(defun durand-replace-extra-args (target extra-args)
"Replace slots for extra-args in TARGET by EXTRA-ARGS.
-
This does not check if the lengths match, though in theory they
should.
@@ -170,11 +176,10 @@ And this will delete any `nil' values from the result."
;;;###autoload
(defun durand-open-object (&optional arg)
"Open something.
-
What can be opened is controlled by the variable
`durand-open-targets'.
-If ARG is non-nil, and if the chosen target contains `-1' in the
+If ARG is non-nil, and if the chosen target contains -1 in the
command line options, then read a string to replace that -1. If
the chosen target has a sub-list, then use that sub-list as
options to choose from."